Jelajahi Sumber

feature(优化): 优化页面显示

ZZH-wl 2 tahun lalu
induk
melakukan
1e8074f84f

+ 5 - 6
.env

@@ -3,19 +3,18 @@ VUE_APP_SECRET_KEY=preview
 
 # 租户码
 VUE_APP_TENANT=default
-# 登录验证微服务名称
-VUE_APP_AdminPath  = dashoo.opms.admin-0.0.1
-VUE_APP_ParentPath = dashoo.opms.parent-0.0.1
 
+# GateWay地址
 VUE_APP_MicroSrvProxy_API=http://127.0.0.1:9981/
-
-VUE_APP_MicroSrvProxy_API=http://192.168.0.81:9981/
+# 登录验证微服务名称
+VUE_APP_AdminPath=dashoo.opms.admin-0.0.1
+# 业务接口微服务名称
+VUE_APP_ParentPath=dashoo.opms.parent-0.0.1
 
 VUE_APP_PROTOCOL='http://'
 # 文件上传
 VUE_APP_UPLOAD_WEED='http://192.168.0.252:9333/dir/assign'
 
-
 SSO_LOGIN=''
 SSO_HREF=''
 

+ 4 - 12
.env.development

@@ -1,27 +1,19 @@
-
 # 租户码
 VUE_APP_TENANT=default
 
-# GateWay地址
-
-
+## GateWay地址
 #VUE_APP_MicroSrvProxy_API=http://192.168.0.252:8100/
-
-# 登录验证微服务名称
+## 登录验证微服务名称
 #VUE_APP_AdminPath=dashoo.labsop.lims_latest_opms_admin
-
-# 业务接口微服务名称
+## 业务接口微服务名称
 #VUE_APP_ParentPath=dashoo.labsop.lims_latest_opms_parent
-VUE_APP_AdminPath  = dashoo.opms.admin-0.0.1
-VUE_APP_ParentPath = dashoo.opms.parent-0.0.1
-VUE_APP_MicroSrvProxy_API=http://127.0.0.1:9981/
 
+# GateWay地址
 VUE_APP_MicroSrvProxy_API=http://127.0.0.1:9981/
 # 登录验证微服务名称
 VUE_APP_AdminPath=dashoo.opms.admin-0.0.1
 # 业务接口微服务名称
 VUE_APP_ParentPath=dashoo.opms.parent-0.0.1
 
-
 # 文件上传
 VUE_APP_UPLOAD_WEED='http://192.168.0.252:9333/dir/assign'

+ 21 - 3
src/components/select/SelectUser.vue

@@ -10,13 +10,18 @@
             suffix-icon="el-icon-search"
             @change="search" />
         </header>
-        <el-dropdown>
+        <el-dropdown @command="handleCommand">
           <span class="el-dropdown-link">
-            按字母顺序查看
+            {{ orderByMap[queryForm.orderBy] }}
             <i class="el-icon-arrow-down el-icon--right"></i>
           </span>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item>按创建顺序查看</el-dropdown-item>
+            <el-dropdown-item v-if="queryForm.orderBy !== 'userName'" command="userName">
+              按字母顺序查看
+            </el-dropdown-item>
+            <el-dropdown-item v-if="queryForm.orderBy !== 'createdTime'" command="createdTime">
+              按创建顺序查看
+            </el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
         <ul v-infinite-scroll="fetchData" class="options" :infinite-scroll-disabled="disabled">
@@ -77,6 +82,7 @@
         queryForm: {
           keyWords: '',
           pageNum: 1,
+          orderBy: 'userName',
           pageSize: 50,
         },
         disabled: false,
@@ -85,12 +91,24 @@
         options: [],
         selected: [],
         ids: [],
