Commit 319a4ac9 by lixiaomin

修改商品配置

parent bdffa312
<template>
<div>
<el-dialog title="商品规格机器操作步骤详情" :visible.sync="open" width="1000px" append-to-body>
<el-dialog title="配置制作步骤" :visible.sync="open" width="1000px" append-to-body>
<el-table :data="special_tb_data" style="width: 100%" ref="special_tb" @row-click="specal_tb_row_click();">
<el-table-column label="" type="expand">
......@@ -60,14 +60,12 @@ export default {
}
},
mounted:function(){
console.log("mounted mach_model_list");
this.spec_mach_model_list();
},
methods: {
/**提前将商品信息传入 */
setSpecGoods(p_goods){
this.goods = p_goods;
console.log("pgoods ",this.goods);
},
findSpecNameById(p_specId){
let specList = JSON.parse(this.goods.spec);
......@@ -90,8 +88,6 @@ export default {
},
/**打开规格详情配置,并初始化显示内容 */
async showSpecial(isShow,p_goods){
console.log("111 ");
/** 根据商品获取sku list; 按原型组装数据*/
await this.getSkuByGoodsId(this.goods.id).then((res)=>{
console.log("getSkuByGoodsId response 123",res);
......@@ -118,10 +114,6 @@ export default {
}).catch((res)=>{
console.log("getSkuByGoodsId 123",res);
});
console.log("333 ");
console.log("this.skuList ",this.skuList );
console.log("mach_model_list ",this.mach_model_list );
// sku,和机器型号可能的数据放到一个数组里,后续只循环一个数组即可,也为方法抽取提供条件;
let t_special_tb_data=[]
for(let i=0;i<this.skuList.length;i++){
......@@ -204,9 +196,6 @@ export default {
}
this.special_tb_data = t_special_tb_data;
console.log("this.special_tb_data ",this.special_tb_data);
console.log("666 ");
//回显历史数据
this.get_step_data();
......@@ -235,11 +224,9 @@ export default {
getSkuByGoodsId(goodsId){
return new Promise((resolve,reject)=>{
list_sku_byGoodsId(goodsId).then((response) => {
console.log("222 ");
resolve(response);
}).catch((response) => {
console.log("getSkuByGoodsId error",response);
console.log("222 e");
reject(response);
});
});
......@@ -249,10 +236,8 @@ export default {
getStepListByMidAndSkuId(p_queryParams){
return new Promise((resolve,reject)=>{
list_step(p_queryParams).then((response) => {
console.log("getStepListByMidAndSkuId 555 ");
resolve(response);
}).catch((response) => {
console.log("getStepListByMidAndSkuId 555 error",response);
reject(response);
});
});
......
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