Browse Source

Merge branch 'dev' into sit

lucky 2 years ago
parent
commit
2e910af476

+ 34 - 9
src/views/process/read/index.vue

@@ -90,8 +90,10 @@
         >
           <i
             class="el-icon-view tb-icon"
-            @click="getRouter(scope.row.toRouter, scope.row.orderCode)"
+            @click="getRouter(scope.row)"
           ></i>
+            <!-- @click="getRouter(scope.row.toRouter, scope.row.orderCode)" -->
+
         </el-tooltip>
       </template>
     </ex-table>
@@ -104,6 +106,7 @@ import mixinPage from "@/mixins/elPaginationHandle";
 import { mapGetters } from "vuex";
 import resToken from "@/mixins/resToken";
 import { routerList, columns ,readUnRead} from "@/views/process/columns";
+import treeRowVue from '@/components/globalComponents/tree-table/tree-row.vue';
 export default {
   name: "role",
   mixins: [mixinPage, resToken],
@@ -166,25 +169,47 @@ export default {
   },
   methods: {
 
-    getRouter(toRouter, queryId) {
-      console.log(this.tableData)
-      console.log(toRouter, queryId)
-      if (toRouter && queryId) {
+    // getRouter(toRouter, queryId) {
+    getRouter(row) {
+      console.log(row)
+      const { order_type, order_id, orderCode } = row;
+        let index = this.process_router_list.findIndex(
+          (y) => y.type === order_type
+        );
+        if (index !== -1) {
+        const { toRouter, to } = this.process_router_list[index];
         let model = {
           type: "view",
-          id: queryId,
+          id: to === "code" ? orderCode : order_id,
         };
-
-         let routerModel = {
+        let routerModel = {
           options: JSON.parse(JSON.stringify(this.parmValue)),
           router: this.$route.path,
         };
         model.preModel = JSON.stringify(routerModel);
-        
+        // console.log(model)
+        // return;
         this.routeGoto(toRouter, model);
       } else {
         this.$message.warning("暂未找到相关流程!");
       }
+
+      // if (toRouter && queryId) {
+      //   let model = {
+      //     type: "view",
+      //     id: queryId,
+      //   };
+
+      //    let routerModel = {
+      //     options: JSON.parse(JSON.stringify(this.parmValue)),
+      //     router: this.$route.path,
+      //   };
+      //   model.preModel = JSON.stringify(routerModel);
+        
+      //   this.routeGoto(toRouter, model);
+      // } else {
+      //   this.$message.warning("暂未找到相关流程!");
+      // }
     },
 
     restSearch() {

+ 28 - 6
src/views/process/unRead/index.vue

@@ -193,22 +193,44 @@ export default {
     this.searchList();
   },
   methods: {
-    getRouter(toRouter, queryId) {
-      if (toRouter && queryId) {
+    getRouter(row) {
+       console.log(row)
+      const { order_type, order_id, orderCode } = row;
+        let index = this.process_router_list.findIndex(
+          (y) => y.type === order_type
+        );
+        if (index !== -1) {
+        const { toRouter, to } = this.process_router_list[index];
         let model = {
           type: "view",
-          id: queryId,
+          id: to === "code" ? orderCode : order_id,
         };
-         let routerModel = {
+        let routerModel = {
           options: JSON.parse(JSON.stringify(this.parmValue)),
           router: this.$route.path,
         };
         model.preModel = JSON.stringify(routerModel);
-        
         this.routeGoto(toRouter, model);
       } else {
         this.$message.warning("暂未找到相关流程!");
       }
+
+
+      // if (toRouter && queryId) {
+      //   let model = {
+      //     type: "view",
+      //     id: queryId,
+      //   };
+      //    let routerModel = {
+      //     options: JSON.parse(JSON.stringify(this.parmValue)),
+      //     router: this.$route.path,
+      //   };
+      //   model.preModel = JSON.stringify(routerModel);
+        
+      //   this.routeGoto(toRouter, model);
+      // } else {
+      //   this.$message.warning("暂未找到相关流程!");
+      // }
     },
 
     restSearch() {
@@ -288,7 +310,7 @@ export default {
       const { code, data, message } = await asyncRequest.detail({ id: id });
       if (code === 0) {
         console.log(toRouter)
-        this.getRouter(toRouter, orderCode);
+        this.getRouter(item);
       } else if (code >= 100 && code <= 104) {
         await this.logout();
       } else {

+ 11 - 1
src/views/reportQuery/saleReport/components/columns.js

@@ -1052,6 +1052,16 @@ const table11 = [
     label: "是否修改销售额",
     minWidth: "115px",
   },
+  {
+    prop: "sale_apply_name",
+    label: "销售人员",
+    minWidth: "95px",
+  },
+  {
+    prop: "sale_apply_company",
+    label: "销售人员部门",
+    minWidth: "115px",
+  },
 
 ]
 
@@ -1154,7 +1164,7 @@ const table12 = [
     minWidth: "155px",
   },
   {
-    prop: "result_desc",
+    prop: "result",
     label: "退货原因",
     minWidth: "155px",
   },

+ 1 - 1
src/views/reportQuery/saleReport/components/table11.vue

@@ -283,7 +283,7 @@ export default {
               let link = document.createElement("a");
               link.style.display = "none";
               link.href = url;
-              let excelName = "订单明细报表.zip";
+              let excelName = "工差明细报表.zip";
               link.setAttribute("download", excelName);
               document.body.appendChild(link);
               link.click();