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 045aea48..04e6440c 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 + } + }" > @@ -1520,12 +1534,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 = '' + } + }, }, }