ソースを参照

提交达沃特

caojunjie 2 年 前
コミット
b86d7577cc

+ 7 - 0
src/api/accountBalance/index.js

@@ -7,3 +7,10 @@ export const getList = (params) => {
         params: params
     })
 }
+export const getListDetailed = (params) => {
+    return request({
+        url: '/api/trade-finance/acc/SelAccItem',
+        method: 'get',
+        params: params
+    })
+}

+ 6 - 0
src/enums/column-name.js

@@ -1029,9 +1029,15 @@ const columnName = [{
   code: 239,
   name: '统计分析-应收账款余额'
 },{
+  code: 239.1,
+  name: '统计分析-应收账款余额-明细'
+},{
   code: 240,
   name: '统计分析-付收账款余额'
 },{
+  code: 240.1,
+  name: '统计分析-付收账款余额-明细'
+},{
   code: 241,
   name: '箱轨迹'
 },{

+ 10 - 3
src/views/businessManagement/inventoryAccount/index.vue

@@ -14,8 +14,9 @@
         @refresh-change="refreshChange"
         :cell-style="cellStyle">
         <template slot-scope="scope" slot="lockingQuantity">
-          <span v-if="Number(scope.row.lockingQuantity) > 0" style="color: #409EFF;cursor: pointer" @click.stop="viewCell(scope.row,scope.index)">{{ scope.row.lockingQuantity }}</span>
-          <span v-else>{{ scope.row.lockingQuantity }}</span>
+          <span style="color: #409EFF;cursor: pointer" @click.stop="viewCell(scope.row,scope.index)">{{ scope.row.lockingQuantity }}</span>
+<!--          <span v-if="Number(scope.row.lockingQuantity) > 0" style="color: #409EFF;cursor: pointer" @click.stop="viewCell(scope.row,scope.index)">{{ scope.row.lockingQuantity }}</span>-->
+<!--          <span v-else>{{ scope.row.lockingQuantity }}</span>-->
         </template>
         <template slot-scope="{row,index}" slot="menu">
           <el-button
@@ -168,7 +169,13 @@ export default {
       done();
     },
     rowCell(row, index) {
-      this.$refs.crud.rowCell(row, index)
+      if (JSON.parse(localStorage.getItem("saber-userInfo")).content.account === "admin"){
+        this.findObject(this.option.column, "lockingQuantity").cell = true
+        this.$refs.crud.rowCell(row, index)
+      }else {
+        this.findObject(this.option.column, "lockingQuantity").cell = false
+        this.$refs.crud.rowCell(row, index)
+      }
     },
     deletePrice(row,index){
       if (row.id){

+ 1 - 0
src/views/financialManagement/billDetails/billDetails.vue

@@ -25,6 +25,7 @@
       <template slot="corpIdSearch">
         <select-component
           v-model="search.corpId"
+          corpType="KH"
           :configuration="configuration"
         ></select-component>
       </template>

+ 2 - 0
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -115,6 +115,7 @@
       "label": "数量",
       "prop": "quantity",
       "width": 120,
+      "search": true,
       "overHidden": true,
       "index": 8
     },
@@ -136,6 +137,7 @@
       "label": "结算金额",
       "prop": "settlementAmount",
       "width": 120,
+      "search": true,
       "overHidden": true,
       "index": 11
     },

+ 234 - 0
src/views/statisticAnalysis/accountBalanceC/detailPage.vue

@@ -0,0 +1,234 @@
+<template>
+  <div>
+    <div class="borderless">
+      <div class="customer-head">
+        <div class="customer-back">
+          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                     @click="backToList">返回列表
+          </el-button>
+        </div>
+      </div>
+      <basic-container style="margin-top: 50px">
+        <avue-crud
+            :option="option"
+            :search.sync="search"
+            v-model="form"
+            :table-loading="loading"
+            :data="dataList"
+            ref="crud"
+            :key="key"
+            @on-load="onLoad"
+            @search-change="searchChange"
+            @refresh-change="refreshChange"
+            @resetColumn="resetColumnTwo('crud','option','optionList',240.1)"
+            @saveColumn="saveColumnTwo('crud','option','optionList',240.1)"
+            :page.sync="page">
+          <template slot-scope="scope" slot="menuLeft">
+            <el-button type="warning"
+                       icon="el-icon-plus"
+                       size="small"
+                       @click="outExport"
+            >导出
+            </el-button>
+          </template>
+        </avue-crud>
+      </basic-container>
+    </div>
+  </div>
+</template>
+
+<script>
+
+import {getListDetailed} from "@/api/accountBalance/index.js";
+import {getToken} from "@/util/auth";
+
+export default {
+  name: "index",
+  props:{
+    detailData: Object,
+  },
+  data() {
+    return {
+      loading: false,
+      show: true,
+      search: {},
+      form: {},
+      dataList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      key: 0,
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        menuWidth: 140,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "70%",
+        menu: false,
+        column: [{
+          label: '采购单号',
+          prop: 'accSysNo',
+          search: true,
+          overHidden: true,
+        }, {
+          label: '数量',
+          prop: 'quantity',
+          overHidden: true,
+        }, {
+          label: '应收金额',
+          prop: 'amount',
+          search: true,
+          overHidden: true,
+        }, {
+          label: '已收金额',
+          prop: 'settlementAmount',
+          overHidden: true,
+        }, {
+          label: '余额',
+          prop: 'balance',
+          overHidden: true,
+        }, {
+          label: '科目代码',
+          prop: 'subjectNumber',
+          overHidden: true,
+        }, {
+          label: '开户银行',
+          prop: 'accountBank',
+          overHidden: true,
+        }, {
+          label: '银行户头',
+          prop: 'accountName',
+          overHidden: true,
+        }, {
+          label: '银行账号',
+          prop: 'accountNo',
+          overHidden: true,
+        }, {
+          label: '溢付款',
+          prop: 'overPayment',
+          overHidden: true,
+        }, {
+          label: '使用返利',
+          prop: 'usedProfit',
+          overHidden: true,
+        }, {
+          label: '使用溢付款',
+          prop: 'caseOverPayment',
+          overHidden: true,
+        }]
+      }
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(240.1), this.optionList);
+    this.key++
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    //导出
+    outExport() {
+      this.$confirm('是否导出列表?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let queryParams = this.search
+        const routeData = this.$router.resolve({
+          path: '/api/trade-finance/acc/SelAccItemExport',      //跳转目标窗口的地址
+          query: {
+            'Blade-Auth': getToken(),
+            ...queryParams,    //括号内是要传递给新窗口的参数
+            billType: "申请",
+            corpId:this.detailData.corpId
+          }
+        })
+        window.open(routeData.href.slice(1, routeData.href.length));
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+    backToList() {
+      this.$emit("goBack");
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    searchChange(params, done) {
+      done();
+      this.onLoad(this.page, params)
+    },
+    onLoad(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        billType: "申请",
+        corpId:this.detailData.corpId
+      }
+      this.loading = true
+      getListDetailed(params).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+
+//自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+//自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 56 - 1
src/views/statisticAnalysis/accountBalanceC/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container>
+    <basic-container v-if="show">
       <avue-crud
           :option="option"
           :search.sync="search"
@@ -18,19 +18,42 @@
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="GYS"/>
         </template>
+        <template slot-scope="scope" slot="corpName">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{scope.row.corpName}}</span>
+        </template>
+        <template slot-scope="scope" slot="menuLeft">
+          <el-button type="warning"
+                     icon="el-icon-plus"
+                     size="small"
+                     @click="outExport"
+          >导出
+          </el-button>
+        </template>
       </avue-crud>
     </basic-container>
+    <detail-page
+        ref="detail"
+        @goBack="goBack"
+        :detailData="detailData"
+        v-else
+    ></detail-page>
   </div>
 </template>
 
 <script>
 
 import {getList} from "@/api/accountBalance/index.js";
+import {getToken} from "@/util/auth";
+import detailPage from "./detailPage.vue";
 
 export default {
   name: "index",
+  components:{
+    detailPage
+  },
   data() {
     return {
+      show:true,
       loading: false,
       search: {},
       form: {},
@@ -112,6 +135,38 @@ export default {
     }
   },
   methods: {
+    goBack(){
+      this.show = true;
+      this.onLoad(this.page,this.search)
+    },
+    beforeOpenPage(row, index){
+      this.show = false
+      this.detailData = row
+    },
+    //导出
+    outExport() {
+      this.$confirm('是否导出列表?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let queryParams = this.search
+        const routeData = this.$router.resolve({
+          path: '/api/trade-finance/acc/selBillBalanceExport',      //跳转目标窗口的地址
+          query: {
+            'Blade-Auth': getToken(),
+            ...queryParams,//括号内是要传递给新窗口的参数
+            billType: "申请"
+          }
+        })
+        window.open(routeData.href.slice(1, routeData.href.length));
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
     //刷新
     refreshChange() {
       this.onLoad(this.page, this.search)

+ 235 - 0
src/views/statisticAnalysis/accountBalanceD/detailPage.vue

@@ -0,0 +1,235 @@
+<template>
+  <div>
+    <div class="borderless">
+      <div class="customer-head">
+        <div class="customer-back">
+          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                     @click="backToList">返回列表
+          </el-button>
+        </div>
+      </div>
+      <basic-container style="margin-top: 50px">
+        <avue-crud
+            :option="option"
+            :search.sync="search"
+            v-model="form"
+            :table-loading="loading"
+            :data="dataList"
+            ref="crud"
+            :key="key"
+            @on-load="onLoad"
+            @search-change="searchChange"
+            @refresh-change="refreshChange"
+            @resetColumn="resetColumnTwo('crud','option','optionList',239.1)"
+            @saveColumn="saveColumnTwo('crud','option','optionList',239.1)"
+            :page.sync="page">
+          <template slot-scope="scope" slot="menuLeft">
+            <el-button type="warning"
+                       icon="el-icon-plus"
+                       size="small"
+                       @click="outExport"
+            >导出
+            </el-button>
+          </template>
+        </avue-crud>
+      </basic-container>
+    </div>
+  </div>
+</template>
+
+<script>
+
+import {getListDetailed} from "@/api/accountBalance/index.js";
+import {getToken} from "@/util/auth";
+
+export default {
+  name: "index",
+  props:{
+    detailData: Object,
+  },
+  data() {
+    return {
+      loading: false,
+      show: true,
+      search: {},
+      form: {},
+      detailData: {},
+      dataList: [],
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      key: 0,
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        menuWidth: 140,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        dialogWidth: "70%",
+        menu: false,
+        column: [{
+          label: '销售单号',
+          prop: 'accSysNo',
+          search: true,
+          overHidden: true,
+        }, {
+          label: '数量',
+          prop: 'quantity',
+          overHidden: true,
+        }, {
+          label: '应收金额',
+          prop: 'amount',
+          search: true,
+          overHidden: true,
+        }, {
+          label: '已收金额',
+          prop: 'settlementAmount',
+          overHidden: true,
+        }, {
+          label: '余额',
+          prop: 'balance',
+          overHidden: true,
+        }, {
+          label: '科目代码',
+          prop: 'subjectNumber',
+          overHidden: true,
+        }, {
+          label: '开户银行',
+          prop: 'accountBank',
+          overHidden: true,
+        }, {
+          label: '银行户头',
+          prop: 'accountName',
+          overHidden: true,
+        }, {
+          label: '银行账号',
+          prop: 'accountNo',
+          overHidden: true,
+        }, {
+          label: '溢付款',
+          prop: 'overPayment',
+          overHidden: true,
+        }, {
+          label: '使用返利',
+          prop: 'usedProfit',
+          overHidden: true,
+        }, {
+          label: '使用溢付款',
+          prop: 'caseOverPayment',
+          overHidden: true,
+        }]
+      }
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(239.1), this.optionList);
+    this.key++
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+  },
+  methods: {
+    //导出
+    outExport() {
+      this.$confirm('是否导出列表?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let queryParams = this.search
+        const routeData = this.$router.resolve({
+          path: '/api/trade-finance/acc/SelAccItemExport',      //跳转目标窗口的地址
+          query: {
+            'Blade-Auth': getToken(),
+            ...queryParams,//括号内是要传递给新窗口的参数
+            billType: "收费",
+            corpId:this.detailData.corpId
+          }
+        })
+        window.open(routeData.href.slice(1, routeData.href.length));
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+    backToList() {
+      this.$emit("goBack");
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    searchChange(params, done) {
+      done();
+      this.onLoad(this.page, params)
+    },
+    onLoad(page, params = {}) {
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+        billType: "收费",
+        corpId:this.detailData.corpId
+      }
+      this.loading = true
+      getListDetailed(params).then(res => {
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+
+//自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+//自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 56 - 2
src/views/statisticAnalysis/accountBalanceD/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <basic-container>
+    <basic-container v-if="show">
       <avue-crud
           :option="option"
           :search.sync="search"
@@ -18,20 +18,42 @@
         <template slot="corpNameSearch">
           <crop-select v-model="search.corpId" corpType="KH"/>
         </template>
+        <template slot-scope="scope" slot="corpName">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row, scope.index)">{{scope.row.corpName}}</span>
+        </template>
+        <template slot-scope="scope" slot="menuLeft">
+          <el-button type="warning"
+                     icon="el-icon-plus"
+                     size="small"
+                     @click="outExport"
+          >导出
+          </el-button>
+        </template>
       </avue-crud>
     </basic-container>
+    <detail-page
+        ref="detail"
+        @goBack="goBack"
+        :detailData="detailData"
+        v-else
+    ></detail-page>
   </div>
 </template>
 
 <script>
 
 import {getList} from "@/api/accountBalance/index.js";
-
+import detailPage from "./detailPage.vue";
+import {getToken} from "@/util/auth";
 export default {
   name: "index",
+  components:{
+    detailPage
+  },
   data() {
     return {
       loading: false,
+      show:true,
       search: {},
       form: {},
       detailData: {},
@@ -112,6 +134,38 @@ export default {
     }
   },
   methods: {
+    goBack(){
+      this.show = true;
+      this.onLoad(this.page,this.search)
+    },
+    //导出
+    outExport() {
+      this.$confirm('是否导出列表?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let queryParams = this.search
+        const routeData = this.$router.resolve({
+          path: '/api/trade-finance/acc/selBillBalanceExport',      //跳转目标窗口的地址
+          query: {
+            'Blade-Auth': getToken(),
+            ...queryParams,//括号内是要传递给新窗口的参数
+            billType: "收费"
+          }
+        })
+        window.open(routeData.href.slice(1, routeData.href.length));
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消' //
+        });
+      })
+    },
+    beforeOpenPage(row, index){
+      this.show = false
+      this.detailData = row
+    },
     //刷新
     refreshChange() {
       this.onLoad(this.page, this.search)