From 8dbb6e0a15df3ad9873893c75dac6904fce6749f Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 9 Jan 2024 08:46:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=A7=BB=E5=8A=A8=E5=88=B0?= =?UTF-8?q?=E5=BA=93=E4=BD=8D=E9=AB=98=E7=BA=A7=E7=AD=9B=E9=80=89=E5=8A=9F?= =?UTF-8?q?=E8=83=BDapi=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/location/index.ts | 8 ++++- .../inventorymoveJobMain.data.ts | 24 +++++++------- .../inventorymoveRequestMain/index.vue | 31 +++++++++++++------ .../inventorymoveRequestMain.data.ts | 14 ++++++--- .../demandforecastingMain.data.ts | 2 +- .../purchaseMain/purchaseMain.data.ts | 4 +++ 6 files changed, 55 insertions(+), 28 deletions(-) diff --git a/src/api/wms/location/index.ts b/src/api/wms/location/index.ts index 2165af0e6..1960d423a 100644 --- a/src/api/wms/location/index.ts +++ b/src/api/wms/location/index.ts @@ -76,5 +76,11 @@ export const importTemplate = () => { } export const selectBusinessTypeToLocation = async (params) => { - return request.get({ url: `/wms/location/pageBusinessTypeToLocation`, params }) + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/location/pageBusinessTypeToLocationSenior', data }) + } else { + return request.get({ url: `/wms/location/pageBusinessTypeToLocation`, params }) + } } \ No newline at end of file diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts index fedb5042f..452d235fc 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/inventorymoveJobMain.data.ts @@ -700,7 +700,7 @@ export const InventorymoveJobDetail = useCrudSchemas(reactive([ }, }, { - label: '从库存状态', + label: '库存状态', field: 'inventoryStatus', dictType: DICT_TYPE.INVENTORY_STATUS, dictClass: 'string', @@ -710,17 +710,17 @@ export const InventorymoveJobDetail = useCrudSchemas(reactive([ width: 150 }, }, - { - label: '到库存状态', - field: 'toInventoryStatus', - dictType: DICT_TYPE.INVENTORY_STATUS, - dictClass: 'string', - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - }, + // { + // label: '到库存状态', + // field: 'toInventoryStatus', + // dictType: DICT_TYPE.INVENTORY_STATUS, + // dictClass: 'string', + // isTable: true, + // sort: 'custom', + // table: { + // width: 150 + // }, + // }, { label: '订单号', field: 'poNumber', diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index 6309cde4c..f82635cc1 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -151,6 +151,11 @@ const { tableObject, tableMethods } = useTable({ fromInventoryStatus.value = null businessType.value = 'InventorymoveRequest' console.log(146 , businessType.value) +}else { + tableObject.params = { + fromInventoryStatus: 'OK', + toInventoryStatus:'SCRAP' + } } // 修改 tableform 属性 @@ -186,13 +191,6 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { delete item.tableForm.searchCondition } } - if(item.field == "toInventoryStatus"){ - if (fromInventoryStatus.value) { - item.tableForm.disabled = true - } else { - item.tableForm.disabled = false - } - } if(item.field == "toLocationCode"){ if (toInventoryStatus.value) { item.tableForm.searchCondition = [ @@ -252,7 +250,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => }else if ( routeName.value == 'ScraptoholdRequestMain') { row['toInventoryStatus'] = "HOLD" }else{ - row['toInventoryStatus'] = null + row['toInventoryStatus'] = val[0]['inventoryStatus'] } } else { row[formField] = val[0][searchField] @@ -287,7 +285,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { }else if ( routeName.value == 'ScraptoholdRequestMain') { setV['toInventoryStatus'] = "HOLD" }else{ - setV['toInventoryStatus'] = null + setV['toInventoryStatus'] = val[0]['inventoryStatus'] } } else { setV[formField] = val[0][searchField] @@ -454,7 +452,20 @@ const handleExport = async () => { // 发起导出 exportLoading.value = true const data = await InventorymoveRequestMainApi.exportInventorymoveRequestMain(setSearchParams) - download.excel(data, '库存转移申请主.xlsx') + if(routeName.value == 'OktoholdRequestMain'){ + download.excel(data, '合格转隔离申请主.xlsx') + }else if ( routeName.value == 'HoldtookRequestMain') { + download.excel(data, '隔离转合格申请主.xlsx') + }else if ( routeName.value == 'HoldtoscrapRequestMain') { + download.excel(data, '隔离转报废申请主.xlsx') + }else if ( routeName.value == 'OktoscrapRequestMain') { + download.excel(data, '合格转报废申请主.xlsx') + }else if ( routeName.value == 'ScraptoholdRequestMain') { + download.excel(data, '报废转隔离申请主.xlsx') + }else{ + download.excel(data, '库存转移申请主.xlsx') + } + } catch { } finally { exportLoading.value = false diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index c216fd1b0..23e25d46b 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -152,8 +152,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ { label: '从库位类型范围', field: 'fromLocationTypes', - dictType: DICT_TYPE.LOCATION_TYPE, - dictClass: 'string', + // dictType: DICT_TYPE.LOCATION_TYPE, + // dictClass: 'string', isTable: true, sort: 'custom', table: { @@ -182,8 +182,8 @@ export const InventorymoveRequestMain = useCrudSchemas(reactive([ { label: '到库位类型范围', field: 'toLocationTypes', - dictType: DICT_TYPE.LOCATION_TYPE, - dictClass: 'string', + // dictType: DICT_TYPE.LOCATION_TYPE, + // dictClass: 'string', isTable: true, sort: 'custom', table: { @@ -726,8 +726,14 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive( width: 150 }, tableForm: { + disabled: true, type: 'Select' }, + form: { + componentProps: { + disabled: true + } + } }, { label: '从货主代码', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index 2fc257724..eeee47d31 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -115,7 +115,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ isForm: false, }, { - label: '单据号11', + label: '单据号', field: 'number', sort: 'custom', table: { diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index fc91b560b..493e6c950 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -396,6 +396,10 @@ export const PurchaseDetail = useCrudSchemas(reactive([ key: 'available', value: 'TRUE', isMainValue: false + },{ + key: 'available', + value: 'TRUE', + isMainValue: false }] }, form: {