瀏覽代碼

客户档案、公海、私海页面国家地址相关功能调整优化

lxf 1 年之前
父節點
當前提交
71345e557c
共有 4 個文件被更改,包括 424 次插入1509 次删除
  1. 10 11
      src/components/selectCity/index.vue
  2. 138 507
      src/views/customer/file/index.vue
  3. 132 489
      src/views/customer/highseas/index.vue
  4. 144 502
      src/views/customer/privatesea/index.vue

+ 10 - 11
src/components/selectCity/index.vue

@@ -1,12 +1,21 @@
 <template>
   <div class="select-city">
-    <el-select clearable filterable allow-create :placeholder="placeholder" @change="getCityData" @clear="getCityData" v-model="showModel" style="width: 100%">
+    <el-select
+      clearable
+      filterable
+      :placeholder="placeholder"
+      @change="getCityData"
+      v-model="showModel"
+      style="width: 100%"
+      :no-match-text="'无数据,请联系管理员添加'"
+      :no-data-text="'无数据,请联系管理员添加'">
       <el-option v-for="item in data" :label="item.name" :value="item.id"> </el-option>
     </el-select>
   </div>
 </template>
 <script setup>
 import { reactive, ref } from "vue";
+
 const { proxy } = getCurrentInstance();
 const showModel = ref("");
 const emit = defineEmits(["update:modelValue", "change"]);
@@ -62,25 +71,15 @@ watch(
   }
 );
 const getCityData = (val) => {
-  let isAddCity = true;
   //判断val是否在data里面
   proxy.data.forEach((item) => {
     if (item.id == val) {
-      isAddCity = false;
       formData.value[proxy.addressId || "provinceId"] = item.id;
       formData.value[proxy.addressName || "provinceName"] = item.name;
-      console.log(formData.value);
       emit("update:modelValue", formData.value);
       showModel.value = item.id;
       emit("change", item.id);
     }
   });
-  if (isAddCity) {
-    formData.value[proxy.addressId || "provinceId"] = null;
-    formData.value[proxy.addressName || "provinceName"] = val;
-    showModel.value = val;
-    emit("update:modelValue", formData.value);
-    emit("change", val);
-  }
 };
 </script>

文件差異過大導致無法顯示
+ 138 - 507
src/views/customer/file/index.vue


+ 132 - 489
src/views/customer/highseas/index.vue

@@ -1,9 +1,7 @@
 <template>
   <div class="tenant">
     <div style="padding: 20px; background: #fff; margin-bottom: 20px">
-      <el-button type="primary" style="margin-left: 10px" @click="openModal()"
-        >添加客户</el-button
-      >
+      <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
     </div>
 
     <byTable
@@ -16,22 +14,11 @@
       highlight-current-row
       @moreSearch="moreSearch"
       @get-list="getList"
-      ref="table"
-    >
+      ref="table">
       <template #isTop="{ item }">
         <div>
-          <img
-            style="cursor: pointer; width: 20px; transform: translateY(5px)"
-            :src="'/img/isTop.png'"
-            @click="deleteTop(item)"
-            v-if="item.isTop === 1"
-          />
-          <img
-            style="cursor: pointer; width: 20px; transform: translateY(5px)"
-            :src="'/img/noTop.png'"
-            @click="addTop(item)"
-            v-else
-          />
+          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)" v-if="item.isTop === 1" />
+          <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/noTop.png'" @click="addTop(item)" v-else />
         </div>
       </template>
       <template #address="{ item }">
@@ -40,23 +27,13 @@
         <span v-if="item.cityName"> ,{{ item.cityName }}</span>
       </template>
       <template #name="{ item }">
-        <div
-          style="cursor: pointer; color: #409eff; word-break: break-all"
-          @click="handleClickName(item)"
-        >
+        <div style="cursor: pointer; color: #409eff; word-break: break-all" @click="handleClickName(item)">
           {{ item.name }}
         </div>
       </template>
       <template #tags="{ item }">
         <div style="width: 100%">
