From 9e3b086f9e0ca889f372acaa6aadecc6d2b6a8d7 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 13:32:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehousing/Inventory/config.js | 1 + .../warehousing/Inventory/index.vue | 43 +++++++++++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js index 0e3f7a27..be132c88 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js @@ -19,6 +19,7 @@ export const dialogConfig = { { t_width: '', t_props: 'num', t_label: '设备数量' }, { t_width: '', t_props: 'modelName', t_label: '入库人' }, { t_width: '', t_props: 'createDate', t_label: '入库日期' }, + { t_width: '', t_props: 'remark', t_label: '备注' }, ], } diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue index 3cbeec8b..045aea48 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -334,6 +334,7 @@ type="date" placeholder="请输入检验时间" style="width: 400px" + @change="changeCheckTime" /> @@ -349,6 +350,15 @@ type="date" placeholder="请输入检验时间" style="width: 13vw" + :disabled="!codeForm.thisCheckTime" + :picker-options="{ + disabledDate(time) { + if (codeForm.thisCheckTime) { + return time.getTime() < new Date(codeForm.thisCheckTime).getTime(); + } + return false; + } + }" /> @@ -523,22 +533,25 @@ :stripe="true" > - + /> --> + @@ -950,6 +963,7 @@ export default { dialogConfig, getInventoryWarehousingApi, sendParams: {}, + requiredMaCode: false, } }, created() { @@ -1224,6 +1238,13 @@ export default { this.getList() }) } else { + this.requiredMaCode = this.codeTableList.some( + (item) => !item.maCode, + ) + if (this.requiredMaCode) { + this.$message.error('设备编码不能为空') + return + } // 统一处理时间格式为 yyyy-MM-dd this.codeTableList.forEach((item) => { if (item.thisCheckTime) { @@ -1492,6 +1513,19 @@ export default { closeDialogOuter() { this.dialogConfig.outerVisible = false }, + handleMaCodeBlur(row) { + if (!row.maCode) { + this.$message.warning('设备编码不能为空') + } + }, + // 校验检验日期 + changeCheckTime() { + if (this.codeForm.thisCheckTime > this.codeForm.nextCheckTime) { + this.codeForm.nextCheckTime = '' + } else if (!this.codeForm.thisCheckTime) { + this.codeForm.nextCheckTime = '' + } + }, }, } @@ -1503,4 +1537,7 @@ export default { ::v-deep.el-form-item__label { padding: 0 20px !important; } +::v-deep .el-input-number.is-without-controls .el-input__inner { + text-align: start; +} \ No newline at end of file