Commit 319a4ac9 by lixiaomin

修改商品配置

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