Browse Source

客户档案、公海、私海页面功能优化

lxf 1 year ago
parent
commit
b781dbf83d

+ 28 - 5
src/views/customer/file/index.vue

@@ -163,8 +163,13 @@
                     <div style="width: 100%">
                       <div style="color: #909399; margin: 8px 0">跟进时间: {{ record.date }}</div>
                       <div style="margin: 8px 0">跟进人: {{ dictValueLabel(record.createUser, userList) }}</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 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 v-else>跟进记录:</div>
+                      </div>
+                      <div v-else>
+                        <div style="word-wrap: break-word; margin: 8px 0">{{ getContent(record) }}</div>
+                      </div>
                       <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)">
@@ -355,8 +360,13 @@
                     <span>{{ dictValueLabel(record.createUser, userList) }}</span>
                     <span>{{ record.date }}</span>
                   </div>
-                  <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
-                  <div style="margin: 8px 0" v-else>跟进记录:</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 v-else>跟进记录:</div>
+                  </div>
+                  <div v-else>
+                    <div style="word-wrap: break-word; margin: 8px 0">{{ getContent(record) }}</div>
+                  </div>
                   <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)">
@@ -882,6 +892,12 @@ const openModal = () => {
   formData.data = {
     countryId: "44",
     tags: [],
+    customerUserList: [
+      {
+        name: "",
+        email: "",
+      },
+    ],
   };
   getCityData(formData.data.countryId, "20");
   loadingOperation.value = false;
@@ -1110,8 +1126,15 @@ const getStyle = (val) => {
     return "";
   }
 };
+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}) `;
+  }
+};
 const recordShow = (item) => {
-  if (!(item.fileList && item.fileList.length > 0)) {
+  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] || [];
     });

+ 28 - 9
src/views/customer/highseas/index.vue

@@ -163,8 +163,13 @@
                     <div style="width: 100%">
                       <div style="color: #909399; margin: 8px 0">跟进时间: {{ record.date }}</div>
                       <div style="margin: 8px 0">跟进人: {{ dictValueLabel(record.createUser, userList) }}</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 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 v-else>跟进记录:</div>
+                      </div>
+                      <div v-else>
+                        <div style="word-wrap: break-word; margin: 8px 0">{{ getContent(record) }}</div>
+                      </div>
                       <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)">
@@ -347,8 +352,13 @@
                     <span>{{ dictValueLabel(record.createUser, userList) }}</span>
                     <span>{{ record.date }}</span>
                   </div>
-                  <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
-                  <div style="margin: 8px 0" v-else>跟进记录:</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 v-else>跟进记录:</div>
+                  </div>
+                  <div v-else>
+                    <div style="word-wrap: break-word; margin: 8px 0">{{ getContent(record) }}</div>
+                  </div>
                   <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)">
@@ -459,10 +469,6 @@ const statisticsType = ref([
     label: "客户类型统计",
     value: 2,
   },
-  {
-    label: "业务员统计",
-    value: 3,
-  },
 ]);
 const sourceList = ref({
   data: [],
@@ -793,6 +799,12 @@ const openModal = () => {
   formData.data = {
     countryId: "44",
     tags: [],
+    customerUserList: [
+      {
+        name: "",
+        email: "",
+      },
+    ],
   };
   getCityData(formData.data.countryId, "20");
   loadingOperation.value = false;
@@ -1033,8 +1045,15 @@ const getStyle = (val) => {
     return "";
   }
 };
+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}) `;
+  }
+};
 const recordShow = (item) => {
-  if (!(item.fileList && item.fileList.length > 0)) {
+  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] || [];
     });

+ 28 - 9
src/views/customer/privatesea/index.vue

@@ -163,8 +163,13 @@
                     <div style="width: 100%">
                       <div style="color: #909399; margin: 8px 0">跟进时间: {{ record.date }}</div>
                       <div style="margin: 8px 0">跟进人: {{ dictValueLabel(record.createUser, userList) }}</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 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 v-else>跟进记录:</div>
+                      </div>
+                      <div v-else>
+                        <div style="word-wrap: break-word; margin: 8px 0">{{ getContent(record) }}</div>
+                      </div>
                       <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)">
@@ -347,8 +352,13 @@
                     <span>{{ dictValueLabel(record.createUser, userList) }}</span>
                     <span>{{ record.date }}</span>
                   </div>
-                  <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
-                  <div style="margin: 8px 0" v-else>跟进记录:</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 v-else>跟进记录:</div>
+                  </div>
+                  <div v-else>
+                    <div style="word-wrap: break-word; margin: 8px 0">{{ getContent(record) }}</div>
+                  </div>
                   <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)">
@@ -460,10 +470,6 @@ const statisticsType = ref([
     label: "客户类型统计",
     value: 2,
   },
-  {
-    label: "业务员统计",
-    value: 3,
-  },
 ]);
 const sourceList = ref({
   data: [],
@@ -794,6 +800,12 @@ const openModal = () => {
     countryId: "44",
     userId: useUserStore().user.userId,
     tags: [],
+    customerUserList: [
+      {
+        name: "",
+        email: "",
+      },
+    ],
   };
   getCityData(formData.data.countryId, "20");
   loadingOperation.value = false;
@@ -1034,8 +1046,15 @@ const getStyle = (val) => {
     return "";
   }
 };
+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}) `;
+  }
+};
 const recordShow = (item) => {
-  if (!(item.fileList && item.fileList.length > 0)) {
+  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] || [];
     });