+        orderByMap: { userName: '按字母顺序查看', createdTime: '按创建顺序查看' },
       }
     },
     mounted() {
       // this.fetchData()
     },
     methods: {
+      handleCommand(command) {
+        switch (command) {
+          case 'userName':
+            this.queryForm.orderBy = command
+            break
+          case 'createdTime':
+            this.queryForm.orderBy = command
+            break
+        }
+        this.search()
+      },
       open() {
         this.clear()
         if (this.ids.length) {

+ 3 - 0
src/views/base/distributor/detail.vue

@@ -164,6 +164,9 @@
         font-size: 14px;
         font-weight: 600;
         color: #333;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
       }
     }
 

+ 3 - 0
src/views/contract/detail.vue

@@ -246,6 +246,9 @@
         font-size: 14px;
         font-weight: 600;
         color: #333;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
       }
     }
 

+ 92 - 78
src/views/customer/detail.vue

@@ -36,10 +36,10 @@
               {{ detail.abbrName }}
             </el-descriptions-item>
             <el-descriptions-item content-class-name="my-content" label="客户级别" label-class-name="my-label">
-              {{ detail.custLevel }}
+              {{ selectDictLabel(levelOptions, detail.custLevel) }}
             </el-descriptions-item>
             <el-descriptions-item content-class-name="my-content" label="客户类型" label-class-name="my-label">
-              {{ detail.custIndustry }}
+              {{ selectDictLabel(industryOptions, detail.custIndustry) }}
             </el-descriptions-item>
             <el-descriptions-item content-class-name="my-content" label="客户状态" label-class-name="my-label">
               {{ detail.custStatus == 10 ? '正常' : '异常' }}
@@ -50,6 +50,69 @@
           </el-descriptions>
         </header>
         <el-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane label="详细信息" name="detail">
+            <el-descriptions
+              border
+              :column="2"
+              :content-style="{ width: '25%', 'word-break': 'break-all' }"
+              :label-style="{ width: '25%' }"
+              size="medium">
+              <el-descriptions-item label="客户级别">
+                {{ selectDictLabel(levelOptions, detail.custLevel) }}
+              </el-descriptions-item>
+              <el-descriptions-item label="下次联系时间">
+                {{ detail.followUpDate }}
+              </el-descriptions-item>
+              <el-descriptions-item label="所在省">
+                {{ detail.custProvince }}
+              </el-descriptions-item>
+              <el-descriptions-item label="所在市">
+                {{ detail.custCity }}
+              </el-descriptions-item>
+              <el-descriptions-item label="所在区">
+                {{ detail.custRegion }}
+              </el-descriptions-item>
+              <el-descriptions-item label="详细地址">
+                {{ detail.custAddress }}
+              </el-descriptions-item>
+              <el-descriptions-item label="创建人">
+                {{ detail.createdName }}
+              </el-descriptions-item>
+              <el-descriptions-item label="创建时间">
+                {{ detail.createdTime }}
+              </el-descriptions-item>
+              <el-descriptions-item label="跟进次数">
+                {{ abstract.followContent }}
+              </el-descriptions-item>
+              <el-descriptions-item label="未跟进时长">
+                {{ abstract.notFollowDay }}
+              </el-descriptions-item>
+              <el-descriptions-item label="项目数量">
+                {{ abstract.business }}
+              </el-descriptions-item>
+              <el-descriptions-item label="项目总额">
+                {{ formatPrice(abstract.businessTotal) }}
+              </el-descriptions-item>
+              <el-descriptions-item label="成交次数">
+                {{ abstract.dealCotal }}
+              </el-descriptions-item>
+              <el-descriptions-item label="成交总额">
+                {{ formatPrice(abstract.dealTotal) }}
+              </el-descriptions-item>
+              <el-descriptions-item label="回款总额">
+                {{ formatPrice(abstract.paymentTotal) }}
+              </el-descriptions-item>
+              <el-descriptions-item label="未回款总额">
+                {{ formatPrice(abstract.notPaymentTotal) }}
+              </el-descriptions-item>
+              <el-descriptions-item label="开票总额" :span="24">
+                {{ formatPrice(abstract.drawTotal) }}
+              </el-descriptions-item>
+              <el-descriptions-item label="备注" :span="24">
+                {{ detail.remark }}
+              </el-descriptions-item>
+            </el-descriptions>
+          </el-tab-pane>
           <el-tab-pane label="跟进记录" name="follow">
             <ul v-if="followList.length" class="follow">
               <li v-for="(date, index) in followList" :key="index">
