From eb05d4dea148b169e6ec97392a971f64d86ecce2 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Tue, 28 May 2024 14:01:47 +0800 Subject: [PATCH 01/17] =?UTF-8?q?BUG=E4=BF=AE=E5=A4=8D=201=E3=80=81WMS?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=8C=85=E8=A3=85=E4=BF=A1=E6=81=AF=E4=B8=AD?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=89=A9=E6=96=99=E4=BB=A3=E7=A0=81=E5=90=8E?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E5=B8=A6=E5=87=BA=E8=AE=A1=E9=87=8F=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E4=B8=94=E8=AE=A1=E9=87=8F=E5=8D=95=E4=BD=8D=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/basicDataManage/itemManage/itempackage/index.vue | 3 ++- .../itemManage/itempackage/itempackage.data.ts | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue index e2bdd9751..815a31436 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue @@ -210,6 +210,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { nextTick(() => { const setV = {} setV[formField] = val[0][searchField] + setV['uom'] = val[0]['uom'] formRef.setValues(setV) }) } @@ -281,4 +282,4 @@ onMounted(async () => { importTemplateData.templateUrl = await ItempackagingApi.importTemplate() }) -@/api/wms/itempackage \ No newline at end of file +@/api/wms/itempackage diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts b/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts index f1ca43fe7..fc23cf2ec 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itempackage/itempackage.data.ts @@ -47,6 +47,11 @@ export const Itempackaging = useCrudSchemas(reactive([ isTable: true, table: { width: 120 + },form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + disabled: true + } } }, { @@ -236,4 +241,4 @@ export const ItempackagingRules = reactive({ packUnit: [{ required: true, message: '包装单位不能为空', trigger: 'change' }], packQty: [{ required: true, message: '包装数量不能为空', trigger: 'change' }], available: [{ required: true, message: '是否可用不能为空', trigger: 'change' }] -}) \ No newline at end of file +}) From ff7980cb5642e7f3c01c648277113d97c3b70531 Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 28 May 2024 14:11:09 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7--=E5=8F=91=E8=B4=A7=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=8D=95=E5=8F=B7=E6=A0=B9=E6=8D=AE=E5=AE=A2=E6=88=B7=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++ src/components/BasicForm/src/BasicForm.vue | 6 ++ .../customerreturnRequestMain.data.ts | 65 +++++++++++-------- .../customerreturnRequestMain/index.vue | 33 +++++++++- 4 files changed, 87 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 314704f75..1fe27a989 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,16 @@ form: { message: '请选择生产线信息!', // 当前置条件为空时 弹出信息提示 isMainValue: true // 表示查询条件是主表的字段的值 }, + { + key: 'customerCode', // 查询列表中字段 + value: 'customerCode', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + isFormModel:true, // filters中添加筛选的数据--取于formModel + required:true, // 前置添加必有,和isFormModel结合使用 + message: '请选择客户代码!', // 前置添加没填的提示语 + } { key:'available', // 查询列表中字段 value:'TRUE', // 指查询具体值 diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 4157195f5..714c529a0 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -396,6 +396,12 @@ const opensearchTable = ( if (searchCondition[i].isSearch) { if (searchCondition[i].isFormModel) { //用formModel中的值 + if(searchCondition[i].required){ + if (formRef.value.formModel[searchCondition[i].value] == '' ||formRef.value.formModel[searchCondition[i].value] == undefined) { + message.warning(searchCondition[i].message?searchCondition[i].message:'前置条件未选择!') + return + } + } filters.push({ action: searchCondition[i].action, column: searchCondition[i].key, diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts index e58df3e48..cfa5c326c 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/customerreturnRequestMain.data.ts @@ -78,6 +78,32 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ }, isSearch: true, }, + { + label: '客户代码', + field: 'customerCode', + sort: 'custom', + table: { + width: 150 + }, + isSearch: true, + form: { + // labelMessage: '信息提示说明!!!', + componentProps: { + enterSearch: true, + isSearchList: true, // 开启查询弹窗 + searchListPlaceholder: '请选择客户代码', // 输入框占位文本 + searchField: 'code', // 查询弹窗赋值字段 + searchTitle: '客户信息', // 查询弹窗标题 + searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 + searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: 'TRUE', + isMainValue: false + }] + } + } + }, { label: '发货记录单号', field: 'deliverRecordNumber', @@ -107,35 +133,22 @@ export const CustomerreturnRequestMain = useCrudSchemas(reactive([ action: 'betweeen', // 查询拼接条件 isSearch: true, // 使用自定义拼接条件 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 - }] - } - } - }, - { - label: '客户代码', - field: 'customerCode', - sort: 'custom', - table: { - width: 150 - }, - isSearch: true, - form: { - // labelMessage: '信息提示说明!!!', - componentProps: { - isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择客户代码', // 输入框占位文本 - searchField: 'code', // 查询弹窗赋值字段 - searchTitle: '客户信息', // 查询弹窗标题 - searchAllSchemas: Customer.allSchemas, // 查询弹窗所需类 - searchPage: CustomerApi.getCustomerPage, // 查询弹窗所需分页方法 - searchCondition: [{ - key: 'available', - value: 'TRUE', - isMainValue: false - }] + }, + { + key: 'customerCode', // 查询列表中字段 + value: 'customerCode', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isFormModel:true, // filters中添加筛选的数据--取于formModel + required:true, // 前置添加必有 + message: '请选择客户代码!', // 前置添加没填的提示语 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + } + ] } } }, + { label: '发货计划单号', field: 'deliverPlanNumber', diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index 9dde767ca..47618055c 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -58,6 +58,8 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" :isShowButton = isShowButton + @onEnter="onEnter" + /> @@ -88,6 +90,7 @@ :isShowReduceButton="false" @submitForm="submitFormLabel" @searchTableSuccess="searchTableSuccess" + /> @@ -104,6 +107,7 @@ import { CustomerreturnRequestMain,CustomerreturnRequestMainRules,Customerreturn import * as CustomerreturnRequestMainApi from '@/api/wms/customerreturnRequestMain' import * as CustomerreturnRequestDetailApi from '@/api/wms/customerreturnRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' +import { DeliverRecordMain,DeliverRecordDetail } from '../../deliver/deliverRecordMain/deliverRecordMain.data' import * as DeliverRecordDetailApi from '@/api/wms/deliverRecordDetail' import { SupplierdeliverRequestPackage @@ -129,7 +133,34 @@ const isShowButton = ref(true) const updataTableColumns = (val) => { tableColumns.value = val } - +const onEnter = async (field,value)=>{ + console.log('onEnter',field,value) + const dateTime = new Date().getTime() + if(field=='customerCode'){ + //客户代码---》发货记录单号 + formRef.value.opensearchTable('deliverRecordNumber', 'number', '发货记录信息', DeliverRecordMain.allSchemas, DeliverRecordDetailApi.getDeliverRecordDetailPage,[{ + key: 'available', + value: 'TRUE', + isMainValue: false + }, + { + key: 'createTime', // 查询列表中字段 + value: dateTime - 30 * 24 * 60 * 60 * 1000 + "," + dateTime, // 指查询具体值 + action: 'betweeen', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + }, + { + key: 'customerCode', // 查询列表中字段 + value: 'customerCode', // 指查询具体值 + action: '==', // 查询拼接条件 + isSearch: true, // 使用自定义拼接条件 + isFormModel:true, + isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 + } + ],undefined,undefined,null,true,DeliverRecordDetail.allSchemas) + } +} // 查询页面返回 const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { nextTick(() => { From 9cb269e5206b00de1c3c5c38facf41ec54497bff Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 28 May 2024 14:19:46 +0800 Subject: [PATCH 03/17] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1fe27a989..52d41693e 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,14 @@ form: { isFormModel:true, // filters中添加筛选的数据--取于formModel required:true, // 前置添加必有,和isFormModel结合使用 message: '请选择客户代码!', // 前置添加没填的提示语 - } + }, + { + key: 'itemCode', + value: 'itemCode', + message: '请选择订单行', + isTableRowValue: true, //查询当前searchTable表中行数据的值 + isMainValue:false + }, { key:'available', // 查询列表中字段 value:'TRUE', // 指查询具体值 From d3c4c97b377f17f2b3e8d31bca3a6115655a3c0d Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 28 May 2024 15:11:32 +0800 Subject: [PATCH 04/17] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E9=80=80=E8=B4=A7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerreturnRequestMain/index.vue | 58 ++++++++++++++++--- 1 file changed, 51 insertions(+), 7 deletions(-) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index 47618055c..7859e1a17 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -57,10 +57,11 @@ @tableSelectionDelete="tableSelectionDelete" @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" - :isShowButton = isShowButton @onEnter="onEnter" /> + + { @@ -201,9 +201,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] setV['customerCode'] = val[0]['customerCode'] setV['customerDockCode'] = val[0]['customerDockCode'] - if(setV['deliverRecordNumber'] != null){ - isShowButton.value = false - } + // 获取子表数据 DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']}) .then(res => { @@ -221,7 +219,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } }) }) - if (res) tableData.value = res.list + if (res) { + tableData.value = [...res.list] + originTableData.value = [...res.list] + } }).catch(err => { console.log(err) message.error('错误') @@ -480,6 +481,7 @@ const labelPrint = async (row) => { /** 添加/修改操作 */ const formRef = ref() const openForm =async (type: string, row?: number) => { + originTableData.value = [] if(type == "update"){ CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => { if(item.field == 'deliverRecordNumber'){ @@ -589,10 +591,52 @@ CustomerreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => { tableFormKeys[item.field] = item.default ? item.default : '' }) const tableData = ref([]) +const originTableData = ref([]) +const searchTableRef = ref() // 添加明细 +// const handleAddTable = () => { +// tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) +// } const handleAddTable = () => { - tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) + console.log('originTableData.value',originTableData.value) + console.log('tableData.value',tableData.value) + const subTableDFata = originTableData.value.filter(item=> !tableData.value.find(item1=>item1.id == item.id)) + if(subTableDFata.length==0){ + message.warning('暂无可选择数据!') + return + } + + const tableObject = { + // 当前页 + currentPage: 1, + // 导出加载中 + exportLoading: false, + // 加载中 + loading: false, + // 页数 + pageSize: subTableDFata.length, + params:null, + // 排序 + sort: { + order: '', // 排序规则 + prop: '' // 排序字段 + }, + // 总条数 + total: subTableDFata.length, + // 表格数据 + tableList: subTableDFata, + currentRow:null + } + const tableColumns = CustomerreturnRequestDetail.allSchemas.tableFormColumns + tableColumns.forEach((item) => { + item.width = item.table?.width || 150 + }) + searchTableRef.value.openData("收货明细",tableObject,{tableColumns},true) +} +const searchTableSuccess1 = (formField, searchField, val, formRef, type, row) => { + console.log(val) + tableData.value = [...tableData.value,...val] } // 删除明细 const handleDeleteTable = (item, index) => { From d9c455f331cf4fdcf87d853dfee09f35688cc9df Mon Sep 17 00:00:00 2001 From: yufei0306 <13417315+yufei0306@user.noreply.gitee.com> Date: Tue, 28 May 2024 15:23:02 +0800 Subject: [PATCH 05/17] bug --- .../customerreturn/customerreturnRequestMain/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index 7859e1a17..2fd8a1768 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -199,7 +199,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(formField == 'deliverRecordNumber') { setV['deliverRecordNumber'] = val[0]['number'] setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] - setV['customerCode'] = val[0]['customerCode'] + // setV['customerCode'] = val[0]['customerCode'] setV['customerDockCode'] = val[0]['customerDockCode'] // 获取子表数据 From 919f41f456943c9ad76b8e97e9f57ef6bc387724 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Tue, 28 May 2024 16:30:57 +0800 Subject: [PATCH 06/17] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processproductionRequest/index.vue | 130 +++++++---- .../processproductionRequestMain.data.ts | 202 ++++++++++++++++-- 2 files changed, 266 insertions(+), 66 deletions(-) diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index 5637b4620..19c9f77d0 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -21,16 +21,14 @@ :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" - :pagination="{ - total: tableObject.total - }" + :pagination="{total: tableObject.total}" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -