盘点入库-编码入库-设备编码必填
This commit is contained in:
parent
b360d07dc4
commit
91c0464a0e
|
|
@ -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: '备注' },
|
||||
],
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -530,15 +530,18 @@
|
|||
type="index"
|
||||
/>
|
||||
<el-table-column
|
||||
label="设备编码"
|
||||
align="center"
|
||||
prop="maCode"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template v-slot:header>
|
||||
<span style="color: red;">* </span>设备编码
|
||||
</template>
|
||||
<template v-slot:default="{ row }" v-if="!isNumCheck">
|
||||
<el-input
|
||||
v-model="row.maCode"
|
||||
placeholder="请输入设备编码"
|
||||
@blur="handleMaCodeBlur(row)"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -950,6 +953,7 @@ export default {
|
|||
dialogConfig,
|
||||
getInventoryWarehousingApi,
|
||||
sendParams: {},
|
||||
requiredMaCode: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -1224,6 +1228,14 @@ export default {
|
|||
this.getList()
|
||||
})
|
||||
} else {
|
||||
// this.codeTableList 中只要有一个maCode为空, 则不允许提交
|
||||
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 +1504,11 @@ export default {
|
|||
closeDialogOuter() {
|
||||
this.dialogConfig.outerVisible = false
|
||||
},
|
||||
handleMaCodeBlur(row) {
|
||||
if (!row.maCode) {
|
||||
this.$message.warning('设备编码不能为空')
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue