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