-          <el-tag
-            style="margin-right: 8px"
-            type="success"
-            v-for="(tag, index) in item.tag"
-            closable
-            :key="index"
-            @close="tagClose(tag, item)"
-          >
+          <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.tag" closable :key="index" @close="tagClose(tag, item)">
             {{ dictValueLabel(tag, customerTag) }}
           </el-tag>
           <template v-if="item.tag.length !== customerTag.length">
@@ -68,36 +45,17 @@
                 (val) => {
                   return changeTag(val, item);
                 }
-              "
-            >
-              <el-option
-                v-for="tag in customerTag"
-                :key="tag.value"
-                :label="tag.label"
-                :value="tag.value"
-                :disabled="judgeTagSelect(item.tag, tag.value)"
-              />
+              ">
+              <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tag, tag.value)" />
             </el-select>
-            <el-tag
-              style="cursor: pointer"
-              type="success"
-              @click="showSelect(item)"
-              v-else
-            >
-              +
-            </el-tag>
+            <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
           </template>
         </div>
       </template>
       <template #follow="{ item }">
         <div :class="'getWidth' + item.id" style="width: 100%">
           <div style="width: 100%; display: flex">
-            <template
-              v-if="
-                item.customerFollowRecordsList &&
-                item.customerFollowRecordsList.length > 0
-              "
-            >
+            <template v-if="item.customerFollowRecordsList && item.customerFollowRecordsList.length > 0">
               <div
                 :style="
                   index > 2
@@ -105,59 +63,35 @@
                     : 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer'
                 "
                 v-for="(record, index) in item.customerFollowRecordsList"
-                :key="record.id"
-              >
-                <el-popover
-                  placement="bottom"
-                  :width="300"
-                  trigger="hover"
-                  @show="recordShow(record)"
-                >
+                :key="record.id">
+                <el-popover placement="bottom" :width="300" trigger="hover" @show="recordShow(record)">
                   <template #reference>
                     <div>
-                      <span v-if="record.date">{{
-                        record.date.substr(0, 10)
-                      }}</span>
-                      <el-icon
-                        style="margin-left: 8px; transform: translateY(2px)"
-                        @click="deleteFollow(record)"
-                        ><DeleteFilled
-                      /></el-icon>
+                      <span v-if="record.date">{{ record.date.substr(0, 10) }}</span>
+                      <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)"><DeleteFilled /></el-icon>
                     </div>
                   </template>
                   <template #default>
                     <div style="width: 100%">
-                      <div style="color: #909399; margin: 8px 0">
-                        跟进时间: {{ record.date }}
-                      </div>
+                      <div style="color: #909399; margin: 8px 0">跟进时间: {{ record.date }}</div>
                       <div style="margin: 8px 0">
                         跟进人:
                         {{ dictValueLabel(record.createUser, userList) }}
                       </div>
                       <div v-if="record.type == '30'">
-                        <div
-                          style="word-wrap: break-word; margin: 8px 0"
-                          v-html="getStyle(record.content)"
-                          v-if="record.content"
-                        ></div>
+                        <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
                         <div v-else>跟进记录:</div>
                       </div>
                       <div v-else>
                         <div style="word-wrap: break-word; margin: 8px 0">
                           <!-- {{ getContent(record) }} -->
-                          <span v-if="record.type === '10'"
-                            >跟进记录:报价单总金额
-                          </span>
-                          <span v-if="record.type === '20'"
-                            >跟进记录:合同总金额
-                          </span>
+                          <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
+                          <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                           <span>{{ moneyFormat(record.amount, 2) }}</span>
                           <span
                             v-if="record.type === '10' && record.code"
                             :class="{ 'code-class': isHave }"
-                            @click="
-                              isHaveOne ? handlePushRoute(record) : () => {}
-                            "
+                            @click="isHaveOne ? handlePushRoute(record) : () => {}"
                             >({{ record.code }})</span
                           >
                           <span
