qymljy 2 éve
szülő
commit
81c98287f4

+ 2 - 2
src/Form/salerPrivatecustomer/add.vue

@@ -71,9 +71,9 @@
               <el-select v-model="form.grade" placeholder="请选择客户等级" style="width: 100%">
                 <el-option
                     v-for="item in options.gradeData"
-                    :key="item.rowindex"
+                    :key="item.value"
                     :label="item.value"
-                    :value="item.rowindex">
+                    :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>

+ 18 - 23
src/SDrpManagement/salerPrivatecustomer/detail/customerDetail.vue

@@ -13,7 +13,6 @@
         @pageChange="pageChange"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
-        <tagPanl slot="tags" :data="tags" :id="mainData.sa_customersid" @onSuccess="queryMainData"></tagPanl>
         <!-- 使用此插槽可不传[tags] -->
         <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
 <!--        <tagPanl slot="tags" :data="tags" :id="mainData.sa_customersid" @onSuccess="queryMainData"/>-->
@@ -33,7 +32,7 @@
             <transaction_status v-if="tool.checkAuth($route.name,'transaction')" :id="mainData.sa_customersid" @onshow="onSuccess" @shareSuccess="onSuccess"></transaction_status>
           </div>
           <div class="normal-margin" v-show="mainData.datastatus === 0">
-            <lock v-if="tool.checkAuth($route.name,'lock')"  :id="mainData.sa_customersid" @onshow="onSuccess"></lock>
+            <lock v-if="tool.checkAuth($route.name,'lock')"   :id="mainData.sa_customersid" @onshow="onSuccess"></lock>
           </div>
           <div class="normal-margin" v-show="mainData.datastatus === 2">
             <unlock v-if="tool.checkAuth($route.name,'unlock')" :id="mainData.sa_customersid" @onshow="onSuccess"></unlock>
@@ -41,8 +40,8 @@
           <div class="normal-margin">
             <share v-if="tool.checkAuth($route.name,'share') && mainData.poolname === ''" :id="mainData.sa_customersid" @onshow="onSuccess" @shareSuccess="onSuccess"></share>
           </div>
-          <div class="normal-margin">
-            <send_back v-if="tool.checkAuth($route.name,'back')" :id="mainData.sa_customersid" @onshow="onSuccess" @backSuccess="onSuccess"></send_back>
+          <div class="normal-margin" >
+              <send_back v-if="tool.checkAuth($route.name,'back') "  :data="mainData" @onshow="onSuccess" @backSuccess="onSuccess"></send_back>
           </div>
           <div class="normal-margin" v-show="mainData.datastatus !== 1">
             <to_void v-if="tool.checkAuth($route.name,'toVoid')" :id="mainData.sa_customersid" @onshow="onSuccess" @toVoidSuccess="onSuccess"></to_void>
@@ -51,13 +50,13 @@
         </el-popover>
       </div>
       <div slot="slot0" >
-        <detailed :data="this.$route.query.id"></detailed>
+        <detailed ref="detailed"></detailed>
       </div>
-      <div slot="slot1" class="container normal-panel">
-        <contacts :data="this.$route.query.data"></contacts>
+      <div slot="slot1" class="container normal-panel"  >
+        <contacts :data="mainData"  @onSuccess="onSuccess" v-if="flag"></contacts>
       </div>
       <div slot="slot2" class="container normal-panel">
-        <address_manage :data="this.$route.query.data"></address_manage>
+        <address_manage :data="mainData"  v-if="flag"></address_manage>
       </div>
     </basicDetails>
   </div>
@@ -67,7 +66,7 @@
 import detailed from './modules/detailedData'
 import contacts from './modules/contacts/list'
 import address_manage from './modules/addressManage/list'
-import transactionUser from "./modules/operation/transactionUser";
+import transactionUser from "./modules/operation/transactionUser"
 import lock from './modules/operation/lock'
 import unlock from './modules/operation/unlock'
 import share from './modules/operation/share'
@@ -89,13 +88,14 @@ export default {
         userid:''
       },
       users:[],
