Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
d0b73703b3
  1. 10
      .env.test
  2. 2
      src/api/qms/inspectionJob/inspectionJobMain/index.ts
  3. 15
      src/api/qms/inspectionRecord/inspectionRecordMain/index.ts
  4. 2
      src/api/qms/inspectionRequest/index.ts
  5. 3
      src/api/wms/demandforecastingDetail/index.ts
  6. 52
      src/api/wms/demandforecastingMain/index.ts
  7. 2
      src/api/wms/inventorymoveRecordMain/index.ts
  8. 11
      src/api/wms/location/index.ts
  9. 20
      src/api/wms/productionreturnRecordDetail/index.ts
  10. 2
      src/api/wms/productreceiptRecordMain/index.ts
  11. 8
      src/api/wms/purchasePlanDetail/index.ts
  12. 15
      src/components/BasicForm/src/BasicForm.vue
  13. 2
      src/components/Search/src/Search.vue
  14. 12
      src/components/SearchTable/src/SearchTable.vue
  15. 14
      src/components/Table/src/Table.vue
  16. 123
      src/components/TableForm/src/TableForm.vue
  17. 1
      src/locales/zh-CN.ts
  18. 20
      src/utils/auth.ts
  19. 4
      src/utils/dict.ts
  20. 4
      src/views/login/login.vue
  21. 11
      src/views/qms/aql/aql.data.ts
  22. 11
      src/views/qms/counter/counter.data.ts
  23. 11
      src/views/qms/dynamicRule/dynamicRule.data.ts
  24. 14
      src/views/qms/inspectionJob/addForm.vue
  25. 156
      src/views/qms/inspectionJob/index.vue
  26. 23
      src/views/qms/inspectionJob/inspectionJobMain.data.ts
  27. 11
      src/views/qms/inspectionMethod/inspectionMethod.data.ts
  28. 29
      src/views/qms/inspectionQ1/index.vue
  29. 13
      src/views/qms/inspectionQ1/inspectionQ1.data.ts
  30. 13
      src/views/qms/inspectionQ2/inspectionQ2.data.ts
  31. 41
      src/views/qms/inspectionQ3/index.vue
  32. 59
      src/views/qms/inspectionQ3/inspectionQ3.data.ts
  33. 103
      src/views/qms/inspectionRecord/index.vue
  34. 31
      src/views/qms/inspectionRecord/inspectionRecordMain.data.ts
  35. 1
      src/views/qms/inspectionRecordFirst/addForm.vue
  36. 38
      src/views/qms/inspectionRecordFirst/index.vue
  37. 37
      src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts
  38. 11
      src/views/qms/inspectionRequest/index.vue
  39. 75
      src/views/qms/inspectionRequest/inspectionRequestMain.data.ts
  40. 6
      src/views/qms/inspectionScheme/addForm.vue
  41. 11
      src/views/qms/inspectionScheme/inspectionScheme.data.ts
  42. 11
      src/views/qms/inspectionTemplate/inspectionTemplate.data.ts
  43. 11
      src/views/qms/sampleCode/sampleCode.data.ts
  44. 11
      src/views/qms/samplingProcess/samplingProcess.data.ts
  45. 11
      src/views/qms/samplingScheme/samplingScheme.data.ts
  46. 11
      src/views/qms/selectedSet/selectedSet.data.ts
  47. 5
      src/views/system/serialNumber/index.vue
  48. 2
      src/views/system/systemInstallPackage/index.vue
  49. 4
      src/views/system/tenant/index.vue
  50. 7
      src/views/system/user/index.vue
  51. 21
      src/views/wms/agvManage/agvLocationrelation/index.vue
  52. 4
      src/views/wms/basicDataManage/customerManage/customer/customer.data.ts
  53. 13
      src/views/wms/basicDataManage/customerManage/customer/index.vue
  54. 12
      src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts
  55. 16
      src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue
  56. 4
      src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts
  57. 13
      src/views/wms/basicDataManage/customerManage/customerdock/index.vue
  58. 4
      src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts
  59. 13
      src/views/wms/basicDataManage/customerManage/customeritem/index.vue
  60. 13
      src/views/wms/basicDataManage/customerManage/project/index.vue
  61. 4
      src/views/wms/basicDataManage/customerManage/project/project.data.ts
  62. 13
      src/views/wms/basicDataManage/customerManage/saleprice/index.vue
  63. 4
      src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts
  64. 9
      src/views/wms/basicDataManage/documentSetting/businesstype/index.vue
  65. 13
      src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue
  66. 13
      src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue
  67. 13
      src/views/wms/basicDataManage/documentSetting/plansetting/index.vue
  68. 13
      src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue
  69. 13
      src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue
  70. 9
      src/views/wms/basicDataManage/documentSetting/switch/index.vue
  71. 13
      src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue
  72. 4
      src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts
  73. 13
      src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue
  74. 4
      src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts
  75. 13
      src/views/wms/basicDataManage/factoryModeling/dock/index.vue
  76. 3
      src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue
  77. 13
      src/views/wms/basicDataManage/factoryModeling/location/index.vue
  78. 4
      src/views/wms/basicDataManage/factoryModeling/location/location.data.ts
  79. 13
      src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue
  80. 4
      src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts
  81. 13
      src/views/wms/basicDataManage/factoryModeling/process/index.vue
  82. 4
      src/views/wms/basicDataManage/factoryModeling/process/process.data.ts
  83. 13
      src/views/wms/basicDataManage/factoryModeling/productionline/index.vue
  84. 4
      src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts
  85. 13
      src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue
  86. 4
      src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts
  87. 13
      src/views/wms/basicDataManage/factoryModeling/workshop/index.vue
  88. 4
      src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts
  89. 13
      src/views/wms/basicDataManage/factoryModeling/workstation/index.vue
  90. 4
      src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts
  91. 4
      src/views/wms/basicDataManage/itemManage/bom/bom.data.ts
  92. 13
      src/views/wms/basicDataManage/itemManage/bom/index.vue
  93. 21
      src/views/wms/basicDataManage/itemManage/itemarea/index.vue
  94. 6
      src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts
  95. 15
      src/views/wms/basicDataManage/itemManage/itembasic/index.vue
  96. 14
      src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts
  97. 19
      src/views/wms/basicDataManage/itemManage/itempackage/index.vue
  98. 4
      src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts
  99. 5
      src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue
  100. 21
      src/views/wms/basicDataManage/itemManage/packageunit/index.vue

10
.env.test

@ -4,10 +4,10 @@ NODE_ENV=test
VITE_DEV=false VITE_DEV=false
# 请求路径 # 请求路径
VITE_BASE_URL='http://dev.ccwin-in.com:25300/api' VITE_BASE_URL='http://dev.ccwin-in.com:29000/api'
# 上传路径 # 上传路径
VITE_UPLOAD_URL='http://dev.ccwin-in.com:25300/api/admin-api/infra/file/upload' VITE_UPLOAD_URL='http://dev.ccwin-in.com:29000/api/admin-api/infra/file/upload'
# 接口前缀 # 接口前缀
VITE_API_BASEPATH= VITE_API_BASEPATH=
@ -31,13 +31,13 @@ VITE_BASE_PATH=/
VITE_OUT_DIR=sfms3.0-ui VITE_OUT_DIR=sfms3.0-ui
# 自定义接口路径 # 自定义接口路径
VITE_INTERFACE_URL='http://dev.ccwin-in.com:25310/magic/web/index.html' VITE_INTERFACE_URL='http://dev.ccwin-in.com:29000/magic/web/index.html'
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25310' VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:29000'
# 租户配置 # 租户配置
VITE_TENANT='["长春1379","成都1397","长春2379"]' VITE_TENANT='["长春","成都"]'
# 查看质检报告环境 # 查看质检报告环境
VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400' VITE_REPORT_URL = 'http://dev.ccwin-in.com:25400'

2
src/api/qms/inspectionJob/inspectionJobMain/index.ts

@ -4,7 +4,7 @@ import request from '@/config/axios'
// 查询检验任务列表 // 查询检验任务列表
export const getInspectionJobMainPage = async (params) => { export const getInspectionJobMainPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch // delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/qms/inspection-job-main/senior', data }) return await request.post({ url: '/qms/inspection-job-main/senior', data })
} else { } else {

15
src/api/qms/inspectionRecord/inspectionRecordMain/index.ts

@ -26,8 +26,8 @@ export interface InspectionRecordMainVO {
// 查询检验申请列表 // 查询检验申请列表
export const getInspectionRecordMainPage = async (params) => { export const getInspectionRecordMainPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch // delete params.isSearch
const data = {...params} const data = { ...params }
return await request.post({ url: '/qms/inspection-record-main/senior', data }) return await request.post({ url: '/qms/inspection-record-main/senior', data })
} else { } else {
return await request.get({ url: `/qms/inspection-record-main/page`, params }) return await request.get({ url: `/qms/inspection-record-main/page`, params })
@ -62,16 +62,23 @@ export const deleteInspectionRecordMain = async (id: number) => {
export const exportInspectionRecordMain = async (params) => { export const exportInspectionRecordMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
const data = { ...params } const data = { ...params }
return await request.downloadPost({ url: `/qms/inspection-record-main/export-excel-senior`, data }) return await request.downloadPost({
url: `/qms/inspection-record-main/export-excel-senior`,
data
})
} else { } else {
return await request.download({ url: `/qms/inspection-record-main/export-excel`, params }) return await request.download({ url: `/qms/inspection-record-main/export-excel`, params })
} }
} }
// 导出首件检验记录 Excel
export const exportFirstInspectionRecordMain = async (params) => { export const exportFirstInspectionRecordMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
const data = { ...params } const data = { ...params }
return await request.downloadPost({ url: `/qms/inspection-record-main/export-excel-first-senior`, data }) return await request.downloadPost({
url: `/qms/inspection-record-main/export-excel-first-senior`,
data
})
} else { } else {
return await request.download({ url: `/qms/inspection-record-main/export-excel-first`, params }) return await request.download({ url: `/qms/inspection-record-main/export-excel-first`, params })
} }

2
src/api/qms/inspectionRequest/index.ts