@@ -168,21 +102,11 @@
                           >
                         </div>
                       </div>
-                      <div
-                        style="margin: 8px 0; display: flex"
-                        v-if="record.fileList && record.fileList.length > 0"
-                      >
+                      <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
                         <div style="width: 36px">附件:</div>
                         <div style="width: calc(100% - 36px)">
-                          <div
-                            v-for="(file, index) in record.fileList"
-                            :key="index"
-                          >
-                            <a
-                              style="color: #409eff; cursor: pointer"
-                              @click="openFile(file.fileUrl)"
-                              >{{ file.fileName }}</a
-                            >
+                          <div v-for="(file, index) in record.fileList" :key="index">
+                            <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
                           </div>
                         </div>
                       </div>
@@ -191,17 +115,9 @@
                 </el-popover>
               </div>
               <div
-                style="
-                  line-height: 32px;
-                  margin-right: 8px;
-                  padding: 0 8px;
-                  background-color: #eeeeee;
-                  border-radius: 4px;
-                  cursor: pointer;
-                "
+                style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
                 @click="clickMore(item)"
-                v-if="item.customerFollowRecordsList.length >= 3"
-              >
+                v-if="item.customerFollowRecordsList.length >= 3">
                 更多
               </div>
             </template>
@@ -210,20 +126,8 @@
       </template>
     </byTable>
 
-    <el-dialog
-      :title="modalType == 'add' ? '新增' : '编辑'"
-      v-if="dialogVisible"
-      v-model="dialogVisible"
-      width="800"
-      v-loading="loadingOperation"
-    >
-      <byForm
-        :formConfig="formConfig"
-        :formOption="formOption"
-        v-model="formData.data"
-        :rules="rules"
-        ref="submit"
-      >
+    <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loadingOperation">
+      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
         <template #address>
           <el-row style="width: 100%">
             <el-col :span="8">
@@ -233,13 +137,8 @@
                   placeholder="国家"
                   filterable
                   @change="(val) => getCityData(val, '20', true)"
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                  >
-                  </el-option>
+                  :no-match-text="'无数据,请联系管理员添加'">
+                  <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
@@ -251,28 +150,20 @@
                   addressId="provinceId"
                   addressName="provinceName"
                   v-model="formData.data"
-                  :data="provinceData"
-                >
+                  :data="provinceData">
                 </selectCity>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="cityName">
-                <selectCity
-                  placeholder="城市"
-                  addressId="cityId"
-                  addressName="cityName"
-                  v-model="formData.data"
-                  :data="cityData"
-                ></selectCity>
+                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"></selectCity>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row style="margin-top: 20px; width: 100%">
             <el-col :span="24">
               <el-form-item prop="address">
-                <el-input v-model="formData.data.address" type="textarea">
-                </el-input>
+                <el-input v-model="formData.data.address" type="textarea"> </el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -280,18 +171,11 @@
         <template #person>
           <div style="width: 100%">
             <el-button type="primary" @click="clickAddPerson">添 加</el-button>
-            <el-table
-              :data="formData.data.customerUserList"
-              style="width: 100%; margin-top: 16px"
-            >
+            <el-table :data="formData.data.customerUserList" style="width: 100%; margin-top: 16px">
               <el-table-column label="联系人" width="160">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'customerUserList.' + $index + '.name'"
-                      :rules="rules.name2"
-                      :inline-message="true"
-                    >
+                    <el-form-item :prop="'customerUserList.' + $index + '.name'" :rules="rules.name2" :inline-message="true">
                       <el-input v-model="row.name" placeholder="请输入联系人" />
                     </el-form-item>
                   </div>
@@ -300,35 +184,16 @@
               <el-table-column label="电子邮箱">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'customerUserList.' + $index + '.email'"
