Browse Source

修改应收、付总账

lichao 3 years ago
parent
commit
de05f7645e

+ 56 - 2
src/views/reportManagement/generalLedgerCr/detail.vue

@@ -98,7 +98,17 @@
         :show-overflow-tooltip="true"
         sortable
         :fixed="item.fixed"
-      />
+      >
+        <template slot-scope="scope">
+            <span v-if="item.label == 'fmblno'">
+              <el-link :underline="false" type="primary">
+                <div @click="goPage(scope.row)">
+                  {{ scope.row.fmblno }}
+                </div></el-link>
+            </span>
+          <span v-else>{{ scope.row[item.label] }}</span>
+        </template>
+      </el-table-column>
     </el-table>
 
     <pagination
@@ -464,7 +474,7 @@ export default {
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = "合计";
-        } else if (index === 7 || index === 8 || index === 9) {
+        } else if (index === 6 || index === 7 || index === 8 || index === 9 || index === 10 || index === 11) {
           const values = data.map((item) => Number(item[column.property]));
           if (!values.every((value) => isNaN(value))) {
             sums[index] = values.reduce((prev, curr) => {
@@ -662,6 +672,50 @@ export default {
           this.download(response.msg);
         });
     },
+    // 去页面
+    goPage(row) {
+      console.log(row)
+      switch (row.fBilltype) {
+        case "入库": {
+          console.log(row)
+          this.$router.push({
+            path: "/business/inStock",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "出库": {
+          this.$router.push({
+            path: "/business/outStock",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "调拨": {
+          this.$router.push({
+            path: "/business/stockTransfer",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "货权转移": {
+          this.$router.push({
+            path: "/business/stockTransfer",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "货物通关": {
+          this.$router.push({
+            path: "/business/cargoClearance",
+          });
+          break;
+        }
+        default: {
+          return this.$message.error("未知错误,无状态");
+        }
+      }
+    },
   },
 };
 </script>

+ 7 - 7
src/views/reportManagement/generalLedgerCr/index.vue

@@ -379,28 +379,28 @@ export default {
           label: "ffeesName",
           name: "结算单位",
           checked: 0,
-          width: 130,
+          width: 250,
         },
         {
           surface: "7",
           label: "famount",
           name: "应付金额",
           checked: 0,
-          width: 130,
+          width: 250,
         },
         {
           surface: "8",
           label: "fstlamount",
           name: "实付金额",
           checked: 0,
-          width: 130,
+          width: 250,
         },
         {
           surface: "9",
           label: "nnfinished",
           name: "未付金额",
           checked: 0,
-          width: 130,
+          width: 250,
         },
       ],
       allCheck: false,
@@ -460,7 +460,7 @@ export default {
     getRow() {
       let that = this;
       this.data = {
-        tableName: "应付总账",
+        tableName: "应付总账明细",
         userId: Cookies.get("userName"),
       };
       select(this.data).then((res) => {
@@ -483,7 +483,7 @@ export default {
     },
     delRow() {
       this.data = {
-        tableName: "应付总账",
+        tableName: "应付总账明细",
         userId: Cookies.get("userName"),
       };
       resetModule(this.data).then((res) => {
@@ -498,7 +498,7 @@ export default {
     save() {
       this.showSetting = false;
       this.data = {
-        tableName: "应付总账",
+        tableName: "应付总账明细",
         userId: Cookies.get("userName"),
         sysTableSetList: this.setRowList,
       };

+ 76 - 13
src/views/reportManagement/generalLedgerDr/detail.vue

@@ -9,7 +9,8 @@
             size="mini"
             @click="handleExport"
             v-hasPermi="['warehouseBusiness:receivable:export']"
-          >导出</el-button
+          >导出
+          </el-button
           >
         </el-col>
         <div style="margin: 0 12px">
@@ -101,7 +102,17 @@
         :show-overflow-tooltip="true"
         sortable
         :fixed="item.fixed"
-      />
+      >
+        <template slot-scope="scope">
+            <span v-if="item.label == 'fmblno'">
+              <el-link :underline="false" type="primary">
+                <div @click="goPage(scope.row)">
+                  {{ scope.row.fmblno }}
+                </div></el-link>
+            </span>
+          <span v-else>{{ scope.row[item.label] }}</span>
+        </template>
+      </el-table-column>
     </el-table>
 
     <pagination
@@ -198,17 +209,17 @@ import {
   updateWhgenleg,
   exporReceivable,
 } from "@/api/reportManagement/receivable";
-import { listWarehouse } from "@/api/basicdata/warehouse";
-import { listArea } from "@/api/basicdata/area";
-import { listGoods } from "@/api/basicdata/goods";
-import { listCorps } from "@/api/basicdata/corps";
-import { addSet, select, resetModule } from "@/api/system/set";
+import {listWarehouse} from "@/api/basicdata/warehouse";
+import {listArea} from "@/api/basicdata/area";
+import {listGoods} from "@/api/basicdata/goods";
+import {listCorps} from "@/api/basicdata/corps";
+import {addSet, select, resetModule} from "@/api/system/set";
 import Cookies from "js-cookie";
 import draggable from "vuedraggable";
 
 export default {
   name: "generalLedgerDr",
-  components: { draggable },
+  components: {draggable},
   data() {
     return {
       pickerOptions: {
@@ -277,7 +288,7 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        fMarks: [{ required: true, message: "唛头不能为空", trigger: "blur" }],
+        fMarks: [{required: true, message: "唛头不能为空", trigger: "blur"}],
       },
       showSetting: false,
       drag: false,
@@ -462,7 +473,7 @@ export default {
       this.drag = false;
     },
     getSum(param) {
-      const { columns, data } = param;
+      const {columns, data} = param;
       const sums = [];
       columns.forEach((column, index) => {
         if (index === 0) {
@@ -493,7 +504,7 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      let queryParams = {pageNum: 1, pageSize: 10, fName: name};
       listWarehouse(queryParams).then((response) => {
         this.warehouseOptions = response.rows;
       });
@@ -523,7 +534,7 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      let queryParams = {pageNum: 1, pageSize: 10, fName: name};
       listGoods(queryParams).then((response) => {
         this.goodsOptions = response.rows;
       });
@@ -533,7 +544,7 @@ export default {
       if (name == null || name === "") {
         return false;
       }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      let queryParams = {pageNum: 1, pageSize: 10, fName: name};
       listCorps(queryParams).then((response) => {
         this.fMblnoOptions = response.rows;
         this.KHblnoOptions = response.rows;
@@ -665,6 +676,55 @@ export default {
           this.download(response.msg);
         });
     },
+    // 去页面
+    goPage(row) {
+      switch (row.fBilltype) {
+        case "入库": {
+          this.$router.push({
+            path: "/business/inStock",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "出库": {
+          this.$router.push({
+            path: "/business/outStock",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "调拨": {
+          this.$router.push({
+            path: "/business/stockTransfer",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "货权转移": {
+          this.$router.push({
+            path: "/business/stockTransfer",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        case "货物通关": {
+          this.$router.push({
+            path: "/business/cargoClearance",
+          });
+          break;
+        }
+        case "计算仓储费": {
+          this.$router.push({
+            path: "/business/agreement",
+            query: { id: row.fsrcpid },
+          });
+          break;
+        }
+        default: {
+          return this.$message.error("未知错误,无状态");
+        }
+      }
+    },
   },
 };
 </script>
@@ -673,15 +733,18 @@ export default {
   display: flex;
   justify-content: flex-end;
 }
+
 .listStyle {
   display: flex;
   border-top: 1px solid #dcdfe6;
   border-left: 1px solid #dcdfe6;
   border-right: 1px solid #dcdfe6;
 }
+
 .listStyle:last-child {
   border-bottom: 1px solid #dcdfe6;
 }
+
 .progress {
   display: flex;
   align-items: center;

+ 7 - 7
src/views/reportManagement/generalLedgerDr/index.vue

@@ -381,28 +381,28 @@ export default {
           label: "ffeesName",
           name: "结算单位",
           checked: 0,
-          width: 180,
+          width: 250,
         },
         {
           surface: "2",
           label: "famount",
           name: "应收金额",
           checked: 0,
-          width: 130,
+          width: 250,
         },
         {
           surface: "3",
           label: "fstlamount",
           name: "实收金额",
           checked: 0,
-          width: 130,
+          width: 250,
         },
         {
           surface: "4",
           label: "nnfinished",
           name: "未收金额",
           checked: 0,
-          width: 130,
+          width: 250,
         },
       ],
       allCheck: false,
@@ -462,7 +462,7 @@ export default {
     getRow() {
       let that = this;
       this.data = {
-        tableName: "应收总账",
+        tableName: "应收总账明细",
         userId: Cookies.get("userName"),
       };
       select(this.data).then((res) => {
@@ -485,7 +485,7 @@ export default {
     },
     delRow() {
       this.data = {
-        tableName: "应收总账",
+        tableName: "应收总账明细",
         userId: Cookies.get("userName"),
       };
       resetModule(this.data).then((res) => {
@@ -500,7 +500,7 @@ export default {
     save() {
       this.showSetting = false;
       this.data = {
-        tableName: "应收总账",
+        tableName: "应收总账明细",
         userId: Cookies.get("userName"),
         sysTableSetList: this.setRowList,
       };