Explorar o código

进口、财务 路由缓存

qinbai %!s(int64=3) %!d(string=hai) anos
pai
achega
55000b3cd0

+ 36 - 30
src/router/views/index.js

@@ -233,65 +233,69 @@ export default [{
     },
     // 采购合同详情页
     {
-      path: '/purchase_detailsPage',
+      path: '/purchase/contract/index',
       component: Layout,
       hidden: true,
       children: [
         {
-          path: '/purchase_detailsPage',
-          name:'采购详情',
+          path: '/purchase/contract/index',
+          name:'采购订单',
           meta: {
-            i18n: 'purchase_detailsPage'
+            i18n: '/purchase/contract/index',
+            keepAlive: true
           },
-          component: () => import( /* webpackChunkName: "views" */ '@/views/purchase/contract/detailsPage')
+          component: () => import( /* webpackChunkName: "views" */ '@/views/purchase/contract/index')
         }
       ]
     },
   // 销售合同详情页
     {
-      path: '/salesContract_detailsPage',
+      path: '/salesManagement/salesContract/index',
       component: Layout,
       hidden: true,
       children: [
         {
-          path: '/salesContract_detailsPage',
-          name:'销售详情',
+          path: '/salesManagement/salesContract/index',
+          name:'销售订单',
           meta: {
-            i18n: 'salesContract_detailsPage'
+            i18n: '/salesManagement/salesContract/index',
+            keepAlive: true
           },
-          component: () => import( /* webpackChunkName: "views" */ '@/views/salesManagement/salesContract/detailsPage')
+          component: () => import( /* webpackChunkName: "views" */ '@/views/salesManagement/salesContract/index')
         }
       ]
     },
   // 进口 收货单详情页
   {
-    path: '/importReceipt_detailsPage',
+    path: '/importTrade/receipt/index',
     component: Layout,
     hidden: true,
     children: [
       {
-        path: '/importReceipt_detailsPage',
-        name:'收货详情',
+        path: '/importTrade/receipt/index',
+        name:'收货',
         meta: {
-          i18n: 'importReceipt_detailsPage'
+          i18n: '/importTrade/receipt/index',
+          keepAlive: true
         },
-        component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/receipt/detailsPageEdit')
+        component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/receipt/index')
       }
     ]
   },
     // 进口 发货单详情页
   {
-    path: '/importInvoice_detailsPage',
+    path: '/importTrade/invoice/index',
     component: Layout,
     hidden: true,
     children: [
       {
-        path: '/importInvoice_detailsPage',
-        name:'发货详情',
+        path: '/importTrade/invoice/index',
+        name:'发货',
         meta: {
-          i18n: 'importInvoice_detailsPage'
+          i18n: 'importTrade/invoice/index',
+          keepAlive: true
         },
-        component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/invoice/detailsPageEdit')
+        component: () => import( /* webpackChunkName: "views" */ '@/views/importTrade/invoice/index')
       }
     ]
   },
@@ -462,33 +466,35 @@ export default [{
   },
   // 收款详情
   {
-    path: '/receipt_detailsPage',
+    path: '/financialManagement/receipt',
     component: Layout,
     hidden: true,
     children: [
       {
-        path: '/receipt_detailsPage',
-        name:"收款详情",
+        path: '/financialManagement/receipt',
+        name:"收款管理",
         meta: {
-          i18n: 'receipt_detailsPage',
+          i18n: '/financialManagement/receipt',
+          keepAlive: true,
         },
-        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/receiptDetailsPage')
+        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/receipt')
       }
     ]
   },
   // 付款详情
   {
-    path: '/payment_detailsPage',
+    path: '/financialManagement/payment',
     component: Layout,
     hidden: true,
     children: [
       {
-        path: '/payment_detailsPage',
-        name:"付款详情",
+        path: '/financialManagement/payment',
+        name:"付款管理",
         meta: {
-          i18n: 'payment_detailsPage',
+          i18n: '/financialManagement/payment',
+          keepAlive: true,
         },
-        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/paymentDetailsPage')
+        component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/payment')
       }
     ]
   },

+ 30 - 12
src/views/financialManagement/payment.vue

@@ -1,5 +1,5 @@
 <template>
-  <basic-container>
+  <basic-container v-if="show">
     <avue-crud :option="option"
                :data="dataList"
                ref="crud"
@@ -36,7 +36,7 @@
           type="text"
           icon="el-icon-edit"
           size="small"
-          @click.stop="editOpen(scope.row, scope.index)"
+          @click.stop="editOpen(scope.row, 2)"
         >编辑
         </el-button>
         <el-button
@@ -49,17 +49,26 @@
       </template>
     </avue-crud>
   </basic-container>
+  <detail-page
+    ref="detail"
+    @goBack="goBack"
+    :detailData="detailData"
+    v-else
+  ></detail-page>
 </template>
 
 <script>
   import option from "./configuration/paymentList.json";
   import {getList ,remove} from "@/api/financialManagement/financialManagement"
+  import detailPage from "./paymentDetailsPage";
 
   export default {
     data() {
       return {
         loading : false,
         form: {},
+        show:true,
+        detailData:{},
         option: option,
         parentId:0,
         dataList: [{
@@ -76,23 +85,28 @@
     created() {
 
     },
+    components:{
+      detailPage
+    },
     mounted() {
       option.height = window.innerHeight - 350 ;
     },
     methods: {
       //新单打开
-      addReceipt(){
-        this.$router.push({
-          path: "/payment_detailsPage",
-          query: {id: ''},
-        });
+      addReceipt(row){
+        this.detailData = {
+          id: row.id,
+          status: 1
+        };
+        this.show = false;
       },
       //编辑打开
-      editOpen(row, index){
-        this.$router.push({
-          path: "/payment_detailsPage",
-          query: {id:row.id},
-        });
+      editOpen(row, status){
+        this.detailData = {
+          id: row.id,
+          status: status
+        };
+        this.show = false;
       },
       rowDel(row, index, done) {
         if(row.id){
@@ -141,6 +155,10 @@
           this.loading = false
         })
       },
+      goBack() {
+        this.detailData=this.$options.data().detailData
+        this.show = true;
+      }
     }
   }
 </script>

+ 9 - 8
src/views/financialManagement/paymentDetailsPage.vue

@@ -106,8 +106,13 @@
   import {detailListData } from "@/api/importTrade/purchase";
   import {getSysNo} from "@/api/importTrade/purchase";
   import { getUserInfo } from "@/api/system/user";
-
   export default {
+    name: "paymentDetailsPage",
+    props: {
+      detailData: {
+        type: Object
+      }
+    },
     data() {
       return {
         form: {},
@@ -311,8 +316,8 @@
       this.getWorkDicts("currency").then(res =>{
         this.currencyDic = res.data.data
       })
-      if (this.$route.query.id) {
-        this.id = BigInt(this.$route.query.id);//字符串转数字  超长用BigInt
+      if (this.detailData.id) {
+        this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
         getDetail(this.id).then(res => {
           this.form = res.data.data;
           this.configuration.dicData = res.data.data.customerModel;
@@ -392,11 +397,7 @@
         })
       },
       backToList(){
-        this.$router.$avueRouter.closeTag();
-        this.$router.push({
-          path: '/financialManagement/payment',
-          query: {}
-        });
+        this.$emit("goBack");
       }
     }
   }

+ 30 - 12
src/views/financialManagement/receipt.vue

@@ -1,5 +1,5 @@
 <template>
-  <basic-container>
+  <basic-container v-if="show">
     <avue-crud :option="option"
                :data="dataList"
                ref="crud"
@@ -36,7 +36,7 @@
           type="text"
           icon="el-icon-edit"
           size="small"
-          @click.stop="editOpen(scope.row, scope.index)"
+          @click.stop="editOpen(scope.row, 2)"
         >编辑
         </el-button>
         <el-button
@@ -49,11 +49,18 @@
       </template>
     </avue-crud>
   </basic-container>
+  <detail-page
+    ref="detail"
+    @goBack="goBack"
+    :detailData="detailData"
+    v-else
+  ></detail-page>
 </template>
 
 <script>
   import option from "./configuration/receiptList.json";
   import {getList ,remove} from "@/api/financialManagement/financialManagement"
+  import detailPage from "./receiptDetailsPage.vue";
 
   export default {
     data() {
@@ -62,6 +69,8 @@
         form: {},
         option: option,
         parentId:0,
+        show:true,
+        detailData:{},
         dataList: [{
           canem:""
         }],
@@ -73,6 +82,9 @@
         query:{}
       }
     },
+    components:{
+      detailPage
+    },
     created() {
 
     },
@@ -81,18 +93,20 @@
     },
     methods: {
       //新单打开
-      addReceipt(){
-        this.$router.push({
-          path: "/receipt_detailsPage",
-          query: {id: ''},
-        });
+      addReceipt(row){
+        this.detailData = {
+          id: row.id,
+          status: 1
+        };
+        this.show = false;
       },
       //编辑打开
-      editOpen(row, index){
-        this.$router.push({
-          path: "/receipt_detailsPage",
-          query: {id:row.id},
-        });
+      editOpen(row,status){
+        this.detailData = {
+          id: row.id,
+          status: status
+        };
+        this.show = false;
       },
       rowDel(row, index, done) {
         if(row.id){
@@ -141,6 +155,10 @@
           this.loading = false
         })
       },
+      goBack() {
+        this.detailData=this.$options.data().detailData
+        this.show = true;
+      }
     }
   }
 </script>

+ 9 - 7
src/views/financialManagement/receiptDetailsPage.vue

@@ -107,6 +107,12 @@
   import { getUserInfo } from "@/api/system/user";
 
   export default {
+    name: "receiptDetailsPage",
+    props: {
+      detailData: {
+        type: Object
+      }
+    },
     data() {
       return {
         form: {},
@@ -294,8 +300,8 @@
       this.getWorkDicts("currency").then(res =>{
         this.currencyDic = res.data.data
       })
-      if (this.$route.query.id) {
-        this.id = BigInt(this.$route.query.id);//字符串转数字  超长用BigInt
+      if (this.detailData.id) {
+        this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
         getDetail(this.id).then(res => {
           this.form = res.data.data;
           this.configuration.dicData = res.data.data.customerModel;
@@ -349,11 +355,7 @@
         })
       },
       backToList(){
-        this.$router.$avueRouter.closeTag();
-        this.$router.push({
-          path: '/financialManagement/receipt',
-          query: {}
-        });
+        this.$emit("goBack");
       }
     }
   }

+ 8 - 7
src/views/purchase/contract/detailsPage.vue

@@ -200,6 +200,11 @@ import {corpsattn, corpsbank,  getDeptLazyTreeS} from "@/api/basicData/configura
 import { getList } from "@/api/basicData/commodityType"
 export default {
   name: "detailsPage",
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
   data() {
     return {
       form: {},
@@ -552,8 +557,8 @@ export default {
     this.getWorkDicts("payment_term").then(res =>{
       this.paymentTypeDic = res.data.data
     })
-    if (this.$route.query.id) {
-      let id = this.$route.query.id.replace(/\"/g, "")
+    if (this.detailData.id) {
+      let id = this.detailData.id.replace(/\"/g, "")
       detailListData(id).then(res => {
         this.form = res.data.data;
         this.configuration.dicData = this.form.corpsName
@@ -968,11 +973,7 @@ export default {
       this.$message.success('发货成功')
     },
     backToList() {
-      this.$router.$avueRouter.closeTag();
-      this.$router.push({
-        path: '/purchase/contract/index',
-        query: {}
-      });
+      this.$emit("goBack");
     },
   }
 }

+ 108 - 88
src/views/purchase/contract/index.vue

@@ -1,87 +1,96 @@
 <template>
-  <basic-container>
-    <avue-crud :option="option"
-               :data="dataList"
-               ref="crud"
-               v-model="form"
-               :page.sync="page"
-               @row-del="rowDel"
-               @row-update="rowUpdate"
-               :before-open="beforeOpen"
-               :before-close="beforeClose"
-               @row-save="rowSave"
-               @search-change="searchChange"
-               @search-reset="searchReset"
-               @selection-change="selectionChange"
-               @current-change="currentChange"
-               @size-change="sizeChange"
-               @refresh-change="refreshChange"
-               @on-load="onLoad"
-               @expand-change="expandChange">
-      <template slot-scope="scope" slot="expand">
-        <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
-          <el-table-column   align="center"  width="60"></el-table-column>
-          <el-table-column   type="selection" align="center"  width="50"></el-table-column>
-          <el-table-column  label="序号" type="index" align="center"  width="50"></el-table-column>
-          <el-table-column  label="提单号" prop="billNo" align="center" show-overflow-tooltip width="200"></el-table-column>
-          <el-table-column  label="货物品种" prop="priceCategoryNames" align="center" show-overflow-tooltip width="180"></el-table-column>
-          <el-table-column  label="件数" prop="purchaseQuantity" align="center" show-overflow-tooltip width="120"></el-table-column>
-          <el-table-column  label="毛重(KG)" prop="grossWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
-          <el-table-column  label="净重(KG)" prop="netWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
-          <el-table-column  label="单价" prop="price" align="center" show-overflow-tooltip width="120"></el-table-column>
-          <el-table-column  label="合同金额" prop="amount" align="center" show-overflow-tooltip width="180"></el-table-column>
-          <el-table-column  label="是否到货" prop="isArrival" align="center" show-overflow-tooltip width="200"></el-table-column>
-        </el-table>
-      </template>
-      <template slot="menuLeft">
-        <el-button size="small"
-                   type="success"
-                   :disabled="true"
-                   @click.stop=""
-        >复制新单
-        </el-button>
-        <el-button size="small"
-                   type="info"
-                   @click.stop="openReport()"
-        >报表
-        </el-button>
-      </template>
-      <template slot-scope="scope" slot="menu">
-        <el-button
-          type="text"
-          icon="el-icon-view"
-          size="small"
-          @click.stop="beforeOpenPage(scope.row,scope.index)"
-        >查看
-        </el-button>
-        <el-button
-          type="text"
-          icon="el-icon-edit"
-          size="small"
-          @click.stop="editOpen(scope.row,scope.index)"
-        >编辑
-        </el-button>
-        <el-button
-          type="text"
-          icon="el-icon-delete"
-          size="small"
-          @click.stop="rowDel(scope.row,scope.index)"
-        >删除
-        </el-button>
-      </template>
-    </avue-crud>
-  </basic-container>
+  <div>
+    <basic-container v-if="show">
+      <avue-crud :option="option"
+                 :data="dataList"
+                 ref="crud"
+                 v-model="form"
+                 :page.sync="page"
+                 @row-del="rowDel"
+                 @row-update="rowUpdate"
+                 :before-open="beforeOpen"
+                 :before-close="beforeClose"
+                 @row-save="rowSave"
+                 @search-change="searchChange"
+                 @search-reset="searchReset"
+                 @selection-change="selectionChange"
+                 @current-change="currentChange"
+                 @size-change="sizeChange"
+                 @refresh-change="refreshChange"
+                 @on-load="onLoad"
+                 @expand-change="expandChange">
+        <template slot-scope="scope" slot="expand">
+          <el-table :data="scope.row.insideList" v-loading="scope.row.loading">
+            <el-table-column   align="center"  width="60"></el-table-column>
+            <el-table-column   type="selection" align="center"  width="50"></el-table-column>
+            <el-table-column  label="序号" type="index" align="center"  width="50"></el-table-column>
+            <el-table-column  label="提单号" prop="billNo" align="center" show-overflow-tooltip width="200"></el-table-column>
+            <el-table-column  label="货物品种" prop="priceCategoryNames" align="center" show-overflow-tooltip width="180"></el-table-column>
+            <el-table-column  label="件数" prop="purchaseQuantity" align="center" show-overflow-tooltip width="120"></el-table-column>
+            <el-table-column  label="毛重(KG)" prop="grossWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
+            <el-table-column  label="净重(KG)" prop="netWeight" align="center" show-overflow-tooltip width="120"></el-table-column>
+            <el-table-column  label="单价" prop="price" align="center" show-overflow-tooltip width="120"></el-table-column>
+            <el-table-column  label="合同金额" prop="amount" align="center" show-overflow-tooltip width="180"></el-table-column>
+            <el-table-column  label="是否到货" prop="isArrival" align="center" show-overflow-tooltip width="200"></el-table-column>
+          </el-table>
+        </template>
+        <template slot="menuLeft">
+          <el-button size="small"
+                     type="success"
+                     :disabled="true"
+                     @click.stop=""
+          >复制新单
+          </el-button>
+          <el-button size="small"
+                     type="info"
+                     @click.stop="openReport()"
+          >报表
+          </el-button>
+        </template>
+        <template slot-scope="scope" slot="menu">
+          <el-button
+            type="text"
+            icon="el-icon-view"
+            size="small"
+            @click.stop="beforeOpenPage(scope.row,1)"
+          >查看
+          </el-button>
+          <el-button
+            type="text"
+            icon="el-icon-edit"
+            size="small"
+            @click.stop="editOpen(scope.row,2)"
+          >编辑
+          </el-button>
+          <el-button
+            type="text"
+            icon="el-icon-delete"
+            size="small"
+            @click.stop="rowDel(scope.row,scope.index)"
+          >删除
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detail-page
+      ref="detail"
+      @goBack="goBack"
+      :detailData="detailData"
+      v-else
+    ></detail-page>
+  </div>
 </template>
-
 <script>
 import option from "./config/mainList.json";
 import {selectPurchaseList,removeData,getItemByPid} from "@/api/importTrade/purchase";
+import detailPage from "./detailsPage.vue";
 
 export default {
   name: "index",
   data() {
     return {
       option: option,
+      detailData:{},
       dataList: [],
       page: {
         pageSize: 10,
@@ -89,9 +98,13 @@ export default {
         total: 0,
       },
       form: {},
+      show: true,
       search: {},
     }
   },
+  components:{
+    detailPage
+  },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
@@ -149,24 +162,27 @@ export default {
       this.$refs.crud.rowAdd();
     },
     //查看跳转页面
-    beforeOpenPage(row, index) {
-      this.$router.push({
-        path: "/purchase_detailsPage",
-        query: {id: JSON.stringify(row.id)},
-      });
+    beforeOpenPage(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
     },
     //新增跳转页面
-    beforeOpen(row, index) {
-      this.$router.push({
-        path: "/purchase_detailsPage",
-        query: {id: JSON.stringify(row.id)},
-      });
+    beforeOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
     },
-    editOpen(row, index) {
-      this.$router.push({
-        path: "/purchase_detailsPage",
-        query: {id: JSON.stringify(row.id)},
-      });
+    editOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
     },
     //点击新增时触发
     beforeClose(done) {
@@ -238,6 +254,10 @@ export default {
         return
       }
     },
+    goBack() {
+      this.detailData=this.$options.data().detailData
+      this.show = true;
+    }
   },
 }
 </script>

+ 8 - 7
src/views/salesManagement/salesContract/detailsPage.vue

@@ -201,6 +201,11 @@ import _ from "lodash";
 
 export default {
   name: "detailsPage",
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
   data() {
     return {
       disabled: false,
@@ -565,8 +570,8 @@ export default {
     this.getWorkDicts("currency").then(res =>{
       this.currencyDic = res.data.data
     })
-    if (this.$route.query.id) {
-      let id = this.$route.query.id.replace(/\"/g, "")
+    if (this.detailData.id) {
+      let id = this.detailData.id.replace(/\"/g, "")
       detailSaleList(id).then(res => {
         this.form = res.data.data;
         this.configuration.dicData = this.form.corpName
@@ -837,11 +842,7 @@ export default {
       })
     },
     backToList() {
-      this.$router.$avueRouter.closeTag();
-      this.$router.push({
-        path: '/salesManagement/salesContract/index',
-        query: {}
-      });
+      this.$emit("goBack");
     },
   },
 }

+ 37 - 18
src/views/salesManagement/salesContract/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <basic-container>
+  <basic-container v-if="show">
     <avue-crud :option="option"
                :data="dataList"
                ref="crud"
@@ -53,14 +53,14 @@
           type="text"
           icon="el-icon-view"
           size="small"
-          @click.stop="beforeOpenPage(scope.row,scope.index)"
+          @click.stop="beforeOpenPage(scope.row,1)"
         >查看
         </el-button>
         <el-button
           type="text"
           icon="el-icon-edit"
           size="small"
-          @click.stop="editOpen(scope.row,scope.index)"
+          @click.stop="editOpen(scope.row,2)"
         >编辑
         </el-button>
         <el-button
@@ -73,11 +73,18 @@
       </template>
     </avue-crud>
   </basic-container>
+  <detail-page
+    ref="detail"
+    @goBack="goBack"
+    :detailData="detailData"
+    v-else
+  ></detail-page>
 </template>
 
 <script>
 import option from "./config/mainList.json";
 import {selectSaleList,removeList,detailSaleList} from "@/api/importTrade/salesContract"
+import detailPage from "./detailsPage.vue";
 
 export default {
   name: "index",
@@ -85,15 +92,20 @@ export default {
     return {
       option: option,
       dataList: [],
+      show:true,
       page: {
         pageSize: 10,
         pagerCount: 5,
         total: 0,
       },
       form: {},
+      detailData:{},
       search: {},
     }
   },
+  components:{
+    detailPage
+  },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {
@@ -151,23 +163,26 @@ export default {
     },
     //查看跳转页面
     beforeOpenPage(row, index) {
-      this.$router.push({
-        path: "/salesContract_detailsPage",
-        query: {id: JSON.stringify(row.id)},
-      });
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
     },
     //新增跳转页面
-    beforeOpen(row, index) {
-      this.$router.push({
-        path: "/salesContract_detailsPage",
-        query: {id: JSON.stringify(row.id)},
-      });
-    },
-    editOpen(row, index) {
-      this.$router.push({
-        path: "/salesContract_detailsPage",
-        query: {id: JSON.stringify(row.id)},
-      });
+    beforeOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
+    },
+    editOpen(row, status) {
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.show = false;
     },
     //点击新增时触发
     beforeClose(done) {
@@ -222,6 +237,10 @@ export default {
         })
       }
     },
+    goBack() {
+      this.detailData=this.$options.data().detailData
+      this.show = true;
+    }
   },
 }
 </script>