积分超市
This commit is contained in:
		| @@ -7,13 +7,13 @@ | ||||
|     <template slot="tabs"> | ||||
|       <el-tabs v-model="currIndex"> | ||||
|         <el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label"> | ||||
|           <component :areaId="areaId" :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/> | ||||
|           <component :ref="String(i)" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions"/> | ||||
|         </el-tab-pane> | ||||
|       </el-tabs> | ||||
|     </template> | ||||
|   </ai-list> | ||||
|   <AddGoods v-else-if="componentName === 'AddGoods'" :areaId="areaId" :params="params" :instance="instance" :dict="dict" @change="onChange"></AddGoods> | ||||
|   <AddStore v-else-if="componentName === 'AddStore'" :areaId="areaId" :params="params" :instance="instance" :dict="dict" @change="onChange"></AddStore> | ||||
|   <AddGoods v-else-if="componentName === 'AddGoods'" :params="params" :instance="instance" :dict="dict" @change="onChange"></AddGoods> | ||||
|   <AddStore v-else-if="componentName === 'AddStore'" :params="params" :instance="instance" :dict="dict" @change="onChange"></AddStore> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| @@ -61,16 +61,10 @@ | ||||
|         currIndex: '0', | ||||
|         componentName: '', | ||||
|         params: {}, | ||||
|         areaName: '', | ||||
|         areaId: '', | ||||
|         isShowDetail: false | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     created () { | ||||
|       this.areaId = this.user.info.areaId | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
|       onAreaChange () { | ||||
|         if (this.currIndex === '0') { | ||||
|   | ||||
| @@ -259,8 +259,7 @@ | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appintegralsupermarketgoods/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             areaId: this.areaId, | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then((res) => { | ||||
|           if (res.code == 0) { | ||||
| @@ -288,8 +287,9 @@ | ||||
|         this.$nextTick(() => { | ||||
|           if (this.form.goodsList.length) { | ||||
|             this.form.goodsList.map(v => v.goods).forEach(v => { | ||||
|               console.log(v) | ||||
|               this.$refs.aiTable.toggleRowSelection(v, true) | ||||
|               if (this.tableData.filter(e => e.id === v.id).length) { | ||||
|                 this.$refs.aiTable.toggleRowSelection(this.tableData.filter(e => e.id === v.id)[0], true) | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|   | ||||
| @@ -77,8 +77,7 @@ | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       permissions: Function, | ||||
|       areaId: String, | ||||
|       permissions: Function | ||||
|     }, | ||||
|  | ||||
|     data() { | ||||
| @@ -116,8 +115,7 @@ | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appintegralsupermarketgoods/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             areaId: this.areaId, | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|   | ||||
| @@ -69,8 +69,7 @@ | ||||
|     props: { | ||||
|       instance: Function, | ||||
|       dict: Object, | ||||
|       permissions: Function, | ||||
|       areaId: String, | ||||
|       permissions: Function | ||||
|     }, | ||||
|  | ||||
|     data() { | ||||
| @@ -110,8 +109,7 @@ | ||||
|       getList () { | ||||
|         this.instance.post(`/app/appintegralsupermarketshop/list`, null, { | ||||
|           params: { | ||||
|             ...this.search, | ||||
|             areaId: this.areaId, | ||||
|             ...this.search | ||||
|           } | ||||
|         }).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|   | ||||
| @@ -193,7 +193,6 @@ export default { | ||||
|       this.$refs[this.refName].clearSelection() | ||||
|     }, | ||||
|     toggleRowSelection() { | ||||
|       console.log(22) | ||||
|       this.$refs[this.refName].toggleRowSelection(...arguments) | ||||
|     }, | ||||
|     toggleAllSelection() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user