@@ -107,73 +170,6 @@
             </ul>
             <div v-else class="no-follow">暂无跟进记录</div>
           </el-tab-pane>
-          <el-tab-pane label="详细信息" name="detail">
-            <!-- <div class="detail-container">
-              <ul>
-                <li>客户级别</li>
-                <li>下次联系时间</li>
-                <li>所在地区</li>
-                <li>详细地址</li>
-                <li>客户级别</li>
-                <li>客户级别</li>
-              </ul>
-            </div> -->
-            <el-descriptions
-              border
-              :column="2"
-              :content-style="{ width: '25%', 'word-break': 'break-all' }"
-              :label-style="{ width: '25%' }"
-              size="medium">
-              <el-descriptions-item label="客户级别">
-                {{ detail.custLevel }}
-              </el-descriptions-item>
-              <el-descriptions-item label="下次联系时间">
-                {{ detail.followUpDate }}
-              </el-descriptions-item>
-              <el-descriptions-item label="所在地区">
-                {{ detail.custLocation }}
-              </el-descriptions-item>
-              <el-descriptions-item label="详细地址">
-                {{ detail.custAddress }}
-              </el-descriptions-item>
-              <el-descriptions-item label="创建人">
-                {{ detail.createdName }}
-              </el-descriptions-item>
-              <el-descriptions-item label="创建时间">
-                {{ detail.createdTime }}
-              </el-descriptions-item>
-              <el-descriptions-item label="跟进次数">
-                {{ abstract.followContent }}
-              </el-descriptions-item>
-              <el-descriptions-item label="未跟进时长">
-                {{ abstract.notFollowDay }}
-              </el-descriptions-item>
-              <el-descriptions-item label="项目数量">
-                {{ abstract.business }}
-              </el-descriptions-item>
-              <el-descriptions-item label="项目总额">
-                {{ formatPrice(abstract.businessTotal) }}
-              </el-descriptions-item>
-              <el-descriptions-item label="成交次数">
-                {{ abstract.dealCotal }}
-              </el-descriptions-item>
-              <el-descriptions-item label="成交总额">
-                {{ formatPrice(abstract.dealTotal) }}
-              </el-descriptions-item>
-              <el-descriptions-item label="回款总额">
-                {{ formatPrice(abstract.paymentTotal) }}
-              </el-descriptions-item>
-              <el-descriptions-item label="未回款总额">
-                {{ formatPrice(abstract.notPaymentTotal) }}
-              </el-descriptions-item>
-              <el-descriptions-item label="开票总额" :span="24">
-                {{ formatPrice(abstract.drawTotal) }}
-              </el-descriptions-item>
-              <el-descriptions-item label="备注" :span="24">
-                {{ detail.remark }}
-              </el-descriptions-item>
-            </el-descriptions>
-          </el-tab-pane>
           <el-tab-pane label="联系人" name="contact">
             <vab-query-form>
               <vab-query-form-left-panel :span="12">
@@ -217,18 +213,22 @@
           </el-tab-pane>
           <el-tab-pane label="项目记录" name="item">
             <el-table border :data="items" height="calc(100% - 42px)">
-              <el-table-column align="center" label="商机标题" prop="nboName" width="120px" />
-              <el-table-column align="center" label="关联客户" prop="custName" width="200px" />
-              <el-table-column align="center" label="审批状态" prop="approStatus" width="320px">
+              <el-table-column align="center" label="项目编号" prop="nboCode" width="120px" />
+              <el-table-column align="center" label="项目名称" prop="nboName" width="200px" />
+              <el-table-column align="center" label="审批状态" prop="approStatus" width="120px">
                 <template slot-scope="scope">
                   {{ getStatus(scope.row.approStatus) }}
                 </template>
               </el-table-column>
