From 094ce1b6d05d5552f49b00600b15f87e9fbcff1a Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 16 Jan 2024 15:17:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=BA=93=E5=86=85=E8=BD=AC=E7=A7=BB?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=98=8E=E7=BB=86=E6=96=B0=E5=A2=9E/?= =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventorymoveRequestMain/index.vue | 49 +++++++++++++------ .../inventorymoveRequestMain.data.ts | 3 ++ 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index 567018941..c470ee39a 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -67,8 +67,8 @@ :apiUpdate="InventorymoveRequestDetailApi.updateInventorymoveRequestDetail" :apiPage="InventorymoveRequestDetailApi.getInventorymoveRequestDetailPage" :apiDelete="InventorymoveRequestDetailApi.deleteInventorymoveRequestDetail" - :Echo="Echo" @searchTableSuccessDetail="searchTableSuccessDetail" + @detailOpenForm="detailOpenForm" /> @@ -271,7 +271,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } }) } - // console.log(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode'))); } setV[formField] = val[0][searchField] formRef.setValues(setV) @@ -292,17 +291,17 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { setV['uom'] = val[0]['uom'] if(routeName.value == 'OktoholdRequestMain'){ setV['toInventoryStatus'] = "HOLD" - }else if ( routeName.value == 'HoldtookRequestMain') { - setV['toInventoryStatus'] = "OK" - }else if ( routeName.value == 'HoldtoscrapRequestMain') { - setV['toInventoryStatus'] = "SCRAP" + }else if ( routeName.value == 'HoldtookRequestMain') { + setV['toInventoryStatus'] = "OK" + }else if ( routeName.value == 'HoldtoscrapRequestMain') { + setV['toInventoryStatus'] = "SCRAP" }else if ( routeName.value == 'OktoscrapRequestMain') { - setV['toInventoryStatus'] = "SCRAP" - }else if ( routeName.value == 'ScraptoholdRequestMain') { - setV['toInventoryStatus'] = "HOLD" - }else{ - setV['toInventoryStatus'] = val[0]['inventoryStatus'] - } + setV['toInventoryStatus'] = "SCRAP" + }else if ( routeName.value == 'ScraptoholdRequestMain') { + setV['toInventoryStatus'] = "HOLD" + }else{ + setV['toInventoryStatus'] = val[0]['inventoryStatus'] + } } else { setV[formField] = val[0][searchField] } @@ -310,10 +309,6 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { }) } -// 子表新增的时候选择表格之后需要会显得字段 -// const Echo = ['ppNumber','poLine', 'batch', 'altBatch', 'itemCode', 'itemName', 'itemDesc1', 'itemDesc2', 'projectCode', 'qty', 'uom'] -const Echo = [] - // 获得表格的各种操作 const { getList, setSearchParams } = tableMethods @@ -440,9 +435,31 @@ const openForm =async (type: string, row?: number) => { formRef.value.open(type, row) } +/** + * 详情 新增/编辑事件 + */ +const detailOpenForm = (type, row) => { + if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ + InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.push({ + key: 'warehouseCode', + value: fromWarehouseCodeMain.value, + isMainValue: false + }) + } else { + InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => { + if (item.key == 'warehouseCode') { + item.value = fromWarehouseCodeMain.value + } + }) + } +} + +const fromWarehouseCodeMain = ref() + /** 详情操作 */ const detailRef = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { + fromWarehouseCodeMain.value = row.fromWarehouseCode detailRef.value.openDetail(row, titleName, titleValue) } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts index d20944767..10631f408 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/inventorymoveRequestMain.data.ts @@ -409,6 +409,9 @@ export const InventorymoveRequestMainRules = reactive({ departmentCode: [ { required: true, message: '请输入部门', trigger: 'blur' } ], + fromWarehouseCode: [ + { required: true, message: '请选择从仓库代码', trigger: 'blur' } + ], status: [ { required: true, message: '请选择状态', trigger: 'change' } ], From dd15e9d6d26d288db7b2b405462bc20034cce6a1 Mon Sep 17 00:00:00 2001 From: chenfang Date: Tue, 16 Jan 2024 15:38:49 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=8F=AF=E7=94=A8=E9=BB=98=E8=AE=A4=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliver/purchaseMain/index.vue | 12 ++++++------ .../purchaseMain/purchaseMain.data.ts | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index aa8a2ad7a..96f48801b 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -179,22 +179,22 @@ // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 - if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + // if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') openForm('update', row) } else if (val == 'delete') { // 删除 - if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + // if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') handleDelete(row.id) } else if (val == 'mainOrderClo') { // 关闭 - if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + // if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') handleClose(row.id) } else if (val == 'mainOrderOpe') { // 打开 - if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + // if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') handleOpen(row.id) } else if (val == 'mainOrderPub') { // 发布 - if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + // if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') handlePublish(row.id) } else if (val == 'mainOrderWit') { // 下架 - if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') + // if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') handleWit(row.id) } } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts index 843278114..8114d84c9 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/purchaseMain.data.ts @@ -242,7 +242,8 @@ export const PurchaseMain = useCrudSchemas(reactive([ value: 'TRUE', componentProps: { inactiveValue: 'FALSE', - activeValue: 'TRUE' + activeValue: 'TRUE', + disabled: true } }, }, From 48e2a1a3c952ffae42d597722c44a330337b7122 Mon Sep 17 00:00:00 2001 From: chenfang Date: Wed, 17 Jan 2024 11:40:26 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7=E6=9C=88=E5=8F=B0=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=90=9C=E7=B4=A2=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierManage/purchaseprice/index.vue | 1 - .../deliverPlanMain/deliverPlanMain.data.ts | 24 ++++++++++++++++++- .../inventorychangeRequestMain/index.vue | 3 ++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue index 12a562ceb..416a853d2 100644 --- a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue @@ -55,7 +55,6 @@ diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts index 83ee6eb79..977980018 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/deliverPlanMain.data.ts @@ -4,6 +4,9 @@ import { dateFormatter } from '@/utils/formatTime' import * as CustomerApi from '@/api/wms/customer' import { Customer } from '@/views/wms/basicDataManage/customerManage/customer/customer.data' +import * as CustomerDockApi from '@/api/wms/customerdock' +import { Customerdock } from '@/views/wms/basicDataManage/customerManage/customerdock/customerdock.data' + import * as SaleMainApi from '@/api/wms/saleMain' import * as SaleDetailApi from '@/api/wms/saleDetail' import { SaleDetail, SaleMain } from '../saleMain/saleMain.data' @@ -320,7 +323,23 @@ export const DeliverPlanDetail = useCrudSchemas(reactive([ table: { width: 150 }, - isTableForm: false, + tableForm:{ + isInpuFocusShow: true, // 开启查询弹窗 + searchListPlaceholder: '请选择物料代码', + searchField: 'code', + searchTitle: '物料基础信息', + searchAllSchemas: Customerdock.allSchemas, + searchPage: CustomerDockApi.getCustomerdockPage, + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + },{ + key: 'customerCode', + value: 'customerCode', + isMainValue: true + }] + }, isForm: false, }, { @@ -533,6 +552,9 @@ export const DeliverPlanDetailRules = reactive({ number: [ { required: true, message: '请输入单据号', trigger: 'blur' } ], + customerDockCode: [ + { required: true, message: '请选择客户月台代码', trigger: 'blur' } + ], itemCode: [ { required: true, message: '请选择物料代码', trigger: 'change' } ], diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index e5457f191..db8e46e7f 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -373,7 +373,8 @@ const submitForm = async (formType, data) => { return; } }) - if(flag){ + if(flag.value){ + formRef.value.formLoading = false return } try {