2022-04-29 19:52:57 +08:00

78 lines
2.0 KiB
Vue

<template>
<view >
<view class="" v-if="!loading && approvalInfo.PERMISSIONAPPLY_ID">
<view v-if="pageData.type=='4'">
<ShopApproval :businessId="pageData.id" :data="approvalInfo" ref="shop" @refresh="reload" :approvalData="approvalData"></ShopApproval>
</view>
<view v-if="pageData.type=='7'">
<ShopChangeState :businessId="pageData.id" :data="approvalInfo" ref="shop" @refresh="reload" :approvalData="approvalData"/>
</view>
</view>
<noFound v-show="!loading && !approvalInfo.PERMISSIONAPPLY_ID" :nodata="true" text="抱歉,没有找到该数据"/>
</view>
</template>
<script>
import ShopApproval from './components/shopApproval.vue'
import ShopChangeState from './components/shopChangeState.vue'
export default {
data() {
return {
pageData:{
type: null,
id: null
},
loading:true,
approvalInfo: {},
approvalData: {}// 审批后授权的列表
}
},
components:{
ShopApproval,
ShopChangeState
},
methods: {
getDetail (opt){
let _this = this
this.$request.$webGet('/EShangApiMain/Platform/GetPermissionApplyDetail?permissionApplyid='+opt.id).then(res=>{
uni.hideLoading()
_this.loading = false
if (res.Result_Code !== 100) {return }
_this.approvalInfo = res.Result_Data
if(_this.pageData.type==='4' ) {
_this.$refs['shop'].getShops(res.Result_Data)
}
_this.getDetailList({id:opt.id,type: res.Result_Data.PERMISSIONAPPLY_TYPE})
})
},
getDetailList(obj){
let _this = this
this.$request.$webGet('/EShangApiMain/BusinessProcess/GetPermissionApplyDetailList?permissionApplyid='+obj.id+'&PermissionApplyType='+obj.type).then(res=>{
uni.hideLoading()
if (res.Result_Code !== 100) {return }
_this.approvalData = res.Result_Data
})
},
reload(){
this.getDetail(this.pageData)
this.getDetailList(this.pageData)
}
},
onLoad(option){
uni.showLoading()
this.pageData = option
this.loading=true
this.getDetail(option)
this.$forceUpdate()
}
}
</script>
<style>
</style>