新增维保记录选择好设备后,仍能切换仓库保存成功

20231126-yw
黄泽腾 2 years ago
parent ae654bf3b0
commit 241318b12c

@ -41,6 +41,7 @@
<el-select v-model="inspectOrder.invCode"
placeholder="请选择仓库"
clearable="true"
:disabled="isDeviceNameEmpty"
style="width: 90%"
>
<el-option
@ -193,6 +194,7 @@ export default {
return {
deptList: [],
invList: [],
isDeviceNameEmpty: false,
deviceDialogVisible: false,
deviceLoading: false,
filterQuery: {
@ -207,9 +209,12 @@ export default {
deptName: null,
invName: null,
selectRow: null,
check: false,
};
},
methods: {
deptChange() {
if(this.inspectOrder.id == null){
this.inspectOrder.deviceName=null;
@ -217,6 +222,7 @@ export default {
}
this.inspectOrder.invCode = null;
this.invList = [];
this.isDeviceNameEmpty=false;
this.getInvList();
},
getDeptList() {
@ -258,6 +264,7 @@ export default {
return;
}
this.setDeptAnInvName();
this.check = false
this.deviceDialogVisible = true;
this.filterQuery = {
code: null,
@ -303,6 +310,7 @@ export default {
onReset() {
this.filterQuery.code = null;
this.filterQuery.page = 1;
this.filterQuery.limit = 10;
this.getDeviceList();
},
queryDevice() {
@ -310,12 +318,18 @@ export default {
this.getDeviceList();
},
handleCurrentChange(row) {
this.check = !this.check
this.selectRow = row;
},
combine() {
if (this.check == false) {
this.$message.error("请选择设备!")
return;
}
this.deviceDialogVisible = false;
this.inspectOrder.code = this.selectRow.code;
this.inspectOrder.deviceName = this.selectRow.deviceName;
this.isDeviceNameEmpty=true;
},
},
created() {

Loading…
Cancel
Save