From 92ef22e9d24620a14c03a24c1f52cd2c9fd92a31 Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Tue, 17 Jun 2025 11:21:39 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../picking/apply/component/AddPicking1.vue | 1 + .../auditing/component/auditingPage1.vue | 1 + .../return/ctReceive/component/home.vue | 4 +-- .../return/receive/component/addReturn1.vue | 7 ++++ .../inventoryScrap/component/homeApply.vue | 1 - src/views/repairTest/repair/dialogOneForm.vue | 36 ++++++++++++++++--- src/views/repairTest/repair/dialogTwoForm.vue | 18 ++++++++-- src/views/store/poleConfig/poleConfig.vue | 10 ++++-- src/views/stquery/deviceScrapQuery.vue | 2 ++ .../toolsAcceptance/component/addTools.vue | 15 +++++--- 10 files changed, 79 insertions(+), 16 deletions(-) diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue index 3f036bd..7bd6522 100644 --- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue +++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue @@ -210,6 +210,7 @@ min="1" clearable style="width: 100%" + :disabled="scope.row.deviceAscription === '主体设备'" /> {{ scope.row.preNum }} diff --git a/src/views/claimAndreturn/picking/auditing/component/auditingPage1.vue b/src/views/claimAndreturn/picking/auditing/component/auditingPage1.vue index 1458f98..365af4b 100644 --- a/src/views/claimAndreturn/picking/auditing/component/auditingPage1.vue +++ b/src/views/claimAndreturn/picking/auditing/component/auditingPage1.vue @@ -613,6 +613,7 @@ export default { this.getData(taskData.taskId) }) .finally(() => { + this.$emit('goBackPage') // 刷新页面 // window.location.reload() }) diff --git a/src/views/claimAndreturn/return/ctReceive/component/home.vue b/src/views/claimAndreturn/return/ctReceive/component/home.vue index 7bd3bbc..ab289db 100644 --- a/src/views/claimAndreturn/return/ctReceive/component/home.vue +++ b/src/views/claimAndreturn/return/ctReceive/component/home.vue @@ -357,11 +357,11 @@ export default { /** 导出按钮操作 */ handleExport() { this.download( - 'material/base/backReceive/export', + 'material/backApply/exportCt', { ...this.queryParams, }, - `退料接收_${new Date().getTime()}.xlsx`, + `成套设备退料接收_${new Date().getTime()}.xlsx`, ) }, }, diff --git a/src/views/claimAndreturn/return/receive/component/addReturn1.vue b/src/views/claimAndreturn/return/receive/component/addReturn1.vue index 46718a5..0dc7e54 100644 --- a/src/views/claimAndreturn/return/receive/component/addReturn1.vue +++ b/src/views/claimAndreturn/return/receive/component/addReturn1.vue @@ -257,6 +257,13 @@ :on-success="(res, file, fileList) => handleSuccess(res, file, fileList, scope.row)" > 点击上传 + diff --git a/src/views/repairTest/inventoryScrap/component/homeApply.vue b/src/views/repairTest/inventoryScrap/component/homeApply.vue index 639bca0..f29484a 100644 --- a/src/views/repairTest/inventoryScrap/component/homeApply.vue +++ b/src/views/repairTest/inventoryScrap/component/homeApply.vue @@ -106,7 +106,6 @@ diff --git a/src/views/repairTest/repair/dialogOneForm.vue b/src/views/repairTest/repair/dialogOneForm.vue index a7d6e2c..592556c 100644 --- a/src/views/repairTest/repair/dialogOneForm.vue +++ b/src/views/repairTest/repair/dialogOneForm.vue @@ -7,6 +7,7 @@ :visible.sync="dialogShowFlag" append-to-body width="600px" + center >
总金额(元):{{ totalPrice }}
@@ -83,7 +84,7 @@ label="配件数量:" :rules="{ required: false, - validator: numberIntegerValidator, + validator: numberIntegerValidatorPart, trigger: 'blur', }" > @@ -333,7 +334,7 @@ label="配件数量:" :rules="{ required: false, - validator: numberIntegerValidator, + validator: numberIntegerValidatorPart, trigger: 'blur', }" > @@ -669,6 +670,20 @@ export default { callback() } }, + + numberIntegerValidatorPart(rule, value, callback) { + // 若值为空字符串,直接通过验证 + if (value === '') { + callback(); + return; + } + const reg = /^(0|[1-9]\d*)$/; // 调整正则表达式,支持 0 和正整数 + if (reg.test(value)) { + callback(); + } else { + callback(new Error('请输入正整数或 0')); + } + }, getTree() { listPartType().then((response) => { this.deptList = this.handleTree(response.data, 'paId') @@ -733,6 +748,13 @@ export default { this.dynamicValidateFormTwo.premiumListTwo = []; }, addDomainOne() { + const formatDate = (date) => { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + }; + // 选择配件 partId // 是否收费 partType // 配件数量 partNum @@ -753,7 +775,7 @@ export default { fileList: [], partChange: '', partChangeNum: '', - updateTime: new Date(), + updateTime: formatDate(new Date()), }; this.dynamicValidateForm.premiumList.push(newDomain); }, @@ -769,6 +791,12 @@ export default { } }, addDomainTwo() { + const formatDate = (date) => { + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; + }; const newDomain = { selected: 'N', // partId: '', @@ -783,7 +811,7 @@ export default { fileList: [], partChange: '', partChangeNum: '', - updateTime: new Date(), + updateTime: formatDate(new Date()), }; this.dynamicValidateFormTwo.premiumListTwo.push(newDomain); }, diff --git a/src/views/repairTest/repair/dialogTwoForm.vue b/src/views/repairTest/repair/dialogTwoForm.vue index 513eea9..3d7d9c4 100644 --- a/src/views/repairTest/repair/dialogTwoForm.vue +++ b/src/views/repairTest/repair/dialogTwoForm.vue @@ -105,7 +105,7 @@ label="配件数量:" :rules="{ required: false, - // validator: numberIntegerValidator, + validator: numberIntegerValidatorPart, trigger: 'blur', }" > @@ -289,10 +289,11 @@ > --> @@ -513,6 +514,19 @@ export default { callback(new Error('请输入大于0的并且小于维修总量的正整数')) } }, + numberIntegerValidatorPart(rule, value, callback) { + // 若值为空字符串,直接通过验证 + if (value === '') { + callback(); + return; + } + const reg = /^(0|[1-9]\d*)$/; // 调整正则表达式,支持 0 和正整数 + if (reg.test(value)) { + callback(); + } else { + callback(new Error('请输入正整数或 0')); + } + }, getTree() { listPartType().then((response) => { this.deptList = this.handleTree(response.data, 'paId') diff --git a/src/views/store/poleConfig/poleConfig.vue b/src/views/store/poleConfig/poleConfig.vue index 68eb7ab..c8427fa 100644 --- a/src/views/store/poleConfig/poleConfig.vue +++ b/src/views/store/poleConfig/poleConfig.vue @@ -100,7 +100,6 @@ @@ -412,7 +412,7 @@ export default { const mainDeviceObj = { deviceType: checkNode[0].label, // 设备型号 deviceTypeId: val[val.length - 1], // 设备Id - deviceNum: '', // 数量 + deviceNum: 1, // 数量 deviceAscription: '抱杆设备', // 所属类型 ascriptionType: 1, // 所属类型 1 主体设备 2 配套设备 typeName: this.deviceName, @@ -444,7 +444,6 @@ export default { this.$message.closeAll() const checkNode = this.$refs['assortDeviceRef'].getCheckedNodes() this.recursionGetDeviceName(this.deviceTypeTreeNew, val[val.length - 2]) - if (checkNode.length < 1) return const assortDeviceObj = { @@ -456,6 +455,11 @@ export default { typeName: this.deviceName, isStorage: checkNode[0].data.isStorage, } + // 判断设备是否关联库存 + if (assortDeviceObj.isStorage == 1) { + this.$message.error('该设备因关联库存无法添加,请先修改该设备') + return + } // 先判断当前所选的配套设备是否已选择为主体设备 if (this.tempList.length > 0 && this.tempList[0].deviceTypeId === assortDeviceObj.deviceTypeId) { diff --git a/src/views/stquery/deviceScrapQuery.vue b/src/views/stquery/deviceScrapQuery.vue index 8124969..54c6c49 100644 --- a/src/views/stquery/deviceScrapQuery.vue +++ b/src/views/stquery/deviceScrapQuery.vue @@ -111,6 +111,7 @@ align="center" prop="code" :show-overflow-tooltip="true" + width="180px" /> {