-                      :rules="rules.email"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.email"
-                        placeholder="请输入电子邮箱"
-                      />
+                    <el-form-item :prop="'customerUserList.' + $index + '.email'" :rules="rules.email" :inline-message="true">
+                      <el-input v-model="row.email" placeholder="请输入电子邮箱" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                align="center"
-                label="操作"
-                width="120"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="120" fixed="right">
                 <template #default="{ row, $index }">
-                  <el-button
-                    type="primary"
-                    link
-                    @click="clickInformationMore(row, $index)"
-                    >更多</el-button
-                  >
-                  <el-button type="primary" link @click="clickDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="clickInformationMore(row, $index)">更多</el-button>
+                  <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -337,28 +202,12 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm()"
-          size="large"
-          :loading="submitLoading"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="更多联系方式"
-      v-if="openPerson"
-      v-model="openPerson"
-      width="700"
-    >
-      <el-form
-        :label-position="'top'"
-        :model="formPerson.data"
-        :rules="rulesPerson"
-        ref="person"
-      >
+    <el-dialog title="更多联系方式" v-if="openPerson" v-model="openPerson" width="700">
+      <el-form :label-position="'top'" :model="formPerson.data" :rules="rulesPerson" ref="person">
         <el-form-item label="联系人" prop="name">
           <el-input v-model="formPerson.data.name" />
         </el-form-item>
@@ -367,32 +216,14 @@
         </el-form-item>
         <el-form-item label="更多联系方式">
           <div style="width: 100%">
-            <el-button type="primary" @click="clickAddMoreInformation"
-              >添 加</el-button
-            >
-            <el-table
-              :data="formPerson.data.contact"
-              style="width: 100%; margin-top: 16px"
-            >
+            <el-button type="primary" @click="clickAddMoreInformation">添 加</el-button>
+            <el-table :data="formPerson.data.contact" style="width: 100%; margin-top: 16px">
               <el-table-column label="类型" width="180">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'contact.' + $index + '.type'"
-                      :rules="rulesPerson.type"
-                      :inline-message="true"
-                    >
-                      <el-select
-                        v-model="row.type"
-                        placeholder="请选择类型"
-                        style="width: 100%"
-                      >
-                        <el-option
-                          v-for="item in contactType"
-                          :key="item.value"
-                          :label="item.label"
-                          :value="item.value"
-                        />
+                    <el-form-item :prop="'contact.' + $index + '.type'" :rules="rulesPerson.type" :inline-message="true">
+                      <el-select v-model="row.type" placeholder="请选择类型" style="width: 100%">
+                        <el-option v-for="item in contactType" :key="item.value" :label="item.label" :value="item.value" />
                       </el-select>
                     </el-form-item>
                   </div>
@@ -401,32 +232,15 @@
               <el-table-column label="联系号码">
                 <template #default="{ row, $index }">
                   <div style="width: 100%">
-                    <el-form-item
-                      :prop="'contact.' + $index + '.contactNo'"
-                      :rules="rulesPerson.contactNo"
-                      :inline-message="true"
-                    >
-                      <el-input
-                        v-model="row.contactNo"
-                        placeholder="请输入联系号码"
-                      />
+                    <el-form-item :prop="'contact.' + $index + '.contactNo'" :rules="rulesPerson.contactNo" :inline-message="true">
+                      <el-input v-model="row.contactNo" placeholder="请输入联系号码" />
                     </el-form-item>
                   </div>
                 </template>
               </el-table-column>
-              <el-table-column
-                align="center"
-                label="操作"
-                width="120"
-                fixed="right"
-              >
+              <el-table-column align="center" label="操作" width="120" fixed="right">
                 <template #default="{ $index }">
-                  <el-button
-                    type="primary"
-                    link
-                    @click="clickInformationDelete($index)"
-                    >删除</el-button
-                  >
+                  <el-button type="primary" link @click="clickInformationDelete($index)">删除</el-button>
                 </template>
               </el-table-column>
             </el-table>
@@ -435,26 +249,12 @@
       </el-form>
       <template #footer>
         <el-button @click="openPerson = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitPerson()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitPerson()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="添加跟进记录"
