Browse Source

联系人,合同

qymljy 2 years ago
parent
commit
7ecb525315

+ 1 - 1
src/Form/QuotedPrice/editCopy.vue

@@ -372,7 +372,7 @@ export default {
       }
     },
     onClose(){
-      this.drawer = false
+      this.$store.dispatch('changeDetailDrawer',false)
       this.$emit('onSuccess')
     },
     onSubmit(){

+ 134 - 13
src/Form/publicCustomer/edit.vue

@@ -82,6 +82,63 @@
                 </el-select>
               </el-form-item>
             </el-col>
+            <el-col :span="24">
+              <el-form-item label="上级客户:" >
+                <el-popover
+                    placement="bottom"
+                    width="700"
+                    trigger="click"
+                    v-model="customerShow"
+                    @show="customerList">
+                  <el-input
+                      style="width:300px;margin-bottom: 10px"
+                      placeholder="请输入内容"
+                      v-model="customerParam.content.where.condition"
+                      clearable
+                      @clear="customerList(customerParam.content.pageNumber = 1)"
+                      size="mini"
+                      @keyup.enter.native="customerList(customerParam.content.pageNumber = 1)">
+                    <i slot="prefix" class="el-icon-search" @click="customerList(customerParam.content.pageNumber = 1)"></i>
+                  </el-input>
+                  <el-table :data="customer.customerData" @row-click="customerData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
+                    <el-table-column
+                        label="客户编号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="客户名称"
+                        width="200">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="地址"
+                    >
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeCustomer"
+                        @current-change="handleCurrentChangeCustomer"
+                        :page-sizes="[10,20,50,100,]"
+                        layout="total,sizes, prev, pager, next, jumper"
+                        :current-page="customer.currentPage"
+                        :total="customer.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference" :readonly="true" v-model="form.superiorenterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
             <el-col :span="24">
               <el-form-item label="省市县:" prop="province">
                 <el-cascader
@@ -108,18 +165,15 @@
               </el-form-item>
             </el-col>
             <el-col :span="24">
-              <el-form-item label="所属行业:" prop="industry">
-                <el-input v-model="form.industry" placeholder="所属行业"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24">
-              <el-form-item label="联系人:" prop="contact">
-                <el-input v-model="form.contact" placeholder="联系人"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="24">
-              <el-form-item label="联系电话:" prop="phonenumber">
-                <el-input v-model="form.phonenumber" placeholder="联系电话"></el-input>
+              <el-form-item label="所属行业:" >
+                <el-select v-model="form.industry" placeholder="请选择所属行业" style="width: 100%">
+                  <el-option
+                      v-for="item in options.industryData"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="24">
@@ -158,6 +212,7 @@ export default {
       isordercheck:true,
       isusedcheck:false,
       checkResults:'',
+      customerShow:false,
       businessData:[],
       businessParam:{
         "id": 20221208103601,
@@ -171,6 +226,9 @@ export default {
       total:0,
       currentPage:0,
       value:'',
+      options:{
+        industryData:[]
+      },
       form:{
         "value":[],
         "sa_customersid": 0,//新增是传0
@@ -202,7 +260,24 @@ export default {
         source:[
           { required: true, message: '请填写客户来源', trigger: 'blur'}
         ],
-      }
+      },
+      customerParam:{
+        "id": 20220920083901,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 10,
+          "where": {
+            "condition": "",
+            "type":2,
+            "sa_projectid":""
+          }
+        }
+      },
+      customer:{
+        customerData:[],
+        total:0,
+        currentPage:0,
+      },
     }
   },
   props:['data','btnType'],
@@ -354,6 +429,52 @@ export default {
       this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
 
     },
+    async customerList(){
+      const res = await this.$api.requested(this.customerParam)
+      this.customer.customerData = res.data
+      this.customer.total = res.total
+      this.customer.currentPage = res.pageNumber
+    },
+    selectCustomer(){
+      this.customerParam.content.where.condition = this.form.enterprisename
+      this.customerList()
+    },
+    /*客户选择信息*/
+    customerData(val){
+      this.form.parentid = val.sa_customersid
+      this.form.superiorenterprisename = val.enterprisename
+      this.customerShow = false
+    },
+    /*客户分页*/
+    handleSizeChangeCustomer(val) {
+      // console.log(`每页 ${val} 条`);
+      this.customerParam.content.pageSize = val
+      this.customerList()
+    },
+    handleCurrentChangeCustomer(val) {
+      // console.log(`当前页: ${val}`);
+      this.customerParam.content.pageNumber = val
+      this.customerList()
+    },
+    /*行业列表*/
+    async industryList(){
+      const res = await this.$api.requested({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "typename": "industry",
+          "parameter": {
+            "siteid": "YOSTEST2"
+          }
+        }
+      })
+      this.options.industryData = res.data
+    }
+  },
+  mounted() {
+    this.industryList()
   }
 }
 </script>

