From a1850e6f8674765cf85518db80439209fcadf2ed Mon Sep 17 00:00:00 2001 From: ljlong_2630 Date: Wed, 13 Nov 2024 18:48:08 +0800 Subject: [PATCH] =?UTF-8?q?YT-683=EF=BC=8CYT-685=EF=BC=9A=E7=BA=BF?= =?UTF-8?q?=E8=BE=B9=E9=80=80=E6=96=99=E5=92=8C=E7=B4=A7=E6=80=A5=E8=83=B6?= =?UTF-8?q?=E6=96=99=E9=9C=80=E6=B1=82=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImportForm/src/ImportFormStep.vue | 38 +++++----- .../callmaterials/callmaterials.data.ts | 4 +- .../productionreturnRequestMain/index.vue | 74 ++++++++++++++----- .../productionreturnRequestMain.data.ts | 28 +++---- 4 files changed, 94 insertions(+), 50 deletions(-) diff --git a/src/components/ImportForm/src/ImportFormStep.vue b/src/components/ImportForm/src/ImportFormStep.vue index ecb8c13fd..616527ac4 100644 --- a/src/components/ImportForm/src/ImportFormStep.vue +++ b/src/components/ImportForm/src/ImportFormStep.vue @@ -87,8 +87,8 @@ {{ t('ts.下载差异数据') }} - {{ t('ts.下一步') }} - {{ t('ts.好的') }} + {{ t('ts.下一步') }} + {{ t('ts.好的') }} {{ t('ts.取 消') }} @@ -219,21 +219,26 @@ const formRef = ref() const submitForm = async () => { // 如果当前在确认数据步骤,调用确认函数 if (active.value === 1) { - if (props.confirmFormSuccess) { - await props.confirmFormSuccess(props.tableObject.tableList, - (msg)=>{ - if(msg){ - message.error(msg) - error.value = false - return - }else{ - message.success(msg) - error.value = false - active.value = 2 // 设置为第三步 - return + if(error.value){ + dialogVisible.value = false + error.value = false + }else{ + if (props.confirmFormSuccess) { + await props.confirmFormSuccess(props.tableObject.tableList, + (msg)=>{ + if(msg){ + message.error(msg) + error.value = false + return + }else{ + message.success(msg) + error.value = false + active.value = 2 // 设置为第三步 + return + } } - } - ) + ) + } } } if(active.value === 2){ @@ -328,7 +333,6 @@ const submitFormSuccess = (response: any) => { }) } else { message.success('上传成功') - debugger if(response.data?.successData?.failList&&response.data?.successData?.failList.length>0) { console.log('设置差异数据:', response.data.successData.failList); console.log('使用的列定义:', props.errorTableColumns); diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts index 5be51a596..ddf820b9f 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/callmaterials.data.ts @@ -117,7 +117,7 @@ export const Callmaterials = useCrudSchemas(reactive([ } }, { - label: '叫料包装数量', + label: '标准包装数量', field: 'callmaterialQty', sort: 'custom', table: { @@ -204,6 +204,7 @@ export const Callmaterials = useCrudSchemas(reactive([ width: 150 }, isSearch: true, + isForm: false, form: { // labelMessage: '信息提示说明!!!', componentProps: { @@ -364,6 +365,7 @@ export const Callmaterials = useCrudSchemas(reactive([ isSearch:true, form: { componentProps: { + placeholder: '请选择工位', disabled: true } } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index efc6bd122..60718f2d8 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -115,6 +115,8 @@ import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' import * as ruleApi from '@/api/wms/rule/index' import * as LocationApi from '@/api/wms/location' +import * as SupplieritemApi from '@/api/wms/supplieritem' +import * as ProductionlineitemApi from '@/api/wms/productionlineitem' const { loadStart, loadDone } = usePageLoading() // 生产退料申请 defineOptions({ name: 'ProductionreturnRequestMain' }) @@ -555,21 +557,29 @@ const buttonTableClick = async (val, row) => { by: 'ASC', }).then(res => { if (res.list.length > 0) { - // 判断物料 可采购 可制造 - if (res.list[0].enableMake == "FALSE") { + // 判断物料 可采购 + if (res.list[0].enableBuy == "TRUE") { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(itemColumns => { - if(itemColumns.field == 'productionLineCodePackage') { - itemColumns.tableForm.isInpuFocusShow = false - itemColumns.tableForm.disabled = true - ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false - } - if(itemColumns.field == 'supplierItemCode') { - itemColumns.tableForm.isInpuFocusShow = true - itemColumns.tableForm.disabled = false - ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true - } - }) + // 修改 tableform 属性 + if(itemColumns.field == 'supplierItemCode') { + itemColumns.tableForm.isInpuFocusShow = true + itemColumns.tableForm.disabled = false + ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = true + formLabelRef.value.formLoading = true + SupplieritemApi.getSupplieritemPage({ + pageSize: 10, + pageNo: 1, + code: item.itemCode, + sort: '', + by: 'ASC', + }).then(response => { + item.supplierItemCode = response.list[0].supplierCode + formLabelRef.value.formLoading = false + }) + } + }) + } else { // 修改 tableform 属性 detailListTableColumns.tableFormColumns.map(itemColumns => { @@ -578,11 +588,36 @@ const buttonTableClick = async (val, row) => { itemColumns.tableForm.disabled = true ProductionreturnRequestDetailLabelRules.supplierItemCode[0].required = false } + }) + } + // 判断物料 可制造 + if (res.list[0].enableMake == "TRUE") { + // 修改 tableform 属性 + detailListTableColumns.tableFormColumns.map(itemColumns => { + if(itemColumns.field == 'productionLineCodePackage') { + item.productionLineCodePackage = item.productionLineCode + itemColumns.tableForm.isInpuFocusShow = true + itemColumns.tableForm.disabled = true + ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true + formLabelRef.value.formLoading = true + ProductionlineitemApi.getProductionlineitemPage({ + pageNo: 1, + code: item.itemCode, + sort: '', + by: 'ASC', + }).then(response => { + item.supplierItemCode = response.list[0].supplierCode + formLabelRef.value.formLoading = false + }) + } + }) + } else { + // 修改 tableform 属性 + detailListTableColumns.tableFormColumns.map(itemColumns => { if(itemColumns.field == 'productionLineCodePackage') { - item.productionLineCodePackage = item.productionLineCode - itemColumns.tableForm.isInpuFocusShow = true + itemColumns.tableForm.isInpuFocusShow = false itemColumns.tableForm.disabled = true - ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = true + ProductionreturnRequestDetailLabelRules.productionLineCodePackage[0].required = false } }) } @@ -835,10 +870,13 @@ const handlePoint = async (row) => { }).then((res) => { if(res.list.length > 0) { isCreateLabel.value = true - if (res.list[0].productionLineCode != null) { + if (res.list[0].supplierItemCode != null) { + labelType.value = 'cg' + } else if(res.list[0].productionLineCode != null){ labelType.value = 'zz' } else { - labelType.value = 'cg' + isCreateLabel.value = false + message.warning('不是采购类型也不是制造类型物料不能打印标签!') } } else { isCreateLabel.value = false diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts index 93af8661a..4116fb05d 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/productionreturnRequestMain.data.ts @@ -1419,18 +1419,18 @@ export const ProductionreturnRequestDetailLabel = useCrudSchemas(reactive