Browse Source

2022-10-19

codeMan 2 years ago
parent
commit
03be51b1a5

+ 2 - 2
src/Form/Creditbilladj/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" type="text" @click="onShow">编 辑</el-button>
+    <el-button size="mini" :type="btnType?btnType:'text'" @click="onShow">编 辑</el-button>
     <el-dialog title="编 辑" :visible.sync="dialogFormVisible">
       <el-row :gutter="20">
         <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="left" size="mini">
@@ -51,7 +51,7 @@
 <script>
 import {mapGetters} from 'vuex'
 export default {
-  props:['data'],
+  props:['data','btnType'],
   data () {
     return {
       dialogFormVisible:false,

+ 2 - 2
src/Form/privateCustomer/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" type="text" @click="editBtn">编 辑</el-button>
+    <el-button size="mini" :type="btnType?btnType:'text'" @click="editBtn">编 辑</el-button>
     <el-dialog title="新 增" :visible.sync="dialogFormVisible" width="60%">
       <div slot="title" style="font-size: 15px">
         新增私域客户
@@ -136,7 +136,7 @@ export default {
       }
     }
   },
-  props:['data'],
+  props:['data','btnType'],
   methods:{
     editBtn () {
       this.dialogFormVisible = true

+ 2 - 2
src/Form/publicCustomer/edit.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" type="text" @click="editBtn">编 辑</el-button>
+    <el-button size="mini" :type="btnType?btnType:'text'" @click="editBtn">编 辑</el-button>
     <el-dialog title="新 增" :visible.sync="dialogFormVisible" width="60%">
       <div slot="title" style="font-size: 15px">
         新增私域客户
@@ -148,7 +148,7 @@ export default {
       }
     }
   },
-  props:['data'],
+  props:['data','btnType'],
   methods:{
     editBtn () {
       this.dialogFormVisible = true

+ 22 - 0
src/Form/tagManage/add.vue

@@ -0,0 +1,22 @@
+<template>
+  <div></div>
+</template>
+
+<script>
+export default {
+  name: '',
+  data() {
+    return {
+    };
+  },
+  computed:{
+  },
+  watch:{
+  },
+  methods: {},
+};
+</script>
+
+<style scoped>
+
+</style>

+ 22 - 0
src/Form/tagManage/edit.vue

@@ -0,0 +1,22 @@
+<template>
+  <div></div>
+</template>
+
+<script>
+export default {
+  name: '',
+  data() {
+    return {
+    };
+  },
+  computed:{
+  },
+  watch:{
+  },
+  methods: {},
+};
+</script>
+
+<style scoped>
+
+</style>

+ 1 - 1
src/HDrpManagement/Creditbilladj/index.vue

@@ -16,7 +16,7 @@
       </template>
       <template v-slot:tbOpreation="scope">
         <el-button size="mini" type="text" @click="checkBuill(scope.data.data)" v-if="scope.data.data.status == '新建'">审 核</el-button>
-        <el-button size="mini" type="text" @click="$router.push({path:'/EnterpriseArchivesDetail',query:{id:scope.data.data.sys_enterpriseid,rowindex:scope.data.data.rowindex}})">详 情</el-button>
+        <el-button size="mini" type="text" @click="$router.push({path:'/creditbilladjDetail',query:{id:scope.data.data.sa_creditbillid,rowindex:scope.data.data.rowindex}})">详 情</el-button>
       </template>
     </basicLayout>
   </div>

+ 104 - 20
src/HDrpManagement/Creditbilladj/modules/details.vue

@@ -1,61 +1,124 @@
+
 <template>
   <basicDetails 
-    :titleText="mainData.enterprisename" 
+    ref="details"
+    :titleText="mainData.enterprisename"
+    formPath="Creditbilladj"
+    :editData="mainData"
     :mainAreaData="mainAreaData" 
-    turnPageId="20220920083901" 
-    idname="sys_enterpriseid" 
-    @pageChange="pageChange">
+    :turnPageId="20221008155103" 
+    idname="sa_creditbillid"
+    :tags="[]"
+    @pageChange="pageChange"
+    @onEditSuccess="queryMainData($route.query.id)">
+    <div slot="tags">
+      <!-- 使用此插槽可不传[tags] -->
+      <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
+    </div>
+    <div slot="customOperation">
+      <el-button class="inline-16" size="mini" @click="checkBuill(mainData)" v-if="mainData.status == '新建'">审 核</el-button>
+      <!-- 此区域提供了自定义操作按钮 -->
+    </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:[]
+      mainAreaData:[],
     }
   },
+  components:{
+    // salescope,
+    // SaleClass,
+    // accountMoney
+  },
   methods:{
     async queryMainData (id) {
       const res = await this.$api.requested({
-        "id": 20220920084001,
+        "id": "20221008155203",
+        "version":1,
         "content": {
-          "sys_enterpriseid": id
+            "sa_creditbillid":this.$route.query.id
         }
       })
       this.mainData = res.data
+      console.log(this.mainData);
+      
+      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:'/creditbilladjDetail',query:{id:id,rowindex:rowindex}})
       this.queryMainData(id)
-      this.$router.replace({path:'/EnterpriseArchivesDetail',query:{id:id,rowindex:rowindex}})
+    },
+    /* 审核 */
+    async checkBuill(data) {
+      if(data.status != '新建') return
+      let res = this.$api.requested({
+        "id": "20221008155303",
+        "version":1,
+        "content": {
+            "sa_creditbillid":data.sa_creditbillid
+        }
+      })
+      this.tool.showMessage(res,() => {
+        this.queryMainData()
+      })
     },
     changeDataStructure () {
       this.mainAreaData = [
         {
-          label:'企业名称',
+          label:'额度单号',
+          value: this.mainData.billno
+        },
+        {
+          label:'客户名称',
           value: this.mainData.enterprisename
         },
         {
-          label:'省市县',
-          value: `${this.mainData.province}-${this.mainData.city}-${this.mainData.county}`
+          label:'账户编号',
+          value: this.mainData.accountno
+        },
+        {
+          label:'账户类型',
+          value: this.mainData.accountname
         },
         {
-          label:'详细地址',
-          value: this.mainData.address
+          label:'信用额度',
+          value: this.mainData.creditquota
         },
         {
-          label:'企业联系人',
-          value: this.mainData.contact
+          label:'状态',
+          value: this.mainData.status
         },
         {
-          label:'联系电话',
-          value: this.mainData.phonenumber
+          label:'备注',
+          value: this.mainData.remarks
         },
         {
-          label:'税号',
-          value: this.mainData.taxno
+          label:'状态',
+          value: this.mainData.status
         },
         {
           label:'创建人',
@@ -65,12 +128,33 @@ export default {
           label:'创建时间',
           value: this.mainData.createdate
         },
+        {
+          label:'最近修改人',
+          value: this.mainData.changeby
+        },
+        {
+          label:'修改时间',
+          value: this.mainData.changedate 
+        },
+        {
+          label:'审核人',
+          value: this.mainData.checkby
+        },
+        {
+          label:'审核时间',
+          value: this.mainData.checkdate
+        },
+        
       ]
     }
   },
   mounted () {
     this.queryMainData(this.$route.query.id)
-  }
+  },
+  created () {
+    // 验证权限
+    this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
+  },
 }
 
 </script>

