|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button type="primary" size="small" @click="dialogTableVisible=true">新增商品</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="addBtn">新增商品</el-button>
|
|
|
<el-dialog title="产品组商品新增" append-to-body :visible.sync="dialogTableVisible" width="50%">
|
|
|
- <table1 v-if="productList()" @checkboxCallBack="checkboxCallBack" :layout="tablecols" :data="productList()" :opwidth="200" :custom="false" :height="300" :checkbox="true">
|
|
|
+ <table1 v-if="productList" @checkboxCallBack="checkboxCallBack" :layout="tablecols" :data="productList" :opwidth="200" :custom="false" :height="300" :checkbox="true">
|
|
|
</table1>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<div>
|
|
@@ -22,10 +22,10 @@ export default {
|
|
|
return {
|
|
|
dialogTableVisible:false,
|
|
|
product:[],
|
|
|
- tablecols:[]
|
|
|
+ tablecols:[],
|
|
|
+ productList:''
|
|
|
}
|
|
|
},
|
|
|
- inject: ['productList'],
|
|
|
props:['id'],
|
|
|
watch: {
|
|
|
|
|
@@ -62,6 +62,22 @@ export default {
|
|
|
},
|
|
|
checkboxCallBack(data) {
|
|
|
this.product = data
|
|
|
+ },
|
|
|
+ async addBtn() {
|
|
|
+ this.dialogTableVisible=true
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "id": "20220923112503",
|
|
|
+ "version":1,
|
|
|
+ "content": {
|
|
|
+ "nocache":true,
|
|
|
+ "sa_itemgroupid":this.id,
|
|
|
+ "where":{
|
|
|
+ "condition":""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(res);
|
|
|
+ this.productList = res.data
|
|
|
}
|
|
|
}
|
|
|
}
|