diff --git a/public/systemConfig.js b/public/systemConfig.js index c84fd37fb..cd2f48d94 100644 --- a/public/systemConfig.js +++ b/public/systemConfig.js @@ -12,5 +12,6 @@ let systemConfig = { // 租户配置 tenant: '["成都"]', systermUpdateAlert: true, - systermUpdateUrl: 'https://scptest.faway-hella.com/' + systermUpdateUrl: 'https://scptest.faway-hella.com/', + needCode:false } diff --git a/src/api/wms/purchasereturnRequestMain/index.ts b/src/api/wms/purchasereturnRequestMain/index.ts index d2ccf17ec..6ec472016 100644 --- a/src/api/wms/purchasereturnRequestMain/index.ts +++ b/src/api/wms/purchasereturnRequestMain/index.ts @@ -61,6 +61,10 @@ export const createPurchasereturnRequestMainNew = async (data: PurchasereturnReq export const updatePurchasereturnRequestMain = async (data: PurchasereturnRequestMainVO) => { return await request.put({ url: `/wms/purchasereturn-request-main/update`, data }) } +// 修改采购退货申请主 --新版 +export const updatePurchasereturnRequestMainNew = async (data: PurchasereturnRequestMainVO) => { + return await request.post({ url: `/wms/purchasereturn-request-main/updateReturnNew`, data }) +} // 删除采购退货申请主 export const deletePurchasereturnRequestMain = async (id: number) => { diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 5c75f708f..b72379329 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -399,4 +399,5 @@ export enum DICT_TYPE { PURCHASE_JOB_STATUS = 'purchase_job_status', // 采购收货任务状态 PUBLISHE_STATUS = 'publishe_status', // 采购收货任务状态 PUBLISHE_STATUS_FIRST_INSPECTION = 'publishe_status_first_inspection', // 首件检验记录发布状态 + RETURN_REASON_TYPE = 'return_reason_type', // 采购退货原因类型 } diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue index fb5102cb4..32c468e96 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await CustomerreceiptRecordMainApi.exportCustomerreceiptRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue index 092693924..cb112ac36 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue @@ -326,8 +326,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await CustomerreceiptRequestMainApi.exportCustomerreceiptRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue index 0e18f8d4a..10cff8f27 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue @@ -365,8 +365,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await CustomerreturnJobMainApi.exportCustomerreturnJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue index fbbc43f99..400ca9f5b 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue @@ -162,8 +162,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await CustomerreturnRecordMainApi.exportCustomerreturnRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index fbb7aa3bc..376ff1484 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -653,8 +653,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await CustomerreturnRequestMainApi.exportCustomerreturnRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue index 44f8292f7..18d8288dc 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await CustomersettleRecordMainApi.exportCustomersettleRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index d0cba855a..748d49b20 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -337,8 +337,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await CustomersettleRequestMainApi.exportCustomersettleRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue index 389ada838..39845108a 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue @@ -350,8 +350,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await DeliverJobMainApi.exportDeliverJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue index e8ebfb94a..368a74cbc 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue @@ -184,8 +184,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await DeliverRecordMainApi.exportDeliverRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 10c39628d..822e0610a 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -474,12 +474,13 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) if(routeName.value == 'DeliverRequestMain'){ const data = await DeliverRequestMainApi.exportDeliverRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await DeliverRequestMainApi.exportZZBJDeliverRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index 5733a471c..65deef6fc 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -433,12 +433,13 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) if(routeName.value == 'DeliverRequestMain'){ const data = await DeliverPlanMainApi.exportDeliverPlanMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) }else{ const data = await DeliverPlanMainApi.exportZZBJDeliverPlanMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } } catch { } finally { diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue index 7eae33f06..b24e9156f 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue @@ -253,8 +253,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await SaleMainApi.exportSaleMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue index 88b4a1e08..3b7d011af 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue @@ -206,8 +206,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await SaleShipmentMainRecordApi.exportSaleShipmentMainRecord(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index b1ee5f67c..9b49ddef3 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -447,8 +447,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await SaleShipmentMainApi.exportSaleShipmentMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue index 2fa1dacb6..3a429d689 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue @@ -239,8 +239,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await StockupJobMainApi.exportStockupMainJob(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue index bba1c0547..de4cf0d62 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue @@ -157,8 +157,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await StockupMainRecordApi.exportStockupMainRecord(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index 51c0e7c72..bf0fc73c7 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -414,8 +414,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await StockupMainRequestApi.exportStockupMainRequest(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryManage/balance/index.vue b/src/views/wms/inventoryManage/balance/index.vue index efd4ef5fa..9a27a95b8 100644 --- a/src/views/wms/inventoryManage/balance/index.vue +++ b/src/views/wms/inventoryManage/balance/index.vue @@ -298,8 +298,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await BalanceApi.exportBalance(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryManage/expectin/index.vue b/src/views/wms/inventoryManage/expectin/index.vue index 7cf744d97..3ee7909ab 100644 --- a/src/views/wms/inventoryManage/expectin/index.vue +++ b/src/views/wms/inventoryManage/expectin/index.vue @@ -226,8 +226,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ExpectinApi.exportExpectin(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryManage/expectout/index.vue b/src/views/wms/inventoryManage/expectout/index.vue index 9e9395716..6e4828a26 100644 --- a/src/views/wms/inventoryManage/expectout/index.vue +++ b/src/views/wms/inventoryManage/expectout/index.vue @@ -225,8 +225,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ExpectoutApi.exportExpectout(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryManage/locationcapacity/index.vue b/src/views/wms/inventoryManage/locationcapacity/index.vue index e3eff998b..911166dc2 100644 --- a/src/views/wms/inventoryManage/locationcapacity/index.vue +++ b/src/views/wms/inventoryManage/locationcapacity/index.vue @@ -180,8 +180,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await LocationcapacityApi.exportLocationcapacity(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryManage/package/index.vue b/src/views/wms/inventoryManage/package/index.vue index 2207101a0..93e8c1971 100644 --- a/src/views/wms/inventoryManage/package/index.vue +++ b/src/views/wms/inventoryManage/package/index.vue @@ -250,8 +250,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await PackageApi.exportPackage(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryManage/transaction/index.vue b/src/views/wms/inventoryManage/transaction/index.vue index af4611586..fd08ba8bd 100644 --- a/src/views/wms/inventoryManage/transaction/index.vue +++ b/src/views/wms/inventoryManage/transaction/index.vue @@ -181,8 +181,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await TransactionApi.exportTransaction(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryManage/transferlog/index.vue b/src/views/wms/inventoryManage/transferlog/index.vue index ae4f21ba6..9dfbee8a8 100644 --- a/src/views/wms/inventoryManage/transferlog/index.vue +++ b/src/views/wms/inventoryManage/transferlog/index.vue @@ -180,8 +180,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ExpectinApi.exportTransferlog(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts index 57b7f701a..8eb790095 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts @@ -26,6 +26,33 @@ export const ScrapJobMain = useCrudSchemas( }, isSearch: true }, + { + label: 'Q1通知单号', + field: 'q1Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q3通知单号', + field: 'q3Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, { label: '状态', field: 'status', @@ -465,7 +492,7 @@ export const ScrapJobMain = useCrudSchemas( type: 'daterange', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } - }, + } }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts index e53fc5a87..1f76fd57c 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts @@ -35,6 +35,33 @@ export const ScrapRecordMain = useCrudSchemas( }, isSearch: true }, + { + label: 'Q1通知单号', + field: 'q1Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q3通知单号', + field: 'q3Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, { label: '申请时间', field: 'requestTime', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 76fc6168f..1e99700f7 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -483,14 +483,69 @@ const handleHandle = async (id: number) => { /** 添加/修改操作 */ const formRef = ref() -const openForm = async (type: string, row?: number) => { - ScrapRequestMain.allSchemas.formSchema.forEach((item) => { - if (item.field == 'q1Number' || item.field == 'q2Number' || item.field == 'q3Number') { - item.componentProps.enterSearch = true - item.componentProps.isSearchList = true - item.componentProps.disabled = false +const openForm = async (type: string, row?: any) => { + if (type == 'create') { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q1Number' || item.field == 'q2Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + }) + } else { + if (row.q1Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q1Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'q2Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = false + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) } - }) + if (row.q2Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q2Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'q1Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = false + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) + } + if (row.q3Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q3Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'q1Number' || item.field == 'q2Number') { + item.componentProps.enterSearch = false + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) + } + if (!row.q3Number && !row.q2Number && !row.q1Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q1Number' || item.field == 'q2Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + }) + } + } + tableData.value = [] // 重置明细数据 formRef.value.open(type, row) } diff --git a/src/views/wms/issueManage/issue/issueJobMain/index.vue b/src/views/wms/issueManage/issue/issueJobMain/index.vue index 3236df4a8..0900ccb6a 100644 --- a/src/views/wms/issueManage/issue/issueJobMain/index.vue +++ b/src/views/wms/issueManage/issue/issueJobMain/index.vue @@ -300,8 +300,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await IssueJobMainApi.exportIssueJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/issue/issueRecordMain/index.vue b/src/views/wms/issueManage/issue/issueRecordMain/index.vue index 1d33dadca..09be4ea36 100644 --- a/src/views/wms/issueManage/issue/issueRecordMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await IssueRecordMainApi.exportIssueRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index cc0172aea..8b0a7ec37 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -443,8 +443,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await IssueRequestMainApi.exportIssueRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue index 6a4851095..0b252d410 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue @@ -151,8 +151,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await OnlinesettlementRecordMainApi.exportOnlinesettlementRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue index 3ed7419cb..fdb65cb33 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue @@ -267,8 +267,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await OnlinesettlementRequestMainApi.exportOnlinesettlementRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index cbe5bb6f4..a45482301 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -458,8 +458,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await PreparetoissueMainApi.exportPreparetoissueMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue index c215034cd..25664257a 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue @@ -300,8 +300,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionreceiptJobMainApi.exportProductionreceiptJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue index 7a21ef6bb..7a755dd15 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionreceiptRecordMainApi.exportProductionreceiptRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue index 76b2ea5a7..829fa8cd5 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue @@ -272,8 +272,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionreturnJobMainApi.exportProductionreturnJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue index 17197ae23..1ac79535e 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue @@ -157,8 +157,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionreturnRecordMainApi.exportProductionreturnRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index bcc489c2e..c38810975 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -607,8 +607,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionreturnRequestMainApi.exportProductionreturnRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index cf54e1ceb..c86f9d785 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -551,8 +551,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionreturnRequestMainNoApi.exportProductionreturnRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue index a86d7465d..2ab729794 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionscrapRecordMainApi.exportProductionscrapRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue index 706cfc44d..d82c2e427 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue @@ -607,8 +607,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionscrapRequestMainApi.exportProductionscrapRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue index b2ced7cb5..0a6cdf28c 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue @@ -328,8 +328,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await RepleinshJobMainApi.exportRepleinshJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue index 3cd277407..aaabc13e8 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue @@ -153,8 +153,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await RepleinshRecordMainApi.exportRepleinshRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index f1429b571..4e7d268d9 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -344,8 +344,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue index cb2d66d12..ae74a1187 100644 --- a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue +++ b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await OfflinesettlementRecordMainApi.exportOfflinesettlementRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index 34cec3303..b4e3c69e1 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -408,8 +408,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProcessproductionRequestMainApi.exportProcessproductionRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue index 9ed0d75e4..8fe50a0c2 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue @@ -223,8 +223,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductdismantleJobMainApi.exportProductdismantleJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue index fcd8edda1..eeece57a8 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue @@ -226,8 +226,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductdismantleRecordMainApi.exportProductdismantleRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index a396a2639..09524c463 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -541,8 +541,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductdismantleRequestMainApi.exportProductdismantleRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index b00d63f2c..0714b74d0 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -549,8 +549,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index 76d95435d..3c9e4ce62 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -512,8 +512,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMainAssemble(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 4e6129d82..635a26584 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -500,9 +500,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMainAssembleSparePart(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) - } catch { + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } finally { exportLoading.value = false } diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 9f35454a4..3cb8bb4d0 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -502,8 +502,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMainPredictSparePart(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue index dc6c32a9b..73055b195 100644 --- a/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue +++ b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue @@ -214,8 +214,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await QadProductionPlanMainApi.exportQadProductionPlanMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue index ed31768e3..1dae7a485 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue @@ -246,8 +246,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductputawayJobMainApi.exportProductputawayJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue index 2abfe9ab6..00476fc84 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductputawayRecordMainApi.exportProductputawayRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index 2712cf70f..f8f85ce64 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -342,8 +342,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductputawayRequestMainApi.exportProductputawayRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue index eb9b174f7..48580ecad 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue @@ -249,8 +249,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductputawayJobMainApi.exportProductputawayJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue index 4bffe5fac..537b8df2d 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue @@ -156,8 +156,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductputawayRecordMainApi.exportProductputawayRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue index 1b39b44e4..2d134ead9 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue @@ -344,8 +344,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductputawayRequestMainApi.exportProductputawayRequestMainAssemble(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue index 24215192e..518556f93 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue @@ -350,8 +350,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index 3abac7cae..c68de58d5 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -294,8 +294,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index a300ebb1f..f5706b3e0 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -577,8 +577,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue index bf7f05680..02a099ecf 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue @@ -290,8 +290,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptJobMainApi.exportProductreceiptJobMainAssemble(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue index 6c885fcae..773573524 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue @@ -358,8 +358,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordAssembleMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 434ecb16a..2e08da174 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -576,8 +576,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMainAssemble(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue index 836ed5a27..a46e9350c 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue @@ -287,8 +287,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue index a40cdcdc8..d7d4a729d 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue @@ -199,8 +199,9 @@ const handleExport = async () => { await message.exportConfirm() // 发起导出 exportLoading.value = true + const excelTitle = ref(route.meta.title) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) - download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) + download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue index d6fee3548..1805e5bf4 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue @@ -99,6 +99,9 @@ { 'batch':item['batch'], 'status':item['inventoryStatus'], 'inventoryBalance':item['qty'], - 'qty':1, + 'qty':0, 'reason_type':'', 'reason':'' })) @@ -904,11 +907,19 @@ const submitForm = async (formType, submitData) => { // message.warning("退货数量不能大于收获数量") // return; // } - if (tableData.value.find((item) => item['qty']> item['inventoryBalance'])) { + if (tableData.value.find((item) => Number(item['qty'])> Number(item['inventoryBalance']))) { message.warning('退货数量不能大于库存余额') return } - data.subList = tableData.value.filter(item=>item['qty']>0) // 拼接子表数据参数 + console.log(tableData.value) + data.subList = tableData.value.filter(item=>Number(item['qty'])>0) // 拼接子表数据参数 + console.log('data.subList') + console.log(data.subList) + + if(data.subList.length<1){ + message.warning('至少有一条数据') + return + } formRef.value.formLoading = true try { if (formType === 'create') { @@ -917,7 +928,7 @@ const submitForm = async (formType, submitData) => { message.success(t('common.createSuccess')) } else { data.returnSourceType='1' - await PurchasereturnRequestMainApi.updatePurchasereturnRequestMain(data) + await PurchasereturnRequestMainApi.updatePurchasereturnRequestMainNew(data) message.success(t('common.updateSuccess')) } formRef.value.dialogVisible = false diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts new file mode 100644 index 000000000..ba8735894 --- /dev/null +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMain.data.ts @@ -0,0 +1,1858 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter, dateFormatter2 } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 +import * as getRequestsettingApi from '@/api/wms/requestsetting/index' +import { + PurchasereceiptRecordDetail, + PurchasereceiptRecordMain +} from '../../purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data' +import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' +import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/supplier.data' +import * as SupplierApi from '@/api/wms/supplier' +import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data' +import * as ItemPackageApi from '@/api/wms/itempackage/index' +import * as LocationApi from '@/api/wms/location' +import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' +import * as BalanceApi from '@/api/wms/balance' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + +import * as InspectionQ2Api from '@/api/qms/inspectionQ2' +import { Q2 } from '@/views/qms/inspectionQ2/inspectionQ2.data' + +// 获取自动提交自动通过自动执行,跳过任务直接删生成记录的默认值 +const queryParams = { + pageSize: 10, + pageNo: 1, + code: 'PurchaseReturnRequest' +} +const data = await getRequestsettingApi.getRequestsettingPage(queryParams) +const requestsettingData = data?.list[0] || {} + +// 获取当前操作人的部门 +import { useUserStore } from '@/store/modules/user' +import { TableColumn } from '@/types/table' +const userStore = useUserStore() +const userDept = userStore.userSelfInfo.dept +// id 转str 否则form回显匹配不到 +userDept.id = userDept.id.toString() +const userDeptArray: any = [userDept] + +// 采购收货记录展示列 +export const PurchasereceiptRecordMain1 = useCrudSchemas( + reactive([ + { + label: '物料代码', + field: 'itemCode', + fixed: 'left', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '采购收货记录单号', + field: 'number', + fixed: 'left', + sort: 'custom', + table: { + width: 200 + }, + isSearch: true + }, + { + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + sortTableDefault: 2, + isSearch: true + }, + { + label: '采购订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + } + }, + + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + } + }, + { + label: '批次', // 实际是子表的从批次,为了不影响页面,单独放上面 + field: 'fromBatch', + sort: 'custom', + isForm: false, + isTableForm: false, + table: { + width: 150 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + } + }, + // { + // label: '包装规格', + // field: 'packUnit', + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, + // { + // label: '从库位代码', + // field: 'fromLocationCode', + // sort: 'custom', + // table: { + // width: 150 + // }, + // + // }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + } + } + ]) +) + +/** + * @returns {Array} 采购退货申请主表 + */ +export const PurchasereturnRequestMain = useCrudSchemas( + reactive([ + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180, + fixed: 'left' + }, + isForm: false, + isSearch: true + }, + { + label: '状态', + field: 'status', + dictType: DICT_TYPE.REQUEST_STATUS, + dictClass: 'string', + isSearch: true, + isTable: true, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, + { + label: '供应商代码', + field: 'supplierCode', + sort: 'custom', + table: { + width: 150 + }, + sortTableDefault: 1, + isSearch: true, + form: { + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择供应商代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '供应商信息', // 查询弹窗标题 + searchAllSchemas: Supplier.allSchemas, // 查询弹窗所需类 + searchPage: SupplierApi.getSupplierPage, // 查询弹窗所需分页方法 + verificationParams: [ + { + key: 'code', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + + { + // label: '采购收货记录单号', + // field: 'purchaseReceiptRecordNumber', + label: '发货单号', + field: 'asnNumber', + sort: 'custom', + table: { + width: 180 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + disabled: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择发货单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: '采购收货记录', // 查询弹窗标题 + searchAllSchemas: PurchasereceiptRecordMain1.allSchemas, // 查询弹窗所需类 + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageReturn, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'supplierCode', + value: 'supplierCode', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + // { + // label: '发货单号', + // field: 'asnNumber', + // sort: 'custom', + // table: { + // width: 180 + // }, + // isForm: false, + // sortTableDefault: 2 + // }, + { + label: '要货计划单号', + field: 'ppNumber', + sort: 'custom', + table: { + width: 180 + }, + isForm: false, + isTable: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + isSearch: false, + isDetail: true, + table: { + width: 150 + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + // multiple: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择Q2通知单号', // 输入框占位文本 + searchField: 'number', // 查询弹窗赋值字段 + searchTitle: 'Q2通知单号', // 查询弹窗标题 + searchAllSchemas: Q2.allSchemas, // 查询弹窗所需类 + searchPage: InspectionQ2Api.getQ2Page, // 查询弹窗所需分页方法 + searchCondition: [ + { + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'status', + value: '0', + isMainValue: false + }, + { + key: 'supplierCode', + value: 'supplierCode', + isMainValue: true + } + ], + verificationParams: [ + { + key: 'number', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true + } + ] // 失去焦点校验参数 + } + } + }, + { + label: '承运商', + field: 'carrierCode', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '运输方式', + field: 'transferMode', + sort: 'custom', + dictType: DICT_TYPE.TRANSFER_MODE, + dictClass: 'string', + table: { + width: 150 + }, + isTable: false + }, + { + label: '车牌号', + field: 'vehiclePlateNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '从仓库代码', + field: 'fromWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '到仓库代码', + field: 'toWarehouseCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + isTable: false + }, + { + label: '从库区类型范围', + field: 'fromAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isForm: false + }, + { + label: '到库区类型范围', + field: 'toAreaTypes', + dictType: DICT_TYPE.AREA_TYPE, + dictClass: 'string', + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '从库区代码范围', + field: 'fromAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '到库区代码范围', + field: 'toAreaCodes', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false, + isTableForm: false + }, + { + label: '从月台代码', + field: 'fromDockCode', + sort: 'custom', + table: { + width: 150 + }, + isForm: false, + isTable: false + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'PurchaseReturn', + componentProps: { + disabled: true + } + }, + isForm: false, + isTable: false + }, + { + label: '申请时间', + field: 'requestTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + }, + isForm: false, + isTable: false + }, + { + label: '截止时间', + field: 'dueTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + isTable: false, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '部门', + field: 'departmentCode', + sort: 'custom', + isForm: false, + table: { + width: 150 + }, + isTable: false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return userDeptArray.find((account) => account.id == cellValue)?.name + }, + form: { + value: userDept.id, + component: 'Select', + api: () => userDeptArray, + componentProps: { + disabled: true, + optionsAlias: { + labelField: 'name', + valueField: 'id' + } + } + } + }, + + { + label: '原因', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false + }, + { + label: '创建时间', + field: 'createTime', + isForm: false, + table: { + width: 180 + }, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + 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: '创建者', + field: 'creator', + table: { + width: 130 + }, + isForm: false, + isTable: true + }, + { + label: '最后更新时间', + field: 'updateTime', + sort: 'custom', + isDetail: true, + isForm: false, + isTable: false, + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + style: { width: '100%' }, + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x' + } + } + }, + { + label: '最后更新者', + field: 'updater', + isDetail: true, + isForm: false, + isTable: false, + table: { + width: 150 + } + }, + { + label: '自动提交', + field: 'autoCommit', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoCommit, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动通过', + field: 'autoAgree', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoAgree, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '自动执行', + field: 'autoExecute', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isTable: false, + isForm: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.autoExecute, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '直接生成记录', + field: 'directCreateRecord', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isForm: false, + isTable: false, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: requestsettingData.directCreateRecord, + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE', + disabled: true + } + } + }, + { + label: '操作', + field: 'action', + isDetail: false, + isForm: false, + table: { + width: 300, + fixed: 'right' + } + } + ]) +) + +//表单校验 +export const PurchasereturnRequestMainRules = reactive({ + supplierCode: [ + { required: true, message: '请输入供应商代码', trigger: 'blur' } + ], + dueTime: [ + { required: true, message: '请选择截止时间', trigger: 'blur' } + ], + purchaseReceiptRecordNumber: [ + { required: true, message: '请输入采购收货记录单号', trigger: 'blur' } + ], + carrierCode: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + ], + vehiclePlateNumber: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' }, + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], + fromWarehouseCode: [ + { required: true, message: '请输入从仓库代码', trigger: 'blur' } + ], + fromAreaTypes: [ + { required: true, message: '请选择从库区类型范围', trigger: 'change' } + ], + departmentCode: [ + { required: true, message: '请输入部门', trigger: 'blur' } + ], + autoCommit: [ + { required: true, message: '请选择是否自动提交', trigger: 'change' } + ], + autoAgree: [ + { required: true, message: '请选择是否自动通过', trigger: 'change' } + ], + autoExecute: [ + { required: true, message: '请选择是否自动执行', trigger: 'change' } + ], + directCreateRecord: [ + { required: true, message: '请选择是否跳过任务直接生成记录', trigger: 'change' } + ], + businessType: [ + { required: true, message: '请输入业务类型', trigger: 'blur' } + ], +}) + +/** + * @returns {Array} 采购退货申请子表 + */ +export const PurchasereturnRequestDetail = useCrudSchemas(reactive([ + { + label: '订单号', + field: 'poNumber', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '订单行', + field: 'poLine', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + isInpuFocusShow: false, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, + searchCondition: [{ + key: 'number', + value: 'purchaseReceiptRecordNumber', + message: '请填写采购收货记录号!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + isSearchList: false, + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage, + searchCondition: [{ + key: 'number', + value: 'purchaseReceiptRecordNumber', + message: '请填写采购收货记录号!', + isMainValue: true + }] + } + }, + }, + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + // labelMessage: '信息提示说明!!!', + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode, + searchCondition: [{ + key: 'supplierCode', + value: 'supplierCode', + message: '请填写采购收货记录号!', + isMainValue: true + }] + }, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled:true, + isSearchList: true, + searchListPlaceholder: '请选择订单行', + searchField: 'poLine', + searchTitle: '采购收货记录信息', + searchAllSchemas: PurchasereceiptRecordDetail.allSchemas, + searchPage: PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageBySupplierCode, + searchCondition: [{ + key: 'supplierCode', + value: 'supplierCode', + message: '请填写采购收货记录号!', + isMainValue: true + }] + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:false, + isTable:false, + hiddenInMain: true, + isForm: false, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm:false, + isTable:false, + hiddenInMain: true, + isForm: false, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + form: { + componentProps:{ + disabled:true + } + } + }, + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // isTableForm: false, + // isTable: false, + // isForm: false, + // tableForm:{ + // disabled:true + // }, + // form: { + // componentProps:{ + // disabled:true + // } + // } + // }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // hiddenInMain: true, + // tableForm:{ + // disabled:true + // }, + // isTableForm: false, + // isTable: false, + // isForm: false, + // form: { + // componentProps:{ + // disabled:true + // } + // } + // }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + // isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true, + type: 'Select', + }, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6, + disabled:false + } + }, + isTable:false, + isTableForm:false, + tableForm:{ + disabled:true, + type:'InputNumber', + min:0, + precision: 6 + } + }, + // { //与国强联调的时候发现退货数量用的是qty + // label: '退货数量', + // field: 'returnedQty', + // sort: 'custom', + // table: { + // width: 150 + // }, + // form: { + // component: 'InputNumber', + // componentProps: { + // min: 0, + // precision: 6, + // disabled:false + // } + // }, + // isTable: false, + // isTableForm: false, + // isForm:false, + // tableForm:{ + // type:'InputNumber', + // min:0, + // precision: 6, + // disabled:false + // } + // }, + { + label: '从库位代码', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + // tableForm: { + // enterSearch: true, + // // labelMessage: '信息提示说明!!!', + // isInpuFocusShow: true, // 开启查询弹窗 + // searchListPlaceholder: '请选择从库位代码', + // searchField: 'code', + // searchTitle: '库位代码信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.getLocationListByAreaAndBusinesstype, + // searchCondition: [{ + // key: 'businessType', + // value: 'PurchaseReturn', + // message: '请填写业务类型', + // isMainValue: false + // },{ + // key: 'isIn', + // value: 'out', + // message: '', + // isMainValue: false + // }], + // verificationParams: [{ + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true, + // }], // 失去焦点校验参数 + // }, + form: { + componentProps:{ + disabled:true + } + }, + // form:{ + // // labelMessage: '信息提示说明!!!', + // componentProps: { + // enterSearch: true, + // isSearchList: true, + // searchListPlaceholder: '请选择从库位代码', + // searchField: 'code', + // searchTitle: '库位代码信息', + // searchAllSchemas: Location.allSchemas, + // searchPage: LocationApi.getLocationListByAreaAndBusinesstype, + // searchCondition: [{ + // key: 'businessType', + // value: 'PurchaseReturn', + // message: '请填写业务类型', + // isMainValue: false + // },{ + // key: 'isIn', + // value: 'out', + // message: '', + // isMainValue: false + // }], + // verificationParams: [{ + // key: 'code', + // action: '==', + // value: '', + // isMainValue: false, + // isSearch: true, + // isFormModel: true, + // }], // 失去焦点校验参数 + // } + // }, + hiddenInMain: true, + isTable: false, + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + hiddenInMain: true, + isTable: false, + // form: { + // componentProps:{ + // disabled: true, + // } + // }, + form: { + componentProps: { + enterSearch: true, + isSearchList: true, + searchListPlaceholder: '请选择包装号', + searchField: 'packingNumber', + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePageReturn, + searchCondition: [{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + required:true, + isMainValue:true + }, + // { + // key: 'batch', + // value: 'batch', + // message: '请填写批次', + // isTableRowValue: true, //查询当前searchTable表中行数据的值 + // // required:true, + // isMainValue:true + // } + ], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + } + }, + tableForm: { + enterSearch: true, + multiple: true, + // labelMessage: '信息提示说明!!!', + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码、批次、从库位代码', + searchField: 'packingNumber', + searchTitle: '库存余额信息', // 查询弹窗标题 + searchAllSchemas: Balance.allSchemas, // 查询弹窗所需类 + searchPage: BalanceApi.getBalancePageReturn, + searchCondition: [{ + key: 'itemCode', + value: 'itemCode', + message: '请填写物料代码', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + required:true, + isMainValue:false + }, + // { + // key: 'batch', + // value: 'batch', + // message: '请填写批次', + // isTableRowValue: true, //查询当前searchTable表中行数据的值 + // required:true, + // isMainValue:false + // } + ], + verificationParams: [{ + key: 'packingNumber', + action: '==', + value: '', + isMainValue: false, + isSearch: true, + isFormModel: true, + }], // 失去焦点校验参数 + }, + }, + { + label: '库存余额', + field: 'inventoryBalance', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled: true, + min: 0, + precision: 6 + } + }, + tableForm:{ + hidden:false,//控制列是否展示 + type:'InputNumber', + min:0, + precision: 6 + }, + hiddenInMain: true, + isTable: false, + isDetail: false, + }, + { + label: '退货数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + min: 0, + precision: 6 + } + }, + isForm:false, + tableForm:{ + type:'InputNumber', + min:0, + precision: 6 + } + }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isSearch: true, + hiddenInMain: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true, + type: 'Select', + }, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '到库位代码', + field: 'toLocationCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '从货主代码', + field: 'fromOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + { + label: '到货主代码', + field: 'toOwnerCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm: false, + isTable: false, + isForm: false, + form: { + componentProps:{ + disabled:true + } + } + }, + // { + // label: '到货日期', + // field: 'arriveDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // hiddenInMain: true, + // form: { + // component: 'DatePicker', + // componentProps: { + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // tableForm:{ + // disabled:true, + // type: 'FormDate', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // }, + // isTableForm: false + // }, + // { + // label: '生产日期', + // field: 'produceDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // hiddenInMain: true, + // sort: 'custom', + // table: { + // width: 180 + // }, + // form: { + // component: 'DatePicker', + // componentProps: { + // disabled: true, + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // tableForm:{ + // disabled:true, + // type: 'FormDate', + // format: 'YYYY-MM-DD', + // valueFormat: 'x', + // }, + // isTableForm: false + // }, + // { + // label: '过期日期', + // field: 'expireDate', + // formatter: dateFormatter2, + // detail: { + // dateFormat: 'YYYY-MM-DD' + // }, + // sort: 'custom', + // table: { + // width: 180 + // }, + // hiddenInMain: true, + // form: { + // component: 'DatePicker', + // componentProps: { + // disabled: true, + // style: {width: '100%'}, + // type: 'date', + // dateFormat: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // isTableForm: false, + // isTable: false, + // tableForm:{ + // disabled:true, + // type: 'FormDate', + // format: 'YYYY-MM-DD', + // valueFormat: 'x', + // } + // }, + // { + // label: '任务明细ID', + // field: 'jobDetailId', + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // disabled:true + // }, + // isTableForm:false, + // hiddenInMain: true, + // isForm:false, + // form: { + // componentProps:{ + // disabled:true + // } + // }, + // }, + { + label: '项目代码', + field: 'projectCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isForm: false, + isTableForm: false, + isTable: false, + hiddenInMain: true, + form: { + componentProps:{ + disabled:true + } + }, + }, + + { + label: '单据号', + field: 'number', + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + tableForm:{ + disabled:true + }, + isForm: false, + isTableForm:false, + }, + // { + // label: '接口类型', + // field: 'interfaceType', + // dictType: DICT_TYPE.INTERFACE_TYPE, + // dictClass: 'string', + // isSearch: true, + // isTable: true, + // hiddenInMain: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // tableForm:{ + // disabled:true + // }, + // isForm:false, + // isTableForm:false, + // form: { + // componentProps:{ + // disabled:true + // } + // }, + // }, + { + label: '备注', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: false, + isTable: false, + hiddenInMain: true, + isForm: false, + form: { + componentProps:{ + disabled:true + } + }, + }, + { + label: '创建时间', + field: 'createTime', + formatter: dateFormatter, + detail: { + dateFormat: 'YYYY-MM-DD HH:mm:ss' + }, + sort: 'custom', + table: { + width: 180 + }, + hiddenInMain: true, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + dateFormat: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'x', + } + }, + tableForm:{ + disabled:true + }, + isTableForm:false, + isForm:false + }, + { + label: '创建者', + field: 'creator', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + hiddenInMain: true, + isTableForm:false, + isForm:false + }, + { + label: '原因', + field: 'remark', + sort: 'custom', + table: { + width: 150 + }, + isTable: false, + }, + // { + // label: '操作', + // hiddenInMain:true, + // field: 'action', + // isDetail: false, + // isForm: false , + // table: { + // width: 150, + // fixed: 'right' + // }, + // isTableForm:false, + // } +])) + +//表单校验 +export const PurchasereturnRequestDetailRules = reactive({ + // packingNumber: [ + // { required: true, message: '请输入包装号', trigger: 'blur' } + // ], + // batch: [ + // { required: true, message: '请输入批次', trigger: 'blur' } + // ], + // inventoryStatus: [ + // { required: true, message: '请选择库存状态', trigger: 'change' } + // ], + // poNumber: [ + // { required: true, message: '请输入订单号', trigger: 'blur' } + // ], + // poLine: [ + // { required: true, message: '请输入订单行', trigger: 'blur' } + // ], + // reason: [ + // { required: true, message: '请选择原因', trigger: 'change' } + // ], + itemCode: [ + { required: true, message: '请输入物料代码', trigger: 'blur' } + ], + remark: [ + { max: 50, message: '不得超过50个字符', trigger: 'blur' } + ], +}) + +export const PurchasereReturnRequestDetailLabel = useCrudSchemas(reactive([ + { + label: '物料代码', + field: 'itemCode', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled: true + }, + form: { + componentProps: { + disabled: true + } + } + }, + { + label: '物料名称', + field: 'itemName', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述1', + field: 'itemDesc1', + sort: 'custom', + table: { + width: 150 + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + }, + { + label: '物料描述2', + field: 'itemDesc2', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '包装号', + field: 'packingNumber', + sort: 'custom', + table: { + width: 150 + }, + isTable:false, + isTableForm: false, + isForm: false + }, + // { + // label: '器具号', + // field: 'containerNumber', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '数量', + field: 'qty', + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'InputNumber', + componentProps: { + disabled:true, + min: 1, + precision: 6 + }, + }, + tableForm: { + disabled:true, + type: 'InputNumber', + min: 1, + precision: 6 + } + }, + { + label: '计量单位', + field: 'uom', + dictType: DICT_TYPE.UOM, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: true + } + }, + { + label: '从库位代码1', + field: 'fromLocationCode', + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false + }, + { + label: '生产日期', + field: 'produceDate', + formatter: dateFormatter2, + detail: { + dateFormat: 'YYYY-MM-DD' + }, + sort: 'custom', + table: { + width: 180 + }, + form: { + component: 'DatePicker', + componentProps: { + disabled:true, + style: {width: '100%'}, + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'x', + } + }, + tableForm:{ + disabled:true, + type:'FormDate', + placeholder: '请选择生产日期', + valueFormat: 'x', + }, + }, + + // { + // label: '替代批次', + // field: 'altBatch', + // sort: 'custom', + // table: { + // width: 150 + // }, + // isTableForm: false, + // isForm: false + // }, + { + label: '库存状态', + field: 'inventoryStatus', + dictType: DICT_TYPE.INVENTORY_STATUS, + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + isTableForm: false, + isForm: false, + tableForm: { + type: 'Select' + } + }, + { + label: '批次', + field: 'batch', + sort: 'custom', + table: { + width: 150 + }, + }, + { + label: '包装数量', + field: 'packQty', + sort: 'custom', + table: { + width: 150 + }, + form: { + componentProps: { + disabled: true, + isSearchList: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + } + + ] + } + }, + tableForm: { + disabled: true, + isInpuFocusShow: true, + searchListPlaceholder: '请选择包装', + searchField: 'packQty', + searchTitle: '物品包装信息', + searchAllSchemas: Itempackaging.allSchemas, + searchPage: ItemPackageApi.getItempackagingPageBySupplierdeliver, + searchCondition: [ + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isMainValue: true + }, + { + key: 'available', + value: 'TRUE', + isMainValue: false + }] + }, + isTableForm: true, + isForm: true + }, + { + label: '包装规格', + field: 'packUnit', + dictClass: 'string', + isTable: true, + sort: 'custom', + table: { + width: 150, + componentProps: { + disabled: true + } + }, + tableForm:{ + disabled:true + }, + isTableForm: true, + isForm: true + }, +])) + diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts index ba641667b..f904e74ff 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts @@ -546,7 +546,7 @@ export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive { /** 初始化 **/ onMounted(async () => { + + SupplierinvoiceRequestMain.allSchemas.formSchema.forEach(async item=>{ + if(item.field == 'procurementCreator'){ + //采购审批人 + const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) + item.componentProps.options = procurementCreators.list + } + }) getList() getDefaultSupplier() getLoginUserRoleList() diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts index 73aa8bb5f..07379eceb 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts @@ -29,7 +29,7 @@ const requestsettingData = data?.list[0] || {} userDept.id = userDept.id.toString() const userDeptArray:any = [userDept] -const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) +// const procurementCreators = await SupplierinvoiceRequestMainApi.queryUserInfoByRoleCode({ roleCode: 'purchase',pageSize: 1000,pageNo: 1,sort: '',by: 'ASC' }) /** * @returns {Array} 采购员列表 */ @@ -809,8 +809,9 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive( isDetail:false, form: { component: 'Select', - api: () => procurementCreators.list, + // api: () => procurementCreators.list, componentProps: { + options:[], optionsAlias: { labelField: 'nickname', valueField: 'id' @@ -1474,15 +1475,24 @@ export const SupplierinvoiceRequestDetailMain = useCrudSchemas(reactive