+ 4 - 1
src/HDrpManagement/privateCustomer/index.vue

@@ -17,13 +17,16 @@
             {{scope.data.column.data[scope.data.column.columnname] == 0 ? '正常' : scope.data.column.data[scope.data.column.columnname] == 1 ? '作废' : '锁定'}}
           </span>
         </div>
+        <div v-else-if="scope.data.column.columnname == 'grade' && customerLead">
+          {{customerLead.find(item => item.rowindex == scope.data.column.data[scope.data.column.columnname]).value}}
+        </div>
         <div v-else>
           {{scope.data.column.data[scope.data.column.columnname] || scope.data.column.columnname == 'operation' ? scope.data.column.data[[scope.data.column.columnname]] : '--'}}
         </div>
       </template>
       <template v-slot:tbOpreation="scope">
         <status-change class="inline-16" @onSuccess="$refs.basicLayout.listData()" :data="scope.data.data" />
-        <el-button size="mini" type="text" class="inline-16" @click="$router.push({path:'/EnterpriseArchivesDetail',query:{id:scope.data.data.sys_enterpriseid,rowindex:scope.data.data.rowindex}})">详 情</el-button>
+        <el-button size="mini" type="text" class="inline-16" @click="$router.push({path:'/PrivateCustomerDetail',query:{id:scope.data.data.sa_customersid,rowindex:scope.data.data.rowindex}})">详 情</el-button>
       </template>
     </basicLayout>
   </div>

