Commit 53a83095 authored by 邓春圆's avatar 邓春圆

修改商品报错,bug修复

parent 74c57922
......@@ -241,19 +241,20 @@
<script>
import {
createProduct,
updateProduct,
deleteProduct,
exportProductExcel,
getProduct,
getProductPage,
exportProductExcel,
product_coupon_newProd
product_coupon_newProd,
updateProduct
} from "@/api/ecw/product";
import { getProductAttrList } from "@/api/ecw/productAttr";
import { getProductTypeList } from "@/api/ecw/productType";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import { CommonStatusEnum, AuditStatusEnum } from '@/utils/constants';
import { uploadFile } from "@/api/infra/file";
import {getProductAttrList} from "@/api/ecw/productAttr";
import {getProductTypeList} from "@/api/ecw/productType";
import {DICT_TYPE, getDictDatas} from '@/utils/dict';
import {AuditStatusEnum, CommonStatusEnum} from '@/utils/constants';
import {uploadFile} from "@/api/infra/file";
import ImageUpload from '@/components/ImageUpload'
export default {
name: "EcwProductIndex",
components: {
......@@ -457,8 +458,6 @@ export default {
needBook: 0,
couponIds:[],
};
let c = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId)
this.form.couponIds = c
this.resetForm("form");
},
/** 搜索按钮操作 */
......@@ -477,6 +476,10 @@ export default {
this.reset();
this.open = true;
this.title = this.$t("添加商品");
product_coupon_newProd().then(r => {
this.preferentialList = r.data
this.form.couponIds = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId)
})
if (this.queryParams.typeId) {
this.form.typeId = this.queryParams.typeId;
}
......@@ -497,6 +500,11 @@ export default {
})
this.open = true;
this.title = this.$t("修改商品");
product_coupon_newProd().then(r => {
this.preferentialList = r.data
this.form.couponIds = this.preferentialList.filter(i => i.isDefault).map(i => i.couponId)
// this.reset()
})
});
},
......@@ -628,16 +636,6 @@ export default {
}
}
},
watch:{
open(val){
if(val){
product_coupon_newProd().then(r => {
this.preferentialList = r.data
this.reset()
})
}
}
}
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment