Commit 98be934f authored by 我在何方's avatar 我在何方

新增商品修复

parent a67a96a9
...@@ -381,7 +381,6 @@ export default { ...@@ -381,7 +381,6 @@ export default {
this.getList() this.getList()
}, },
created() { created() {
console.log(111)
//新增商品异常跳转商品修改 //新增商品异常跳转商品修改
if(this.$route.query.prodId){ if(this.$route.query.prodId){
this.exceptionProductId = this.$route.query.prodId this.exceptionProductId = this.$route.query.prodId
...@@ -505,7 +504,7 @@ export default { ...@@ -505,7 +504,7 @@ export default {
const id = row.id; const id = row.id;
getProduct(id).then(response => { getProduct(id).then(response => {
this.form = {...response.data,couponIds:[]}; this.form = {...response.data,couponIds:[]};
let attrArray = this.form.attrId.split(','); let attrArray = this.form.attrId?this.form.attrId.split(','):[];
for (let index in attrArray) { for (let index in attrArray) {
let value = attrArray[index]; let value = attrArray[index];
attrArray[index] = parseInt(value); attrArray[index] = parseInt(value);
...@@ -542,6 +541,7 @@ export default { ...@@ -542,6 +541,7 @@ export default {
this.$modal.msgSuccess(this.$t("修改成功")); this.$modal.msgSuccess(this.$t("修改成功"));
this.open = false; this.open = false;
if(this.exceptionProductId){ if(this.exceptionProductId){
this.exceptionProductId = null
this.$router.replace({ path: '/product/product-list'}) this.$router.replace({ path: '/product/product-list'})
} }
this.getList(); this.getList();
......
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