Skip to content

Commit

Permalink
bug修复
Browse files Browse the repository at this point in the history
  • Loading branch information
zhh committed Jun 19, 2018
1 parent 98688dc commit d1cab7e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions src/views/pms/product/components/ProductInfoDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@
selectProductCateValue: function (newValue) {
if (newValue != null && newValue.length === 2) {
this.value.productCategoryId = newValue[1];
this.value.productCategoryName= this.getCateNameById(this.value.productCategoryId);
} else {
this.value.productCategoryId = null;
this.value.productCategoryName=null;
}
}
},
Expand Down Expand Up @@ -154,6 +156,18 @@
}
});
},
getCateNameById(id){
let name=null;
for(let i=0;i<this.productCateOptions.length;i++){
for(let j=0;i<this.productCateOptions[i].children.length;j++){
if(this.productCateOptions[i].children[j].value===id){
name=this.productCateOptions[i].children[j].label;
return name;
}
}
}
return name;
},
handleNext(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
Expand Down
6 changes: 3 additions & 3 deletions src/views/pms/product/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
:visible.sync="editSkuInfo.dialogVisible"
width="40%">
<span>商品货号:</span>
<span>{{editSkuInfo.productName}}</span>
<span>{{editSkuInfo.productSn}}</span>
<el-input placeholder="按sku编号搜索" v-model="editSkuInfo.keyword" size="small" style="width: 50%;margin-left: 20px">
<el-button slot="append" icon="el-icon-search" @click="handleSearchEditSku"></el-button>
</el-input>
Expand Down Expand Up @@ -301,7 +301,7 @@
editSkuInfo:{
dialogVisible:false,
productId:null,
productName:'',
productSn:'',
productAttributeCategoryId:null,
stockList:[],
productAttr:[],
Expand Down Expand Up @@ -435,7 +435,7 @@
handleShowSkuEditDialog(index,row){
this.editSkuInfo.dialogVisible=true;
this.editSkuInfo.productId=row.id;
this.editSkuInfo.productName=row.name;
this.editSkuInfo.productSn=row.productSn;
this.editSkuInfo.productAttributeCategoryId = row.productAttributeCategoryId;
this.editSkuInfo.keyword=null;
fetchSkuStockList(row.id,{keyword:this.editSkuInfo.keyword}).then(response=>{
Expand Down

0 comments on commit d1cab7e

Please sign in to comment.