From 4808ead460bb5add33a3e53109206061b5e505ef Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 8 Jul 2024 10:59:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=88=B6=E5=93=81=E8=BF=94=E4=BF=AE?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=20=E8=BF=94=E4=BF=AE=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=BA=BF=E4=BB=A3=E7=A0=81=E6=98=AF=E5=BF=85=E5=A1=AB=E9=A1=B9?= =?UTF-8?q?=E4=BD=86=E6=98=AF=E6=9C=AA=E6=A0=87=E8=AF=86=EF=BC=8C=E8=A1=A5?= =?UTF-8?q?=E6=96=99=E7=94=B3=E8=AF=B7=E5=BA=94=E8=AF=A5=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=AA=E8=83=BD=E6=B7=BB=E5=8A=A0=E4=B8=80=E6=9D=A1=E6=98=8E?= =?UTF-8?q?=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issueManage/repleinsh/repleinshRequestMain/index.vue | 9 ++++++--- .../productrepairRequestMain.data.ts | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index 74040ff72..d1a83f67e 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -118,6 +118,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => newRow['itemCode'] = item['code'] newRow['uom'] = item['uom'] newRow['id'] = item['id'] + newRow['toLocationCode'] = formRef.formModel['toLocationCode'] tableData.value.push(newRow) }) } else { @@ -359,6 +360,7 @@ const tableData = ref([]) // 添加明细 const handleAddTable = () => { tableData.value.push(JSON.parse(JSON.stringify(tableFormKeys))) + } // 删除明细 const handleDeleteTable = (item, index) => { @@ -376,10 +378,11 @@ const submitForm = async (formType, submitData) => { if(data.masterId){ data.id = data.masterId } - tableData.value.forEach(item=>{ - item.toLocationCode = data.toLocationCode - }) data.subList = tableData.value // 拼接子表数据参数 + if( data.subList.length>1){ + message.warning('明细只能选择一条数据') + return; + } if(tableData.value.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') formRef.value.formLoading = false diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts index 45a183c70..309e89bc0 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/productrepairRequestMain.data.ts @@ -118,7 +118,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ sortTableDefault:4, tableForm:{ isInpuFocusShow: true, - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '生产线信息', // 查询弹窗标题 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 @@ -138,7 +138,7 @@ export const ProductrepairRequestMain = useCrudSchemas(reactive([ // labelMessage: '信息提示说明!!!', componentProps: { isSearchList: true, // 开启查询弹窗 - searchListPlaceholder: '请选择生产线代码', // 输入框占位文本 + searchListPlaceholder: '请选择返修生产线代码', // 输入框占位文本 searchField: 'code', // 查询弹窗赋值字段 searchTitle: '生产线信息', // 查询弹窗标题 searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类 @@ -501,6 +501,9 @@ export const ProductrepairRequestMainRules = reactive({ workshopCode: [ { required: true, message: '请选择车间代码', trigger: 'change' } ], + productionLineCode: [ + { required: true, message: '请选择返修生产线', trigger: 'change' } + ], // dueTime: [ // { required: true, message: '请选择截止时间', trigger: 'change' } // ], From f48cbf6529686b943c55d4a89c00cfe29179bb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Mon, 8 Jul 2024 11:04:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentMainPart.data.ts | 274 +++++++++--------- src/views/eam/itemAccounts/index.vue | 44 ++- .../SparePartsApply.data.ts | 3 +- src/views/eam/sparePartsApplyMain/index.vue | 10 +- 4 files changed, 176 insertions(+), 155 deletions(-) diff --git a/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts index ed90c0233..04decb155 100644 --- a/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts +++ b/src/views/eam/equipmentMainPart/equipmentMainPart.data.ts @@ -5,148 +5,150 @@ import { dateFormatter } from '@/utils/formatTime' export const EquipmentMainPartRules = reactive({ name: [required], code: [required], - type: [required], + type: [required] }) -export const EquipmentMainPart = useCrudSchemas(reactive([ - { - label: 'id', - field: 'id', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '编码', - field: 'code', - sort: 'custom', - isSearch: true, - }, - { - label: '名称', - field: 'name', - sort: 'custom', - isSearch: true, - }, - { - label: '类型', - field: 'type', - sort: 'custom', - dictType: DICT_TYPE.DEVICE_TYPE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isSearch: true, - form: { - component: 'Select' - } - }, - { - label: '创建时间', - field: 'createTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: true, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] - } +export const EquipmentMainPart = useCrudSchemas( + reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '编码', + field: 'code', + sort: 'custom', + isSearch: true }, - isForm: false, - }, - { - label: '部门id', - field: 'departmentCode', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '备注', - field: 'remark', - sort: 'custom', - isSearch: false, - }, - { - label: '地点ID', - field: 'siteId', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '是否启用', - field: 'available', - sort: 'custom', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', // 默认都是字符串类型其他暂不考虑 - isTable: true, - isDetail: false, - isSearch: false, - isTableForm: false, - isForm: false, - }, - { - label: '删除时间', - field: 'deletionTime', - sort: 'custom', - formatter: dateFormatter, - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - search: { - component: 'DatePicker', - componentProps: { - valueFormat: 'YYYY-MM-DD HH:mm:ss', - type: 'daterange', - defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + { + label: '名称', + field: 'name', + sort: 'custom', + isSearch: true + }, + { + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_TYPE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isSearch: true, + form: { + component: 'Select' } }, - form: { - component: 'DatePicker', - componentProps: { - type: 'datetime', - valueFormat: 'x' + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false + }, + { + label: '部门id', + field: 'departmentCode', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '备注', + field: 'remark', + sort: 'custom', + isSearch: false + }, + { + label: '地点ID', + field: 'siteId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false + }, + { + label: '是否启用', + field: 'available', + sort: 'custom', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', // 默认都是字符串类型其他暂不考虑 + isTable: true, + isDetail: false, + isSearch: false, + isTableForm: false, + isForm: false + }, + { + label: '删除时间', + field: 'deletionTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + form: { + component: 'DatePicker', + componentProps: { + type: 'datetime', + valueFormat: 'x' + } } }, - }, - { - label: '删除人id', - field: 'deleterId', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - }, - { - label: '并发乐观锁', - field: 'concurrencyStamp', - sort: 'custom', - isSearch: false, - isTable: false, - isForm: false, - isDetail:false, - form: { - component: 'InputNumber', - value: 0 + { + label: '删除人id', + field: 'deleterId', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false }, - }, - { - label: '操作', - field: 'action', - isForm: false, - table: { - width: 150, - fixed: 'right' + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + isSearch: false, + isTable: false, + isForm: false, + isDetail: false, + form: { + component: 'InputNumber', + value: 0 + } + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } } - } -])) + ]) +) diff --git a/src/views/eam/itemAccounts/index.vue b/src/views/eam/itemAccounts/index.vue index 2369ba9cb..3e8f617a3 100644 --- a/src/views/eam/itemAccounts/index.vue +++ b/src/views/eam/itemAccounts/index.vue @@ -31,9 +31,9 @@ v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" > -