cz 1 anno fa
parent
commit
86db6cd235

+ 17 - 3
src/components/process/EHSD/AfterSales.vue

@@ -78,6 +78,10 @@ const userList = ref([]);
 const afterSalesType = computed(
   () => proxy.useUserStore().allDict["after_sales_type"]
 );
+const afterSalesReason = computed(
+  () => proxy.useUserStore().allDict["after_sales_reason"]
+);
+
 const openMaterial = ref(false);
 const formData = reactive({
   data: {
@@ -123,14 +127,24 @@ const formConfig = computed(() => {
       data: afterSalesType.value,
       disabled: false,
     },
+    // {
+    //   type: "input",
+    //   itemType: "text",
+    //   prop: "reason",
+    //   label: "售后原因",
+    //   disabled: false,
+    //   itemWidth: 50,
+    // },
     {
-      type: "input",
-      itemType: "text",
+      type: "select",
       prop: "reason",
       label: "售后原因",
-      disabled: false,
+      required: true,
       itemWidth: 50,
+      data: afterSalesReason.value,
+      disabled: false,
     },
+
     {
       type: "input",
       itemType: "textarea",

+ 28 - 20
src/components/process/EHSD/Purchase.vue

@@ -1628,32 +1628,40 @@ onMounted(() => {
           contractShipmentList.value &&
           contractShipmentList.value.length > 0
         ) {
-          formData.data.purchaseArrivalList = res.rows.map((item) => {
-            let current = contractShipmentList.value.find(
+          for (let i = 0; i < res.rows.length; i++) {
+            const item = res.rows[i];
+            let arr = contractShipmentList.value.filter(
               (x) => x.productId == item.productId
             );
-            return {
-              productCode: item.productCode,
-              productId: item.productId,
-              productName: item.productName,
-              arrivalTime: current ? current.shipmentTime : "",
-              quantity: current ? current.quantity : "",
-            };
-          });
+            formData.data.purchaseArrivalList = [
+              ...formData.data.purchaseArrivalList,
+              ...arr.map((x) => ({
+                productCode: item.productCode,
+                productId: item.productId,
+                productName: item.productName,
+                arrivalTime: x ? x.shipmentTime : "",
+                quantity: x ? x.quantity : "",
+              })),
+            ];
+          }
         } else {
           setTimeout(() => {
-            formData.data.purchaseArrivalList = res.rows.map((item) => {
-              let current = contractShipmentList.value.find(
+            for (let i = 0; i < res.rows.length; i++) {
+              const item = res.rows[i];
+              let arr = contractShipmentList.value.filter(
                 (x) => x.productId == item.productId
               );
-              return {
-                productCode: item.productCode,
-                productId: item.productId,
-                productName: item.productName,
-                arrivalTime: current ? current.shipmentTime : "",
-                quantity: current ? current.quantity : "",
-              };
-            });
+              formData.data.purchaseArrivalList = [
+                ...formData.data.purchaseArrivalList,
+                ...arr.map((x) => ({
+                  productCode: item.productCode,
+                  productId: item.productId,
+                  productName: item.productName,
+                  arrivalTime: x ? x.shipmentTime : "",
+                  quantity: x ? x.quantity : "",
+                })),
+              ];
+            }
           }, 1500);
         }
         let fileIds = formData.data.purchaseProductList.map(

+ 26 - 2
src/views/EHSD/procurement/profitBudgetEHSD/index.vue

@@ -85,7 +85,8 @@
                                     <Bottom />
                                   </el-icon>
                                 </span>
-                                {{scope.row.contractCurrency}} {{ moneyFormat(scope.row.contractAmount ,2)}}
+                                {{scope.row.contractCurrency}} <span @click="handlePushRoute(scope.row,1)"
+                                      style="cursor:pointer;color:#409eff">{{ moneyFormat(scope.row.contractAmount ,2)}}</span>
                               </div>
                             </template>
                           </el-table-column>
@@ -101,7 +102,8 @@
                                     <Bottom />
                                   </el-icon>
                                 </span>
-                                CNY {{ moneyFormat(scope.row.purchaseAmount ,2)}}
+                                CNY <span @click="handlePushRoute(scope.row,2)"
+                                      style="cursor:pointer;color:#409eff">{{ moneyFormat(scope.row.purchaseAmount ,2)}}</span>
                               </div>
                             </template>
                           </el-table-column>
@@ -1118,6 +1120,28 @@ const getColor = (data, sonRow, att) => {
     return false;
   }
 };
+
+const handlePushRoute = (row, type) => {
+  if (type == 1) {
+    proxy.$router.push({
+      name: "contractDetails",
+      query: {
+        currentContractId: row.contractId,
+      },
+    });
+  } else {
+    proxy.$router.push({
+      path: "/platform_manage/process/processApproval",
+      query: {
+        flowKey: "ehsd_purchase_flow",
+        // id: row.flowId,
+        processType: 20,
+        businessId: row.purchaseId,
+        submitType: 10,
+      },
+    });
+  }
+};
 </script>
 
 <style lang="scss" scoped>

+ 2 - 0
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -1160,6 +1160,8 @@ const pushRoute = (row) => {
     name: "Packing",
     query: {
       contractId: row.id,
+      customerId: row.buyCorporationId,
+      random: proxy.random(),
     },
   });
 };

+ 12 - 11
src/views/customer/file/index.vue

@@ -577,19 +577,20 @@ const config = computed(() => {
         width: 150,
       },
       render(type) {
-        let arr = type.split(",");
-        if (arr && arr.length > 0) {
-          let str = "";
-          for (let i = 0; i < arr.length; i++) {
-            const val = arr[i];
-            str =
-              str +
-              proxy.dictValueLabel(val, customerSource.value) +
-              (i < arr.length - 1 ? " , " : "");
+        if (type) {
+          let arr = type.split(",");
+          if (arr && arr.length > 0) {
+            let str = "";
+            for (let i = 0; i < arr.length; i++) {
+              const val = arr[i];
+              str =
+                str +
+                proxy.dictValueLabel(val, customerSource.value) +
+                (i < arr.length - 1 ? " , " : "");
+            }
+            return str;
           }
-          return str;
         }
-        // return proxy.dictValueLabel(type, customerSource.value);
       },
     },
     {

+ 12 - 11
src/views/customer/highseas/index.vue

@@ -521,19 +521,20 @@ const config = computed(() => {
         width: 150,
       },
       render(type) {
-        let arr = type.split(",");
-        if (arr && arr.length > 0) {
-          let str = "";
-          for (let i = 0; i < arr.length; i++) {
-            const val = arr[i];
-            str =
-              str +
-              proxy.dictValueLabel(val, customerSource.value) +
-              (i < arr.length - 1 ? " , " : "");
+        if (type) {
+          let arr = type.split(",");
+          if (arr && arr.length > 0) {
+            let str = "";
+            for (let i = 0; i < arr.length; i++) {
+              const val = arr[i];
+              str =
+                str +
+                proxy.dictValueLabel(val, customerSource.value) +
+                (i < arr.length - 1 ? " , " : "");
+            }
+            return str;
           }
-          return str;
         }
-        // return proxy.dictValueLabel(type, customerSource.value);
       },
     },
     {

+ 12 - 11
src/views/customer/privatesea/index.vue

@@ -521,19 +521,20 @@ const config = computed(() => {
         width: 150,
       },
       render(type) {
-        let arr = type.split(",");
-        if (arr && arr.length > 0) {
-          let str = "";
-          for (let i = 0; i < arr.length; i++) {
-            const val = arr[i];
-            str =
-              str +
-              proxy.dictValueLabel(val, customerSource.value) +
-              (i < arr.length - 1 ? " , " : "");
+        if (type) {
+          let arr = type.split(",");
+          if (arr && arr.length > 0) {
+            let str = "";
+            for (let i = 0; i < arr.length; i++) {
+              const val = arr[i];
+              str =
+                str +
+                proxy.dictValueLabel(val, customerSource.value) +
+                (i < arr.length - 1 ? " , " : "");
+            }
+            return str;
           }
-          return str;
         }
-        // return proxy.dictValueLabel(type, customerSource.value);
       },
     },
     {

+ 4 - 0
src/views/process/processApproval/index.vue

@@ -741,6 +741,10 @@ const optionTwo = reactive({
         ${params[0].axisValue}
         <br/> 
         ${params[0].seriesName}:${params[0].data} 
+           <br/> 毛利率:${chartData.value[params[0].dataIndex].grossRate}%
+        <br/> 对比上一版本利润:${
+          chartData.value[params[0].dataIndex].contractCurrency
+        } ${chartData.value[params[0].dataIndex].compareLastGross}    
         <br/> 销售合同金额:${
           chartData.value[params[0].dataIndex].contractCurrency
         } ${chartData.value[params[0].dataIndex].contractAmount}

+ 8 - 1
src/views/salesMange/afterSales/index.vue

@@ -225,6 +225,10 @@ const userList = ref([]);
 const afterSalesType = computed(
   () => proxy.useUserStore().allDict["after_sales_type"]
 );
+const afterSalesReason = computed(
+  () => proxy.useUserStore().allDict["after_sales_reason"]
+);
+
 const statusData = ref([
   {
     label: "草稿",
@@ -307,7 +311,10 @@ const config = computed(() => {
       attrs: {
         label: "售后原因",
         prop: "reason",
-        width: 150,
+        width: 80,
+      },
+      render(val) {
+        return proxy.dictKeyValue(val, afterSalesReason.value);
       },
     },
     {

+ 2 - 1
src/views/salesMange/shipmentMange/packing/index.vue

@@ -557,6 +557,7 @@
 import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
+import { onActivated, onMounted } from "vue";
 const route = useRoute();
 const loading = ref(false);
 const loadingOne = ref(false);
@@ -873,7 +874,7 @@ const openModal = (flag = false) => {
     contractIds: [],
   };
   dialogVisible.value = true;
-  handleChangeCustomer("", flag);
+  handleChangeCustomer(flag ? route.query.customerId : "", flag);
 };
 const openModalOne = () => {
   formData.dataOne = {

+ 11 - 6
src/views/xiaoman/index.vue

@@ -3,16 +3,16 @@
     <div class="content">
       <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" :selectConfig="selectConfig"
                highlight-current-row :action-list="[
-           
+               {
+            text: '全量同步',
+            action: () => initAllList(),
+          },
              {
             text: '更新近8小时内数据',
             action: () => updateList(),
           },
         ]" @get-list="getList">
-        <!-- {
-            text: '全量同步',
-            action: () => initAllList(),
-          }, -->
+
       </byTable>
     </div>
   </div>
@@ -208,7 +208,12 @@ const getLabel = (key, list, label) => {
 };
 
 const initAllList = () => {
-  proxy.post("/xiaomanCustomer/initAllList").then((res) => {});
+  proxy.msgTip("同步中", 2);
+  proxy.post("/xiaomanCustomer/initAllList").then((res) => {
+    setTimeout(() => {
+      proxy.msgTip("同步成功", 1);
+    }, 300);
+  });
 };
 const updateList = () => {
   proxy.msgTip("更新中", 2);