117 lines
3.0 KiB
Vue
117 lines
3.0 KiB
Vue
<template>
|
|
<ai-list v-if="!isShowDetail">
|
|
<template slot="title">
|
|
<ai-title
|
|
title="订单管理"
|
|
:isShowBottomBorder="false"
|
|
:isShowArea="currIndex === '1'"
|
|
:fullname.sync="areaName"
|
|
v-model="areaId"
|
|
:instance="instance"
|
|
@change="onAreaChange">
|
|
<!-- <template #sub>
|
|
<span v-if="currIndex === '0'">可查看并核销网格员在积分超市中兑换的商品订单</span>
|
|
<span v-else>可查看并核销居民在积分超市中兑换的商品订单</span>
|
|
</template> -->
|
|
</ai-title>
|
|
</template>
|
|
<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"/>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</template>
|
|
</ai-list>
|
|
</template>
|
|
|
|
<script>
|
|
import GirdOrderList from './components/GirdOrderList.vue'
|
|
import ResidentOrderList from './components/ResidentOrderList'
|
|
import { mapState } from 'vuex'
|
|
|
|
export default {
|
|
name: 'AppIntegratingOrder',
|
|
label: '订单管理',
|
|
|
|
components: {
|
|
ResidentOrderList,
|
|
GirdOrderList
|
|
},
|
|
|
|
props: {
|
|
instance: Function,
|
|
dict: Object,
|
|
permissions: Function
|
|
},
|
|
|
|
computed: {
|
|
...mapState(['user']),
|
|
|
|
tabs () {
|
|
const tabList = [
|
|
{label: '网格积分订单', name: 'GirdOrderList', comp: GirdOrderList, permission: ''},
|
|
{label: '居民积分订单', name: 'ResidentOrderList', comp: ResidentOrderList, permission: ''}
|
|
].filter(item => {
|
|
return true
|
|
})
|
|
|
|
return tabList
|
|
}
|
|
},
|
|
|
|
data () {
|
|
return {
|
|
activeName: 'GirdOrderList',
|
|
currIndex: '0',
|
|
componentName: '',
|
|
params: {},
|
|
areaName: '',
|
|
areaId: '',
|
|
isShowDetail: false
|
|
}
|
|
},
|
|
|
|
created () {
|
|
this.areaId = this.user.info.areaId
|
|
if (this.$route.query.id) {
|
|
this.componentName = this.$route.query?.type
|
|
this.params = {id: this.$route.query?.id}
|
|
this.isShowDetail = true
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
onAreaChange () {
|
|
if (this.currIndex === '0') {
|
|
this.$nextTick(() => {
|
|
this.$refs[this.currIndex][0].getList()
|
|
})
|
|
}
|
|
},
|
|
|
|
onChange (data) {
|
|
if (data.type === 'GirdOrderList') {
|
|
this.componentName = 'GirdOrderList'
|
|
this.isShowDetail = false
|
|
this.params = data.params
|
|
}
|
|
if (data.type === 'ResidentOrderList') {
|
|
this.componentName = 'ResidentOrderList'
|
|
this.isShowDetail = false
|
|
this.params = data.params
|
|
}
|
|
|
|
if (data.type === 'Detail') {
|
|
this.componentName = 'Detail'
|
|
this.isShowDetail = true
|
|
this.params = data.params
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
</style>
|