|
|
|
@ -445,7 +445,7 @@ export default {
|
|
|
|
|
// 监听lineCode和checkDate的变化
|
|
|
|
|
headerParameters: {
|
|
|
|
|
handler(newVal) {
|
|
|
|
|
if (newVal.lineCode && newVal.checkDate) {
|
|
|
|
|
if (newVal.lineCode || newVal.checkDate) {
|
|
|
|
|
this.getProductList(); //监听产品和检查日期
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -464,7 +464,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//在选择设备时候,存设备名称
|
|
|
|
|
//在选择产品时候,存产品名称
|
|
|
|
|
handleSelectProductChange(value) {
|
|
|
|
|
const selectedOption = this.productCodeOption.find(
|
|
|
|
|
(option) => option.id === value
|
|
|
|
@ -559,6 +559,19 @@ export default {
|
|
|
|
|
getProductList() {
|
|
|
|
|
getProductList(this.headerParameters).then((response) => {
|
|
|
|
|
this.productCodeOption = response;
|
|
|
|
|
|
|
|
|
|
if (response.length === 0) {
|
|
|
|
|
this.headerParameters.id = null;
|
|
|
|
|
// this.productCodeOption = null;
|
|
|
|
|
} else {
|
|
|
|
|
const found = this.productCodeOption.some(
|
|
|
|
|
(item) => item.id === this.headerParameters.id
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if (!found) {
|
|
|
|
|
this.headerParameters.id = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|