-              <el-table-column align="center" label="商机状态" prop="nboPhase" width="320px" />
-              <el-table-column align="center" label="商机类别" prop="nboType" width="320px" />
-              <el-table-column align="center" label="商机金额" prop="estTransPrice" width="320px" />
-              <el-table-column align="center" label="最后跟进时间" prop="finalFollowTime" width="320px" />
-              <el-table-column align="center" label="下次跟进时间" prop="nextFollowTime " width="320px" />
+              <!--              <el-table-column align="center" label="项目级别" prop="nboType" width="80px" />-->
+              <!--              <el-table-column align="center" label="产品线" prop="productLine" width="120px" />-->
+              <el-table-column align="center" label="经销商/代理商" prop="distributorName" width="200px" />
+              <el-table-column align="center" label="项目预算(万元)" prop="nboBudget" width="120px" />
+              <el-table-column align="center" label="项目备案时间" prop="filingTime" width="160px" />
+              <!--              <el-table-column align="center" label="项目来源" prop="nboSource" width="160px" />-->
+              <!--              <el-table-column align="center" label="销售模式" prop="salesModel" width="160px" />-->
+              <el-table-column align="center" label="最后跟进时间" prop="finalFollowTime" width="160px" />
+              <el-table-column align="center" label="下次跟进时间" prop="nextFollowTime " width="160px" />
             </el-table>
           </el-tab-pane>
           <el-tab-pane label="合同记录" name="contract">
@@ -377,7 +377,7 @@
           notPaymentTotal: '', //未回款总额
           drawTotal: '', //开票总额
         },
-        activeName: 'follow',
+        activeName: 'detail',
         cuctName: '',
         contactList: [],
         selectRows: [],
@@ -388,6 +388,8 @@
         contracts: [], //合同
         appro: [],
         custInfo: {},