@ -20,7 +20,7 @@ export interface InspectionMainVO {
// 查询检验申请列表 // 查询检验申请列表
export const getInspectionMainPage = async (params) => { export const getInspectionMainPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch // delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/qms/inspection-request-main/senior', data }) return await request.post({ url: '/qms/inspection-request-main/senior', data })
} else { } else {

3
src/api/wms/demandforecastingDetail/index.ts

@ -72,6 +72,9 @@ const getPageParams = (params)=>{
export const getDemandforecastingDetailPage = async (params) => { export const getDemandforecastingDetailPage = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch
if(params.flag){
delete params.flag
}
const data = {...params} const data = {...params}
return await request.post({ url: '/wms/demandforecasting-detail/senior', data }) return await request.post({ url: '/wms/demandforecasting-detail/senior', data })
} else { } else {

52
src/api/wms/demandforecastingMain/index.ts

@ -1,4 +1,5 @@
import request from '@/config/axios' import request from '@/config/axios'
import { isString } from '@/utils/is'
export interface DemandforecastingMainVO { export interface DemandforecastingMainVO {
supplierCode: string supplierCode: string
@ -66,6 +67,56 @@ export const witPurchaseMain = async (id: number) => {
return await request.post({ url: `/wms/demandforecasting-main/wit?id=` + id }) return await request.post({ url: `/wms/demandforecasting-main/wit?id=` + id })
} }
// 要货预测-列表和头部请求参数
const getPageParams = (params)=>{
// 到货日期
if(params.dueDate&&params.dueDate.length>0){
if(isString(params.dueDate[0])){
params.startDate = params.dueDate[0]
}else{
params.startDate = params.dueDate[0].format('YYYY-MM-DD')
}
}
if(params.dueDate&&params.dueDate.length>1){
if(isString(params.dueDate[1])){
params.endDate = params.dueDate[1]
}else{
params.endDate = params.dueDate[1].format('YYYY-MM-DD')
}
}
params.dueDate = ''
//计划员
if(params.planerId&&params.planerId.length>0){
params.planers = params.planerId.join(',')
}
params.planerId = ''
// 供应商代码
if(params.supplierCode&&params.supplierCode.length>0){
let keyValue = params.supplierCode.split(' ')
keyValue.forEach(item=>{item = item.trim()})
params.supplierCodes = keyValue.join(',')
}
params.supplierCode = ''
// 物料代码
if(params.itemCode&&params.itemCode.length>0){
let keyValue = params.itemCode.split(' ')
keyValue.forEach(item=>{item = item.trim()})
params.itemCodes = keyValue.join(',')
}
params.itemCode = ''
// 版本号
if(params.version&&params.version.length>0){
let keyValue = params.version.split(' ')
keyValue.forEach(item=>{item = item.trim()})
params.versions = keyValue.join(',')
}
params.version = ''
return params
}
// 导出要货预测主 Excel // 导出要货预测主 Excel
export const exportDemandforecastingMain = async (params) => { export const exportDemandforecastingMain = async (params) => {
if (params.isSearch) { if (params.isSearch) {
@ -73,6 +124,7 @@ export const exportDemandforecastingMain = async (params) => {
const data = {...params} const data = {...params}
return request.post({ url: '/wms/demandforecasting-main/export-excel-senior', data }) return request.post({ url: '/wms/demandforecasting-main/export-excel-senior', data })
} else { } else {
params = getPageParams(params)
return await request.download({ url: `/wms/demandforecasting-main/export-excel`, params }) return await request.download({ url: `/wms/demandforecasting-main/export-excel`, params })
} }
} }

2
src/api/wms/inventorymoveRecordMain/index.ts

@ -45,7 +45,7 @@ export const getInventorymoveRecordMain = async (id: number) => {
// 新增库存转移记录主 // 新增库存转移记录主
export const createInventorymoveRecordMain = async (data: InventorymoveRecordMainVO) => { export const createInventorymoveRecordMain = async (data: InventorymoveRecordMainVO) => {
return await request.post({ url: `/wms/inventorymove-record-main/create`, data }) return await request.post({ url: `/wms/inventorymove-record-main/createMove`, data })
} }
// 修改库存转移记录主 // 修改库存转移记录主

11
src/api/wms/location/index.ts

@ -34,6 +34,17 @@ export const getLocationPage = async (params) => {
return await request.get({ url: `/wms/location/page`, params }) return await request.get({ url: `/wms/location/page`, params })
} }
} }
export const getLocationMPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return request.post({ url: '/wms/location/Msenior', data })
} else {
return await request.get({ url: `/wms/location/Mpage`, params })
}
}
export const getLocationPageRepleinsh = async (params) => { export const getLocationPageRepleinsh = async (params) => {
if (params.isSearch) { if (params.isSearch) {
delete params.isSearch delete params.isSearch

20
src/api/wms/productionreturnRecordDetail/index.ts

@ -44,6 +44,26 @@ export const getProductionreturnRecordDetailPage = async (params) => {
return await request.get({ url: `/wms/productionreturn-record-detail/page`, params }) return await request.get({ url: `/wms/productionreturn-record-detail/page`, params })
} }
} }
// 查询生产退料记录子列表
export const getProductionreturnRecordDetailPageStore = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionreturn-record-detail-store/senior', data })
} else {
return await request.get({ url: `/wms/productionreturn-record-detail-store/page`, params })
}
}
// 查询隔离退料记录子列表
export const getProductionreturnRecordDetailPageHold = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/productionreturn-record-detail-hold/senior', data })
} else {
return await request.get({ url: `/wms/productionreturn-record-detail-hold/page`, params })
}
}
// 查询生产退料记录子详情 // 查询生产退料记录子详情
export const getProductionreturnRecordDetail = async (id: number) => { export const getProductionreturnRecordDetail = async (id: number) => {

2
src/api/wms/productreceiptRecordMain/index.ts

@ -95,7 +95,7 @@ export const exportProductreceiptRecordMain = async (params) => {
params.filters.push(cmd) params.filters.push(cmd)
delete params.isSearch delete params.isSearch
const data = {...params} const data = {...params}
return await request.post({ url: '/wms/productreceipt-record-main/export-excel-senior', data }) return await request.downloadPost({ url: '/wms/productreceipt-record-main/export-excel-senior', data })
} else { } else {
return await request.download({ url: `/wms/productreceipt-record-main/export-excel`, params }) return await request.download({ url: `/wms/productreceipt-record-main/export-excel`, params })
} }

8
src/api/wms/purchasePlanDetail/index.ts

@ -20,10 +20,12 @@ const getPageParams = (params)=>{
console.log('params.status',params.status) console.log('params.status',params.status)
// 状态 // 状态
if(params.status&&params.status.length>0){ if(Array.isArray(params.status)){
params.statuss = params.status.join(',') if(params.status&&params.status.length>0){
params.statuss = params.status.join(',')
}
params.status = ''
} }
params.status = ''
return params return params
} }
// 查询要货计划子列表 // 查询要货计划子列表

15
src/components/BasicForm/src/BasicForm.vue