+ 174 - 0
src/HDrpManagement/privateCustomer/modules/detail.vue

@@ -0,0 +1,174 @@
+
+<template>
+  <basicDetails 
+    ref="details"
+    :titleText="mainData.enterprisename"
+    formPath="privateCustomer"
+    :editData="mainData"
+    :mainAreaData="mainAreaData" 
+    :turnPageId="20221013102602" 
+    idname="sa_customersid"
+    tags=""
+    @pageChange="pageChange"
+    @onEditSuccess="queryMainData($route.query.id)">
+    <!-- 使用此插槽可不传[tags] -->
+    <tagPanl slot="tags" :data="tagObj" :id="mainData.sa_customersid" @onSuccess="queryMainData"/>
+    <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>
+export default {
+  data () {
+    return {
+      mainData:{},
+      tagObj:{},
+      mainAreaData:''
+    }
+  },
+  provide () {
+    return {
+      customerType:() => this.customerType,
+      customerLead:() => this.customerLead,
+      arealist:() => this.arealist
+    }
+  },
+  components:{
+  },
+  methods:{
+    /* 获取系统选项数据 */
+    async getSysOption() {
+      /* 获取客户类型 */
+      let res = await this.$store.dispatch('optiontypeselect','customertypemx')
+      this.customerType = res.data
+      /* 获取客户等级 */
+      let res2 = await this.$store.dispatch('optiontypeselect','customergrade')
+      this.customerLead = res2.data
+    },
+    /* 获取省市县 */
+    async query_arealist() {
+      const res = await this.$api.requested({
+        "classname": "system.tools",
+        "method": "query_arealist",
+        "content": {
+        }
+      })
+      this.arealist = this.tool.createMenu(res.data)
+    },
+    async queryMainData (id) {
+      const res = await this.$api.requested({
+        "id": "20221011133502",
+        "version":1,
+        "content": {
+            "sa_customersid":this.$route.query.id
+        }
+      })
+      this.mainData = res.data
+      console.log(this.mainData);
+      this.getDataTag(this.mainData.sa_customersid)
+      this.$refs['details'].param.content.containssub = 1
+      this.$refs['details'].param.content.sa_saleareaids = [this.mainData.sa_saleareaid]
+      this.changeDataStructure()
+    },
+    /* 获取数据标签 */
+    async getDataTag (id) {
+      let res = await this.$api.requested({
+        "id": 20220929085401,
+        "content": {
+            "ownertable":"sa_customers",
+            "ownerid":id
+        }
+      })
+      this.tagObj = res.data
+      console.log(this.tag);
+      
+    },
+    // 监听切换数据,上一页,下一页
+    pageChange (id,rowindex) {
+      this.$router.replace({path:'/creditbilladjDetail',query:{id:id,rowindex:rowindex}})
+      this.queryMainData(id)
+    },
+    changeDataStructure () {
+      this.mainAreaData = [
+        {
+          label:'客户名称',
+          value: this.mainData.enterprisename
+        },
+        {
+          label:'负责人',
+          // value: this.mainData.leader.length > 0 ? scope.data.column.data[[scope.data.column.columnname]].name : '--'
+          value:this.mainData.leadername
+        },
+        {
+          label:'客户简称',
+          value: this.mainData.abbreviation
+        },
+        {
+          label:'用户类型',
+          value: this.mainData.type
+        },
+        {
+          label:'客户等级',
+          // value: this.customerLead.find(item => item.rowindex == this.mainData.grade).value
+          value:this.mainData.grade
+        },
+        {
+          label:'客户来源',
+          value: this.mainData.source
+        },
+        {
+          label:'所在行业',
+          value: this.mainData.industry
+        },
+        {
+          label:'交易状态',
+          value: this.mainData.tradingstatus
+        },
+        {
+          label:'数据状态',
+          value: this.mainData.datastatus == 0 ? '正常' : this.mainData.datastatus == 1 ? '作废' : '锁定'
+        },
+        {
+          label:'客户状态',
+          value: this.mainData.status
+        },
+        {
+          label:'创建人',
+          value: this.mainData.createby
+        },
+        {
+          label:'创建时间',
+          value: this.mainData.createdate
+        },
+      ]
+    }
+  },
+  mounted () {
+  },
+  created () {
+    // 验证权限
+    this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
+    this.queryMainData(this.$route.query.id)
+    this.getSysOption()
+    this.query_arealist()
+  },
+}
+
+</script>
+<style>
+</style>