-      v-if="openFollow"
-      v-model="openFollow"
-      width="500"
-      destroy-on-close
-    >
-      <byForm
-        :formConfig="formConfigAFollow"
-        :formOption="formOption"
-        v-model="formFollow.data"
-        :rules="rulesFollow"
-        ref="follow"
-      >
+    <el-dialog title="添加跟进记录" v-if="openFollow" v-model="openFollow" width="500" destroy-on-close>
+      <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
         <template #fileSlot>
           <div style="width: 100%">
             <el-upload
@@ -463,8 +263,7 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile"
-            >
+              :on-preview="onPreviewFile">
               <el-button type="primary">文件上传</el-button>
             </el-upload>
           </div>
@@ -472,73 +271,35 @@
       </byForm>
       <template #footer>
         <el-button @click="openFollow = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitFollow()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitFollow()" size="large">确 定</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="跟进记录"
-      v-if="openRecordMore"
-      v-model="openRecordMore"
-      width="800"
-      destroy-on-close
-    >
+    <el-dialog title="跟进记录" v-if="openRecordMore" v-model="openRecordMore" width="800" destroy-on-close>
       <div>
         <div style="padding: 8px 0">
-          <el-button type="primary" @click="clickFollowUp(rowData)" plain
-            >添加跟进记录</el-button
-          >
+          <el-button type="primary" @click="clickFollowUp(rowData)" plain>添加跟进记录</el-button>
         </div>
         <div style="padding-top: 16px">
-          <div
-            v-infinite-scroll="infiniteScroll"
-            class="infinite-scroll"
-            :infinite-scroll-disabled="judgeTotal()"
-          >
+          <div v-infinite-scroll="infiniteScroll" class="infinite-scroll" :infinite-scroll-disabled="judgeTotal()">
             <el-timeline>
-              <el-timeline-item
-                v-for="(record, index) in recordList"
-                :key="index"
-                :timestamp="record.date"
-                hide-timestamp
-              >
+              <el-timeline-item v-for="(record, index) in recordList" :key="index" :timestamp="record.date" hide-timestamp>
                 <div>
-                  <div
-                    style="
-                      padding: 0 0 8px 0;
-                      display: flex;
-                      justify-content: space-between;
-                    "
-                  >
-                    <span>{{
-                      dictValueLabel(record.createUser, userList)
-                    }}</span>
+                  <div style="padding: 0 0 8px 0; display: flex; justify-content: space-between">
+                    <span>{{ dictValueLabel(record.createUser, userList) }}</span>
                     <span>{{ record.date }}</span>
                   </div>
                   <div v-if="record.type == '30'">
-                    <div
-                      style="word-wrap: break-word; margin: 8px 0"
-                      v-html="getStyle(record.content)"
-                      v-if="record.content"
-                    ></div>
+                    <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
                     <div v-else>跟进记录:</div>
                   </div>
                   <div v-else>
                     <div style="word-wrap: break-word; margin: 8px 0">
                       <!-- {{ getContent(record) }} -->
-                      <span v-if="record.type === '10'"
-                        >跟进记录:报价单总金额
-                      </span>
-                      <span v-if="record.type === '20'"
-                        >跟进记录:合同总金额
-                      </span>
+                      <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
+                      <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
                       <span>{{ moneyFormat(record.amount, 2) }}</span>
-                      <span
-                        v-if="record.type === '10' && record.code"
-                        :class="{ 'code-class': isHave }"
-                        @click="isHaveOne ? handlePushRoute(record) : () => {}"
+                      <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }" @click="isHaveOne ? handlePushRoute(record) : () => {}"
                         >({{ record.code }})</span
                       >
                       <span
@@ -549,21 +310,11 @@
                       >
                     </div>
                   </div>
-                  <div
-                    style="margin: 8px 0; display: flex"
-                    v-if="record.fileList && record.fileList.length > 0"
-                  >
+                  <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
                     <div style="width: 36px">附件:</div>
                     <div style="width: calc(100% - 36px)">