@ -106,6 +106,7 @@
:routeName="routeName" :routeName="routeName"
@visibleChange="visibleChange" @visibleChange="visibleChange"
@inputStringFcous='inputStringFcous' @inputStringFcous='inputStringFcous'
:sureDisabled="sureDisabled"
> >
<template v-slot="{ row }"> <template v-slot="{ row }">
<slot :row="row"></slot> <slot :row="row"></slot>
@ -133,6 +134,7 @@
<SearchTable <SearchTable
ref="searchTableRef" ref="searchTableRef"
:showSearchTableQueryFields="showSearchTableQueryFields" :showSearchTableQueryFields="showSearchTableQueryFields"
:isCheckStrictly="isCheckStrictly"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
> >
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{ selections }"> <template v-for="name in Object.keys($slots)" :key="name" #[name]="{ selections }">
@ -339,6 +341,11 @@ const props = defineProps({
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
},
// true ; false
isCheckStrictly:{
type:Boolean,
default:false
} }
}) })
@ -371,6 +378,7 @@ const tableAllSchemas = ref(props.tableAllSchemas)
const tableFormRules = ref(props.tableFormRules) const tableFormRules = ref(props.tableFormRules)
const route = useRoute() // const route = useRoute() //
const routeName = ref('') const routeName = ref('')
const sureDisabled = ref(false)
routeName.value = route.name routeName.value = route.name
// - // -
@ -886,6 +894,7 @@ const onBlur = async (field, e) => {
] ]
count.value++ count.value++
} }
sureDisabled.value= false
} else { } else {
emit('onBlur', field, e) emit('onBlur', field, e)
} }
@ -954,7 +963,9 @@ const inputStringBlur = async (headerItem, val, row, index) => {
defaultButtons.formCloseBtn(null) // defaultButtons.formCloseBtn(null) //
] ]
count.value++ count.value++
} }
sureDisabled.value= false
} }
// //
const onFocus = (field) => { const onFocus = (field) => {
@ -967,6 +978,7 @@ const onFocus = (field) => {
] ]
} }
count.value++ count.value++
sureDisabled.value= true
} }
} }
const inputStringFcous= (headerItem) => { const inputStringFcous= (headerItem) => {
@ -978,6 +990,7 @@ const inputStringFcous= (headerItem) => {
] ]
} }
count.value++ count.value++
sureDisabled.value= true
} }
} }
/** /**

2
src/components/Search/src/Search.vue

@ -271,7 +271,7 @@ const searchTableSuccess = (formField, searchField, val, type, row) => {
} }
const Search = ref() const Search = ref()
onMounted(() => {}) onMounted(() => {})
defineExpose({setFormValues}) // open defineExpose({setFormValues,search}) // open
</script> </script>

12
src/components/SearchTable/src/SearchTable.vue

@ -18,6 +18,7 @@
<Table <Table
v-clientSearchTable v-clientSearchTable
ref="searchTableRef" ref="searchTableRef"
:isCheckStrictly="isCheckStrictly"
:columns="tableColumns" :columns="tableColumns"
:data="tableObjectRef.tableList" :data="tableObjectRef.tableList"
:loading="tableObjectRef.loading" :loading="tableObjectRef.loading"
@ -59,6 +60,11 @@ const props = defineProps({
required: false, required: false,
default: [] default: []
}, },
// true ; false
isCheckStrictly:{
type:Boolean,
default:false
}
}) })
const { t } = useI18n() // const { t } = useI18n() //
const message = useMessage() // const message = useMessage() //
@ -285,11 +291,17 @@ const submitForm = async () => {
} }
} }
const rowClick = (row: any, column: any, event: Event) => { const rowClick = (row: any, column: any, event: Event) => {
const selected = searchTableRef.value?.elTableRef const selected = searchTableRef.value?.elTableRef
?.getSelectionRows() ?.getSelectionRows()
.some((item) => item.id === row.id) .some((item) => item.id === row.id)
if (!selected) { if (!selected) {
searchTableRef.value?.elTableRef?.toggleRowSelection(row, true) searchTableRef.value?.elTableRef?.toggleRowSelection(row, true)
if(props.isCheckStrictly&&row.children){//
row.children.forEach(item => {
searchTableRef.value?.elTableRef?.toggleRowSelection(item, false)
});
}
} else { } else {
// //
searchTableRef.value?.elTableRef?.toggleRowSelection(row, false) searchTableRef.value?.elTableRef?.toggleRowSelection(row, false)

14
src/components/Table/src/Table.vue

@ -63,6 +63,8 @@ export default defineComponent({
searchTableSelectionsList:[],// searchTableSelectionsList:[],//
selectionColor: propTypes.bool.def(false), selectionColor: propTypes.bool.def(false),
rowKey: propTypes.string.def(''), rowKey: propTypes.string.def(''),
// true ; false
isCheckStrictly: propTypes.bool.def(false),
}, },
emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows','rowClick'], emits: ['update:pageSize', 'update:currentPage', 'register', 'update:sort','getSelectionRows','rowClick'],
setup(props, { attrs, slots, emit, expose }) { setup(props, { attrs, slots, emit, expose }) {
@ -120,8 +122,16 @@ export default defineComponent({
const selections = ref<Recordable[]>([]) const selections = ref<Recordable[]>([])
const sortRef = ref() const sortRef = ref()
// //
const selectRow = ()=>{ const selectRow = (selection,row)=>{
console.log(currentPageRef.value,elTableRef.value?.getSelectionRows()) nextTick(()=>{
const selected = elTableRef.value?.getSelectionRows().some((item) => item.id === row.id)
if(props.isCheckStrictly&&selected&&row.children){//
row.children.forEach(item => {
elTableRef.value?.toggleRowSelection(item, false);
});
}
})
emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows()) emit('getSelectionRows', currentPageRef.value,elTableRef.value?.getSelectionRows())
} }
// //

123
src/components/TableForm/src/TableForm.vue

@ -69,6 +69,7 @@
:min-width="headerItem?.tableForm?.minWidth || '200px'" :min-width="headerItem?.tableForm?.minWidth || '200px'"
> >
<el-form <el-form
@submit.native.prevent
ref="TableBaseForm_Ref" ref="TableBaseForm_Ref"
:model="row" :model="row"
style="width: 100%" style="width: 100%"
@ -95,7 +96,7 @@
:disabled="disabledInput(headerItem, row)" :disabled="disabledInput(headerItem, row)"
style="flex: 1" style="flex: 1"
@blur="inputStringBlur(headerItem, row[headerItem.field], row, index)" @blur="inputStringBlur(headerItem, row[headerItem.field], row, index)"
@clear='clearInput(headerItem.field, row, index)' @clear="clearInput(headerItem.field, row, index)"
@focus="inputStringFcous(headerItem)" @focus="inputStringFcous(headerItem)"
/> />
<Icon <Icon
@ -119,7 +120,7 @@
<slot :row="row"></slot> <slot :row="row"></slot>
</el-form-item> </el-form-item>
<!-- 金额输入框 --> <!-- 金额输入框 -->
<el-form-item v-if="headerItem?.tableForm?.type == 'number'" :prop="headerItem.field" > <el-form-item v-if="headerItem?.tableForm?.type == 'number'" :prop="headerItem.field">
<el-input <el-input
:key="headerItem.field + $index" :key="headerItem.field + $index"
v-model="row[headerItem.field]" v-model="row[headerItem.field]"
@ -172,10 +173,10 @@
@visible-change="visibleChange(headerItem.field, $event, row, $index)" @visible-change="visibleChange(headerItem.field, $event, row, $index)"
> >
<el-option <el-option
v-for="op in initSelectOptions(headerItem,row)" v-for="op in initSelectOptions(headerItem, row)"
:label="t(`ts.${initLabel(headerItem,op)}`).replace('ts.', '')" :label="t(`ts.${initLabel(headerItem, op)}`).replace('ts.', '')"
:value="initValue(headerItem,op)" :value="initValue(headerItem, op)"
:key="initValue(headerItem,op)" :key="initValue(headerItem, op)"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -202,7 +203,7 @@
@blur="tableFormSelectOnBlur(headerItem.field, $event, row, $index)" @blur="tableFormSelectOnBlur(headerItem.field, $event, row, $index)"
> >
<el-option-group <el-option-group
v-for="group in initSelectOptions(headerItem,row)" v-for="group in initSelectOptions(headerItem, row)"
:key="group.type" :key="group.type"
:label="t(`ts.${group.name}`).replace('ts.', '')" :label="t(`ts.${group.name}`).replace('ts.', '')"
> >
@ -308,7 +309,7 @@
:id="headerItem?.tableForm?.id" :id="headerItem?.tableForm?.id"
> >
<el-radio <el-radio
v-for="(item, index) in initSelectOptions(headerItem,row)" v-for="(item, index) in initSelectOptions(headerItem, row)"
:key="index" :key="index"
:label="t(`ts.${item.value}`).replace('ts.', '')" :label="t(`ts.${item.value}`).replace('ts.', '')"
:size="headerItem?.tableForm?.size" :size="headerItem?.tableForm?.size"
@ -332,7 +333,7 @@
:fill="headerItem?.tableForm?.fill" :fill="headerItem?.tableForm?.fill"
> >
<el-checkbox <el-checkbox
v-for="(item, index) in initSelectOptions(headerItem,row)" v-for="(item, index) in initSelectOptions(headerItem, row)"
:key="index" :key="index"
:label="t(`ts.${item.value}`).replace('ts.', '')" :label="t(`ts.${item.value}`).replace('ts.', '')"
:disabled="itemIsDisabled(headerItem, row)" :disabled="itemIsDisabled(headerItem, row)"
@ -394,32 +395,34 @@
layout="total, prev, pager, next, jumper" layout="total, prev, pager, next, jumper"
:total="tableData.length" :total="tableData.length"
/> />
<div class="button flex" v-if="isShowButton || isShowReduceButtonSelection"> <div class="button flex" style="padding-top: 10px" v-if="isShowButton || isShowReduceButtonSelection">
<div class="p-12px" v-if="isShowButton" @click.stop="handleAddTable"> <el-button
<Icon icon="ep:circle-plus" color="#409eff" size="26" style="cursor: pointer" /> type="primary"
<div>{{ t('ts.添加明细') }}</div> link
</div> v-if="isShowButton"
<div class="p-12px" v-if="isShowReduceButtonSelection" @click.stop="handleSelectionDelete"> @click.stop="handleAddTable"
<Icon icon="ep:delete" color="#409eff" size="26" style="cursor: pointer" /> :disabled="sureDisabled"
<div>{{ t('ts.批量删除') }}</div> :icon="CirclePlus"
</div> size="large"
<div >
class="p-12px" <span>{{ t('ts.添加明细') }}</span>
v-if=" </el-button>
isShowTableFormSearch?.isShowTableFormSearch|| <el-button
routeName == 'PurchaseMain' || type="primary"
routeName == 'PurchaseMain' || link
routeName == 'ProductionMain' || v-if="isShowReduceButtonSelection"
routeName == 'ZZBJDeliverPlanMain' || @click.stop="handleSelectionDelete"
routeName == 'DeliverPlanMain' || :icon="Remove"
routeName == 'DeliverRequestMain' || size="large"
routeName == 'ZZBJDeliverRequestMain' ||
routeName == 'UnplannedreceiptRequestMain'||
routeName == 'RepleinshRequestMain'
"
> >
<el-input v-model="keyWord" style="width: 240px" :placeholder="`请输入${isShowTableFormSearch?.label},多条数据逗号分隔`" /> <span>{{ t('ts.批量删除') }}</span>
</el-button>
<div class="p-12px" v-if="isShowTableFormSearch?.isShowTableFormSearch">
<el-input
v-model="keyWord"
style="width: 240px"
:placeholder="`请输入${isShowTableFormSearch?.label},多条数据逗号分隔`"
/>
<el-button type="primary" style="margin-left: 10px" @click.stop="batchAdd">{{ <el-button type="primary" style="margin-left: 10px" @click.stop="batchAdd">{{
t('批量添加') t('批量添加')
}}</el-button> }}</el-button>
@ -432,6 +435,7 @@
const { t } = useI18n() // const { t } = useI18n() //
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getIntDictOptions, getStrDictOptions } from '@/utils/dict'
import { CirclePlus, Remove } from '@element-plus/icons-vue'
const props = defineProps({ const props = defineProps({
// //
isShowButton: { isShowButton: {
@ -505,11 +509,16 @@ const props = defineProps({
type: String, type: String,
required: false, required: false,
default: '' default: ''
},
//
sureDisabled: {
type: Boolean,
default: false
} }
}) })
let isShowTableFormSearch = ref({}) let isShowTableFormSearch = ref({})
console.log(33333,props.tableFields) console.log(33333, props.tableFields)
isShowTableFormSearch.value =props.tableFields.find(item=>item.isShowTableFormSearch) isShowTableFormSearch.value = props.tableFields.find((item) => item.isShowTableFormSearch)
// //
const emit = defineEmits([ const emit = defineEmits([
@ -534,11 +543,13 @@ const emit = defineEmits([
'inputStringFcous' 'inputStringFcous'
]) ])
// | type = radio | type = select // | type = radio | type = select
const initSelectOptions = (headerItem,row) => { const initSelectOptions = (headerItem, row) => {
if(row[headerItem.field+'InitOptions']){ if (row[headerItem.field + 'InitOptions']) {
return row[headerItem.field+'InitOptions'] return row[headerItem.field + 'InitOptions']
}else{ } else {
return headerItem.dictType ? getStrDictOptions(headerItem.dictType) : headerItem.tableForm.initOptions return headerItem.dictType
? getStrDictOptions(headerItem.dictType)
: headerItem.tableForm.initOptions
} }
} }
// //
@ -625,7 +636,7 @@ const TableBaseForm_Ref = ref()
const validateForm = () => { const validateForm = () => {
let _lists = TableBaseForm_Ref.value?.map((v) => v.validate()) let _lists = TableBaseForm_Ref.value?.map((v) => v.validate())
if(!_lists ||_lists.length == 0){ if (!_lists || _lists.length == 0) {
return false return false
} }
return Promise.all(_lists) return Promise.all(_lists)
@ -660,7 +671,7 @@ const inputStringBlur = (headerItem, val, row, index) => {
} }
// //
const inputStringFcous = (headerItem) => { const inputStringFcous = (headerItem) => {
emit('inputStringFcous', headerItem) emit('inputStringFcous', headerItem)
} }
const clearInput = (field, row, index) => { const clearInput = (field, row, index) => {
emit('clearInput', field, row, index) emit('clearInput', field, row, index)
@ -670,7 +681,7 @@ const buttonOperationClick = (row, label, index) => {
emit('buttonOperationClick', row, label, index) emit('buttonOperationClick', row, label, index)
} }
const visibleChange = (field, val, row, index) => { const visibleChange = (field, val, row, index) => {
emit('visibleChange',field, val, row, index) emit('visibleChange', field, val, row, index)
} }
const currentPage = ref(1) const currentPage = ref(1)
const pageSize = ref(10) const pageSize = ref(10)
@ -714,19 +725,19 @@ const disabledInput = (headerItem, row) => {
) )
} }
} }
const initLabel=(headerItem,op)=>{ const initLabel = (headerItem, op) => {
if(headerItem?.tableForm?.labelField){ if (headerItem?.tableForm?.labelField) {
return op[headerItem?.tableForm?.labelField] return op[headerItem?.tableForm?.labelField]
}else{ } else {
return op.label return op.label
} }
}
const initValue=(headerItem,op)=>{
if(headerItem?.tableForm?.valueField){
return op[headerItem?.tableForm?.valueField]
}else{
return op.value
} }
const initValue = (headerItem, op) => {
if (headerItem?.tableForm?.valueField) {
return op[headerItem?.tableForm?.valueField]
} else {
return op.value
}
} }
const isFullscreen = ref(false) const isFullscreen = ref(false)

1
src/locales/zh-CN.ts

@ -1041,6 +1041,7 @@ export default {
:'采购收货记录主', :'采购收货记录主',
:'采购拒收记录主', :'采购拒收记录主',
退:'采购退货记录主', 退:'采购退货记录主',
:'采购拒收记录主',
:'合同附件', :'合同附件',
:'发票附件', :'发票附件',
:'货运单附件', :'货运单附件',

20
src/utils/auth.ts

@ -10,24 +10,32 @@ const RefreshTokenKey = 'REFRESH_TOKEN'
// 获取token // 获取token
export const getAccessToken = () => { export const getAccessToken = () => {
// 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错 // 此处与TokenKey相同,此写法解决初始化时Cookies中不存在TokenKey报错
return wsCache.get(AccessTokenKey) ? wsCache.get(AccessTokenKey) : wsCache.get('ACCESS_TOKEN') // return wsCache.get(AccessTokenKey) ? wsCache.get(AccessTokenKey) : wsCache.get('ACCESS_TOKEN')
return sessionStorage.getItem(AccessTokenKey) ? sessionStorage.getItem(AccessTokenKey) : sessionStorage.getItem('ACCESS_TOKEN')
} }
// 刷新token // 刷新token
export const getRefreshToken = () => { export const getRefreshToken = () => {
return wsCache.get(RefreshTokenKey) // return wsCache.get(RefreshTokenKey)
return sessionStorage.getItem(RefreshTokenKey)
} }
// 设置token // 设置token
export const setToken = (token: TokenType) => { export const setToken = (token: TokenType) => {
wsCache.set(RefreshTokenKey, token.refreshToken) // wsCache.set(RefreshTokenKey, token.refreshToken)
wsCache.set(AccessTokenKey, token.accessToken) // wsCache.set(AccessTokenKey, token.accessToken)
sessionStorage.setItem(RefreshTokenKey,token.refreshToken)
sessionStorage.setItem(AccessTokenKey,token.accessToken)
} }
// 删除token // 删除token
export const removeToken = () => { export const removeToken = () => {
wsCache.delete(AccessTokenKey) // wsCache.delete(AccessTokenKey)
wsCache.delete(RefreshTokenKey) // wsCache.delete(RefreshTokenKey)
sessionStorage.removeItem(AccessTokenKey)
sessionStorage.removeItem(RefreshTokenKey)
} }
/** 格式化token(jwt格式) */ /** 格式化token(jwt格式) */

4
src/utils/dict.ts

