From 38ad1daf9ff6fd4d1933e0c969feee3db64254a0 Mon Sep 17 00:00:00 2001 From: zhang_li Date: Wed, 23 Apr 2025 10:19:20 +0800 Subject: [PATCH] =?UTF-8?q?YT-2441=E5=8F=B7=E5=8F=A3=E5=93=81=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E4=BB=BB=E5=8A=A1=E6=8C=89=E6=95=B0=E9=87=8F=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.vue | 49 ++++++++++++++++++- .../productreceiptAssembleRequestMain.data.ts | 3 ++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 471af50a7..7a6c7272c 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -159,6 +159,8 @@ import * as WorkshopApi from '@/api/wms/workshop' import * as ConfigApi from '@/api/infra/config' import { usePageLoading } from '@/hooks/web/usePageLoading' import * as ruleApi from '@/api/wms/rule/index' +import * as AreaApi from '@/api/wms/areabasic' +import * as LocationApi from '@/api/wms/location' const { loadStart, loadDone } = usePageLoading() // 装配收货申请 // 号口品收货申请 @@ -226,7 +228,7 @@ const onChange = (field, cur) => { // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) - nextTick(() => { + nextTick(async() => { if (type == 'tableForm') { if (formField == 'secondPackUnit') { row['secondPackUnit'] = val[0]['packUnit'] @@ -243,7 +245,50 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } const index1 = 0 setTableFormsValues(val, index1) - } else{ + } else if (formField == 'workStationCode') { + const params = { + available: 'TRUE', + pageSize: 20, + pageNo: 1, + code: val[0]['fgLocationCode'], + name: '', + areaCode: '', + sort: '', + by: 'ASC', + } + const res = await LocationApi.getLocationPage(params) + console.log(222,res) + const params1 = { + available: 'TRUE', + pageSize: 20, + pageNo: 1, + code: res.list[0].areaCode, + name: '', + type: '', + manageMode:'' , + sort: '', + by: 'ASC', + } + const res1 = await AreaApi.getAreaPage(params1) + if (res1.list[0].manageMode == 'BY_BATCH') { + row['batch'] = formatTime(new Date(), 'yyyyMMdd') + ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { + if(item.field == 'batch') + item.tableForm.disabled = false + }) + ProductreceiptRequestDetailRules.batch[0].required = true + + } else if (res1.list[0].manageMode == 'BY_QUANTITY') { + ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { + if(item.field == 'batch') + item.tableForm.disabled = true + }) + row['batch'] = '' + ProductreceiptRequestDetailRules.batch[0].required = false + } + + row[formField] = val[0][searchField] + } else{ row[formField] = val[0][searchField] } } else { diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts index 9c93172af..56b90b895 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/productreceiptAssembleRequestMain.data.ts @@ -1170,6 +1170,9 @@ export const ProductreceiptRequestDetail = useCrudSchemas( sortTableDefault: 1006, table: { width: 150 + }, + tableForm: { + disabled:false } }, {