|
|
@@ -90,6 +90,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {getList, getDetail, add, update, remove} from "@/api/productBatch/productBatch";
|
|
|
+ import {getDetail as getModelDetail } from "@/api/productModel/productModel";
|
|
|
import option from "@/option/productBatch/productBatch";
|
|
|
import optionSub from "@/option/productBatch/product.js";
|
|
|
import {mapGetters} from "vuex";
|
|
|
@@ -146,6 +147,18 @@
|
|
|
// });
|
|
|
// }
|
|
|
|
|
|
+ 'form.productModelId'(newValue, oldValue) {
|
|
|
+ if(newValue){
|
|
|
+ this.$nextTick(() => {
|
|
|
+ getModelDetail(newValue).then(res => {
|
|
|
+ this.optionSub.column.waterCooling.hide= !(","+res.data.data.inStockFormItem+",").includes(",water_cooling,")
|
|
|
+ this.optionSub.column.airtight.hide= !(","+res.data.data.inStockFormItem+",").includes(",airtight,")
|
|
|
+ this.optionSub.column.coldQrCode.hide= !(","+res.data.data.inStockFormItem+",").includes(",cold_qr_code,")
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
created () {
|
|
|
let that = this;
|
|
|
@@ -283,6 +296,10 @@
|
|
|
},
|
|
|
beforeOpen(done, type) {
|
|
|
this.optionSub.menu = false;
|
|
|
+
|
|
|
+ this.option.column.productModelId.disabled=false;
|
|
|
+ this.option.column.clientId.disabled=false;
|
|
|
+ this.option.column.factoryId.disabled=false;
|
|
|
if (["edit", "view"].includes(type)) {
|
|
|
getDetail(this.form.id).then(res => {
|
|
|
this.form = res.data.data;
|
|
|
@@ -309,6 +326,7 @@
|
|
|
this.optionSub.menu = true;
|
|
|
if(!this.form.details){
|
|
|
this.form.details = [{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true},{"$cellEdit":true}]
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
done();
|