+        levelOptions: [],
+        industryOptions: [],
       }
     },
     computed: {
@@ -399,10 +401,19 @@
     mounted() {
       this.id = this.$route.query.id
       this.init()
+      this.getOptions()
       this.getDynamics()
       this.handleClick({ name: 'follow' })
     },
     methods: {
+      getOptions() {
+        Promise.all([this.getDicts('cust_level'), this.getDicts('cust_idy')])
+          .then(([level, industry]) => {
+            this.levelOptions = level.data.values || []
+            this.industryOptions = industry.data.values || []
+          })
+          .catch((err) => console.log(err))
+      },
       checkPermi(val) {
         let str = 'cust:'
         if (this.detail.salesId) str += 'list:'
@@ -680,6 +691,9 @@
         font-size: 14px;
         font-weight: 600;
         color: #333;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
       }
     }
 

+ 16 - 10
src/views/customer/list.vue

@@ -106,8 +106,14 @@
           <span v-else-if="item.prop === 'custStatus'">
             {{ row.custStatus == 10 ? '正常' : '异常' }}
           </span>
+          <span v-else-if="item.prop === 'custIndustry'">
+            {{ selectDictLabel(industryOptions, row.custIndustry) }}
+          </span>
           <span v-else-if="item.prop === 'followUpDate'">
-            {{ parseTime(row.followUpDate, '{y}-{m}-{d} {h}-{i}') }}
+            {{ parseTime(row.followUpDate, '{y}-{m}-{d} {h}:{i}') }}
+          </span>
+          <span v-else-if="item.prop === 'createdTime'">
+            {{ parseTime(row.createdTime, '{y}-{m}-{d} {h}:{i}') }}
           </span>
           <span v-else>{{ row[item.prop] }}</span>
         </template>
@@ -182,14 +188,14 @@
         columns: [
           {
             label: '客户编码',
-            width: '120px',
+            width: '80px',
             prop: 'custCode',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '客户名称',
-            width: '120px',
+            width: '160px',
             prop: 'custName',
             sortable: false,
             disableCheck: true,
@@ -203,21 +209,21 @@
           },
           {
             label: '所在省',
-            width: 'auto',
+            width: '100px',
             prop: 'custProvince',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '所在市',
-            width: 'auto',
+            width: '100px',
             prop: 'custCity',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '客户类型',
-            width: 'auto',
+            width: '70px',
             prop: 'custIndustry',
             sortable: false,
             disableCheck: false,
@@ -231,28 +237,28 @@
           // },
           {
             label: '客户状态',
-            width: 'auto',
+            width: '40px',
             prop: 'custStatus',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '最后跟进时间',
-            width: '140px',
+            width: '120px',
             prop: 'followUpDate',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '最后跟进人',
-            width: '140px',
+            width: '50px',
             prop: 'followUpMan',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '创建时间',
-            width: '140px',
+            width: '120px',
             prop: 'createdTime',
             sortable: false,
             disableCheck: false,

+ 18 - 11
src/views/customer/openSea.vue

@@ -80,9 +80,15 @@
           <span v-else-if="item.prop === 'custStatus'">
             {{ row.custStatus == 10 ? '正常' : '异常' }}
           </span>
+          <span v-else-if="item.prop === 'custIndustry'">
+            {{ selectDictLabel(industryOptions, row.custIndustry) }}
+          </span>
           <span v-else-if="item.prop === 'followUpDate'">
             {{ parseTime(row.followUpDate, '{y}-{m}-{d} {h}:{i}') }}
           </span>
+          <span v-else-if="item.prop === 'createdTime'">
+            {{ parseTime(row.createdTime, '{y}-{m}-{d} {h}:{i}') }}
+          </span>
           <span v-else>{{ row[item.prop] }}</span>
         </template>
       </el-table-column>
@@ -125,7 +131,7 @@
         label="创建时间"
         min-width="140px"
         prop="createdTime" /> -->
-      <el-table-column align="center" label="操作">
+      <el-table-column align="center" label="操作" width="85px">
         <template slot-scope="scope">
           <el-button v-permissions="['cust:open:edit']" type="text" @click="handleEdit(scope.row)">编辑</el-button>
           <el-button v-permissions="['cust:open:delete']" type="text" @click="handleDelete(scope.row)">删除</el-button>
@@ -160,6 +166,7 @@
   import Pick from './components/Pick'
   import TableTool from '@/components/table/TableTool'
   import downloadFileByByte from '@/utils/base64ToFile'
+
   export default {
     name: 'OpenSea',
     components: {
@@ -193,14 +200,14 @@
         columns: [
           {
             label: '客户编码',
-            width: '120px',
+            width: '80px',
             prop: 'custCode',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '客户名称',
-            width: '120px',
+            width: '160px',
             prop: 'custName',
             sortable: false,
             disableCheck: true,
@@ -214,21 +221,21 @@
           },
           {
             label: '所在省',
-            width: 'auto',
+            width: '100px',
             prop: 'custProvince',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '所在市',
-            width: 'auto',
+            width: '100px',
             prop: 'custCity',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '客户类型',
-            width: 'auto',
+            width: '70px',
             prop: 'custIndustry',
             sortable: false,
             disableCheck: false,
@@ -242,35 +249,35 @@
           // },
           {
             label: '客户状态',
-            width: 'auto',
+            width: '40px',
             prop: 'custStatus',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '最后跟进时间',
-            width: '140px',
+            width: '120px',
             prop: 'followUpDate',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '最后跟进人',
-            width: '140px',
+            width: '50px',
             prop: 'followUpMan',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '创建人',
-            width: '140px',
+            width: '50px',
             prop: 'createdName',
             sortable: false,
             disableCheck: false,
           },
           {
             label: '创建时间',
-            width: '140px',
+            width: '120px',
             prop: 'createdTime',
             sortable: false,
             disableCheck: false,

+ 4 - 1
src/views/proj/business/detail.vue

@@ -182,7 +182,7 @@
                 </template>
               </el-table-column>
               <el-table-column align="center" label="操作人" prop="createdName" show-overflow-tooltip />
-              <el-table-column align="center" label="操作时间" min-width="160px" prop="opnDate" show-overflow-tooltip />
+              <el-table-column align="center" label="操作时间" prop="opnDate" show-overflow-tooltip />
               <el-table-column align="center" label="备注" prop="remark" show-overflow-tooltip />
             </el-table>
           </el-tab-pane>
@@ -431,6 +431,9 @@
         font-size: 14px;
         font-weight: 600;
         color: #333;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
       }
     }
 

+ 27 - 30
src/views/proj/business/index.vue

@@ -74,7 +74,7 @@
         :key="index"
         align="center"
         :label="item.label"
-        :min-width="item.minWidth"
+        :min-width="item.width"
         :prop="item.prop"
         show-overflow-tooltip
         :sortable="item.sortable"
@@ -173,112 +173,109 @@
         columns: [
           {
             label: '项目编码',
-            width: 'auto',
-            minWidth: '120',
             prop: 'nboCode',
+            width: '120px',
+            minWidth: '120px',
             sortable: false,
           },
           {
             label: '项目名称',
-            width: 'auto',
-            minWidth: '280',
             prop: 'nboName',
+            width: '160px',
+            minWidth: '160px',
             sortable: false,
             disableCheck: true,
           },
           {
             label: '所在省',
-            width: 'auto',
-            minWidth: '120',
             prop: 'custProvince',
+            width: '100px',
           },
           {
             label: '所在市',
-            width: 'auto',
-            minWidth: '120',
             prop: 'custCity',
+            width: '100px',
           },
           {
             label: '销售工程师',
-            width: 'auto',
-            minWidth: '120',
             prop: 'saleName',
+            width: '70px',
           },
           {
             label: '客户名称',
-            width: 'auto',
-            minWidth: '280',
             prop: 'custName',
+            width: '200px',
+            minWidth: '180px',
           },
           {
             label: '项目备案时间',
-            width: '140px',
             prop: 'filingTime',
+            width: '150px',
           },
           {
             label: '项目来源',
-            width: '140px',
             prop: 'nboSource',
+            width: '140px',
           },
           {
             label: '销售模式',
-            width: '120px',
             prop: 'salesModel',
+            width: '80px',
           },
           {
             label: '经销商/代理商',
-            width: '120px',
             prop: 'distributorName',
+            width: '160px',
           },
           {
             label: '产品线',
-            width: '120px',
             prop: 'productLine',
+            width: '120px',
           },
           {
             label: '项目级别',
-            width: '120px',
             prop: 'nboType',
+            width: '60px',
           },
           {
-            label: '项目预算(万元)',
-            width: '120px',
+            label: '项目预算(万元)',
             prop: 'nboBudget',
+            width: '120px',
           },
           {
             label: '是否为大项目',
-            width: '120px',
             prop: 'isBig',
+            width: '70px',
           },
           {
             label: '最新跟进时间',
-            width: '140px',
             prop: 'finalFollowTime',
+            width: '150px',
           },
           {
             label: '最新跟进人',
-            width: '120px',
             prop: 'finalFollowName',
+            width: '50px',
           },
           {
             label: '项目成交时间',
-            width: '140px',
             prop: 'projClosingTime',
+            width: '150px',
           },
           {
             label: '合同金额',
-            width: '140px',
             prop: 'contractAmount',
+            width: '140px',
           },
           {
             label: '项目转化时间',
-            width: '140px',
             prop: 'projConversionTime',
+            width: '150px',
           },
           {
             label: '转化原因',
-            width: '140px',
             prop: 'projConversionReason',
+            width: '140px',
           },
         ],
         allColumns: [
@@ -293,7 +290,7 @@
           '经销商/代理商',
           '产品线',
           '项目级别',
-          '项目预算(万元)',
+          '项目预算(万元)',
           '是否为大项目',
           '最新跟进时间',
         ],
@@ -308,7 +305,7 @@
           '销售模式',
           '经销商/代理商',
           '产品线',
-          '项目预算(万元)',
+          '项目预算(万元)',
           '是否为大项目',
           '最新跟进时间',
           '最新跟进',