+      flag:false
     }
   },
   components:{
     detailed,
     contacts,
-    address_manage
-    ,transactionUser,
+    address_manage,
+    transactionUser,
     lock,
     unlock,
     share,
@@ -114,9 +114,9 @@ export default {
       this.mainData = res.data
       this.$refs['details'].param.content.type = this.$route.query.tabIndex
       this.$refs['details'].param.content.isExport = false
-      this.$refs['details'].param.content.sa_customersid = [this.mainData.sa_customersid]
       this.changeDataStructure()
-      this.queryTags(this.mainData.sa_customersid)
+      this.$refs.detailed.detailedList(this.mainData)
+      this.flag = true
     },
     show(){
       this.visible = false
@@ -145,7 +145,7 @@ export default {
         },
         {
           label:'负责人',
-          value:this.mainData.leadername
+          value:this.mainData.leader[0].name
         },
         {
           label:'最近跟近时间',
@@ -158,8 +158,10 @@ export default {
       ]
     },
     // 监听切换数据,上一页,下一页
-    pageChange (id,rowindex) {
-      this.$router.replace({path:'/customerDetail',query:{id:id,rowindex:rowindex}})
+    pageChange (id,rowindex,tabIndex) {
+      this.flag = false
+      tabIndex = this.$route.query.tabIndex
+      this.$router.replace({path:'/customerDetail',query:{id:id,rowindex:rowindex,tabIndex:tabIndex}})
       this.queryMainData(id)
     },
     async queryTags(id){
@@ -183,13 +185,6 @@ export default {
   },
   created() {
     this.tool.checkAuth(this.$route.name,'update')?'':this.$router.go(-1)
-    /*this.tool.checkAuth(this.$route.name,'toVoid')?'':this.$router.go(-1)*/
-    // this.tool.checkAuth(this.$route.name,'responsible')?'':this.$router.go(-1)
-    // this.tool.checkAuth(this.$route.name,'transaction')?'':this.$router.go(-1)
-    // this.tool.checkAuth(this.$route.name,'lock')?'':this.$router.go(-1)
-    // this.tool.checkAuth(this.$route.name,'unlock')?'':this.$router.go(-1)
-    // this.tool.checkAuth(this.$route.name,'share')?'':this.$router.go(-1)
-    // this.tool.checkAuth(this.$route.name,'back')?'':this.$router.go(-1)
   }
 }
 </script>

+ 5 - 4
src/SDrpManagement/salerPrivatecustomer/detail/modules/addressManage/list.vue

@@ -51,17 +51,20 @@ export default {
       tableHieght:"600px",
       tablecols:[],
       list:[],
+      listGet:[],
       total:0,
       currentPage:0,
       search:"",
+      sys_enterpriseid:"",
       params:{
-        "id": "20221018153302",
+        "id": "20221022165503",
         "content": {
           "sys_enterpriseid": "",
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
-            "condition": ""
+            "condition": "",
+            "workaddress":1
           }
         }
       }
@@ -72,8 +75,6 @@ export default {
     async listData(){
       this.params.content.sys_enterpriseid = this.data.sys_enterpriseid
       const res = await this.$api.requested(this.params)
-      console.log("--------------")
-      console.log(res)
       this.list = res.data
       this.total = res.total
       this.currentPage = res.pageTotal

+ 4 - 0
src/SDrpManagement/salerPrivatecustomer/detail/modules/addressManage/modules/add.vue

@@ -79,10 +79,14 @@ export default {
   },
   methods:{
     onshow(){
+      console.log("输出")
+      console.log(this.data)
       this.form.sys_enterpriseid = this.data.sys_enterpriseid
       this.dialogFormVisible = true
+
     },
     onSubmit(){
+      console.log(this.form)
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
         const res = await this.$api.requested({

+ 18 - 6
src/SDrpManagement/salerPrivatecustomer/detail/modules/contacts/list.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <add class="normal-margin" :data="data" @insertSuccess="onSuccess" style="float: left;"></add>
+    <add class="normal-margin" :data="data"  @insertSuccess="onSuccess" style="float: left;"></add>
     <div style="width: 20%;float: left;margin-left: 2%">
       <el-input
           placeholder="请输入内容"
@@ -40,6 +40,7 @@
 import add from './modules/add'
 import edit from './modules/edit'
 import toVoid from './modules/toVoid'
+import {mapGetters} from 'vuex'
 export default {
   name: "list",
   props:["data"],
@@ -52,13 +53,14 @@ export default {
       currentPage:0,
       search:"",
       params:{
-        "id": "20221018150602",
+        "id": "20221022165503",
         "content": {
           "sys_enterpriseid": "",
           "pageNumber": 1,
           "pageSize": 20,
           "where": {
-            "condition": ""
+            "condition": "",
+            "workaddress":0
           }
         }
       }
@@ -67,6 +69,11 @@ export default {
   components:{
     add,edit,toVoid
   },
+  computed:{
+    ...mapGetters({
+      dataToForm:'dataToForm'
+    })
+  },
   methods:{
     async listData(){
       this.params.content.sys_enterpriseid = this.data.sys_enterpriseid
@@ -78,15 +85,15 @@ export default {
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
       this.params.content.pageSize = val
-      this.listData()
+      this.listData(data)
     },
     handleCurrentChange(val) {
       // console.log(`当前页: ${val}`);
       this.params.content.pageNumber = val
-      this.listData()
+      this.listData(data)
     },
     onSuccess(){
-      this.listData()
+     this.listData()
     },
     clearData(){
       this.search = ""
@@ -101,6 +108,11 @@ export default {
   },
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).contactsTable.tablecols
+  },
+  watch:{
+    "dataToForm":function (val){
+      console.log(val)
+    }
   }
 }
 </script>

+ 4 - 0
src/SDrpManagement/salerPrivatecustomer/detail/modules/contacts/modules/add.vue

@@ -132,10 +132,14 @@ export default {
   methods:{
     onshow(){
       this.dialogFormVisible = true
+
       this.form.sys_enterpriseid = this.data.sys_enterpriseid
       this.form.enterprisename = this.data.enterprisename
+      console.log("***********//////////////")
+      console.log(this.form)
     },
     onSubmit(){
+      console.log(this.form)
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
         const res = await this.$api.requested({

+ 23 - 15
src/SDrpManagement/salerPrivatecustomer/detail/modules/detailedData.vue

@@ -2,18 +2,18 @@
   <div class="container normal-panel">
     <div class="container normal-panel">
       <el-descriptions title="基本信息">
-        <el-descriptions-item label="客户名称">{{ basic.enterprisename }}</el-descriptions-item>
-        <el-descriptions-item label="客户编号">{{ basic.sa_customersid }}</el-descriptions-item>
-        <el-descriptions-item label="企业简称">{{ basic.abbreviation }}</el-descriptions-item>
-        <el-descriptions-item label="客户类型">{{ basic.type }}</el-descriptions-item>
-        <el-descriptions-item label="客户级别">{{ basic.grade }}</el-descriptions-item>
-        <el-descriptions-item label="所属行业">{{ basic.industry }}</el-descriptions-item>
-        <el-descriptions-item label="上级企业">{{ basic.superiorenterprisename }}</el-descriptions-item>
-        <el-descriptions-item label="成交状态">{{ basic.tradingstatus }}</el-descriptions-item>
-        <el-descriptions-item label="合作状态">{{ basic.status }}</el-descriptions-item>
-        <el-descriptions-item label="负责人">{{ basic.createby }}</el-descriptions-item>
-        <el-descriptions-item label="来源">{{ basic.source }}</el-descriptions-item>
-        <el-descriptions-item label="所属公海">{{ basic.poolname }}</el-descriptions-item>
+        <el-descriptions-item label="客户名称">{{ basic.enterprisename?basic.enterprisename:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="客户编号">{{ basic.sa_customersid?basic.sa_customersid:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="企业简称">{{ basic.abbreviation?basic.abbreviation:"--"}}</el-descriptions-item>
+        <el-descriptions-item label="客户类型">{{ basic.type?basic.type:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="客户级别">{{ basic.grade?basic.grade:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="所属行业">{{ basic.industry?basic.industry:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="上级企业">{{ basic.superiorenterprisename?basic.superiorenterprisename:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="成交状态">{{ basic.tradingstatus?basic.tradingstatus:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="合作状态">{{ basic.status?basic.status:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="负责人">{{ basic.createby?basic.createby:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="来源">{{ basic.source?basic.source:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="所属公海">{{ basic.poolname?basic.poolname:"--" }}</el-descriptions-item>
       </el-descriptions>
     </div>
 
@@ -43,12 +43,13 @@ export default {
   data(){
     return {
       basic:[],
-      system:[]
+      system:[],
+      sa_customersid:""
     }
   },
   mounted() {
-    this.basicData(this.data)
-    this.systemData(this.data)
+    // this.basicData(this.data)
+    // this.systemData(this.data)
   },
   methods:{
     /*基本信息*/
@@ -71,6 +72,13 @@ export default {
         },
       })
       this.system = res.data
+    },
+    detailedList(data){
+      console.log("输出")
+      console.log(data)
+      this.sa_customersid = data.sa_customersid
+      this.basicData(data.sa_customersid)
+      this.systemData(data.sa_customersid)
     }
   }
 }

+ 11 - 4
src/SDrpManagement/salerPrivatecustomer/detail/modules/operation/sendBack.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button style="width:100%" size="mini"  block @click="onshow">退回至公海</el-button>
+    <el-button style="width:100%" size="mini" v-show="this.name !== this.createby"  block @click="onshow">退回至公海</el-button>
     <el-dialog title="" :visible.sync="dialogForm" width="900px" append-to-body>
       <div slot="title" style="font-size: 15px">
         退回至公海
@@ -34,7 +34,7 @@
 <script>
 export default {
   name: "sendBack",
-  props:["id"],
+  props:["data"],
   data() {
     return {
       dialogForm: false,
@@ -42,6 +42,8 @@ export default {
         sa_customerpoolid: "",
         sa_customersid: ""
       },
+      createby:"",
+      name:"",
       pool: [],
       rules: {
         sa_customerpoolid: [
@@ -54,17 +56,20 @@ export default {
     onshow(){
       this.dialogForm = true
       this.poolList()
+      if (this.data.leader.length !== 0){
+        this.createby = this.data.leader[0].createby
+        this.name = this.data.leader[0].name
+      }
       this.$emit("onshow")
     },
     onSubmit(){
-      console.log(this.form)
       this.$refs['form'].validate(async (valid) => {
         if (!valid) return false
         const res = await this.$api.requested({
           "id": 20221014102602,
           "content": {
             "sa_customerpoolid":this.form.sa_customerpoolid,//公海池id
-            "sa_customersids":[this.id]//客户id
+            "sa_customersids":[this.data.sa_customersid]//客户id
           },
         })
         this.tool.showMessage(res, ()=>{
@@ -88,6 +93,8 @@ export default {
       console.log(res)
       this.pool = res.data
     }
+  },
+  mounted() {
   }
 }
 </script>

+ 2 - 2
src/SDrpManagement/salerPrivatecustomer/index.vue

@@ -30,7 +30,7 @@
           </div>
         </template>
         <template v-slot:tbOpreation="scope">
-          <el-button size="mini" type="text" @click="$router.push({path:'/customerDetail',query:{id:scope.data.data.sa_customersid,rowindex:scope.data.data.rowindex,tabIndex:tabIndex,enterpriseid:scope.data.data.sys_enterpriseid,data:scope.data.data}})">详 情</el-button>
+          <el-button size="mini" type="text" @click="$router.push({path:'/customerDetail',query:{id:scope.data.data.sa_customersid,rowindex:scope.data.data.rowindex,tabIndex:tabIndex}})">详 情</el-button>
         </template>
       </basicLayout>
   </div>
@@ -58,7 +58,7 @@ export default {
         title: '我下属参与的',
         name: "4",
       }],
-      tabIndex:"",
+      tabIndex:"0",
       options:[],
       listData:[]
     }