-                      <div
-                        v-for="(file, index) in record.fileList"
-                        :key="index"
-                      >
-                        <a
-                          style="color: #409eff; cursor: pointer"
-                          @click="openFile(file.fileUrl)"
-                          >{{ file.fileName }}</a
-                        >
+                      <div v-for="(file, index) in record.fileList" :key="index">
+                        <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
                       </div>
                     </div>
                   </div>
@@ -574,24 +325,12 @@
         </div>
       </div>
       <template #footer>
-        <el-button @click="openRecordMore = false" size="large"
-          >关 闭</el-button
-        >
+        <el-button @click="openRecordMore = false" size="large">关 闭</el-button>
       </template>
     </el-dialog>
 
-    <el-dialog
-      title="高级检索"
-      v-if="openSearch"
-      v-model="openSearch"
-      width="600"
-      :before-close="cancelSearch"
-    >
-      <byForm
-        :formConfig="formSearchConfig"
-        :formOption="formOption"
-        v-model="sourceList.pagination"
-      >
+    <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
+      <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
         <template #address>
           <el-row style="width: 100%">
             <el-col :span="8">
@@ -601,14 +340,8 @@
                   placeholder="国家"
                   clearable
                   filterable
-                  @change="(val) => getCitySearchData(val, '20', true)"
-                >
-                  <el-option
-                    v-for="item in countrySearchData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                  >
-                  </el-option>
+                  @change="(val) => getCitySearchData(val, '20', true)">
+                  <el-option v-for="item in countrySearchData" :label="item.chineseName" :value="item.id"> </el-option>
                 </el-select>
               </el-form-item>
             </el-col>
@@ -620,72 +353,39 @@
                   addressId="provinceId"
                   addressName="provinceName"
                   v-model="sourceList.pagination"
-                  :data="provinceSearchData"
-                >
+                  :data="provinceSearchData">
                 </selectCity>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item prop="cityName">
-                <selectCity
-                  placeholder="城市"
-                  addressId="cityId"
-                  addressName="cityName"
-                  v-model="sourceList.pagination"
-                  :data="citySearchData"
-                ></selectCity>
+                <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData"></selectCity>
               </el-form-item>
             </el-col>
           </el-row>
         </template>
         <template #tags>
           <div style="width: 100%">
-            <el-tag
-              style="margin-right: 8px"
-              type="info"
-              v-for="(tag, index) in sourceList.pagination.tags"
-              closable
-              :key="index"
-              @close="tagSearchClose(tag)"
-            >
+            <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index" @close="tagSearchClose(tag)">
               {{ dictValueLabel(tag, customerTag) }}
             </el-tag>
-            <template
-              v-if="sourceList.pagination.tags.length !== customerTag.length"
-            >
-              <el-select
-                v-if="addTagSearchShow"
-                v-model="addSearchTag"
-                style="margin-top: 8px"
-                @change="changeSearchTag"
-              >
+            <template v-if="sourceList.pagination.tags.length !== customerTag.length">
+              <el-select v-if="addTagSearchShow" v-model="addSearchTag" style="margin-top: 8px" @change="changeSearchTag">
                 <el-option
                   v-for="tag in customerTag"
                   :key="tag.value"
                   :label="tag.label"
                   :value="tag.value"
-                  :disabled="
-                    judgeTagSelect(sourceList.pagination.tags, tag.value)
-                  "
-                />
+                  :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
               </el-select>
-              <el-tag
-                style="cursor: pointer"
-                type="info"
-                @click="addTagSearchShow = true"
-                v-else
-              >
-                +
-              </el-tag>
+              <el-tag style="cursor: pointer" type="info" @click="addTagSearchShow = true" v-else> + </el-tag>
             </template>
           </div>
         </template>
       </byForm>
       <template #footer>
         <el-button @click="cancelSearch()" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitSearch()" size="large"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
       </template>
     </el-dialog>
   </div>
