吴树波 hace 4 horas
padre
commit
0c109a234a

+ 7 - 0
src/api/crm/customer.js

@@ -151,3 +151,10 @@ export function delCustomer(customerId) {
     method: 'delete'
   })
 }
+
+export function queryPhone(customerId) {
+  return request({
+    url: '/crm/customer/queryPhone/' + customerId,
+    method: 'get'
+  })
+}

+ 11 - 1
src/views/crm/components/customerDetails.vue

@@ -14,6 +14,8 @@
             </el-descriptions-item>
             <el-descriptions-item label="手机号" >
                 <span v-if="item!=null">{{item.mobile}}</span>
+                <el-button type="text" v-hasPermi="['crm:customer:queryPhone']" size="mini"
+                           @click="handleQueryPhone(item)" icon="el-icon-view">查看</el-button>
             </el-descriptions-item>
             <el-descriptions-item label="性别" >
                 <span v-if="item!=null">
@@ -139,7 +141,7 @@
     import customerVoiceLogsList from '../components/customerVoiceLogsList.vue';
     import customerStoreOrderList from '../components/customerStoreOrderList.vue';
     import customerContacts from './customerContacts.vue';
-    import { getCustomer } from "@/api/crm/customer";
+    import { getCustomer, queryPhone } from "@/api/crm/customer";
     export default {
         name: "customer",
         components: { customerContacts,customerVisitList,customerLogsList,customerVoiceLogsList,customerStoreOrderList,customerSmsLogsList },
@@ -180,6 +182,14 @@
         mounted(){
         },
         methods: {
+            handleQueryPhone(item) {
+                queryPhone(item.customerId).then(response => {
+                    this.$alert(response.mobile, '手机号', {
+                        confirmButtonText: '确定',
+                        callback: action => {}
+                    });
+                });
+            },
             handleClick(tab, event) {
                 if(tab.name=="contacts"){
                     this.$refs.contacts.getData(this.item.customerId);

+ 16 - 2
src/views/crm/customer/line.vue

@@ -132,7 +132,13 @@
       <el-table-column label="所属公司" align="center" prop="companyName" />
       <el-table-column label="客户编号" width="120"  align="center" prop="customerCode" />
       <el-table-column label="客户名称" align="center" prop="customerName" />
-      <el-table-column label="手机" align="center" prop="mobile" />
+      <el-table-column label="手机" width="150" align="center" prop="mobile">
+        <template slot-scope="scope">
+          {{scope.row.mobile}}
+          <el-button type="text" v-hasPermi="['crm:customer:queryPhone']" size="mini"
+                     @click="handleQueryPhone(scope.row)" icon="el-icon-view">查看</el-button>
+        </template>
+      </el-table-column>
       <el-table-column  label="性别" align="center" prop="sex">
         <template slot-scope="scope">
             <el-tag prop="status" v-for="(item, index) in sexOptions"    v-if="scope.row.sex==item.dictValue">{{item.dictLabel}}</el-tag>
@@ -315,7 +321,7 @@
 </template>
 
 <script>
-import { assignCustomer,importLineTemplate,listLineCustomer, getLineCustomer, delLineCustomer, addLineCustomer, updateLineCustomer, exportLineCustomer } from "@/api/crm/customer";
+import { assignCustomer,importLineTemplate,listLineCustomer, getLineCustomer, delLineCustomer, addLineCustomer, updateLineCustomer, exportLineCustomer,queryPhone } from "@/api/crm/customer";
 import {getCitys} from "@/api/store/city";
 import { getToken } from "@/utils/auth";
 import { isAdmin } from "@/api/system/user";
@@ -467,6 +473,14 @@ export default {
     this.getList();
   },
   methods: {
+    handleQueryPhone(row) {
+      queryPhone(row.customerId).then(response => {
+        this.$alert(response.mobile, '手机号', {
+          confirmButtonText: '确定',
+          callback: action => {}
+        });
+      });
+    },
     handleScheduleTimeChange(val) {
       if (val) {
         this.queryParams.beginTime = val[0];