Browse Source

客户分析增加loading

cz 2 years ago
parent
commit
03f30a3962

+ 15 - 0
src/views/WDLY/basic/supplier/index.vue

@@ -528,6 +528,21 @@ const submitForm = () => {
         id: x.id,
         fileName: x.fileName,
       })) || [];
+    // if (JSON.parse(formData.data.victoriatouristJson).accountPeriod == "") {
+    //   return ElMessage({
+    //     message: "请输入账期!",
+    //     type: "info",
+    //   });
+    // }
+    // if (JSON.parse(formData.data.victoriatouristJson).returnPeriod == "") {
+    //   return ElMessage({
+    //     message: "请输入退换货期限!",
+    //     type: "info",
+    //   });
+    // }
+    // formData.data.victoriatouristJson = JSON.stringify(
+    //   formData.data.victoriatouristJson
+    // );
     submitLoading.value = true;
     proxy.post("/supplierInfo/" + modalType.value, formData.data).then(
       (res) => {

+ 3 - 3
src/views/connect/E-mail/mail/com/right/contract/pi.vue

@@ -81,7 +81,7 @@ const sourceList = ref({
     pageSize: 10,
   },
 });
-const statusData = [
+const statusData = ref([
   {
     label: "草稿",
     value: 0,
@@ -102,10 +102,10 @@ const statusData = [
     label: "终止",
     value: 99,
   },
-];
+]);
 const { proxy } = getCurrentInstance();
 const getStatus = (row) => {
-  const current = statusData.find((x) => x.value == row.status);
+  const current = statusData.value.find((x) => x.value == row.status);
   if (current) return current.label;
 };
 

+ 2 - 0
src/views/connect/E-mail/mail/com/right/contract/quotation.vue

@@ -14,6 +14,8 @@
       ></el-input>
       <el-select
         v-model="sourceList.pagination.status"
+        clearable
+        filterable
         style="width: 40%; margin-left: 10px"
         size="small"
       >

+ 33 - 2
src/views/connect/E-mail/mail/com/right/purchase/index.vue

@@ -10,7 +10,7 @@
         size="small"
       ></el-input>
       <el-select
-        v-model="sourceList.pagination.status"
+        v-model="sourceList.pagination.purchaseStatus"
         clearable
         filterable
         style="width: 40%; margin-left: 10px"
@@ -41,7 +41,12 @@
           <div>{{ moneyFormat(row.amount, 2) }}</div>
         </template>
       </el-table-column>
-      <el-table-column prop="purchaseStatus" label="状态" width="100" />
+      <el-table-column
+        prop="purchaseStatus"
+        label="状态"
+        width="100"
+        :formatter="getStatus"
+      />
       <el-table-column label="操作" width="60" fixed="right" align="center">
         <template #default="{ row }">
           <el-button type="primary" text
@@ -74,7 +79,33 @@ const sourceList = ref({
     pageSize: 10,
   },
 });
+const statusData = ref([
+  {
+    label: "审批中",
+    value: "10",
+  },
+  {
+    label: "驳回",
+    value: "20",
+  },
+  {
+    label: "已采购",
+    value: "30",
+  },
+  {
+    label: "终止",
+    value: "99",
+  },
+  {
+    label: "已作废",
+    value: "88",
+  },
+]);
 const { proxy } = getCurrentInstance();
+const getStatus = (row) => {
+  const current = statusData.value.find((x) => x.value == row.purchaseStatus);
+  if (current) return current.label;
+};
 const getData = () => {
   loading.value = true;
   proxy.post("/purchase/page", sourceList.value.pagination).then((res) => {

+ 1 - 1
src/views/connect/E-mail/mail/index.vue

@@ -80,7 +80,7 @@ const handleClose = (icon) => {
   // border-radius: 5px;
   border-top-left-radius: 5px;
   border-bottom-left-radius: 5px;
-  z-index: 9999;
+  z-index: 2000;
   position: fixed;
   margin-top: 100px;
   top: 0;

+ 17 - 3
src/views/customer/analysis/index.vue

@@ -34,7 +34,7 @@
         </el-form-item>
       </el-form>
     </div>
-    <div class="one bck">
+    <div class="one bck" v-loading="loading">
       <TitleInfo :content="titleList[0]"></TitleInfo>
       <div class="statistics">
         <div class="item">
@@ -97,7 +97,7 @@
         </div>
       </div>
     </div>
-    <div class="two bck">
+    <div class="two bck" v-loading="loadingOne">
       <TitleInfo :content="titleList[1]"></TitleInfo>
       <div class="statistics">
         <div class="item">
@@ -157,7 +157,7 @@
         </div>
       </div>
     </div>
-    <div class="three bck">
+    <div class="three bck" v-loading="loadingTwo">
       <TitleInfo :content="titleList[2]"></TitleInfo>
       <div ref="echartDom" style="min-height: 400px"></div>
     </div>
@@ -171,6 +171,8 @@ import TitleInfo from "@/components/TitleInfo/index.vue";
 const titleList = ["客户来源统计", "类型统计", "趋势分析"];
 const { proxy } = getCurrentInstance();
 const loading = ref(false);
+const loadingOne = ref(false);
+const loadingTwo = ref(false);
 const queryForm = reactive({
   countryId: "",
   beginTime: "",
@@ -310,11 +312,20 @@ const option = reactive({
   },
 });
 const getData = () => {
+  loading.value = true;
+  loadingOne.value = true;
+  loadingTwo.value = true;
   proxy.post("/saleQuotation/sourceStatistics", queryForm).then((res) => {
     allData.sourceData = res;
+    setTimeout(() => {
+      loading.value = false;
+    }, 200);
   });
   proxy.post("/saleQuotation/typeStatistics", queryForm).then((res) => {
     allData.typeData = res;
+    setTimeout(() => {
+      loadingOne.value = false;
+    }, 200);
   });
   proxy.post("/saleQuotation/trendAnalysis", queryForm).then((res) => {
     let listOne = res.contractStatisticsList.map((x) => x.count);
@@ -328,6 +339,9 @@ const getData = () => {
     option.data.series[2].data = listOne;
     option.data.series[3].data = listThree;
     myChart.setOption(option.data);
+    setTimeout(() => {
+      loadingTwo.value = false;
+    }, 200);
   });
 };
 const onQuery = () => {