@@ -1137,10 +837,7 @@ const getCityData = (id, type, isChange) => {
 };
 getCityData("0");
 const clickAddPerson = () => {
-  if (
-    formData.data.customerUserList &&
-    formData.data.customerUserList.length > 0
-  ) {
+  if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
     formData.data.customerUserList.push({
       name: "",
       email: "",
@@ -1167,29 +864,24 @@ const submitFollow = () => {
     } else {
       formFollow.data.fileList = [];
     }
-    proxy
-      .post("/customerFollowRecords/" + modalType.value, formFollow.data)
-      .then(
-        () => {
-          ElMessage({
-            message: modalType.value == "add" ? "添加成功" : "编辑成功",
-            type: "success",
-          });
-          openFollow.value = false;
-          getList();
-        },
-        (err) => {
-          console.log(err);
-        }
-      );
+    proxy.post("/customerFollowRecords/" + modalType.value, formFollow.data).then(
+      () => {
+        ElMessage({
+          message: modalType.value == "add" ? "添加成功" : "编辑成功",
+          type: "success",
+        });
+        openFollow.value = false;
+        getList();
+      },
+      (err) => {
+        console.log(err);
+      }
+    );
   });
 };
 const submitForm = () => {
   submit.value.handleSubmit(() => {
-    if (
-      formData.data.customerUserList &&
-      formData.data.customerUserList.length > 0
-    ) {
+    if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
       formData.data.tag = formData.data.tags.join(",");
       submitLoading.value = true;
       proxy.post("/customer/" + modalType.value, formData.data).then(
@@ -1214,31 +906,24 @@ const submitForm = () => {
   });
 };
 const getDict = () => {
-  proxy
-    .getDictOne([
-      "customer_tag",
-      "customer_source",
-      "customer_status",
-      "contact_type",
-    ])
-    .then((res) => {
-      customerTag.value = res["customer_tag"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      customerSource.value = res["customer_source"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      customerStatus.value = res["customer_status"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-      contactType.value = res["contact_type"].map((x) => ({
-        label: x.dictValue,
-        value: x.dictKey,
-      }));
-    });
+  proxy.getDictOne(["customer_tag", "customer_source", "customer_status", "contact_type"]).then((res) => {
+    customerTag.value = res["customer_tag"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    customerSource.value = res["customer_source"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    customerStatus.value = res["customer_status"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    contactType.value = res["contact_type"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
   proxy
     .get("/tenantUser/list", {
       pageNum: 1,
@@ -1365,24 +1050,14 @@ const getContent = (item) => {
   if (item.type === "10") {
     return "跟进记录: " + "报价单总金额 " + proxy.moneyFormat(item.amount, 2);
   } else if (item.type === "20") {
-    return (
-      "跟进记录: " +
-      "合同总金额 " +
-      proxy.moneyFormat(item.amount, 2) +
-      ` (${item.contractCode}) `
-    );
+    return "跟进记录: " + "合同总金额 " + proxy.moneyFormat(item.amount, 2) + ` (${item.contractCode}) `;
   }
 };
 const recordShow = (item) => {
-  if (
-    !(item.fileList && item.fileList.length > 0) &&
-    JSON.stringify(item.fileList) !== "[]"
-  ) {
-    proxy
-      .post("/fileInfo/getList", { businessIdList: [item.id] })
-      .then((fileObj) => {
-        item.fileList = fileObj[item.id] || [];
-      });
+  if (!(item.fileList && item.fileList.length > 0) && JSON.stringify(item.fileList) !== "[]") {
+    proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((fileObj) => {
+      item.fileList = fileObj[item.id] || [];
+    });
   }
 };
 const openFile = (path) => {
@@ -1413,19 +1088,8 @@ const clickMore = (item) => {
       })
       .then((fileObj) => {
         for (let i = 0; i < res.rows.length; i++) {
-          recordList.value[
-            parseInt(
-              i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize
-            )
-          ].fileList =
-            fileObj[
-              recordList.value[
-                parseInt(
-                  i +
-                    (queryParams.value.pageNum - 1) * queryParams.value.pageSize
-                )
-              ].id
-            ] || [];
+          recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].fileList =
+            fileObj[recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].id] || [];
         }
       });
   });
@@ -1436,10 +1100,7 @@ const infiniteScroll = () => {
   clickMore();
 };
 const judgeTotal = () => {
-  if (
-    queryParams.value.pageNum * queryParams.value.pageSize >=
-    queryParams.value.total
-  ) {
+  if (queryParams.value.pageNum * queryParams.value.pageSize >= queryParams.value.total) {
     return true;
   }
   return false;
@@ -1501,19 +1162,14 @@ const statisticalData = ref({
   customerList: [],
 });
 const obtainStatisticalData = () => {
-  proxy
-    .post("/customer/sourceStatistics", sourceList.value.paginationTwo)
-    .then((res) => {
-      statisticalData.value = res;
-    });
+  proxy.post("/customer/sourceStatistics", sourceList.value.paginationTwo).then((res) => {
+    statisticalData.value = res;
+  });
 };
 obtainStatisticalData();
 const getNum = (val) => {
   let num = 0;
-  if (
-    statisticalData.value.customerList &&
-    statisticalData.value.customerList.length > 0
-  ) {
+  if (statisticalData.value.customerList && statisticalData.value.customerList.length > 0) {
     statisticalData.value.customerList.map((item) => {
       if (sourceList.value.paginationTwo.statisticsType === 1) {
         if (item.source === val) {
@@ -1605,8 +1261,7 @@ const addTagSearchShow = ref(false);
 let copySearch = ref({});
 const moreSearch = () => {
   if (sourceList.value.pagination.tag) {
-    sourceList.value.pagination.tags =
-      sourceList.value.pagination.tag.split(",");
+    sourceList.value.pagination.tags = sourceList.value.pagination.tag.split(",");
   } else {
     sourceList.value.pagination.tags = [];
   }
@@ -1619,12 +1274,8 @@ const cancelSearch = () => {
   openSearch.value = false;
 };
 const submitSearch = () => {
-  if (
-    sourceList.value.pagination.tags &&
-    sourceList.value.pagination.tags.length > 0
-  ) {
-    sourceList.value.pagination.tag =
-      sourceList.value.pagination.tags.join(",");
+  if (sourceList.value.pagination.tags && sourceList.value.pagination.tags.length > 0) {
+    sourceList.value.pagination.tag = sourceList.value.pagination.tags.join(",");
   } else {
     sourceList.value.pagination.tag = "";
   }
@@ -1634,9 +1285,7 @@ const submitSearch = () => {
   getList();
 };
 const tagSearchClose = (val) => {
-  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter(
-    (item) => item !== val
-  );
+  sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter((item) => item !== val);
 };
 const changeSearchTag = (val) => {
   sourceList.value.pagination.tags.push(val);
@@ -1645,18 +1294,12 @@ const changeSearchTag = (val) => {
 };
 // 判断当前用户有无销售合同页面权限
 const isHave = ref(false);
-if (
-  useUserStore().permissions &&
-  useUserStore().permissions.includes("contract")
-) {
+if (useUserStore().permissions && useUserStore().permissions.includes("contract")) {
   isHave.value = true;
 }
 // 判断当前用户有无报价单页面权限
 const isHaveOne = ref(false);
-if (
-  useUserStore().permissions &&
-  useUserStore().permissions.includes("priceSheet")
-) {
+if (useUserStore().permissions && useUserStore().permissions.includes("priceSheet")) {
   isHaveOne.value = true;
 }
 

文件差異過大導致無法顯示
+ 144 - 502
src/views/customer/privatesea/index.vue


部分文件因文件數量過多而無法顯示