@ -203,6 +203,7 @@ export enum DICT_TYPE {
CARRIER_TYPE = 'carrier_type', // 承运商类型 CARRIER_TYPE = 'carrier_type', // 承运商类型
INSPECT_TYPE = 'inspect_type', // 检验类型 INSPECT_TYPE = 'inspect_type', // 检验类型
INSPECTION_TYPE = 'inspection_type', // 质量管理检验类型 INSPECTION_TYPE = 'inspection_type', // 质量管理检验类型
INSPECTION_TYPE_NEW = 'inspection_type_new', // 质量管理检验类型
NEXT_ACTION = 'next_action', // 下一步检验动作 NEXT_ACTION = 'next_action', // 下一步检验动作
SAMPLE_METHOD = 'sample_method', // 抽检方式 SAMPLE_METHOD = 'sample_method', // 抽检方式
WAREHOUSE_TYPE = 'warehouse_type', // 仓库类型 WAREHOUSE_TYPE = 'warehouse_type', // 仓库类型
@ -322,6 +323,9 @@ export enum DICT_TYPE {
QUALITY_NOTIFICATION_PRIORITY = 'quality_notification_priority', // 质量通知优先级 QUALITY_NOTIFICATION_PRIORITY = 'quality_notification_priority', // 质量通知优先级
CLAIM_REASON = 'claim_Reason', // 质量通知索赔原因 CLAIM_REASON = 'claim_Reason', // 质量通知索赔原因
QMS_CODE = 'qms_code', // 质量通知代码 QMS_CODE = 'qms_code', // 质量通知代码
QMS_Q1_CODE = 'qms_Q1_code',
QMS_Q2_CODE = 'qms_Q2_code',
QMS_Q3_CODE = 'qms_Q3_code',
DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置 DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置
DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型 DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型
PROBLEM_REASON = 'problem_reason', // 质量通知问题原因 PROBLEM_REASON = 'problem_reason', // 质量通知问题原因

4
src/views/login/login.vue

@ -9,7 +9,7 @@
> >
<!-- 左上角的 logo + 系统标题 --> <!-- 左上角的 logo + 系统标题 -->
<div class="relative flex items-center "> <div class="relative flex items-center ">
<img alt="" class="mr-10px w-36px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<!-- 左边的背景图 + 欢迎语 --> <!-- 左边的背景图 + 欢迎语 -->
@ -33,7 +33,7 @@
class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end" class="flex items-center justify-between at-2xl:justify-end at-xl:justify-end"
> >
<div class="flex items-center at-2xl:hidden at-xl:hidden"> <div class="flex items-center at-2xl:hidden at-xl:hidden">
<img alt="" class="mr-10px w-36px h-36px" src="@/assets/imgs/logo_white.png" /> <img alt="" class="mr-10px w-144px h-36px" src="@/assets/imgs/logo_white_blue.png" />
<span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span> <span class="text-20px font-bold">{{ t(`ts.${underlineToHump(appStore.getTitle)}`) }}</span>
</div> </div>
<div class="flex items-center justify-end space-x-10px"> <div class="flex items-center justify-end space-x-10px">

11
src/views/qms/aql/aql.data.ts

@ -578,7 +578,16 @@ export const Aql = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '创建者', label: '创建者',

11
src/views/qms/counter/counter.data.ts

@ -208,7 +208,16 @@ export const Counter = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
}, },
{ {
label: '创建者', label: '创建者',

11
src/views/qms/dynamicRule/dynamicRule.data.ts

@ -76,7 +76,16 @@ export const DynamicRule = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
}, },
{ {
label: '创建者', label: '创建者',

14
src/views/qms/inspectionJob/addForm.vue

@ -6,6 +6,7 @@
:width="dialogWidth" :width="dialogWidth"
:close-on-click-modal="false" :close-on-click-modal="false"
:vLoading="formLoading" :vLoading="formLoading"
:before-close="handleClose"
> >
<div <div
class="box" class="box"
@ -414,7 +415,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
v-model="item.inspectionJobCharacteristicsUpdateReqVO.remark" v-model="item.inspectionJobCharacteristicsUpdateReqVO.remark"
@ -512,7 +513,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'" > <!-- <el-col :span="12" v-if="item.inspectionJobCharacteristicsUpdateReqVO.featureType == '1'" >
<el-form-item label="缺陷级别" required> <el-form-item label="缺陷级别" required>
<el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled> <el-select v-model="cur.defectLevel" placeholder="请选择缺陷级别" disabled>
@ -926,8 +926,9 @@ const buttonBaseClick = async (val) => {
} }
// //
else if (val == 'close') { else if (val == 'close') {
// await InspectionJobMainApi.abandonInspectionJobMain(data.value.id) await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
dialogVisible.value = false dialogVisible.value = false
emit('close')
} }
// //
else if (val == 'staging') { else if (val == 'staging') {
@ -935,7 +936,7 @@ const buttonBaseClick = async (val) => {
} }
} }
// //
const emit = defineEmits(['submitForm', 'searchTableSuccess']) const emit = defineEmits(['submitForm', 'searchTableSuccess','close'])
const validateForm = (formRef) => { const validateForm = (formRef) => {
let _lists = formRef?.map((v) => v.validate()) let _lists = formRef?.map((v) => v.validate())
return Promise.all(_lists) return Promise.all(_lists)
@ -1519,6 +1520,11 @@ const inspectionValueInput = (item, cur) => {
} }
} }
} }
const handleClose =async (done: () => void) => {
await InspectionJobMainApi.abandonInspectionJobMain(data.value.id)
emit('close')
done()
}
</script> </script>
<style scoped> <style scoped>
.small-title { .small-title {

156
src/views/qms/inspectionJob/index.vue

@ -20,7 +20,8 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table v-clientTable <Table
v-clientTable
:columns="tableColumns" :columns="tableColumns"
:data="tableObject.tableList" :data="tableObject.tableList"
:loading="tableObject.loading" :loading="tableObject.loading"
@ -57,6 +58,7 @@
:rules="InspectionJobMainRules" :rules="InspectionJobMainRules"
:formAllSchemas="InspectionJobMain.allSchemas" :formAllSchemas="InspectionJobMain.allSchemas"
@submitForm="submitForm" @submitForm="submitForm"
@close="getList"
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
@ -83,13 +85,13 @@
:list="list" :list="list"
/> />
<el-dialog <el-dialog
v-model="showQualityReport" v-model="showQualityReport"
:title="t('质检明细')" :title="t('质检明细')"
:append-to-body="false" :append-to-body="false"
destroy-on-close destroy-on-close
fullscreen fullscreen
> >
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe> <iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog> </el-dialog>
</template> </template>
@ -119,6 +121,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam'
import { useUserStore } from '@/store/modules/user'
// //
defineOptions({ name: 'inspectionJobMain' }) defineOptions({ name: 'inspectionJobMain' })
@ -129,7 +132,7 @@ const route = useRoute() // 路由信息
const routeName = ref() const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns) const tableColumns = ref(InspectionJobMain.allSchemas.tableColumns)
const userStore = useUserStore()
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val
@ -180,7 +183,7 @@ const { getList, setSearchParams } = tableMethods
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultExportBtn(null), defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-job-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
@ -199,7 +202,13 @@ const buttonBaseClick = (val, item) => {
handleExport() handleExport()
} else if (val == 'refresh') { } else if (val == 'refresh') {
// //
getList() if (tableObject.params.filters && tableObject.params.filters.length > 0) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { } else if (val == 'filtrate') {
// //
} else { } else {
@ -226,23 +235,35 @@ const isShowMainButton2 = (row, val) => {
} }
} }
//
const isShowMainButton1 = (row, val) => {
if (val.indexOf(row.status) > -1) {
if (userStore.getUser.id == row.acceptUserId) {
return false
} else {
return true
}
} else {
return true
}
}
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListJobAccBtn({ // defaultButtons.mainListJobAccBtn({
hide: isShowMainButton(row, ['1']), // hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:accept' // hasPermi: 'qms:inspection-job-main:accept'
}), // // }), //
defaultButtons.mainListJobCloBtn({ defaultButtons.mainListJobCloBtn({
hide: isShowMainButton(row, ['1']), hide: isShowMainButton(row, ['1']),
hasPermi: 'qms:inspection-job-main:close' hasPermi: 'qms:inspection-job-main:close'
}), // }), //
defaultButtons.mainListJobAbaBtn({ defaultButtons.mainListJobAbaBtn({
hide: isShowMainButton(row, ['2']), hide: isShowMainButton1(row, ['2']),
hasPermi: 'qms:inspection-job-main:abandon' hasPermi: 'qms:inspection-job-main:abandon'
}), // }), //
defaultButtons.mainListJobExeBtn({ defaultButtons.mainListJobExeBtn({
hide: isShowMainButton(row, ['2']), hide: isShowMainButton(row, ['1', '2']),
hasPermi: 'qms:inspection-job-main:execute' hasPermi: 'qms:inspection-job-main:execute'
}), // }), //
defaultButtons.mainListOrderPubBtn({ defaultButtons.mainListOrderPubBtn({
@ -284,14 +305,13 @@ const buttonTableClick = async (val, row) => {
} }
} }
//
// //
const reportHeight = ref(window.innerHeight - 120) const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false) const showQualityReport = ref(false)
const qualityReport = ref('') const qualityReport = ref('')
const checkQualityReport = async (row) => { const checkQualityReport = async (row) => {
showQualityReport.value = true showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}` qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
} }
/** 添加/修改操作 */ /** 添加/修改操作 */
@ -309,8 +329,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => {
// //
const formRef = ref() const formRef = ref()
const execute = async (type: string, row?: number) => { const execute = async (type: string, row?: any) => {
formRef.value.open(type, row) if (row.status == '2') {
if (userStore.getUser.id == row.acceptUserId) {
formRef.value.open(type, row)
} else {
message.error('承接人与当前登录人不一致')
}
} else if (row.status == '1') {
await handleAccept(row.id)
formRef.value.open(type, row)
await getList()
}
} }
/** 关闭按钮操作 */ /** 关闭按钮操作 */
const handleClose = async (id: number) => { const handleClose = async (id: number) => {
@ -321,7 +351,7 @@ const handleClose = async (id: number) => {
await InspectionJobMainApi.closeInspectionJobMain(id) await InspectionJobMainApi.closeInspectionJobMain(id)
message.success(t('common.closeSuccess')) message.success(t('common.closeSuccess'))
// //
await getList() buttonBaseClick('refresh', null)
} catch {} } catch {}
} }
/** 发布按钮操作 */ /** 发布按钮操作 */
@ -333,19 +363,19 @@ const handleRelease = async (id: number) => {
await InspectionJobMainApi.releaseInspectionJobMain(id) await InspectionJobMainApi.releaseInspectionJobMain(id)
message.success('发布成功!') message.success('发布成功!')
// //
await getList() buttonBaseClick('refresh', null)
} catch {} } catch {}
} }
// //
const handleAccept = async (id: number) => { const handleAccept = async (id: number) => {
try { try {
// //
await message.confirm(t('common.confirmAccept')) // await message.confirm(t('common.confirmAccept'))
// //
await InspectionJobMainApi.acceptInspectionJobMain(id) await InspectionJobMainApi.acceptInspectionJobMain(id)
message.success(t('common.acceptSuccess')) // message.success(t('common.acceptSuccess'))
// // (TB)
await getList() // buttonBaseClick('refresh', null)
} catch {} } catch {}
} }
// //
@ -357,7 +387,7 @@ const handleAbandon = async (id: number) => {
await InspectionJobMainApi.abandonInspectionJobMain(id) await InspectionJobMainApi.abandonInspectionJobMain(id)
message.success(t('common.giveupSuccess')) message.success(t('common.giveupSuccess'))
// //
await getList() buttonBaseClick('refresh', null)
} catch {} } catch {}
} }
@ -401,7 +431,11 @@ const submitForm = async (formType, data) => {
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
formRef.value.formLoading = false formRef.value.formLoading = false
// //
getList() if (formType === 'create') {
getList()
} else {
buttonBaseClick('refresh', null)
}
} finally { } finally {
formRef.value.formLoading = false formRef.value.formLoading = false
} }
@ -415,19 +449,75 @@ const handleImport = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) {
if (route.name == 'inspectionJobProductionMain') {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '4'
})
} else if (route.name == 'inspectionJobPurchaseMain') {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '1'
})
} else {
searchData.filters.push({
action: 'notIn',
column: 'excludeInspectionType',
value: '1,4'
})
}
}
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
} }
getList() // getList() //
} }
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
  tableObject.params = { console.log(11,route.name)
    available: true if (route.name == 'inspectionJobProductionMain') {
  } tableObject.params = {
available: true,
inspectionType: '4'
}
} else if (route.name == 'inspectionJobPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4'
}
}
getList() getList()
// importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate() // importTemplateData.templateUrl = await InspectionJobMainApi.importTemplate()
}) })
onActivated(() => {
if (route.name == 'inspectionJobProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else if (route.name == 'inspectionJobPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4'
}
}
getList()
})
</script> </script>

23
src/views/qms/inspectionJob/inspectionJobMain.data.ts

@ -272,7 +272,7 @@ export const InspectionJobMain = useCrudSchemas(
label: '检验类型', label: '检验类型',
field: 'inspectionType', field: 'inspectionType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.INSPECTION_TYPE, dictType: DICT_TYPE.INSPECTION_TYPE_NEW,
dictClass: 'string', dictClass: 'string',
isSearch: true, isSearch: true,
form: { form: {
@ -567,6 +567,7 @@ export const InspectionJobMain = useCrudSchemas(
dictClass: 'string', dictClass: 'string',
isForm: false, isForm: false,
isTable: true, isTable: true,
isSearch: true,
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 150
@ -594,6 +595,17 @@ export const InspectionJobMain = useCrudSchemas(
width: 110 width: 110
} }
}, },
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -613,6 +625,15 @@ export const InspectionJobMain = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
} }
}, },
{ {

11
src/views/qms/inspectionMethod/inspectionMethod.data.ts

@ -93,7 +93,16 @@ export const InspectionMethod = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
}, },
{ {
label: '创建者', label: '创建者',

29
src/views/qms/inspectionQ1/index.vue

@ -55,6 +55,7 @@
:apiCreate="Q1Api.createQ1" :apiCreate="Q1Api.createQ1"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@onChange="onChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -77,6 +78,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -92,20 +94,45 @@ routeName.value = route.name
const tableColumns = ref(Q1.allSchemas.tableColumns) const tableColumns = ref(Q1.allSchemas.tableColumns)
// //
const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'customerCode') { if (formField == 'customerCode') {
setV['itemCode'] = '' setV['itemCode'] = ''
} }
if (formField == 'itemCode') { if (formField == 'itemCode') {
setV['uom'] = val[0]['customerUom'] setV['uom'] = val[0]['customerUom']
console.log(333,val[0].code)
const params = {
by: "ASC",
filters: [{column: "itemCode", action: "==", value: val[0].itemCode}],
pageNo: 1,
pageSize: 500,
sort: ""
}
params.isSearch = true
StdcostpriceApi.getStdcostpricePage(params).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
claimAmount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6)
})
}
})
} }
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
formRef.setValues(setV) formRef.setValues(setV)
}) })
} }
const onChange =(field,e)=>{
if (field == 'qty') {
basicFormRef.value.formRef.formModel.claimAmount = (parseFloat( basicFormRef.value.formRef.formModel.qty) * parseFloat( priceObj.value.price)).toFixed(6)
}
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {
tableColumns.value = val tableColumns.value = val

13
src/views/qms/inspectionQ1/inspectionQ1.data.ts

@ -179,7 +179,7 @@ export const Q1 = useCrudSchemas(
label: '编码', label: '编码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_CODE, dictType: DICT_TYPE.QMS_Q1_CODE,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
@ -384,7 +384,16 @@ export const Q1 = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '操作', label: '操作',

13
src/views/qms/inspectionQ2/inspectionQ2.data.ts

@ -286,7 +286,7 @@ export const Q2 = useCrudSchemas(
label: '编码', label: '编码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_CODE, dictType: DICT_TYPE.QMS_Q2_CODE,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: true, isTable: true,
@ -465,7 +465,16 @@ export const Q2 = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '操作', label: '操作',

41
src/views/qms/inspectionQ3/index.vue

@ -55,6 +55,7 @@
:apiCreate="Q3Api.createQ3" :apiCreate="Q3Api.createQ3"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="false"
@onChange="onChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -77,6 +78,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import * as StdcostpriceApi from '@/api/wms/stdcostprice'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -92,12 +95,43 @@ routeName.value = route.name
const tableColumns = ref(Q3.allSchemas.tableColumns) const tableColumns = ref(Q3.allSchemas.tableColumns)
// //
const priceObj = ref()
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(async () => {
const setV = {} const setV = {}
if (formField == 'itemCode') { if (formField == 'itemCode') {
console.log(val) console.log(val)
setV['uom'] = val[0]['uom'] setV['uom'] = val[0]['uom']
console.log(formRef.formModel.qty)
// let res = await ProductionlineitemApi.selectItemCodeToProductionLineCode(val[0].code)
ProductionlineitemApi.selectItemCodeToProductionLineCode(val[0].code).then((res) => {
console.log(res)
if (res?.length > 0) {
formRef.formModel.defectLocation = res[0].productionLineCode
Q3.allSchemas.formSchema.forEach(item=>{
if (item.field == 'defectLocation') {
item.componentProps.options = res
}
})
}
})
const params = {
by: "ASC",
filters: [{column: "itemCode", action: "==", value: val[0].code}],
pageNo: 1,
pageSize: 500,
sort: ""
}
params.isSearch = true
StdcostpriceApi.getStdcostpricePage(params).then((res) => {
if (res.list?.length > 0) {
priceObj.value = res.list[0]
formRef.setValues({
amount: (parseFloat(formRef.formModel.qty) * parseFloat(priceObj.value.price)).toFixed(6)
})
}
})
} }
if (formField == 'q1Number') { if (formField == 'q1Number') {
//Q1 //Q1
@ -113,6 +147,11 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
} }
}) })
} }
const onChange =(field,e)=>{
if (field == 'qty') {
basicFormRef.value.formRef.formModel.amount = (parseFloat( basicFormRef.value.formRef.formModel.qty) * parseFloat( priceObj.value.price)).toFixed(6)
}
}
// //
const updataTableColumns = (val) => { const updataTableColumns = (val) => {

59
src/views/qms/inspectionQ3/inspectionQ3.data.ts

@ -20,8 +20,14 @@ export const Q3Rules = reactive({
qty: [required], qty: [required],
code: [required], code: [required],
defectLocation: [required], defectLocation: [required],
defectType: [required], defectType: [
problemReason: [required], { required: true, message: '缺陷类型不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
problemReason: [
{ required: true, message: '问题原因不能为空', trigger: 'blur' },
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
priority: [required], priority: [required],
amount: [required], amount: [required],
costCode: [required], costCode: [required],
@ -208,9 +214,9 @@ export const Q3 = useCrudSchemas(
label: '编码', label: '编码',
field: 'code', field: 'code',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.QMS_CODE, dictType: DICT_TYPE.QMS_Q3_CODE,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: true,
isTable: true, isTable: true,
tableForm: { tableForm: {
type: 'Select' type: 'Select'
@ -220,36 +226,45 @@ export const Q3 = useCrudSchemas(
label: '缺陷位置', label: '缺陷位置',
field: 'defectLocation', field: 'defectLocation',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEFECT_LOCATION,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false, isTable: false,
tableForm: { form: {
type: 'Select' component: 'Select',
componentProps: {
options: [],
optionsAlias: {
labelField: 'productionLineName',
valueField: 'productionLineCode'
},
filterable: true,
}
} }
}, },
{ {
label: '缺陷类型', label: '缺陷类型',
field: 'defectType', field: 'defectType',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.DEFECT_TYPE,
dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false, isTable: false,
tableForm: { table: {
type: 'Select' width: '150'
},
form: {
component: 'Input'
} }
}, },
{ {
label: '问题原因', label: '问题原因',
field: 'problemReason', field: 'problemReason',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.PROBLEM_REASON,
dictClass: 'string',
isSearch: false, isSearch: false,
isTable: false, isTable: false,
tableForm: { table: {
type: 'Select' width: '150'
},
form: {
component: 'Input'
} }
}, },
{ {
@ -383,8 +398,7 @@ export const Q3 = useCrudSchemas(
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
isSearch: false, isTable: true,
isTable: false,
isForm: false, isForm: false,
table: { table: {
width: 180 width: 180
@ -401,7 +415,16 @@ export const Q3 = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '操作', label: '操作',

103
src/views/qms/inspectionRecord/index.vue

@ -91,6 +91,15 @@
:detailAllSchemasRules="InspectionRecordPackageRules" :detailAllSchemasRules="InspectionRecordPackageRules"
:list="list" :list="list"
/> />
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -116,6 +125,7 @@ import UseAddForm from './useAddForm.vue'
import AddForm from './addForm.vue' import AddForm from './addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain' import * as InspectionJobMainApi from '@/api/qms/inspectionJob/inspectionJobMain'
import { getReportUrl } from '@/utils/systemParam'
import { import {
InspectionJobMain, InspectionJobMain,
@ -163,7 +173,7 @@ const { getList, setSearchParams } = tableMethods
// //
let HeadButttondata = [ let HeadButttondata = [
defaultButtons.defaultExportBtn(null), // defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-recode-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
@ -234,8 +244,8 @@ const butttondata = (row) => {
// hide:row.useDecision, // hide:row.useDecision,
// hasPermi: 'qms:inspection-recode-main:execute', // hasPermi: 'qms:inspection-recode-main:execute',
// }), // // }), //
// defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }) // defaultButtons.mainListEditBtn({ hide: isShowEditBtn(row, ['11']) }), //
defaultButtons.mainListEditBtn(null) // defaultButtons.mainListPlanCheckQualityReportBtn({}) //
] ]
} }
@ -249,13 +259,13 @@ const buttonTableClick = async (val, row) => {
// //
// 1使 // 1使
if (row.estimateCode == 1) { if (row.estimateCode == 1) {
InspectionRecordUser.allSchemas.formSchema.forEach((itemColumn) => { InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') { if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value == 1) itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value == 1)
} }
}) })
} else if (row.estimateCode == 2) { } else if (row.estimateCode == 2) {
InspectionRecordUser.allSchemas.formSchema.forEach((itemColumn) => { InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') { if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value != 1) itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value != 1)
} }
@ -279,12 +289,24 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainOrderPub') { } else if (val == 'mainOrderPub') {
// //
handleOrderPub(row) handleOrderPub(row)
} else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'edit') { } else if (val == 'edit') {
// //
// //
execute('execute', row) execute('execute', row)
} }
} }
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = getReportUrl() + '/purchasereceiptReport?asnNumber=' + row.asnNumber
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
// const openForm = async (type : string, row ?: number) => { // const openForm = async (type : string, row ?: number) => {
@ -293,8 +315,10 @@ const basicFormRef = ref()
// } // }
/** 使用决策操作操作 */ /** 使用决策操作操作 */
const formRef = ref() const formRef = ref()
const rowData = ref()
const openUseForm = async (type: string, row?: number) => { const openUseForm = async (type: string, row?: number) => {
tableData.value = [] // tableData.value = [] //
rowData.value = row
formRef.value.open(type, row) formRef.value.open(type, row)
} }
@ -371,6 +395,7 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
handleOrderPub(rowData.value)
// //
getList() getList()
} finally { } finally {
@ -404,12 +429,35 @@ const submitFormExecute = async (formType, data) => {
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType') let isHave = searchData?.filters?.some((item) => item.column == 'inspectionType')
if (!isHave) { if (!isHave) {
searchData.filters.push({ if (route.name == 'inspectionRecordPurchaseMain') {
action: '!=', searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '1'
},{
action: '==',
column: 'available',
value: true
})
} else if (route.name == 'inspectionRecordProductionMain') {
searchData.filters.push({
action: '==',
column: 'inspectionType',
value: '4'
},{
action: '==',
column: 'available',
value: true
})
} else {
searchData.filters.push({
action: 'notIn',
column: 'inspectionType', column: 'inspectionType',
value: '11' value: '1,4,11'
}) })
} }
}
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
@ -419,10 +467,43 @@ const searchFormClick = (searchData) => {
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
tableObject.params = { if (route.name == 'inspectionRecordPurchaseMain') {
available: true, tableObject.params = {
excludeInspectionType: '11' available: true,
inspectionType: '1'
}
} else if (route.name == 'inspectionRecordProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4,11'
}
} }
getList()
})
onActivated(() => {
if (route.name == 'inspectionRecordPurchaseMain') {
tableObject.params = {
available: true,
inspectionType: '1'
}
} else if (route.name == 'inspectionRecordProductionMain') {
tableObject.params = {
available: true,
inspectionType: '4'
}
} else {
tableObject.params = {
available: true,
excludeInspectionType: '1,4,11'
}
}
getList() getList()
}) })
</script> </script>

31
src/views/qms/inspectionRecord/inspectionRecordMain.data.ts

@ -58,7 +58,7 @@ export const InspectionRecordMain = useCrudSchemas(
field: 'asnNumber', field: 'asnNumber',
sort: 'custom', sort: 'custom',
isSearch: true, isSearch: true,
isForm:false, isForm: false,
form: { form: {
componentProps: { componentProps: {
disabled: true disabled: true
@ -245,7 +245,6 @@ export const InspectionRecordMain = useCrudSchemas(
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, },
table: { table: {
width: 150 width: 150
@ -277,7 +276,6 @@ export const InspectionRecordMain = useCrudSchemas(
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, },
table: { table: {
width: 150 width: 150
@ -294,7 +292,6 @@ export const InspectionRecordMain = useCrudSchemas(
componentProps: { componentProps: {
disabled: true disabled: true
} }
}, },
table: { table: {
width: 150 width: 150
@ -421,7 +418,7 @@ export const InspectionRecordMain = useCrudSchemas(
componentProps: { componentProps: {
type: 'datetime', type: 'datetime',
valueFormat: 'x', valueFormat: 'x',
disabled: true disabled: true
} }
}, },
detail: { detail: {
@ -499,7 +496,7 @@ export const InspectionRecordMain = useCrudSchemas(
table: { table: {
width: 150 width: 150
}, },
isForm:false isForm: false
}, },
{ {
label: '执行结果', label: '执行结果',
@ -516,6 +513,17 @@ export const InspectionRecordMain = useCrudSchemas(
} }
} }
}, },
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -535,6 +543,15 @@ export const InspectionRecordMain = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
} }
}, },
{ {
@ -586,7 +603,7 @@ export const InspectionRecordMain = useCrudSchemas(
isForm: false, isForm: false,
isDetail: false, isDetail: false,
table: { table: {
width: 250, width: 300,
fixed: 'right' fixed: 'right'
} }
} }

1
src/views/qms/inspectionRecordFirst/addForm.vue

@ -715,6 +715,7 @@ if (props.basicFormWidth) {
dialogWidth.value = props.isBusiness ? '60%' : '40%' dialogWidth.value = props.isBusiness ? '60%' : '40%'
} }
const rules = ref({ const rules = ref({
inspectionSchemeCode: [{ required: true, message: '请选择检验方案', trigger: 'blur' }],
inspectionTime: [{ required: true, message: '请选择检验时间', trigger: 'blur' }], inspectionTime: [{ required: true, message: '请选择检验时间', trigger: 'blur' }],
'inspectionJobCharacteristicsUpdateReqVO.description': [ 'inspectionJobCharacteristicsUpdateReqVO.description': [
{ required: true, message: '请填写描述', trigger: ['blur', 'change'] } { required: true, message: '请填写描述', trigger: ['blur', 'change'] }

38
src/views/qms/inspectionRecordFirst/index.vue

@ -1,7 +1,12 @@
<template> <template>
<ContentWrap> <ContentWrap>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<Search :schema="InspectionRecordMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> <Search :schema="InspectionRecordMain.allSchemas.searchSchema" @search="setSearchParams"
@reset="setSearchParams({
available: true,
inspectionType:'11'
})"
/>
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
@ -49,6 +54,15 @@
<!-- 包装信息 --> <ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionRecordMain.allSchemas" <!-- 包装信息 --> <ListTable ref="listTableRef" titleName="包装信息" :allSchemas="InspectionRecordMain.allSchemas"
:detailAllSchemas="InspectionRecordPackage.allSchemas" :detailAllSchemasRules="InspectionRecordPackageRules" :detailAllSchemas="InspectionRecordPackage.allSchemas" :detailAllSchemasRules="InspectionRecordPackageRules"
:list="list"/> :list="list"/>
<el-dialog
v-model="showQualityReport"
:title="t('质检明细')"
:append-to-body="false"
destroy-on-close
fullscreen
>
<iframe :height="reportHeight" width="100%" :src="qualityReport" frameborder="0"></iframe>
</el-dialog>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -62,6 +76,7 @@
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import AddForm from '../inspectionRecordFirst/addForm.vue' import AddForm from '../inspectionRecordFirst/addForm.vue'
import Detail from './detail.vue' import Detail from './detail.vue'
import { getReportUrl } from '@/utils/systemParam'
import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data' import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeatures,InspectionTemplateRules } from '../inspectionTemplate/inspectionTemplate.data'
@ -139,8 +154,8 @@ const buttonBaseClick = (val, item) => {
defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:update' }), // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:update' }), //
defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:delete' }), // defaultButtons.mainListDeleteBtn({ hide: isShowMainButton(row, 'publish'),hasPermi: 'wms:inspection-recode-first-main:delete' }), //
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi: 'qms:inspection-recode-first-main:pub' }), // defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row, 'publish'), hasPermi: 'qms:inspection-recode-first-main:pub' }), //
defaultButtons.mainExport({ hide: !row.isPublished }),//
defaultButtons.mainExport({ hide: !row.isPublished}), // defaultButtons.mainListPlanCheckQualityReportBtn({}) //
] ]
} }
@ -156,11 +171,22 @@ const buttonBaseClick = (val, item) => {
handleDelete(row.id) handleDelete(row.id)
}else if (val == 'mainOrderPub') { // }else if (val == 'mainOrderPub') { //
handleOrderPub(row) handleOrderPub(row)
}else if (val == 'mainExport') { }else if (val == 'mainPlanCheckQualityReport') {
//
checkQualityReport(row)
} else if (val == 'mainExport') {
// //
handleMainExport(row) handleMainExport(row)
} }
} }
//
const reportHeight = ref(window.innerHeight - 120)
const showQualityReport = ref(false)
const qualityReport = ref('')
const checkQualityReport = async (row) => {
showQualityReport.value = true
qualityReport.value = `${getReportUrl()}/purchasereceiptReport?asnNumber=${row.asnNumber}`
}
/** 添加/修改操作 */ /** 添加/修改操作 */
const basicFormRef = ref() const basicFormRef = ref()
const openForm = async (type : string, row ?: number) => { const openForm = async (type : string, row ?: number) => {
@ -217,7 +243,7 @@ const handleMainExport = async (row: any) => {
} }
/** 导出按钮操作 */ /** 导出按钮操作 */
const handleExport = async () => { const handleExport = async () => {
try { try {
// //

37
src/views/qms/inspectionRecordFirst/inspectionRecordFirstMain.data.ts

@ -29,7 +29,7 @@ export const InspectionRecordMain = useCrudSchemas(
isSearch: false, isSearch: false,
table: { table: {
width: 150 width: 150
}, }
}, },
{ {
label: '物料编码', label: '物料编码',
@ -82,7 +82,6 @@ export const InspectionRecordMain = useCrudSchemas(
} }
}, },
{ {
label: '检验人', label: '检验人',
field: 'creator', field: 'creator',
@ -123,7 +122,6 @@ export const InspectionRecordMain = useCrudSchemas(
type: 'daterange', type: 'daterange',
dateFormat: 'YYYY-MM-DD', dateFormat: 'YYYY-MM-DD',
valueFormat: 'YYYY-MM-DD' valueFormat: 'YYYY-MM-DD'
} }
}, },
form: { form: {
@ -136,13 +134,38 @@ export const InspectionRecordMain = useCrudSchemas(
} }
} }
}, },
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{
label: '发货单号',
field: 'asnNumber',
sort: 'custom',
isSearch: true,
form: {
componentProps: {
disabled: true
}
},
table: {
width: 180
}
},
{ {
label: '操作', label: '操作',
field: 'action', field: 'action',
isForm: false, isForm: false,
isDetail: false, isDetail: false,
table: { table: {
width: 200, width: 300,
fixed: 'right' fixed: 'right'
} }
} }
@ -271,7 +294,11 @@ export const InspectionRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isSearch: false, isTable: true,
table: {
width: 180,
},
isSearch: true,
search: { search: {
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {

11
src/views/qms/inspectionRequest/index.vue

@ -5,7 +5,9 @@
<Search <Search
:schema="InspectionMain.allSchemas.searchSchema" :schema="InspectionMain.allSchemas.searchSchema"
@search="setSearchParams" @search="setSearchParams"
@reset="setSearchParams" @reset="setSearchParams({
available: true
})"
/> />
</ContentWrap> </ContentWrap>
@ -148,7 +150,7 @@ const { getList, setSearchParams } = tableMethods
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn({ hasPermi: 'qms:inspection-request-main:create' }), // defaultButtons.defaultAddBtn({ hasPermi: 'qms:inspection-request-main:create' }), //
// defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), // // defaultButtons.defaultImportBtn({ hasPermi: 'wms:inspectionMain:import' }), //
defaultButtons.defaultExportBtn(null), // defaultButtons.defaultExportBtn({ hasPermi: 'qms:inspection-request-main:export' }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
@ -175,8 +177,9 @@ const buttonBaseClick = (val, item) => {
handleExport() handleExport()
} else if (val == 'refresh') { } else if (val == 'refresh') {
// //
tableObject.params.isSearch = false // tableObject.params.isSearch = false
tableObject.params.filters = '' // tableObject.params.filters = ''
console.log(tableObject.params)
getList() getList()
} else if (val == 'filtrate') { } else if (val == 'filtrate') {
// //

75
src/views/qms/inspectionRequest/inspectionRequestMain.data.ts

@ -250,14 +250,16 @@ export const InspectionMain = useCrudSchemas(
isMainValue: false isMainValue: false
} }
], ],
verificationParams: [{ verificationParams: [
key: 'code', {
action: '==', key: 'code',
value: '', action: '==',
isMainValue: false, value: '',
isSearch: true, isMainValue: false,
isFormModel: true, isSearch: true,
}], // 失去焦点校验参数 isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -300,14 +302,16 @@ export const InspectionMain = useCrudSchemas(
isMainValue: false isMainValue: false
} }
], ],
verificationParams: [{ verificationParams: [
key: 'code', {
action: '==', key: 'code',
value: '', action: '==',
isMainValue: false, value: '',
isSearch: true, isMainValue: false,
isFormModel: true, isSearch: true,
}], // 失去焦点校验参数 isFormModel: true
}
] // 失去焦点校验参数
} }
} }
}, },
@ -436,8 +440,8 @@ export const InspectionMain = useCrudSchemas(
isSearch: true isSearch: true
}, },
{ {
label: 'aql', label: 'AQL值',
field: 'aql', field: 'aqlValue',
sort: 'custom', sort: 'custom',
dictType: DICT_TYPE.BASIC_AQL, dictType: DICT_TYPE.BASIC_AQL,
dictClass: 'string', dictClass: 'string',
@ -445,6 +449,19 @@ export const InspectionMain = useCrudSchemas(
width: 150 width: 150
} }
}, },
{
label: '状态',
field: 'status',
dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string',
isForm: false,
isTable: true,
isSearch: true,
sort: 'custom',
table: {
width: 150
}
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',
@ -467,6 +484,19 @@ export const InspectionMain = useCrudSchemas(
width: 110 width: 110
} }
}, },
{
label: '包装号',
field: 'packageCode',
sort: 'custom',
isSearch: true,
isTable: false,
isForm: false,
tableForm: {
disabled: false
}
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -486,6 +516,15 @@ export const InspectionMain = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
},
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
} }
}, },
{ {

6
src/views/qms/inspectionScheme/addForm.vue

@ -820,7 +820,7 @@ const rules = ref({
programmeTemplateCode: [ programmeTemplateCode: [
{ required: true, message: '请选择检验模板', trigger: ['blur', 'change'] } { required: true, message: '请选择检验模板', trigger: ['blur', 'change'] }
], ],
description: [{ required: true, message: '请选择描述', trigger: 'blur' }], description: [{ required: false, message: '请选择描述', trigger: 'blur' }],
// splitRule: [{ required: true, message: '', trigger: ['blur', 'change'] }], // splitRule: [{ required: true, message: '', trigger: ['blur', 'change'] }],
aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change'] }], aql: [{ required: true, message: '请选择aql', trigger: ['blur', 'change'] }],
inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }], inspectionLevel: [{ required: true, message: '请选择检验水平', trigger: ['blur', 'change'] }],
@ -1371,7 +1371,7 @@ const searchTableSuccess = async (formField, searchField, val, type, row) => {
data.value.samplePieceSize = 1 data.value.samplePieceSize = 1
isSamplePieceSizeDisabled.value = false isSamplePieceSizeDisabled.value = false
} }
data.value.description = val[0].desc1 // data.value.description = val[0].desc1
} else if (formField == 'inspectionType') { } else if (formField == 'inspectionType') {
data.value.testTypeName = val[0].description data.value.testTypeName = val[0].description
} else if (formField == 'programmeTemplateCode') { } else if (formField == 'programmeTemplateCode') {
@ -1478,7 +1478,7 @@ const onItemBlur= async (field, pageApi, item) => {
const obj = array.list[0] const obj = array.list[0]
if (obj) { if (obj) {
dataObj['itemName'] = obj.name dataObj['itemName'] = obj.name
dataObj['description'] = obj.desc1 // dataObj['description'] = obj.desc1
} else { } else {
message.alert('暂无数据') message.alert('暂无数据')
dataObj[field + 'Code'] = '' dataObj[field + 'Code'] = ''

11
src/views/qms/inspectionScheme/inspectionScheme.data.ts

@ -221,7 +221,16 @@ export const InspectionSchemeMain = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
}, },
{ {
label: '创建者', label: '创建者',

11
src/views/qms/inspectionTemplate/inspectionTemplate.data.ts

@ -96,7 +96,16 @@ export const InspectionTemplateMain = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
}, },
{ {
label: '创建者', label: '创建者',

11
src/views/qms/sampleCode/sampleCode.data.ts

@ -139,7 +139,16 @@ export const SampleCode = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '创建者', label: '创建者',

11
src/views/qms/samplingProcess/samplingProcess.data.ts

@ -122,7 +122,16 @@ export const SamplingProcess = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
}, },
{ {
label: '创建者', label: '创建者',

11
src/views/qms/samplingScheme/samplingScheme.data.ts

@ -66,7 +66,16 @@ export const SamplingScheme = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '创建者', label: '创建者',

11
src/views/qms/selectedSet/selectedSet.data.ts

@ -68,7 +68,16 @@ export const SelectedSet = useCrudSchemas(
dateFormat: 'YYYY-MM-DD HH:mm:ss', dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x' valueFormat: 'x'
} }
} },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
}, },
{ {
label: '创建者', label: '创建者',

5
src/views/system/serialNumber/index.vue

@ -99,6 +99,9 @@
import download from '@/utils/download' import download from '@/utils/download'
import * as SerialNumberApi from '@/api/system/serialNumber' import * as SerialNumberApi from '@/api/system/serialNumber'
import SerialNumberForm from './SerialNumberForm.vue' import SerialNumberForm from './SerialNumberForm.vue'
import { formatDate } from '@/utils/formatTime'
const route = useRoute() //
defineOptions({ name: 'SerialNumber' }) defineOptions({ name: 'SerialNumber' })
@ -168,7 +171,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await SerialNumberApi.exportSerialNumber(queryParams) const data = await SerialNumberApi.exportSerialNumber(queryParams)
download.excel(data, '流水号规则.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

2
src/views/system/systemInstallPackage/index.vue

@ -123,7 +123,7 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:system-install-package:update'}), // defaultButtons.mainListEditBtn({hasPermi:'wms:system-install-package:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:system-install-package:delete'}), // defaultButtons.mainListDeleteBtn({hasPermi:'wms:system-install-package:delete'}), //
] ]
// - // -

4
src/views/system/tenant/index.vue

@ -104,6 +104,8 @@ import download from '@/utils/download'
import * as TenantApi from '@/api/system/tenant' import * as TenantApi from '@/api/system/tenant'
import * as TenantPackageApi from '@/api/system/tenantPackage' import * as TenantPackageApi from '@/api/system/tenantPackage'
import TenantForm from './TenantForm.vue' import TenantForm from './TenantForm.vue'
import { formatDate } from '@/utils/formatTime'
const route = useRoute() //
defineOptions({ name: 'SystemTenant' }) defineOptions({ name: 'SystemTenant' })
@ -177,7 +179,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await TenantApi.exportTenant(queryParams) const data = await TenantApi.exportTenant(queryParams)
download.excel(data, '租户列表.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

7
src/views/system/user/index.vue

@ -29,6 +29,10 @@
start-placeholder="开始日期" end-placeholder="结束日期" class="!w-240px" /> start-placeholder="开始日期" end-placeholder="结束日期" class="!w-240px" />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-form-item label="用户昵称" prop="nickeName">
<el-input v-model="queryParams.nickeName" placeholder="请输入用户昵称" clearable @keyup.enter="handleQuery"
class="!w-240px" />
</el-form-item>
<el-button type="info" plain @click="handleQuery"> <el-button type="info" plain @click="handleQuery">
<Icon icon="ep:search" />搜索 <Icon icon="ep:search" />搜索
</el-button> </el-button>
@ -125,7 +129,8 @@ const queryParams = reactive({
mobile: undefined, mobile: undefined,
status: undefined, status: undefined,
deptId: undefined, deptId: undefined,
createTime: [] createTime: [],
nickeName:undefined
}) })
const queryFormRef = ref() // const queryFormRef = ref() //

21
src/views/wms/agvManage/agvLocationrelation/index.vue

@ -69,6 +69,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'AgvLocationrelation' }) defineOptions({ name: 'AgvLocationrelation' })
@ -128,7 +129,13 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
getList() if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else { // } else { //
console.log('其他按钮', item) console.log('其他按钮', item)
@ -202,7 +209,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -220,7 +231,7 @@ const handleDelete = async (id: number) => {
await AgvLocationrelationApi.deleteAgvLocationrelation(id) await AgvLocationrelationApi.deleteAgvLocationrelation(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -233,7 +244,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params) const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params)
download.excel(data, 'AGV库位转换.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -248,7 +259,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: 'AGV库位转换导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/customerManage/customer/customer.data.ts

@ -244,7 +244,7 @@ export const Customer = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -267,7 +267,7 @@ export const Customer = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/customerManage/customer/index.vue

@ -67,6 +67,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Customer' }) defineOptions({ name: 'Customer' })
@ -195,7 +196,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -215,7 +220,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -229,7 +234,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await CustomerApi.exportCustomer(tableObject.params) const data = await CustomerApi.exportCustomer(tableObject.params)
download.excel(data, '客户 .xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -244,7 +249,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '客户导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

12
src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/customerDeliveryForecast.data.ts

@ -116,6 +116,9 @@ export const CustomerDeliveryForecast = useCrudSchemas(reactive<CrudSchema[]>([
field: 'createTime', field: 'createTime',
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
table: {
width: 180,
},
isForm: false, isForm: false,
form: { form: {
component: 'DatePicker', component: 'DatePicker',
@ -125,6 +128,15 @@ export const CustomerDeliveryForecast = useCrudSchemas(reactive<CrudSchema[]>([
valueFormat: 'x', valueFormat: 'x',
} }
}, },
isSearch: true,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
},
},
}, },
{ {
label: '是否可用', label: '是否可用',

16
src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue

@ -124,7 +124,13 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
getList() if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else { // } else { //
console.log('其他按钮', item) console.log('其他按钮', item)
@ -180,7 +186,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -198,7 +208,7 @@ const handleDelete = async (id: number) => {
await CustomerDeliveryForecastApi.deleteCustomerDeliveryForecast(id) await CustomerDeliveryForecastApi.deleteCustomerDeliveryForecast(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }

4
src/views/wms/basicDataManage/customerManage/customerdock/customerdock.data.ts

@ -296,7 +296,7 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -319,7 +319,7 @@ export const Customerdock = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/customerManage/customerdock/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Customerdock' }) defineOptions({ name: 'Customerdock' })
@ -198,7 +199,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -230,7 +235,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -243,7 +248,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await CustomerdockApi.exportCustomerdock(tableObject.params) const data = await CustomerdockApi.exportCustomerdock(tableObject.params)
download.excel(data, '客户月台.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -258,7 +263,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '客户月台导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/customerManage/customeritem/customeritem.data.ts

@ -284,7 +284,7 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -307,7 +307,7 @@ export const Customeritem = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/customerManage/customeritem/index.vue

@ -71,6 +71,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as ItembasicApi from '@/api/wms/itembasic' import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../../itemManage/itembasic/itembasic.data' import { Itembasic } from '../../itemManage/itembasic/itembasic.data'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Customeritem' }) defineOptions({ name: 'Customeritem' })
@ -204,7 +205,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
const onEnter = async (field,value)=>{ const onEnter = async (field,value)=>{
console.log(field,value) console.log(field,value)
@ -254,7 +259,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -267,7 +272,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await CustomeritemApi.exportCustomeritem(tableObject.params) const data = await CustomeritemApi.exportCustomeritem(tableObject.params)
download.excel(data, '客户物料 .xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -282,7 +287,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '客户物料导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

13
src/views/wms/basicDataManage/customerManage/project/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Project' }) defineOptions({ name: 'Project' })
@ -195,7 +196,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -224,7 +229,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -237,7 +242,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await ProjectApi.exportProject(tableObject.params) const data = await ProjectApi.exportProject(tableObject.params)
download.excel(data, '项目.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -252,7 +257,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '项目导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/customerManage/project/project.data.ts

@ -163,7 +163,7 @@ export const Project = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -186,7 +186,7 @@ export const Project = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/customerManage/saleprice/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Saleprice' }) defineOptions({ name: 'Saleprice' })
@ -199,7 +200,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -228,7 +233,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -241,7 +246,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await SalepriceApi.exportSaleprice(tableObject.params) const data = await SalepriceApi.exportSaleprice(tableObject.params)
download.excel(data, '销售价格单.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -256,7 +261,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '销售价格单导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/customerManage/saleprice/saleprice.data.ts

@ -222,7 +222,7 @@ export const Saleprice = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -245,7 +245,7 @@ export const Saleprice = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

9
src/views/wms/basicDataManage/documentSetting/businesstype/index.vue

@ -78,6 +78,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'Businesstype' }) defineOptions({ name: 'Businesstype' })
@ -287,7 +288,7 @@ const formsSuccess = async (formType, submitData) => {
.then(async () => { .then(async () => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
await getList() buttonBaseClick('refresh',null)
}) })
.catch(() => { .catch(() => {
data.itemTypes = data.itemTypes.split(',') data.itemTypes = data.itemTypes.split(',')
@ -352,7 +353,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -365,7 +366,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await BusinesstypeApi.exportBusinesstype(tableObject.params) const data = await BusinesstypeApi.exportBusinesstype(tableObject.params)
download.excel(data, '业务类型.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -380,7 +381,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '业务类型导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

13
src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Documentsetting' }) defineOptions({ name: 'Documentsetting' })
@ -176,7 +177,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -196,7 +201,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -209,7 +214,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await DocumentsettingApi.exportDocumentsetting(tableObject.params) const data = await DocumentsettingApi.exportDocumentsetting(tableObject.params)
download.excel(data, '单据设置.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -224,7 +229,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '单据设置导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

13
src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Jobsetting' }) defineOptions({ name: 'Jobsetting' })
@ -176,7 +177,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -196,7 +201,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -209,7 +214,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await JobsettingApi.exportJobsetting(tableObject.params) const data = await JobsettingApi.exportJobsetting(tableObject.params)
download.excel(data, '任务单设置.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -224,7 +229,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '任务单设置导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

13
src/views/wms/basicDataManage/documentSetting/plansetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Plansetting' }) defineOptions({ name: 'Plansetting' })
@ -177,7 +178,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -197,7 +202,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -210,7 +215,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await PlansettingApi.exportPlansetting(tableObject.params) const data = await PlansettingApi.exportPlansetting(tableObject.params)
download.excel(data, '计划单设置.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -225,7 +230,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '计划单设置导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

13
src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Recordsetting' }) defineOptions({ name: 'Recordsetting' })
@ -177,7 +178,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -197,7 +202,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -210,7 +215,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await RecordsettingApi.exportRecordsetting(tableObject.params) const data = await RecordsettingApi.exportRecordsetting(tableObject.params)
download.excel(data, '记录单设置.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -225,7 +230,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '记录单设置导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

13
src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Requestsetting' }) defineOptions({ name: 'Requestsetting' })
@ -177,7 +178,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -197,7 +202,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -210,7 +215,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await RequestsettingApi.exportRequestsetting(tableObject.params) const data = await RequestsettingApi.exportRequestsetting(tableObject.params)
download.excel(data, '申请单设置.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -225,7 +230,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '申请单设置导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

9
src/views/wms/basicDataManage/documentSetting/switch/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Switch' }) defineOptions({ name: 'Switch' })
@ -176,7 +177,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -189,7 +190,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await SwitchApi.exportSwitch(tableObject.params) const data = await SwitchApi.exportSwitch(tableObject.params)
download.excel(data, '单据开关.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -204,7 +205,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '单据开关导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {
@ -225,7 +226,7 @@ const success = async (formType, data) => {
const res = await SwitchApi.updateSwitch(data) const res = await SwitchApi.updateSwitch(data)
if(true===res){ if(true===res){
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
getList() buttonBaseClick('refresh',null)
}else{ }else{
message.error('修改失败') message.error('修改失败')
} }

13
src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Transactiontype' }) defineOptions({ name: 'Transactiontype' })
@ -178,7 +179,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -198,7 +203,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -211,7 +216,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await TransactiontypeApi.exportTransactiontype(tableObject.params) const data = await TransactiontypeApi.exportTransactiontype(tableObject.params)
download.excel(data, '事务类型.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -226,7 +231,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '事务类型导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data.ts

@ -214,7 +214,7 @@ export const Area = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -237,7 +237,7 @@ export const Area = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue

@ -68,6 +68,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Area' }) defineOptions({ name: 'Area' })
@ -201,7 +202,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -230,7 +235,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -243,7 +248,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await AreaApi.exportArea(tableObject.params) const data = await AreaApi.exportArea(tableObject.params)
download.excel(data, '库区.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -258,7 +263,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '库区导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/dock/dock.data.ts

@ -252,7 +252,7 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -275,7 +275,7 @@ export const Dock = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/dock/index.vue

@ -70,6 +70,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as LocationApi from '@/api/wms/location' import * as LocationApi from '@/api/wms/location'
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Dock' }) defineOptions({ name: 'Dock' })
@ -230,7 +231,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
@ -244,7 +249,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -257,7 +262,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await DockApi.exportDock(tableObject.params) const data = await DockApi.exportDock(tableObject.params)
download.excel(data, '月台.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -272,7 +277,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '月台导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

3
src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue

@ -59,6 +59,7 @@ import download from '@/utils/download'
import { Enterprise,EnterpriseRules } from './enterprise.data' import { Enterprise,EnterpriseRules } from './enterprise.data'
import * as EnterpriseApi from '@/api/wms/enterprise' import * as EnterpriseApi from '@/api/wms/enterprise'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Enterprise' }) defineOptions({ name: 'Enterprise' })
@ -229,7 +230,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await EnterpriseApi.exportEnterprise(tableObject.params) const data = await EnterpriseApi.exportEnterprise(tableObject.params)
download.excel(data, '企业.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

13
src/views/wms/basicDataManage/factoryModeling/location/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'Location' }) defineOptions({ name: 'Location' })
@ -219,7 +220,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -248,7 +253,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -261,7 +266,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await LocationApi.exportLocation(tableObject.params) const data = await LocationApi.exportLocation(tableObject.params)
download.excel(data, '库位.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -276,7 +281,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '库位导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/location/location.data.ts

@ -392,7 +392,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -415,7 +415,7 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'Locationgroup' }) defineOptions({ name: 'Locationgroup' })
@ -200,7 +201,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -229,7 +234,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -242,7 +247,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await LocationgroupApi.exportLocationgroup(tableObject.params) const data = await LocationgroupApi.exportLocationgroup(tableObject.params)
download.excel(data, '库位组.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -257,7 +262,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '库位组导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/locationgroup/locationgroup.data.ts

@ -214,7 +214,7 @@ export const Locationgroup = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -237,7 +237,7 @@ export const Locationgroup = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/process/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Process' }) defineOptions({ name: 'Process' })
@ -207,7 +208,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -236,7 +241,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -249,7 +254,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await ProcessApi.exportProcess(tableObject.params) const data = await ProcessApi.exportProcess(tableObject.params)
download.excel(data, '工序.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -264,7 +269,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '工序导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/process/process.data.ts

@ -217,7 +217,7 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -240,7 +240,7 @@ export const Process = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/productionline/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
// 线 // 线
defineOptions({ name: 'Productionline' }) defineOptions({ name: 'Productionline' })
@ -200,7 +201,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -229,7 +234,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -242,7 +247,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await ProductionlineApi.exportProductionline(tableObject.params) const data = await ProductionlineApi.exportProductionline(tableObject.params)
download.excel(data, '生产线.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -257,7 +262,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '生产线导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/productionline/productionline.data.ts

@ -227,7 +227,7 @@ export const Productionline = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -250,7 +250,7 @@ export const Productionline = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Warehouse' }) defineOptions({ name: 'Warehouse' })
@ -189,7 +190,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -209,7 +214,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -222,7 +227,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await WarehouseApi.exportWarehouse(tableObject.params) const data = await WarehouseApi.exportWarehouse(tableObject.params)
download.excel(data, '仓库.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -237,7 +242,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '仓库导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data.ts

@ -156,7 +156,7 @@ export const Warehouse = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -179,7 +179,7 @@ export const Warehouse = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/workshop/index.vue

@ -65,6 +65,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Workshop' }) defineOptions({ name: 'Workshop' })
@ -191,7 +192,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -211,7 +216,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -224,7 +229,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await WorkshopApi.exportWorkshop(tableObject.params) const data = await WorkshopApi.exportWorkshop(tableObject.params)
download.excel(data, '车间.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -239,7 +244,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '车间导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/workshop/workshop.data.ts

@ -124,7 +124,7 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -147,7 +147,7 @@ export const Workshop = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/factoryModeling/workstation/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'Workstation' }) defineOptions({ name: 'Workstation' })
@ -209,7 +210,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -238,7 +243,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -251,7 +256,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await WorkstationApi.exportWorkstation(tableObject.params) const data = await WorkstationApi.exportWorkstation(tableObject.params)
download.excel(data, '工位.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -266,7 +271,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '工位导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/factoryModeling/workstation/workstation.data.ts

@ -302,7 +302,7 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -325,7 +325,7 @@ export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

4
src/views/wms/basicDataManage/itemManage/bom/bom.data.ts

@ -255,7 +255,7 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -278,7 +278,7 @@ export const Bom = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

13
src/views/wms/basicDataManage/itemManage/bom/index.vue

@ -68,6 +68,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as ProcessApi from "@/api/wms/process"; import * as ProcessApi from "@/api/wms/process";
import { formatDate } from '@/utils/formatTime'
// bom // bom
defineOptions({ name: 'Bom' }) defineOptions({ name: 'Bom' })
@ -206,7 +207,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
// //
@ -241,7 +246,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -254,7 +259,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await BomApi.exportBom(tableObject.params) const data = await BomApi.exportBom(tableObject.params)
download.excel(data, '物料清单信息 .xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -269,7 +274,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料清单信息导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

21
src/views/wms/basicDataManage/itemManage/itemarea/index.vue

@ -42,7 +42,6 @@
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm
ref="formRef" ref="formRef"
@success="getList"
:rules="ItemareaRules" :rules="ItemareaRules"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="locationCode" fieldTableColumn="locationCode"
@ -52,13 +51,13 @@
:tableData="tableData" :tableData="tableData"
:apiUpdate="ItemareaApi.updateItemarea" :apiUpdate="ItemareaApi.updateItemarea"
:apiCreate="ItemareaApi.createItemarea" :apiCreate="ItemareaApi.createItemarea"
:isBusiness="true" :isBusiness="false"
@handleAddTable="handleAddTable" @handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
:isShowReduceButtonSelection="true" :isShowReduceButtonSelection="true"
@tableSelectionDelete="tableSelectionDelete" @tableSelectionDelete="tableSelectionDelete"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
@submitForm="submitForm" @success="submitForm"
:isShowButton = isShowButton :isShowButton = isShowButton
:basicFormWidth="75" :basicFormWidth="75"
:tableFormDataLength="false" :tableFormDataLength="false"
@ -68,7 +67,7 @@
<Detail <Detail
ref="detailRef" ref="detailRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
:isBasic="false" :isBasic="true"
:allSchemas="Itemarea.allSchemas" :allSchemas="Itemarea.allSchemas"
:detailAllSchemas="ItemareaDetail.allSchemas" :detailAllSchemas="ItemareaDetail.allSchemas"
:detailAllSchemasRules="ItemareaDetailRules" :detailAllSchemasRules="ItemareaDetailRules"
@ -98,7 +97,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
  import TableHead from '@/components/TableHead/src/TableHead.vue'   import TableHead from '@/components/TableHead/src/TableHead.vue'
  import ImportForm from '@/components/ImportForm/src/ImportForm.vue'   import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
  import Detail from '@/components/Detail/src/Detail.vue'   import Detail from '@/components/Detail/src/Detail.vue'
  import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'Itemarea' }) defineOptions({ name: 'Itemarea' })
@ -323,7 +322,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -336,7 +335,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await ItemareaApi.exportItemarea(tableObject.params) const data = await ItemareaApi.exportItemarea(tableObject.params)
download.excel(data, '物料库区配置管理主.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -380,7 +379,11 @@ const submitForm = async (formType, data) => {
} }
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
// //
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} finally { } finally {
formRef.value.formLoading = false formRef.value.formLoading = false
} }
@ -395,7 +398,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料库区配置导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //

6
src/views/wms/basicDataManage/itemManage/itemarea/itemarea.data.ts

@ -669,7 +669,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
field: 'creator', field: 'creator',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
}, },
@ -680,7 +680,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
isTable: false, isTable: true,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
}, },
@ -693,7 +693,7 @@ export const Itemarea = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
sort: 'custom', sort: 'custom',
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
}, },

15
src/views/wms/basicDataManage/itemManage/itembasic/index.vue

@ -88,6 +88,9 @@ import { Expectin } from '@/views/wms/inventoryManage/expectin/expectin.data'
import * as ExpectinApi from '@/api/wms/expectin' import * as ExpectinApi from '@/api/wms/expectin'
import { formatDate } from '@/utils/formatTime'
// //
defineOptions({ name: 'Itembasic' }) defineOptions({ name: 'Itembasic' })
@ -185,7 +188,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料基础信息导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
@ -248,7 +251,11 @@ const formsSuccess = async (formType,data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
const detailRef = ref() const detailRef = ref()
@ -268,7 +275,7 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch { } } catch { }
} }
@ -280,7 +287,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await ItembasicApi.exportItembasic(tableObject.params) const data = await ItembasicApi.exportItembasic(tableObject.params)
download.excel(data, '物料基本信息.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false

14
src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts

@ -48,7 +48,7 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '描述1', label: '方案描述',
field: 'desc1', field: 'desc1',
sort: 'custom', sort: 'custom',
table: { table: {
@ -433,13 +433,16 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
label: '创建者', label: '创建者',
field: 'creator', field: 'creator',
isForm: false, isForm: false,
isTable: true isTable: true,
table: {
width: 180
},
}, },
{ {
label: '最后更新时间', label: '最后更新时间',
field: 'updateTime', field: 'updateTime',
sort: 'custom', sort: 'custom',
isTable: false, isTable: true,
isDetail: true, isDetail: true,
formatter: dateFormatter, formatter: dateFormatter,
isForm: false, isForm: false,
@ -464,7 +467,10 @@ export const Itembasic = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false isTable: true,
table: {
width: 180
},
}, },
{ label: '备注', field: 'remark', sort: 'custom', isTable: false}, { label: '备注', field: 'remark', sort: 'custom', isTable: false},
{ {

19
src/views/wms/basicDataManage/itemManage/itempackage/index.vue

@ -81,6 +81,7 @@ import * as ItembasicApi from '@/api/wms/itembasic'
import { Itembasic } from '../itembasic/itembasic.data' import { Itembasic } from '../itembasic/itembasic.data'
import * as PackageunitApi from '@/api/wms/packageunit' import * as PackageunitApi from '@/api/wms/packageunit'
import { Packageunit } from '../packageunit/packageunit.data' import { Packageunit } from '../packageunit/packageunit.data'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Itempackaging' }) defineOptions({ name: 'Itempackaging' })
@ -235,7 +236,11 @@ const formsSuccess = async (formType, data) => {
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
const onEnter = async (field,value)=>{ const onEnter = async (field,value)=>{
console.log('onEnter',field,value) console.log('onEnter',field,value)
@ -304,8 +309,12 @@ const handleDelete = async (id: number) => {
tableObject.loading = false tableObject.loading = false
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {
tableObject.loading = false
} finally {
tableObject.loading = false
}
} }
/** 导出按钮操作 */ /** 导出按钮操作 */
@ -317,7 +326,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await ItempackagingApi.exportItempackaging(tableObject.params) const data = await ItempackagingApi.exportItempackaging(tableObject.params)
download.excel(data, '物料包装信息.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -332,7 +341,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料包装信息导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

4
src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts

@ -256,7 +256,7 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
formatter: dateFormatter, formatter: dateFormatter,
detail: { detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss' dateFormat: 'YYYY-MM-DD HH:mm:ss'
@ -279,7 +279,7 @@ export const Itempackaging = useCrudSchemas(reactive<CrudSchema[]>([
field: 'updater', field: 'updater',
isDetail: true, isDetail: true,
isForm: false, isForm: false,
isTable: false, isTable: true,
table: { table: {
width: 150 width: 150
} }

5
src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue

@ -67,6 +67,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import * as WarehouseApi from "@/api/wms/warehouse"; import * as WarehouseApi from "@/api/wms/warehouse";
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Itemwarehouse' }) defineOptions({ name: 'Itemwarehouse' })
@ -229,7 +230,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await ItemwarehouseApi.exportItemwarehouse(tableObject.params) const data = await ItemwarehouseApi.exportItemwarehouse(tableObject.params)
download.excel(data, '物料仓库默认配置.xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -244,7 +245,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物料仓库默认配置导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

21
src/views/wms/basicDataManage/itemManage/packageunit/index.vue

@ -66,6 +66,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
import { formatDate } from '@/utils/formatTime'
defineOptions({ name: 'Packageunit' }) defineOptions({ name: 'Packageunit' })
@ -128,7 +129,13 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'export') { // } else if (val == 'export') { //
handleExport() handleExport()
} else if (val == 'refresh') { // } else if (val == 'refresh') { //
getList() if (tableObject.params.filters && tableObject.params.filters.length > 0 ) {
searchFormClick({
filters: tableObject.params.filters
})
} else {
getList()
}
} else if (val == 'filtrate') { // } else if (val == 'filtrate') { //
} else { // } else { //
console.log('其他按钮', item) console.log('其他按钮', item)
@ -224,7 +231,11 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.formLoading = false basicFormRef.value.formLoading = false
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() if (formType === 'create') {
getList()
}else{
buttonBaseClick('refresh',null)
}
} }
/** 详情操作 */ /** 详情操作 */
@ -242,7 +253,7 @@ const handleDelete = async (id: number) => {
await PackageunitApi.deletePackageunit(id) await PackageunitApi.deletePackageunit(id)
message.success(t('common.delSuccess')) message.success(t('common.delSuccess'))
// //
await getList() buttonBaseClick('refresh',null)
} catch {} } catch {}
} }
@ -255,7 +266,7 @@ const handleExport = async () => {
// //
exportLoading.value = true exportLoading.value = true
const data = await PackageunitApi.exportPackageunit(tableObject.params) const data = await PackageunitApi.exportPackageunit(tableObject.params)
download.excel(data, '物品包装规格信息 .xlsx') download.excel(data, `${route.meta.title}】【${formatDate(new Date())}】.xlsx`)
} catch { } catch {
} finally { } finally {
exportLoading.value = false exportLoading.value = false
@ -270,7 +281,7 @@ const handleImport = () => {
// //
const importTemplateData = reactive({ const importTemplateData = reactive({
templateUrl: '', templateUrl: '',
templateTitle: '物品包装规格信息导入模版.xlsx' templateTitle: `${route.meta.title}】导入模版.xlsx`
}) })
// //
const importSuccess = () => { const importSuccess = () => {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save