瀏覽代碼

禅道1685

wangzhuo 2 年之前
父節點
當前提交
ff29aab2e9

+ 9 - 0
src/api/basicData/customerInformation.js

@@ -179,3 +179,12 @@ export function creatingUsersTwo(data) {
     data: data
   })
 }
+
+// 客户id查找客户联系人list
+
+export function getById(id) {
+  return request({
+    url: '/api/blade-client/corpsattn/list/' + id,
+    method: 'get'
+  })
+}

+ 14 - 0
src/components/warehousKH/main.vue

@@ -54,6 +54,7 @@
 import option from "./configuration/mainList.json";
 import { customerList, allCropList, getDeptLazyTree } from "@/api/basicData/customerInformation";
 import { getCustomerCode, getCustomerName } from "@/enums/management-type";
+import { getById } from "@/api/basicData/customerInformation";
 import { kMaxLength } from "buffer";
 export default {
     name: "main",
@@ -105,6 +106,7 @@ export default {
         treeType: String,
         label: String,
         belongtocompany: Number,
+        source: String
     },
     model: {
         prop: "value",
@@ -227,7 +229,19 @@ export default {
                 if (row) {
                     let res = this.corpList.find(e => { return e.cname == row })
                     if (res) {
+                      if (this.source === '销售机会') {
+                        getById(res.id).then(R => {
+                          console.log(R)
+                          let data = {
+                            'contacts' : R.data.data.cname,
+                            'tel': R.data.data.tel,
+                            'id': res.id
+                          };
+                          this.$emit('getCropId', data)
+                        })
+                      } else {
                         this.$emit('getCropId', res.id)
+                      }
                     } else {
                         this.$emit('getCropId', null)
                     }

+ 9 - 2
src/views/saleLeads/detail.vue

@@ -39,7 +39,7 @@
             <span style="color: #409EFF;cursor: pointer" @click.stop="khEdit">客户名称:</span>
           </template>
           <template slot-scope="{row,index}" slot="corpName">
-            <warehous-Kh v-model="form.corpName" :zhKey="true" :disabled="disabled || approvalStatus"
+            <warehous-Kh v-model="form.corpName" :zhKey="true" :disabled="disabled || approvalStatus" source="销售机会"
               @getCropId="getCropId"></warehous-Kh>
           </template>
           <template slot="fromUser">
@@ -103,6 +103,7 @@
             <el-switch v-model="row.approval" :disabled="!row.$cellEdit" :inactive-value="0" :active-value="1">
             </el-switch>
           </template>
+
         </avue-crud>
       </trade-card>
       <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
@@ -287,6 +288,7 @@ export default {
                 trigger: "change"
               }
             ],
+            value: 0
           },
           {
             label: "备注",
@@ -518,7 +520,11 @@ export default {
 
     },
     getCropId(row) {
-      this.form.corpId = row
+      console.log(row)
+        this.form.corpId = row.id;
+        this.form.contacts = row.contacts;
+        this.form.tel = row.tel;
+        console.log(this.form)
     },
     //修改提交触发
     editCustomer(status) {
@@ -588,6 +594,7 @@ export default {
             bizUserName: this.loginUser,
             bizUser: this.loginUserId,
             $cellEdit: true,
+            approval: 1,
           })
         }
       })

+ 2 - 2
src/views/workManagement/main-items/configuration/mainList.json

@@ -1,8 +1,8 @@
 {
   "expand": true,
   "addBtn": false,
-  "headerAlign": "center",
-  "align": "center",
+  "headerAlign": "left",
+  "align": "left",
   "border": true,
   "index": true,
   "lazy": true,

+ 23 - 3
src/views/workManagement/main-items/detailsPage.vue

@@ -273,8 +273,18 @@
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false">
       <el-form :model="accountFormData" ref="accountFormData">
         <el-form-item label="账户名称" class="landConFrom-input" prop="accountName" :rules="rules">
-          <el-input v-model="accountFormData.accountName" style="width: 220px;" size="small" clearable
-            placeholder="请输入"></el-input>
+<!--          <el-input v-model="accountFormData.accountName" style="width: 220px;" size="small" clearable-->
+<!--            placeholder="请输入"></el-input>-->
+
+          <el-select v-model="accountFormData.accountName" style="width: 220px;" size="small" placeholder="请选择">
+            <el-option
+              v-for="item in primaryServiceAccountTitle"
+              :key="item.dictKey"
+              :label="item.dictValue"
+              :value="item.dictKey">
+            </el-option>
+          </el-select>
+
         </el-form-item>
         <el-form-item label="结算日期" class="landConFrom-input" prop="payTime" :rules="rules">
           <el-date-picker type="date" v-model="accountFormData.payTime" value-format="yyyy-MM-dd HH:mm:ss" size="small"
@@ -318,6 +328,11 @@ import { getDeptLazyTree } from "@/api/system/dept";
 import {corpsbank, projectFiles} from "@/api/basicData/configuration"
 //事务
 import examineApprove from "@/components/examineApprove/index";
+
+// 字典
+import { getWorkDicts } from "@/api/system/dictbiz";
+
+
 //对象数组比较
 import { contrastObj, contrastList2 } from "@/util/contrastData";
 import _ from "lodash";
@@ -341,6 +356,8 @@ export default {
   },
   data() {
     return {
+      // 客户名称字典
+      primaryServiceAccountTitle: [],
       pgList: [],
       pgDialog: false,
       goodsDescList: [],
@@ -988,7 +1005,10 @@ export default {
     beforeCloseAccount(row) {
       if (this.verificationData()) {
         this.account = row;
-        this.accountDialog = true;
+        getWorkDicts("primary_service_account_title").then(res => {
+          this.primaryServiceAccountTitle = res.data.data;
+          this.accountDialog = true;
+        })
       }
     },
     dispatch(row, index) {