+ 4 - 6
src/HDrpManagement/publicCustomer/index.vue

@@ -10,9 +10,9 @@
       :options="options">
       <template v-slot:tbList="scope">
         <div v-if="scope.data.column.columnname == 'leader'">
-          {{scope.data.column.data[[scope.data.column.columnname]].length > 0 ? scope.data.column.data[[scope.data.column.columnname]].length : '--'}}
+          {{scope.data.column.data[[scope.data.column.columnname]].length > 0 ? scope.data.column.data[[scope.data.column.columnname]].name : '--'}}
         </div>
-        <div v-else-if="scope.data.column.columnname == 'grade'">
+        <div v-else-if="scope.data.column.columnname == 'grade' && customerLead">
           {{customerLead.find(item => item.rowindex == scope.data.column.data[scope.data.column.columnname]).value}}
         </div>
         <div v-else-if="scope.data.column.columnname == 'datastatus'">
@@ -26,7 +26,7 @@
       </template>
       <template v-slot:tbOpreation="scope">
         <status-change class="inline-16" @onSuccess="$refs.basicLayout.listData()" :data="scope.data.data" />
-        <el-button size="mini" type="text" class="inline-16" @click="$router.push({path:'/EnterpriseArchivesDetail',query:{id:scope.data.data.sys_enterpriseid,rowindex:scope.data.data.rowindex}})">详 情</el-button>
+        <el-button size="mini" type="text" class="inline-16" @click="$router.push({path:'/PublicCustomerDetail',query:{id:scope.data.data.sa_customersid,rowindex:scope.data.data.rowindex}})">详 情</el-button>
       </template>
     </basicLayout>
   </div>
@@ -76,9 +76,7 @@ export default {
           "where": {
           }
       },
-})
-        console.log(res,11111);
-        
+    })
       this.publicList = res.data
     },
     /* 获取省市县 */

+ 191 - 0
src/HDrpManagement/publicCustomer/modules/detail.vue

@@ -0,0 +1,191 @@
+
+<template>
+  <basicDetails 
+    ref="details"
+    :titleText="mainData.enterprisename"
+    formPath="publicCustomer"
+    :editData="mainData"
+    :mainAreaData="mainAreaData" 
+    :turnPageId="20221011133602" 
+    idname="sa_customersid"
+    :tags="[]"
+    @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:[],
+      customerType:'',
+      customerLead:'',
+      arealist:[],
+      publicList:[]
+    }
+  },
+  provide () {
+    return {
+      customerType:() => this.customerType,
+      customerLead:() => this.customerLead,
+      arealist:() => this.arealist,
+      publicList:() => this.publicList
+    }
+  },
+  components:{
+    // salescope,
+    // SaleClass,
+    // accountMoney
+  },
+  methods:{
+    /* 获取系统选项数据 */
+    async getSysOption() {
+      /* 获取客户类型 */
+      let res = await this.$store.dispatch('optiontypeselect','customertypemx')
+      this.customerType = res.data
+      /* 获取客户等级 */
+      let res2 = await this.$store.dispatch('optiontypeselect','customergrade')
+      this.customerLead = res2.data
+    },
+    /* 获取省市县 */
+    async query_arealist() {
+      const res = await this.$api.requested({
+        "classname": "system.tools",
+        "method": "query_arealist",
+        "content": {
+        }
+      })
+      this.arealist = this.tool.createMenu(res.data)
+    },
+    /* 获取公海数据 */
+    async getPublicList() {
+      const res = await this.$api.requested({
+      "id": 20221009100702,
+      "content": {
+          "pageNumber": 1,
+          "pageSize": 999999,
+          "where": {
+          }
+      },
+    })
+      this.publicList = res.data
+    },
+    async queryMainData (id) {
+      const res = await this.$api.requested({
+        "id": "20221011133502",
+        "version":1,
+        "content": {
+            "sa_customersid":this.$route.query.id
+        }
+      })
+      this.mainData = res.data
+      console.log(this.mainData);
+      
+      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:'/creditbilladjDetail',query:{id:id,rowindex:rowindex}})
+      this.queryMainData(id)
+    },
+    changeDataStructure () {
+      this.mainAreaData = [
+        {
+          label:'客户名称',
+          value: this.mainData.enterprisename
+        },
+        {
+          label:'负责人',
+          // value: this.mainData.leader.length > 0 ? scope.data.column.data[[scope.data.column.columnname]].name : '--'
+          value:this.mainData.leadername
+        },
+        {
+          label:'客户简称',
+          value: this.mainData.abbreviation
+        },
+        {
+          label:'用户类型',
+          value: this.mainData.type
+        },
+        {
+          label:'所属公海池',
+          value: this.mainData.poolname
+        },
+        {
+          label:'客户等级',
+          // value: this.customerLead.find(item => item.rowindex == this.mainData.grade).value
+          value:this.mainData.grade
+        },
+        {
+          label:'客户来源',
+          value: this.mainData.source
+        },
+        {
+          label:'所在行业',
+          value: this.mainData.industry
+        },
+        {
+          label:'交易状态',
+          value: this.mainData.tradingstatus
+        },
+        {
+          label:'数据状态',
+          value: this.mainData.datastatus == 0 ? '正常' : this.mainData.datastatus == 1 ? '作废' : '锁定'
+        },
+        {
+          label:'客户状态',
+          value: this.mainData.status
+        },
+        {
+          label:'创建人',
+          value: this.mainData.createby
+        },
+        {
+          label:'创建时间',
+          value: this.mainData.createdate
+        },
+      ]
+    }
+  },
+  mounted () {
+  },
+  created () {
+    // 验证权限
+    this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
+    this.queryMainData(this.$route.query.id)
+    this.getSysOption()
+    this.query_arealist()
+    this.getPublicList()
+  },
+}
+
+</script>
+<style>
+</style>

