Browse Source

客户管家提交联系人模块相关代码

Lijy 1 year ago
parent
commit
ecb88803a9

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/api.ts

@@ -29,7 +29,7 @@ export const actionButtons: any[] = [
 ]
 
 export const tableColumns: TableColumn[] = [
-    { prop: 'name', label: '联系人', event: 'toDetali', width: '150' },
+    { prop: 'name', label: '联系人姓名', event: 'toDetali', width: '150' },
     { prop: 'customName', label: '客户名称', width: '150' },
     { prop: 'phone', label: '电话号码', width: '200' },
     { prop: 'email', label: '邮箱', width: '200' },

+ 1 - 1
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/deteleTables.vue

@@ -89,7 +89,7 @@ function batchOperation(type: operationType) {
 }
 
 function businessOperationItem(value: string | number, label: string, type: operationType, batch: boolean = false) {
-    confirmAction(`确定${batch ? '批量' : ''}${type}【${label}】商机吗?`).then(() => {
+    confirmAction(`确定${batch ? '批量' : ''}${type}【${label}】联系人吗?`).then(() => {
         let url = type == '恢复' ? URL_RESTORE : URL_DETELEITEM
         post(url, { ids: value }).then(res => {
             if (res.code != 'ok') {

+ 2 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/information.vue

@@ -5,13 +5,13 @@
             <div>
                 <el-button type="primary" v-if="!info.ownerId">认领</el-button>
                 <el-button type="primary" v-else @click="operationCli(false)">转移</el-button>
-                <el-button type="primary" @click="editInfo(info)">编辑</el-button>
+                <el-button type="primary" v-permission="['contactsEdit']" @click="editInfo(info)">编辑</el-button>
             </div>
         </div>
         <div class="form flex flex-wrap justify-between">
             <div v-for="item in formItems" :key="item.label" class="formItem flex pt-2 pb-1" :style="{ width: item.width }">
                 <div :class="item.labelClass">{{ item.label }}:</div>
-                <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1">{{ item.value }}</div>
+                <div class="flex-1 overflow-hidden text-ellipsis whitespace-nowrap ml-1" v-ellipsis-tooltip>{{ item.value }}</div>
             </div>
         </div>
 

+ 2 - 3
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/component/relatedBusiness.vue

@@ -2,7 +2,7 @@
     <div class="relatedTasks pl-4 pr-4 pt-3 pb-3 h-full flex flex-col">
         <div class="flex justify-between">
             <div class="title">相关商机</div>
-            <div>
+            <div v-permission="['businessAddAnEdit']">
                 <el-button type="primary" @click="addBusiness()">新建商机</el-button>
             </div>
         </div>
@@ -15,14 +15,13 @@
                         }}</el-button>
                     </template>
                 </el-table-column>
-                <el-table-column prop="customerName" label="客户名称" width="130" />
+                <el-table-column prop="customerName" label="客户名称" width="140" />
                 <el-table-column prop="inchargerName" label="负责人" width="130" />
                 <el-table-column prop="amountOfMoney" label="商机金额" width="130" />
                 <el-table-column prop="expectedTransactionDate" label="预计成交时间" width="170" />
                 <el-table-column prop="stageValue" label="商机阶段" width="130" />
                 <el-table-column prop="creatorName" label="创建人" width="130" />
                 <el-table-column prop="createTime" label="创建时间" width="130" />
-                <el-table-column prop="modifyTime" label="修改时间" width="130" />
             </el-table>
         </div>
 

+ 10 - 9
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/contacts/index.vue

@@ -26,11 +26,11 @@
         <div class="flex justify-end pb-3">
           <!-- 操作按钮 -->
           <!-- <el-button v-for="(button, index) in actionButtons" :key="index" type="primary">{{ button.text }}</el-button> -->
-          <el-button type="primary" @click="editContacts(false)">新建联系人</el-button>
+          <el-button type="primary" v-permission="['contactsAdd']" @click="editContacts(false)">新建联系人</el-button>
           <el-button type="primary" @click="batchDeteleItem" :disabled="batchTableData.length <= 0">批量删除</el-button>
           <el-button type="primary" @click="showVisible('deteleContactsVisible')">回收站</el-button>
-          <el-button type="primary" @click="showVisible('importVisible')">导入</el-button>
-          <el-button type="primary" @click="exportCustomerTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
+          <el-button type="primary" v-permission="['contactsImport']" @click="showVisible('importVisible')">导入</el-button>
+          <el-button type="primary" v-permission="['contactsExport']" @click="exportCustomerTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
         </div>
         <div class="flex-1 w-full overflow-hidden">
           <!-- 表格 -->
@@ -49,11 +49,11 @@
                 </template>
               </template>
             </el-table-column>
-            <el-table-column :label="'操作'" :width="'200px'" fixed="right">
+            <el-table-column :label="'操作'" :width="'200px'" fixed="right" v-permission="['contactsEdit', 'tasksAdd']">
               <template #default="scope">
-                <el-button link type="primary" size="large" @click="editContacts(scope.row)">编辑</el-button>
-                <el-button link type="primary" size="large" @click="newTask(scope.row)">新建任务</el-button>
-                <el-button link type="danger" size="large"
+                <el-button link type="primary" size="large" v-permission="['contactsEdit']" @click="editContacts(scope.row)">编辑</el-button>
+                <el-button link type="primary" size="large" v-permission="['tasksAdd']" @click="newTask(scope.row)">新建任务</el-button>
+                <el-button link type="danger" size="large" v-permission="['contactsEdit']"
                   @click="contactsDeteleItem(scope.row.id, scope.row.customName)">删除</el-button>
               </template>
             </el-table-column>
@@ -250,8 +250,9 @@ function batchDeteleItem() {
 }
 
 function contactsDeteleItem(value: string | number, label: string, batch: boolean = false) {
-  confirmAction(`确定${batch ? '批量' : ''}删除【${label}】客户吗?`).then(() => {
-    let url = batch ? URL_BATCHDETELE : URL_DETELERECYCLE
+  confirmAction(`确定${batch ? '批量' : ''}删除【${label}】联系人吗?`).then(() => {
+    // let url = batch ? URL_BATCHDETELE : URL_DETELERECYCLE
+    let url = URL_DETELERECYCLE
     post(url, { ids: value }).then(res => {
       if (res.code != 'ok') {
         globalPopup?.showError(res.msg)