From 8edeace99232e359a933b8a2b18a44914f62c169 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 12 Jun 2024 14:49:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A3=80=E9=AA=8C=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warehousing/Inventory/config.js | 2 +- .../warehousing/Inventory/index.vue | 29 +++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js index be132c88..fe6181ab 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/config.js @@ -16,7 +16,7 @@ export const dialogConfig = { { t_width: '', t_props: 'typeName', t_label: '设备类型' }, { t_width: '', t_props: 'typeModelName', t_label: '规格型号' }, { t_width: '', t_props: 'maCode', t_label: '设备编码' }, - { t_width: '', t_props: 'num', t_label: '设备数量' }, + { 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 42399734..68f2f4bb 100644 --- a/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue +++ b/sgzb-ui/src/views/warehouseManage/warehousing/Inventory/index.vue @@ -354,9 +354,11 @@ :picker-options="{ disabledDate(time) { if (codeForm.thisCheckTime) { - return time.getTime() < new Date(codeForm.thisCheckTime).getTime(); + let today = new Date() + today.setHours(0, 0, 0, 0) + return time.getTime() < today.getTime() || time.getTime() < new Date(codeForm.thisCheckTime).getTime() } - return false; + return false } }" /> @@ -602,6 +604,7 @@ type="date" placeholder="请输入检验时间" style="width: 170px" + @change="changeCheckTimeRow(row)" > @@ -617,6 +620,17 @@ type="date" placeholder="请输入下次检验时间" style="width: 170px" + :disabled="!row.thisCheckTime" + :picker-options="{ + disabledDate(time) { + if (row.thisCheckTime) { + let today = new Date() + today.setHours(0, 0, 0, 0) + return time.getTime() < today.getTime() || time.getTime() < new Date(row.thisCheckTime).getTime() + } + return false + } + }" > @@ -1521,12 +1535,21 @@ export default { }, // 校验检验日期 changeCheckTime() { - if (this.codeForm.thisCheckTime > this.codeForm.nextCheckTime) { + if (this.codeForm.nextCheckTime && this.codeForm.thisCheckTime > this.codeForm.nextCheckTime) { this.codeForm.nextCheckTime = '' + this.$message.warning('下次检验日期不能早于检验日期!') } else if (!this.codeForm.thisCheckTime) { this.codeForm.nextCheckTime = '' } }, + changeCheckTimeRow(row) { + if (row.nextCheckTime && row.thisCheckTime > row.nextCheckTime) { + row.nextCheckTime = '' + this.$message.warning('下次检验日期不能早于检验日期!') + } else if (!row.thisCheckTime) { + row.nextCheckTime = '' + } + }, }, }