+ 3 - 1
src/HDrpManagement/projectChange/modules/modules/contacts/components/edit.vue

@@ -332,7 +332,7 @@ export default {
       form:{
         contactsid: 0, //0表示新增,大于0表示选择的联系人
         sa_projectid: 1, //项目id
-        sys_enterpriseid: 1, //关联的企业id
+        sys_enterpriseid: '', //关联的企业id
         enterprisename:'',
         name: "",
         sex: "",
@@ -438,7 +438,9 @@ export default {
       this.myCustomersList()
       this.enterpriseContactList()
       this.myContactList()
+      console.log(this.data,"联系人")
       this.form = Object.assign({},this.form,this.data)
+      console.log(this.form,"编辑联系人信息")
     },
     onSubmit(){
       console.log(this.form,"添加联系人")

+ 36 - 0
src/HDrpManagement/projectChange/modules/modules/contract/components/DirectSalesProjectAgreement.vue

@@ -0,0 +1,36 @@
+<template>
+  <div>
+    <el-drawer
+        :title="title"
+        :visible.sync="drawerShow"
+        size="93%"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose">
+      <div class="drawer__panel" style="margin-bottom: 0px">
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "DirectSalesProjectAgreement",
+  props:["drawerShow"],
+  data(){
+    return {
+      title:'新建直销项目协议'
+    }
+  },
+  methods:{
+    onClose(){
+
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 36 - 0
src/HDrpManagement/projectChange/modules/modules/contract/components/DistributionProjectAgreement.vue

@@ -0,0 +1,36 @@
+<template>
+  <div>
+    <el-drawer
+        :title="title"
+        :visible.sync="drawerShow"
+        size="93%"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose">
+      <div class="drawer__panel" style="margin-bottom: 0px">
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "DistributionProjectAgreement",
+  props:["drawerShow"],
+  data(){
+    return {
+      title:'新建经销项目协议'
+    }
+  },
+  methods:{
+    onClose(){
+
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 18 - 0
src/HDrpManagement/projectChange/modules/modules/contract/components/IntermediationAgreement.vue

@@ -0,0 +1,18 @@
+<template>
+  <div>
+
+  </div>
+</template>
+
+<script>
+
+
+export default {
+  name: "IntermediationAgreement",
+  props:["drawerShow"],
+}
+</script>
+
+<style scoped>
+
+</style>

+ 61 - 2
src/HDrpManagement/projectChange/modules/modules/contract/components/add.vue

@@ -9,18 +9,77 @@
         <el-dropdown-item command="居间协议">居间协议</el-dropdown-item>
       </el-dropdown-menu>
     </el-dropdown>
+    <!--居间协议-->
+    <IntermediationAgreement :drawerShow="intermediationShow" v-if="intermediationShow"></IntermediationAgreement>
+    <!--经销协议-->
+    <DistributionProjectAgreement :drawerShow="distributionProjectShow" v-if="distributionProjectShow"></DistributionProjectAgreement>
+    <!--直销协议-->
+    <DirectSalesProjectAgreement :drawerShow="directSalesProjectShow" v-if="directSalesProjectShow"></DirectSalesProjectAgreement>
   </div>
 </template>
 
 <script>
+import IntermediationAgreement from "@/HDrpManagement/projectChange/modules/modules/contract/components/IntermediationAgreement";
+import DistributionProjectAgreement from "@/HDrpManagement/projectChange/modules/modules/contract/components/DistributionProjectAgreement";
+import DirectSalesProjectAgreement from "@/HDrpManagement/projectChange/modules/modules/contract/components/DirectSalesProjectAgreement";
 export default {
   name: "add",
+  props:["data"],
+  components:{IntermediationAgreement,DistributionProjectAgreement,DirectSalesProjectAgreement},
+  data(){
+    return {
+      intermediationShow:false,
+      distributionProjectShow:false,
+      directSalesProjectShow:false,
+      flag:0,
+    }
+  },
   methods:{
     handleCommand(val){
       console.log(val)
-      this.type = val
-      this.drawerShow = true
+      if (val === '居间协议'){
+        this.intermediationShow = true
+        this.distributionProjectShow = false
+        this.directSalesProjectShow = false
+      }else {
+        if (this.flag === 1){
+          this.distributionProjectShow = true
+          this.directSalesProjectShow = false
+          this.intermediationShow = false
+        }else if(this.flag === 2) {
+          this.directSalesProjectShow = true
+          this.intermediationShow = false
+          this.distributionProjectShow = false
+        }
+      }
+    },
+    /*标签查询*/
+    async queryTag(){
+      this.flag = 0
+      const res = await this.$api.requested({
+        "id": 20220929085401,
+        "content": {
+          "ownertable":'sa_project',
+          "ownerid":this.data.sa_projectid
+        }
+      })
+      console.log(res,"标签数据")
+      if (res.data.datatag.length !== 0){
+        for (let i=0;i<res.data.datatag.length;i++){
+          if (res.data.datatag[i] === '经销'){
+            this.flag = 1
+            break
+          }else if (res.data.datatag[i] === '直销'){
+            this.flag = 2
+            break
+          }
+        }
+      }
+      console.log(this.flag,"是否经销")
     }
+  },
+  mounted() {
+    this.queryTag()
   }
 }
 </script>

+ 1 - 1
src/HDrpManagement/projectChange/modules/modules/contract/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div>
-      <add class="inline-16" :data="data" @insertSuccess="onSuccess"></add>
+<!--      <add class="inline-16" :data="data" @insertSuccess="onSuccess"></add>-->
       <el-input
           placeholder="请输入搜索内容"
           suffix-icon="el-icon-search"

+ 4 - 1
src/HDrpManagement/publicCustomer/modules/detail/detailedData.vue

@@ -12,9 +12,12 @@
         <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.leader.length === 0?"--":basic.leader[0].name }}</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-item label="省市县">{{ basic.province?basic.province + '-' + basic.city + '-' + basic.county:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="企业地址">{{ basic.address?basic.address:"--" }}</el-descriptions-item>
+        <el-descriptions-item label="企业税号">{{ basic.taxno?basic.taxno:"--" }}</el-descriptions-item>
       </el-descriptions>
     </div>
 

+ 4 - 0
src/HManagement/clueManage/clue_public/modules/detail.vue

@@ -209,6 +209,10 @@ export default {
         baseInfo: [
           {
             label:'客户名称',
+            value:this.mainData.enterprisename_customer
+          },
+          {
+            label:'联系人',
             value:this.mainData.name
           },
           {

+ 0 - 5
src/HManagement/clueManage/clue_public/modules/edit.vue

@@ -58,11 +58,6 @@
                 <el-input v-model="form.cluesource" autocomplete="off"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="24">
-              <el-form-item label="来源" prop="cluesource">
-                <el-input v-model="form.cluesource" autocomplete="off"></el-input>
-              </el-form-item>
-            </el-col>
             <el-col :span="24">
               <el-form-item label="备注">
                 <el-input v-model="form.notes" type="textarea" :rows="4" autocomplete="off"></el-input>

+ 5 - 1
src/SDrpManagement/salerPrivatecustomer/detail/modules/detailedData.vue

@@ -12,9 +12,13 @@
         <el-descriptions-item label-class-name="my-label" label="成交状态">{{ basic.tradingstatus?basic.tradingstatus:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="成交次数">{{ basic.contact_signnum === 0?0:basic.contact_signnum }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="合作状态">{{ basic.status?basic.status:"--" }}</el-descriptions-item>
-        <el-descriptions-item label-class-name="my-label" label="负责人">{{ basic.createby?basic.createby:"--" }}</el-descriptions-item>
+        <el-descriptions-item label-class-name="my-label" label="负责人">{{ basic.leader.length !== 0?basic.leader[0].name:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="来源">{{ basic.source?basic.source:"--" }}</el-descriptions-item>
         <el-descriptions-item label-class-name="my-label" label="所属公海">{{ basic.sourcepoolname?basic.sourcepoolname:"--" }}</el-descriptions-item>
+        <el-descriptions-item label-class-name="my-label" label="省市县">{{ basic.province?basic.province + '-' + basic.city + '-' + basic.county:"--" }}</el-descriptions-item>
+        <el-descriptions-item label-class-name="my-label" label="企业地址">{{ basic.address?basic.address:"--" }}</el-descriptions-item>
+        <el-descriptions-item label-class-name="my-label" label="企业税号">{{ basic.taxno?basic.taxno:"--" }}</el-descriptions-item>
+        <el-descriptions-item label-class-name="my-label" label="联系方式">{{ basic.phonenumber?basic.phonenumber:"--" }}</el-descriptions-item>
       </el-descriptions>
     </div>