+ 71 - 0
src/HManagement/siteManage/tagManage/components/add.vue

@@ -0,0 +1,71 @@
+<template>
+  <div style="margin-bottom:16px">
+    <el-button size="mini" type="primary" @click="addBtn">新 增</el-button>
+    <el-dialog title="新 增" append-to-body :visible.sync="dialogFormVisible" width="500px">
+      <div slot="title" style="font-size: 15px">
+        新增明细
+      </div>
+      <el-row :gutter="20">
+        <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="left" size="mini">
+          <el-col :span="24">
+            <el-form-item label="新增标签" prop="tag">
+              <el-input v-model="form.tag" placeholder="请输入标签名"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  props:['data'],
+  data(){
+    return {
+      dialogFormVisible:false,
+      currentData:'',
+      form:{
+        tag:'',
+        sys_systemtagid:0,
+      },
+      rules:{
+        tag:[
+          { required: true, message: '请输入标签名', trigger: 'blur'},
+        ],
+      }
+    }
+  },
+  methods:{
+    addBtn () {
+      this.dialogFormVisible = true
+      this.currentData = this.data
+    },
+    onSubmit(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        this.form.sys_systemtagid = this.currentData.sys_systemtagid
+        const res = await this.$api.requested({
+          "id": "20221013104501",
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.$refs['form'].resetFields();
+          this.dialogFormVisible = false
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 127 - 0
src/HManagement/siteManage/tagManage/components/detail.vue

@@ -0,0 +1,127 @@
+<template>
+  <div>
+    <el-button size="mini" type="text" @click="detailBtn">明 细</el-button>
+    <el-dialog title="新 增" :visible.sync="dialogFormVisible" width="65%">
+      <div slot="title" style="font-size: 15px">
+        明细详情
+      </div>
+      <add :data="data" @onSuccess="getTagDetail" v-if="tool.checkAuth($route.name,'insert')"/>
+       <tableLayout v-if="tagDetail" :layout="tablecols" :data="tagDetail" :custom="true" height="50vh">
+         <template v-slot:customcol="scope">
+           <div v-if="scope.column.columnname == 'mutextags'">
+             <span v-if="scope.column.data[scope.column.columnname].length > 0">
+               <span v-for="(item,index) in scope.column.data[scope.column.columnname]" :key="index">
+                 {{item.tag}}
+               </span>
+             </span>
+             <span v-else>--</span>
+           </div>
+           <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
+         </template>
+         <template v-slot:opreation="scope">
+           <mutextage 
+            class="inline-16" 
+            :tagData="data" 
+            :allData="tagDetail.filter(item=>item.tag!=scope.data.tag)" 
+            :rowData="scope.data"
+            @onSuccess="getTagDetail()"/>
+           <el-button type="text" @click="deleteRow(scope.data)" size="small" v-if="tool.checkAuth($route.name,'delete')">删除</el-button>
+         </template>
+       </tableLayout>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import add from './add'
+import mutextage from './mutextage'
+import { log } from '@antv/g2plot/lib/utils'
+export default {
+  name: "detail",
+  props:['data'],
+  components:{add,mutextage},
+  data(){
+    return {
+      dialogFormVisible:false,
+      isordercheck:true,
+      isusedcheck:false,
+      form:{
+       
+      },
+      tablecols:'',
+      tagDetail:'',
+      currentData:'',
+      rules:{
+        accountno:[
+          { required: true, message: '输入账户编号', trigger: 'blur'},
+        ],
+        accountname:[
+          { required: true, message: '输入账户名称', trigger: 'blur'}
+        ]
+      }
+    }
+  },
+  created () {
+    this.tablecols = this.tool.tabelCol(this.$route.name).dataTagDetailTable.tablecols
+    console.log(this.tablecols);
+    
+  },
+  methods:{
+    detailBtn () {
+      this.dialogFormVisible = true
+      this.currentData = this.data
+      this.getTagDetail()
+    },
+    onSubmit(){
+      console.log(this.form)
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": "20221008134703",
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.$refs['form'].resetFields();
+          this.dialogFormVisible = false
+        })
+      })
+    },
+    async deleteRow (data) {
+      console.log(data);
+      let res = await this.$api.requested({
+        "id": 20221013104601,
+        "content": {
+          "sys_systemtagid": this.data.sys_systemtagid,
+          "tags":[data.tag]
+        }
+      })
+      console.log(res);
+      this.tool.showMessage(res,() => {
+        this.getTagDetail()
+      })
+    },
+    async getTagDetail () {
+      let res = await this.$api.requested({
+        "id": 20221013104401,
+        "content": {
+          "nocache":true,
+          "sys_systemtagid": this.data.sys_systemtagid
+        }
+      })
+      this.tagDetail = res.data
+      console.log(this.tagDetail);
+      
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 86 - 0
src/HManagement/siteManage/tagManage/components/mutextage.vue

@@ -0,0 +1,86 @@
+<template>
+  <div style="margin-bottom:16px">
+    <el-button size="mini" type="text" @click="Btn">互斥标签</el-button>
+    <el-dialog title="新 增" append-to-body :visible.sync="dialogFormVisible" width="500px">
+      <div slot="title" style="font-size: 15px">
+        设置互斥标签
+      </div>
+      <el-row :gutter="20">
+        <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="left" size="mini">
+          <el-col :span="24">
+            <el-form-item label="选择标签" prop="mutextags">
+              <el-select v-model="result" multiple placeholder="请选择标签">
+                <el-option
+                  v-for="item in allData"
+                  :key="item.sys_systemtagdetailid"
+                  :label="item.tag"
+                  :value="item.sys_systemtagdetailid">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "add",
+  props:['allData','rowData','tagData'],
+  data(){
+    return {
+      dialogFormVisible:false,
+      result:[],
+      form: {
+        "sys_systemtagid": 1,
+        "sys_systemtagdetailid": 1,
+        "mutextags": [],
+      },
+      rules:{
+      }
+    }
+  },
+  methods:{
+    Btn () {
+      this.dialogFormVisible = true
+      this.result = this.rowData.mutextags.map(item => {
+        return item.sys_systemtagdetailid
+      })
+    },
+    onSubmit(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        this.form.sys_systemtagid = this.tagData.sys_systemtagid
+        this.form.sys_systemtagdetailid = this.rowData.sys_systemtagdetailid
+        this.form.mutextags = this.result.map(item => {
+          return {
+            "sys_systemtagdetailid": item,
+          }
+        })
+        const res = await this.$api.requested({
+          "id": "20221014122501",
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.$refs['form'].resetFields();
+          this.dialogFormVisible = false
+        })
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+/deep/.el-select {
+  width: 100% !important;
+}
+</style>

+ 40 - 0
src/HManagement/siteManage/tagManage/index.vue

@@ -0,0 +1,40 @@
+
+<template>
+  <div>
+    <basicLayout 
+      ref="basicLayout" 
+      formPath="tagManage" 
+      tableName="dataTagTable" 
+      idName="sys_systemtagid" 
+      :apiId="{query:20221013104301,del:''}" 
+      :options="options">
+      <div slot="custom"></div>
+      <template v-slot:tbList="scope">
+        <div>
+          {{scope.data.column.data[[scope.data.column.columnname]]}}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+        <Detail class="inline-16" :data="scope.data.data"/>
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+import Detail from './components/detail'
+export default {
+  components:{Detail},
+  data () {
+    return {
+      options:[]
+      
+    }
+  },
+  methods:{
+  }
+}
+
+</script>
+<style>
+</style>

+ 1 - 1
src/components/normal-basic-layout/details/index.vue

@@ -19,7 +19,7 @@
           <slot name="tags"></slot>
         </div>
       </div>
-      <div>
+      <div style="display:flex">
         <slot name="customOperation"></slot>
         <cpAdd :formPath="formPath" :data="editData" btnType="default" @onAddSuccess="onSuccess"></cpAdd>
       </div>

+ 3 - 0
src/components/normal-basic-layout/index.vue

@@ -81,6 +81,7 @@ export default {
       select:'',
       param:{
         content:{
+          "isExport":false,
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
@@ -106,6 +107,8 @@ export default {
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageNumber
+      console.log(this.list);
+      
     },
     selectChange () {
       this.param.content.pageNumber = 1

+ 157 - 0
src/components/tagPanl/tagPanl.vue

@@ -0,0 +1,157 @@
+<template>
+  <div class="tag-box">
+    <div style="display:flex;margin-right:0 !important" class="inline-16">
+      <el-tag v-for="(item,index) in data.systemtag" type="danger" size="small" :key="index" style="margin-right:10px">{{item}}</el-tag>
+      <el-tag v-for="(item,index) in data.datatag" size="small" :key="index" style="margin-right:10px">{{item}}</el-tag>
+    </div>
+    <div class="edit inline-16">
+      <div @click="addTag">
+        <i class="el-icon-edit" style="color:#FA8C16;font-size:12px"></i><span class="text">添加</span>
+      </div>
+    </div>
+    <el-dialog title="标签" :visible.sync="dialogFormVisible" width="30%">
+      <div class="header">
+        <div class="left">请选择添加的标签</div>
+        <div class="right" v-if="tagData">已选{{`${tagData.datatag.length}/${tagData.option.length}`}}</div>
+      </div>
+      <div class="tag" v-if="data">
+        <div 
+          class="tag-item" 
+          v-for="item in tagData.option" 
+          :key="item.sys_systemtagdetailid"
+          @click="tagClick(item)"
+          :style="calcBackgroundColor(item)"
+        >{{item.tag}}</div>
+      </div>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width btn-warning">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+/*
+  data:标签数据
+  id:表id
+  <tagPanl slot="tags" :data="tagObj" :id="mainData.sa_customersid" @onSuccess="queryMainData"/>
+
+*/
+import { log } from '@antv/g2plot/lib/utils';
+export default {
+  name: '',
+  props:['data','id'],
+  data() {
+    return {
+      dialogFormVisible:false,
+      tagData:''
+    };
+  },
+  computed:{
+    /* 计算iten是否选中 禁用 */
+    calcBackgroundColor () {
+      return function (data) {
+        console.log(this.tagData);
+        if (this.tagData) {
+          for(let i=0;i<this.tagData.datatag.length;i++) {
+            let res = this.tagData.datatag[i].mutextag.find(item => item == data.tag)
+            if(res) {
+              return 'background:#F5F5F5;color:#999999'
+            }
+          }
+          if(this.tagData.datatag.find(item => item.tag == data.tag)) {
+            return 'background:#FA8C16;color:#ffffff'
+          }
+        }
+        
+      }
+    }
+  },
+  watch:{
+  },
+  methods: {
+    addTag () {
+      this.tagData = JSON.parse(JSON.stringify(this.data))
+      this.tagData.datatag = this.data.datatag.map(item => {
+        return {
+          tag:item,
+          mutextag:this.data.option.find(item2 => item2.tag == item).mutextag
+        }
+      })
+      this.dialogFormVisible = true
+    },
+    async onSubmit () {
+      console.log(this.data);
+      let res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+            "ownertable":"sa_customers",
+            "ownerid":this.id,
+            "datatag":this.tagData.datatag.map(item => item.tag)
+        }
+      })
+      console.log(res);
+      this.tool.showMessage(res,() => {
+        this.tagData = ''
+        this.dialogFormVisible = false
+        this.$emit('onSuccess')
+      })
+    },
+    tagClick (data) {
+      for(let i=0;i<this.tagData.datatag.length;i++) {
+          let res = this.tagData.datatag[i].mutextag.find(item => item == data.tag)
+          if(res) {
+            return
+          }
+        }
+      this.tagData.datatag.some(item => item.tag == data.tag) ? 
+        this.tagData.datatag.splice(this.tagData.datatag.indexOf(data),1) : this.tagData.datatag.push(data)
+    }
+  },
+};
+</script>
+
+<style scoped>
+  .edit {
+    width: 54px;
+    height: 20px;
+    line-height: 20px;
+    background: #FFF3E7;
+    border-radius: 2px 2px 2px 2px;
+    display: flex;
+    justify-content: space-around;
+    cursor: pointer;
+  }
+  .edit .text {
+    color: #FA8C16;
+    font-size: 12px;
+    font-weight: 400;
+    margin-left: 5px;
+  }
+  .tag-box {
+    display: flex;
+    align-items: center;
+    padding-top: 16px;
+  }
+  .tag-box .header {
+    display: flex;
+    justify-content: space-between;
+    margin-bottom: 12px;
+  }
+  .tag-box .header .left {}
+  .tag-box .header .right {}
+  .tag-box .tag {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  .tag-box .tag .tag-item {
+    margin: 0 10px 10px 0;
+    border: 1px solid #cccccc;
+    padding: 2px 12px;
+    font-size: 12px;
+    cursor: pointer;
+    transition: all 0.2s ease-in;
+  }
+</style>
+

+ 4 - 0
src/main.js

@@ -20,6 +20,8 @@ import tableLayout from './components/dynamic-table'
 import basicLayout from './components/normal-basic-layout'
 import basicDetails from './components/normal-basic-layout/details'
 import deleteBtn from './components/delete_btn/index'
+import tagPanl from '@/components/tagPanl/tagPanl'
+
 
 import sort from './components/sort'
 import '@/style/theme/font-icon/iconfont.css'
@@ -49,6 +51,8 @@ Vue.component('basicDetails', basicDetails)
 Vue.component('deleteBtn',deleteBtn)
 
 Vue.component('sort', sort)
+/* 标签组件 */
+Vue.component('tagPanl',tagPanl)
 
 Vue.use(ElementUI);
 

+ 27 - 0
src/router/HDrpManagement.js

@@ -100,6 +100,15 @@ const HDrpManagement = [
       keeproute: true,
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/Creditbilladj/index')
+  },{
+    path: '/creditbilladjDetail',
+    name:'creditbilladj',
+    meta: {
+      title: '信用额度调整单详情',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/Creditbilladj/modules/details')
   },{
     path: '/accountmoney',
     name:'accountmoney',
@@ -118,6 +127,15 @@ const HDrpManagement = [
       keeproute: true,
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/privateCustomer/index')
+  },{
+    path: '/PrivateCustomerDetail',
+    name:'PrivateCustomer',
+    meta: {
+      title: '私域客户详情',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/privateCustomer/modules/detail')
   },{
     path: '/PublicCustomer',
     name:'PublicCustomer',
@@ -127,6 +145,15 @@ const HDrpManagement = [
       keeproute: true,
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/publicCustomer/index')
+  },{
+    path: '/PublicCustomerDetail',
+    name:'PublicCustomer',
+    meta: {
+      title: '公海客户详情',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/publicCustomer/modules/detail')
   },{
     path: '/publicManage',
     name:'publicManage',

+ 8 - 0
src/router/HManagement.js

@@ -339,6 +339,14 @@ const HManagement = [
       ast_nav: true
     },
     component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/custom_option/index.vue')
+  },{
+    path: '/tagManage',
+    name: 'tagManage',
+    meta: {
+      title: '数据标签管理',
+      ast_nav: true
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/tagManage/index.vue')
   },{
     path: '/messageSendtype',
     name: 'messageSendtype',