|
@@ -0,0 +1,146 @@
|
|
|
+
|
|
|
+<template>
|
|
|
+ <basicDetails
|
|
|
+ ref="details"
|
|
|
+ :titleText="mainData.enterprisename"
|
|
|
+ formPath="marketing2/agent"
|
|
|
+ :editData="mainData"
|
|
|
+ :mainAreaData="mainAreaData"
|
|
|
+ turnPageId="20221011144903"
|
|
|
+ idname="sa_agentsid"
|
|
|
+ :tags="[]"
|
|
|
+ :tabs="['经销商团队','代理区域','营销类别','账户余额查询','地址管理','联系人管理']"
|
|
|
+ @pageChange="pageChange"
|
|
|
+ @onEditSuccess="queryMainData($route.query.id)">
|
|
|
+ <div slot="tags">
|
|
|
+ <!-- 使用此插槽可不传[tags] -->
|
|
|
+ <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
|
|
|
+ </div>
|
|
|
+ <div slot="customOperation">
|
|
|
+ <!-- 此区域提供了自定义操作按钮 -->
|
|
|
+ </div>
|
|
|
+ <div slot="slot0" class="container normal-panel">
|
|
|
+ <el-button size="small" type="primary" @click="createAgentAccount" class="normal-margin">创建经销商主账号</el-button>
|
|
|
+ <tableLayout :layout="tablecols" :data="mainData.hrs" :custom="false" height="300px"></tableLayout>
|
|
|
+ </div>
|
|
|
+ <div slot="slot1" class="container normal-panel">
|
|
|
+ <salescope :data="mainData"></salescope>
|
|
|
+ </div>
|
|
|
+ <div slot="slot2" class="container normal-panel">
|
|
|
+ <SaleClass :data="mainData"></SaleClass>
|
|
|
+ </div>
|
|
|
+ <div slot="slot3" class="container normal-panel">
|
|
|
+ <accountMoney :mainData="mainData"></accountMoney>
|
|
|
+ </div>
|
|
|
+ </basicDetails>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import salescope from './modules/salescope/list'
|
|
|
+import SaleClass from './modules/saleclass/index'
|
|
|
+import accountMoney from './modules/accountMoney/index'
|
|
|
+export default {
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ mainData:{},
|
|
|
+ mainAreaData:[],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components:{
|
|
|
+ salescope,
|
|
|
+ SaleClass,
|
|
|
+ accountMoney
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ async queryMainData (id) {
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "classname": "webmanage.sale.agents.agents",
|
|
|
+ "method": "query_agentMain",
|
|
|
+ "content": {
|
|
|
+ "sa_agentsid": this.$route.query.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.mainData = res.data
|
|
|
+ this.$refs['details'].param.content.containssub = 1
|
|
|
+ this.$refs['details'].param.content.sa_saleareaids = [this.mainData.sa_saleareaid]
|
|
|
+ this.changeDataStructure()
|
|
|
+ },
|
|
|
+ // 监听切换数据,上一页,下一页
|
|
|
+ pageChange (id,rowindex) {
|
|
|
+ this.$router.replace({path:'/agent_detail',query:{id:id,rowindex:rowindex}})
|
|
|
+ this.queryMainData(id)
|
|
|
+ },
|
|
|
+ changeDataStructure () {
|
|
|
+ this.mainAreaData = [
|
|
|
+ {
|
|
|
+ label:'经销商编号',
|
|
|
+ value: this.mainData.agentnum
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'签约日期',
|
|
|
+ value: this.mainData.signdate
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'经销商类型',
|
|
|
+ value: this.mainData.type
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'上级经销商',
|
|
|
+ value: this.mainData.parent_enterprisename
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'经销商等级',
|
|
|
+ value: this.mainData.grade
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'营销区域',
|
|
|
+ value: this.mainData.areaname
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'企业名称',
|
|
|
+ value: this.mainData.enterprisename
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label:'省市县',
|
|
|
+ value: `${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'详细地址',
|
|
|
+ value: this.mainData.address
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'企业联系人',
|
|
|
+ value: this.mainData.contact
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'联系电话',
|
|
|
+ value: this.mainData.phonenumber
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'税号',
|
|
|
+ value: this.mainData.taxno
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'创建人',
|
|
|
+ value: this.mainData.createby
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'创建时间',
|
|
|
+ value: this.mainData.createdate
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.queryMainData(this.$route.query.id)
|
|
|
+ },
|
|
|
+ created () {
|
|
|
+ // 验证权限
|
|
|
+ this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
|
|
|
+ },
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+</style>
|