Browse Source

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 years ago
parent
commit
ff9bd90cea

+ 10 - 0
src/api/financialManagement/paymentRequest.js

@@ -92,4 +92,14 @@ export const paymentApply = (data) => {
   })
 }
 
+// 查询客户银行list
+export const getlistBankBy = (corpsId) => {
+  return request({
+    url: '/api/blade-client/client/listBankByCorpId',
+    method: 'get',
+    params: {
+      corpsId:corpsId
+    }
+  })
+}
 

+ 4 - 0
src/components/bill/billDetailList.vue

@@ -30,6 +30,9 @@
       billType:{
         type: String
       },
+      corpId:{
+        type: String
+      },
       itemId: {
         type: String
       },
@@ -67,6 +70,7 @@
       onLoad(page, params = {}){
         this.loading = true;
         params.billType = this.billType
+        params.corpId = this.corpId
         getBillList(page.currentPage, page.pageSize,params).then(res=>{
           this.data = res.data.data.records
           this.page.total = res.data.data.total

+ 17 - 46
src/components/bill/config/mainList.json

@@ -9,7 +9,9 @@
   "cellBtn":false,
   "cancelBtn":false,
   "refreshBtn": false,
+  "searchMenuPosition": "right",
   "searchMenuSpan": 6,
+  "searchSpan": 8,
   "align": "center",
   "delBtn":true,
   "dialogWidth": "60%",
@@ -25,78 +27,47 @@
       "label": "合同号",
       "prop": "accSysNo",
       "overHidden": true,
-      "width": 120,
+      "search": true,
+      "width": 150,
       "index": 2
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
-      "search": true,
+      "label": "提单号",
+      "prop": "billNo",
       "overHidden": true,
-      "width": 200,
-      "index": 3
+      "search": true,
+      "width": 150,
+      "index": 2
     },
     {
       "label": "费用名称",
       "prop": "costType",
       "overHidden": true,
+      "search": true,
       "width": 150,
       "index": 4
     },
     {
-      "label": "数量",
-      "prop": "quantity",
-      "overHidden": true,
-      "width": 120,
-      "index": 5
-    },
-    {
-      "label": "单价",
-      "prop": "price",
-      "width": 120,
-      "overHidden": true,
-      "index": 6
-    },
-    {
-      "label": "账单金额",
+      "label": "金额",
       "prop": "amount",
       "search": true,
       "overHidden": true,
-      "width": 120,
+      "width": 150,
       "index": 7
     },
     {
-      "label": "结算金额",
+      "label": "本次金额",
       "prop": "settlementAmount",
-      "width": 120,
+      "width": 150,
       "overHidden": true,
       "index": 8
     },
     {
-      "label": "币别",
-      "prop": "currency",
-      "width": 120,
-      "overHidden": true,
-      "index": 9
-    },
-    {
-      "label": "汇率",
-      "prop": "exchangeRate",
-      "width": 120,
-      "overHidden": true,
-      "index": 10
-    },
-    {
-      "label": "录入人",
-      "prop": "createUserName",
-      "overHidden": true,
-      "index": 11,
-      "width": 120
-    },
-    {
       "label": "录入日期",
       "prop": "createTime",
       "type": "date",
+      "hide": true,
+      "search": true,
       "overHidden": true,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
@@ -108,7 +79,7 @@
       "prop": "remark",
       "overHidden": true,
       "index": 13,
-      "width": 200
+      "width": 250
     }
   ]
 }

+ 128 - 0
src/components/costBreakdown/config/feeList.json

@@ -0,0 +1,128 @@
+{
+  "headerAlign": "center",
+  "align": "center",
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "lazy": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": false,
+  "simplePage": true,
+  "searchSpan": 8,
+  "searchMenuSpan": 6,
+  "tree": true,
+  "selection": true,
+  "viewBtn": true,
+  "menuWidth": 300,
+  "column": [
+    {
+      "label": "费用编号",
+      "prop": "code",
+      "search": true,
+      "index": 1,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入费用编号",
+          "trigger": "blur"
+        }
+      ],
+      "width": 120
+    },
+    {
+      "label": "费用名称",
+      "prop": "cname",
+      "search": true,
+      "index": 2,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入商品名称",
+          "trigger": "blur"
+        }
+      ],
+      "width": 150
+    },
+    {
+      "label": "币别",
+      "prop": "fcyno",
+      "search": true,
+      "index": 3,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入币别",
+          "trigger": "blur"
+        }
+      ],
+      "width": 120
+    },
+    {
+      "label": "计量单位",
+      "prop": "unitno",
+      "search": true,
+      "index": 4,
+      "rules": [{
+        "required": false,
+        "message": "请输入计量单位",
+        "trigger": "blur"
+      }],
+      "width": 120
+    },
+    {
+      "label": "收付",
+      "type": "select",
+      "prop": "dc",
+      "search": true,
+      "index": 5,
+      "dicData": [{
+        "label": "收",
+        "value": "D"
+      }, {
+        "label": "付",
+        "value": "C"
+      }],
+      "rules": [
+        {
+          "required": false,
+          "message": "请选择收付",
+          "trigger": "blur"
+        }
+      ],
+      "width": 120
+    },
+    {
+      "label": "费用类别",
+      "prop": "feesTypeId",
+      "dicData": [],
+      "type": "tree",
+      "hide": true,
+      "addDisabled": false,
+      "multiple": true,
+      "props": {
+        "label": "title"
+      },
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "click"
+      }],
+      "width": 120
+    },{
+      "label": "备注",
+      "prop": "remarks",
+      "index": 6,
+      "rules": [
+        {
+          "required": false,
+          "message": "请输入备注",
+          "trigger": "blur"
+        }
+      ],
+      "width": 120
+    }
+  ]
+}

+ 293 - 0
src/components/costBreakdown/costBreakdown.vue

@@ -0,0 +1,293 @@
+<template>
+  <span class="select-component" style="display:inline-flex;width: 100%;">
+    <el-select
+      v-model="value"
+      size="small"
+      :placeholder="configuration.placeholder"
+      style="border-right: none;width: 100%"
+      :disabled="disabled?disabled:false"
+      :multiple="configuration.multiple?configuration.multiple:false"
+      :clearable="configuration.clearable?configuration.clearable:false"
+      :collapse-tags="configuration.collapseTags?configuration.collapseTags:false"
+      filterable
+      remote
+      @change="changeName"
+      :remote-method="remoteMethod"
+    >
+      <el-option
+        v-for="item in configuration.dicData.length !== 0?dicData.length !== 0?dicData:configuration.dicData:dicData"
+        :key="item.id"
+        :label="item.cname"
+        :value="item.id"
+      />
+    </el-select>
+    <el-button slot="append" icon="el-icon-search" size="mini" @click="dialogVisible = true"
+               :disabled="disabled?disabled:false"></el-button>
+  <el-dialog
+    v-dialogdrag
+    title="导入费用"
+    :fullscreen="dialogFull"
+    :visible.sync="dialogVisible"
+    class="el-dialogDeep"
+    append-to-body
+    width="70%">
+    <template slot="title">
+      <span class="el-dialog__title">
+        <span style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
+        导入费用
+      </span>
+      <div style="float: right" class="avue-crud__dialog__menu" @click="dialogFull? dialogFull=false: dialogFull=true">
+        <i class="el-icon-full-screen"></i>
+      </div>
+    </template>
+    <el-row style="height: 0">
+      <el-col :span="5">
+        <div class="box">
+          <el-scrollbar>
+            <basic-container>
+              <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
+            </basic-container>
+          </el-scrollbar>
+        </div>
+      </el-col>
+      <el-col :span="19">
+        <basic-container>
+          <avue-crud :option="option"
+                     :data="dataList"
+                     ref="crud"
+                     v-model="form"
+                     :page.sync="page"
+                     :before-close="beforeClose"
+                     @search-change="searchChange"
+                     @search-reset="searchReset"
+                     @refresh-change="refreshChange"
+                     @selection-change="selectionChange"
+                     @on-load="onLoad"
+                     @tree-load="treeLoad">
+          </avue-crud>
+        </basic-container>
+      </el-col>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button type="primary" @click="confirmSelection"
+                 :disabled="configuration.multipleChoices === true?false:selection.length === 1?false:true">确 定</el-button>
+    </span>
+  </el-dialog>
+  </span>
+</template>
+
+<script>
+  import option from "./config/feeList.json";
+  import { getDeptLazyTree, customerList } from "@/api/basicData/basicFeesDesc";
+
+  export default {
+    name: "costBreakdown",
+    props: {
+      disabled: Boolean,
+      value: String,
+      configuration: Object,
+    },
+    model: {
+      prop: 'value',
+      event: 'returnBack'
+    },
+    data() {
+      return {
+        dialogFull: false,
+        form: {},
+        dicData: [],
+        dialogVisible: false,
+        value: '',
+        option: option,
+        parentId: 0,
+        dataList: [],
+        selection: [],
+        treeOption: {
+          nodeKey: 'id',
+          lazy: true,
+          treeLoad: function (node, resolve) {
+            const parentId = (node.level === 0) ? 0 : node.data.id;
+            getDeptLazyTree(parentId).then(res => {
+              resolve(res.data.data.map(item => {
+                return {
+                  ...item,
+                  leaf: !item.hasChildren
+                }
+              }))
+            });
+          },
+          addBtn: false,
+          menu: false,
+          size: 'small',
+          props: {
+            labelText: '标题',
+            label: 'title',
+            value: 'value',
+            children: 'children'
+          }
+        },
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        // 远程模糊查找loading
+        loading: false,
+        queryParams: {
+          size: 10,
+          current: 1
+        },
+      }
+    },
+    created() {
+      // this.option.searchShow = this.configuration.searchShow ? this.configuration.searchShow : false
+      this.remoteMethod()
+    },
+    methods: {
+      changeName(){
+        this.$emit('returnBack', this.value)
+      },
+      //刷新触发
+      refreshChange() {
+        this.page = {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        }
+      },
+      //确认导出触发
+      confirmSelection() {
+        this.dicData = []
+        if (this.configuration.multipleChoices === true) {
+          let value = []
+          for (let item in this.selection) {
+            this.dicData.push({id: this.selection[item].id, cname: this.selection[item].cname})
+            value.push(this.selection[item].id)
+          }
+          this.value = value
+        } else {
+          this.dicData.push({id: this.selection[0].id, cname: this.selection[0].cname})
+          this.value = this.selection[0].id
+        }
+        this.selection = []
+        this.$emit('returnBack', this.value)
+        this.dialogVisible = false
+        this.$emit('receiveList',this.dicData)
+      },
+      //选中触发
+      selectionChange(selection) {
+        this.selection = selection
+      },
+      nodeClick(data) {
+        this.treeDeptId = data.id;
+        this.page.currentPage = 1;
+        this.onLoad(this.page);
+      },
+      //查询全部
+      initData() {
+        customerList().then(res => {
+          const column = this.findObject(this.option.column, "parentId");
+          column.dicData = res.data.data.records;
+        });
+      },
+      //新增子项触发
+      handleAdd(row) {
+        this.parentId = row.id;
+        const column = this.findObject(this.option.column, "parentId");
+        column.value = row.id;
+        column.addDisabled = true;
+        this.$refs.crud.rowAdd();
+      },
+      //点击新增时触发
+      beforeClose(done) {
+        this.parentId = "";
+        const column = this.findObject(this.option.column, "parentId");
+        column.value = "";
+        column.addDisabled = false;
+        done();
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done()
+      },
+      //搜索重置按钮触发
+      searchReset() {
+        this.treeDeptId = '';
+        this.onLoad(this.page);
+      },
+      onLoad(page, params = {parentId: 0}) {
+        let queryParams = Object.assign({}, params, {
+          size: page.pageSize,
+          current: page.currentPage,
+          feesTypeId: this.treeDeptId
+        })
+        customerList(queryParams).then(res => {
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          if (this.page.total) {
+            this.option.height = window.innerHeight - 500;
+          } else {
+            this.option.height = window.innerHeight - 200;
+          }
+        })
+      },
+      //树桩列点击展开触发
+      treeLoad(tree, treeNode, resolve) {
+        const parentId = tree.id;
+        customerList({parentId: parentId}).then(res => {
+          resolve(res.data.data.records);
+        });
+      },
+      // 远程模糊查找
+      remoteMethod(query) {
+        if (query) {
+          this.loading = true;
+          this.queryParams = {
+            size: 10,
+            current: 1,
+            cname: query
+          }
+          customerList(this.queryParams).then(res => {
+            this.dicData = res.data.data.records
+            this.loading = false;
+          });
+        } else {
+          this.loading = true
+          this.queryParams = {
+            size: 10,
+            current: 1
+          }
+          customerList(this.queryParams).then(res => {
+            this.dicData = []
+            this.configuration.dicData = this.configuration.dicData.concat(res.data.data.records)
+            // this.configuration.dicData = res.data.data.records
+            this.removeRepeat()
+            this.loading = false;
+          });
+        }
+      },
+      // 去重
+      removeRepeat() {
+        let obj = []
+        this.configuration.dicData = this.configuration.dicData.reduce((current,next) => {
+          obj[next.id] ? '': obj[next.id] = true && current.push(next)
+          return current
+        }, [])
+      },
+    }
+  };
+</script>
+
+<style scoped lang="scss">
+  .el-dialogDeep {
+    ::v-deep .el-dialog {
+      .el-dialog__body, .el-dialog__footer {
+        padding-bottom: 0 !important;
+        padding-top: 0 !important;
+      }
+    }
+  }
+</style>

+ 42 - 4
src/components/finance/applyPayment.vue

@@ -9,6 +9,22 @@
           <template slot-scope="scope" slot="corpId">
             <selectComponent v-model="corpId" :configuration="configuration"/>
           </template>
+          <template slot-scope="scope" slot="billNo">
+            <el-select placeholder="请选择" v-model="item.form.billNo" clearable>
+              <el-option
+                v-for="item in item.form.billNoList"
+                :key="item"
+                :label="item"
+                :value="item"
+              ></el-option>
+            </el-select>
+          </template>
+          <template slot-scope="scope" slot="costType">
+            <breakdown-select
+               v-model="item.form.costType"
+               :configuration="breakConfiguration">
+            </breakdown-select>
+          </template>
           <template slot-scope="scope" slot="price">
             <el-input
               v-model="item.form.price"
@@ -37,8 +53,8 @@
        添加账单
     </el-button>
     <div style="float: right;margin-right: 8px">
+      <el-button size="small" @click="$emit('choceFun')">取消</el-button>
       <el-button type="primary" size="small" @click="submit()">确定</el-button>
-      <el-button size="small" @click="choceFun">取消</el-button>
     </div>
   </div>
 </template>
@@ -77,6 +93,15 @@
             placeholder:'请点击右边按钮选择',
             dicData:[]
           },
+          breakConfiguration:{
+            multipleChoices:false,
+            multiple:false,
+            disabled:true,
+            searchShow:true,
+            collapseTags:false,
+            placeholder:'请点击右边按钮选择',
+            dicData:[]
+          },
           option:{
             emptyBtn: false,
             submitBtn: false,
@@ -110,7 +135,7 @@
               },
               {
                 label: '提单号',
-                prop: 'accDate',
+                prop: 'billNo',
                 span: 8,
                 rules: [
                   {
@@ -325,8 +350,21 @@
                   this.$message.success("操作成功!")
                   this.$emit("choceFun");
                   //跳转付款申请页面
-
-
+                  if(this.$store.getters.takeStatus){
+                    this.$alert("无法自动跳转到付款申请页面,因为页面已存在。", "温馨提示", {
+                      confirmButtonText: "确定",
+                      type: 'warning',
+                      callback: action => {
+                      }
+                    });
+                  }else{
+                    //关闭一下存在的列表页  跳转
+                    this.$router.$avueRouter.closeTag('/payment_request');
+                    this.$router.push({
+                      path: "/payment_request",
+                      query: {params: res.data.data.id},
+                    });
+                  }
                 }
               })
             }

+ 3 - 0
src/main.js

@@ -35,6 +35,8 @@ import selectComponent from '@/components/selectComponent/customerSelect';
 import warehouseSelect from '@/components/warehouseSelect/index';
 // 商品选择组件
 import goodsSelect from '@/components/goodsSelect/index';
+//费用选择组件
+import breakdownSelect from '@/components/costBreakdown/costBreakdown';
 //枚举列设置名称管理
 import {
   getColumnName
@@ -48,6 +50,7 @@ import '@/assets/css/form.css'
 Vue.component('selectComponent', selectComponent);
 Vue.component('warehouseSelect', warehouseSelect);
 Vue.component('goodsSelect', goodsSelect);
+Vue.component('breakdownSelect', breakdownSelect);
 import portInfo from "@/components/port-info/index";
 Vue.component('portInfo', portInfo);
 // 注册全局crud驱动

+ 3 - 0
src/page/index/tags.vue

@@ -153,6 +153,9 @@ export default {
         if (tag.label == "收货单(I)") {
           this.$store.commit("TAKE_OUT_DETAIL");
         }
+        if (tag.label == "付款申请") {
+          this.$store.commit("PQ_OUT_DETAIL");
+        }
         if (tag.label == "付款结算") {
           this.$store.commit("PAY_OUT_DETAIL");
         }

+ 1 - 0
src/store/getters.js

@@ -32,6 +32,7 @@ const getters = {
   outStatus: state => state.ifdetail.outStatus,
   payStatus: state => state.ifdetail.payStatus,
   outtaskStatus: state => state.ifdetail.outtaskStatus,
+  pqStatus: state => state.ifdetail.pqStatus,
   paySettle: state => state.ifdetail.paySettle,
   receiptSettle: state => state.ifdetail.receiptSettle
 }

+ 12 - 1
src/store/modules/ifdetail.js

@@ -6,7 +6,7 @@ const ifdetail = {
     takeStatus: false, //进口发货单
     outStatus: false, //出口发货单
     outtaskStatus: false, //出口收货单
-    payStatus: false, //付款
+    pqStatus: false, //付款
     paySettle:false, //付款结算
     receiptSettle:false, //收款结算
   },
@@ -67,6 +67,14 @@ const ifdetail = {
       state.outtaskStatus = false;
     },
     //付款管理
+    // 进入付款申请
+    PQ_IN_DETAIL(state) {
+      state.pqStatus = true;
+    },
+    // 退出付款申请
+    PQ_OUT_DETAIL(state) {
+      state.pqStatus = false;
+    },
     // 进入付款结算
     PAY_IN_DETAIL(state) {
       state.paySettle = true;
@@ -112,6 +120,9 @@ const ifdetail = {
       if (tag.label == '收货单(E)') {
         state.outtaskStatus = true;
       }
+      if (tag.label == '付款申请') {
+        state.pqStatus = true;
+      }
       if (tag.label == '付款结算') {
         state.paySettle = true;
       }

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

@@ -8,6 +8,7 @@
   "tip": false,
   "simplePage": true,
   "searchShow": true,
+  "searchSpan": 8,
   "searchMenuSpan": 6,
   "tree": true,
   "searchMenuPosition": "right",
@@ -21,7 +22,6 @@
     {
       "label": "单据类型",
       "prop": "billType",
-      "search": true,
       "overHidden": true,
       "width": 120,
       "index": 1
@@ -29,6 +29,15 @@
     {
       "label": "合同号",
       "prop": "accSysNo",
+      "search": true,
+      "overHidden": true,
+      "width": 120,
+      "index": 2
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "search": true,
       "overHidden": true,
       "width": 120,
       "index": 2
@@ -44,6 +53,7 @@
     {
       "label": "费用名称",
       "prop": "costType",
+      "search": true,
       "overHidden": true,
       "width": 150,
       "index": 4
@@ -65,7 +75,6 @@
     {
       "label": "账单金额",
       "prop": "amount",
-      "search": true,
       "overHidden": true,
       "width": 120,
       "index": 7
@@ -102,6 +111,7 @@
       "label": "录入日期",
       "prop": "createTime",
       "type": "date",
+      "search": true,
       "overHidden": true,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",

+ 10 - 2
src/views/financialManagement/paymentRequest/configuration/detailsPage.json

@@ -23,8 +23,14 @@
       "overHidden": true
     },
     {
+      "label": "提单号",
+      "prop": "billNo",
+      "index": 2,
+      "overHidden": true
+    },
+    {
       "label": "客户名称",
-      "prop": "corpId",
+      "prop": "corpName",
       "index": 2,
       "overHidden": true
     },
@@ -39,6 +45,7 @@
       "label": "数量",
       "prop": "quantity",
       "index": 4,
+      "slot": true,
       "cell": true,
       "overHidden": true
     },
@@ -46,6 +53,7 @@
       "label": "单价",
       "prop": "price",
       "index": 5,
+      "slot": true,
       "cell": true,
       "overHidden": true
     },
@@ -53,7 +61,6 @@
       "label": "金额",
       "prop": "amount",
       "index": 6,
-      "cell": true,
       "overHidden": true
     },
     {
@@ -61,6 +68,7 @@
       "prop": "currency",
       "index": 7,
       "cell": true,
+      "slot": true,
       "overHidden": true
     },
     {

+ 7 - 0
src/views/financialManagement/paymentRequest/configuration/mainList.json

@@ -25,6 +25,13 @@
       "index": 1
     },
     {
+      "label": "提单号",
+      "prop": "srcOrderno",
+      "overHidden": true,
+      "width": 150,
+      "index": 1
+    },
+    {
       "label": "客户名称",
       "prop": "corpName",
       "search": true,

+ 7 - 1
src/views/financialManagement/paymentRequest/paymentRequest.vue

@@ -70,7 +70,13 @@
       }
     },
     created() {
-
+      if(this.$route.query.params){
+        this.detailData={
+          id:this.$route.query.params
+        }
+        this.show = false;
+        this.$store.commit("PQ_IN_DETAIL");
+      }
     },
     components:{
       detailPage

+ 125 - 31
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -31,9 +31,24 @@
           <template slot="corpId">
             <select-component
               v-model="form.corpId"
+              @returnBack="returnBack"
               :configuration="configuration"
             ></select-component>
           </template>
+          <template slot="accountNo">
+            <el-select v-model="form.accountNo"
+                       placeholder="请选择"
+                       @change="accountNoChange"
+                       clearable
+                       filterable>
+              <el-option v-for="(item,index) in form.bankList"
+                         :key="index"
+                         :label="item.accountNo"
+                         :value="item.accountNo"
+                         >
+              </el-option>
+            </el-select>
+          </template>
         </avue-form>
       </basic-container>
       <containerTitle title="明细列表"></containerTitle>
@@ -54,15 +69,51 @@
               size="small"
               :disabled="!checkDisabled"
               @click.stop="rowCell(scope.row,scope.index)"
-            >修改
+            >{{ scope.row.$cellEdit ? '修改完成' : '修改' }}
             </el-button>
             <el-button
               type="text"
               size="small"
-              @click.stop=""
+              @click.stop="rowDel(scope.row,scope.index)"
             >删除
             </el-button>
           </template>
+          <template slot="quantity" slot-scope="{ row }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.quantity"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+              @input="priceChange(row)"
+            ></el-input>
+            <span v-else>{{ row.quantity }}</span>
+          </template>
+          <template slot="price" slot-scope="{ row }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.price"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+              @input="priceChange(row)"
+            ></el-input>
+            <span v-else>{{ row.price }}</span>
+          </template>
+          <template slot="currency" slot-scope="{row,index}">
+            <el-select v-if="row.$cellEdit"
+                       v-model="row.currency"
+                       size="small"
+                       @change="currencyChange(row)"
+                        clearable
+                       filterable>
+              <el-option v-for="(item,index) in currencyDic"
+                         :key="index"
+                         :label="item.dictValue"
+                         :value="item.dictValue"></el-option>
+            </el-select>
+            <span v-else>{{ row.currency }}</span>
+          </template>
         </avue-crud>
       </basic-container>
     </div>
@@ -72,7 +123,7 @@
 <script>
   import itemOption from "./configuration/detailsPage.json";
   import { contrastObj,contrastList } from "@/util/contrastData";
-  import { getDetails,modify,submit, paymentCheck } from "@/api/financialManagement/paymentRequest";
+  import { getDetails,modify,submit, paymentCheck,getlistBankBy } from "@/api/financialManagement/paymentRequest";
 
   export default {
     name: "paymentDetailsPage",
@@ -96,6 +147,15 @@
           pagerCount: 5,
           total: 0,
         },
+        breakConfiguration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:true,
+          searchShow:true,
+          collapseTags:false,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
         query:{},
         option: {
           menuBtn: false,
@@ -131,12 +191,13 @@
               ]
             },
             {
-              label: '总金额',
-              prop: 'amount',
+              label: '银行账号',
+              prop: 'accountNo',
+              type:"select",
               span: 8,
               rules: [
                 {
-                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                  required: false,
                   message: ' ',
                   trigger: 'blur'
                 }
@@ -164,13 +225,14 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '银行账号',
-              prop: 'accountNo',
+            },
+            {
+              label: '总金额',
+              prop: 'amount',
               span: 8,
               rules: [
                 {
-                  required: false,
+                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
                   message: ' ',
                   trigger: 'blur'
                 }
@@ -250,9 +312,39 @@
       }
     },
     methods: {
+      //选择客户
+      returnBack(corpValue){
+        getlistBankBy(corpValue).then(res =>{
+          this.form.bankList = res.data
+        })
+      },
+      //选择银行账号
+      accountNoChange(value){
+        this.form.bankList.forEach(item =>{
+          if(item.accountNo == value){
+            this.$set(this.form,"accountBank",item.accountBank)
+            this.$set(this.form,"accountName",item.accountName)
+          }
+        })
+      },
+      //选择费用
+      returnBreak(breakValue){
+
+      },
+      //选择币别 带汇率
+      currencyChange(row){
+        if(row.currency === "USD"){
+            row.exchangeRate = 6.384300
+        }else{
+          row.exchangeRate = 1
+        }
+      },
       rowCell(row, index) {
         this.$refs.crud.rowCell(row, index)
       },
+      rowDel(row,index){
+        this.dataList.splice(index, 1);
+      },
       //验证新旧数据
       verification(){
         let verification;
@@ -295,27 +387,21 @@
       //结算
       settlement(){
         if(this.verification()){
-          this.$confirm("您确定结算此次申请吗?", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          }).then(()=>{
-            if(this.$store.getters.takeStatus){
-              this.$alert("结算页面已存在,请关闭收货单再进行操作", "温馨提示", {
-                confirmButtonText: "确定",
-                type: 'warning',
-                callback: action => {
-                }
-              });
-            }else{
-              //关闭一下存在的列表页  跳转
-              this.$router.$avueRouter.closeTag('/payment_settle');
-              this.$router.push({
-                path: "/payment_settle",
-                query: {params: this.form.id},
-              });
-            }
-          })
+          if(this.$store.getters.takeStatus){
+            this.$alert("结算页面已存在,请关闭收货单再进行操作", "温馨提示", {
+              confirmButtonText: "确定",
+              type: 'warning',
+              callback: action => {
+              }
+            });
+          }else{
+            //关闭一下存在的列表页  跳转
+            this.$router.$avueRouter.closeTag('/payment_settle');
+            this.$router.push({
+              path: "/payment_settle",
+              query: {params: this.form.id},
+            });
+          }
         }
       },
       searchReset() {
@@ -341,6 +427,9 @@
               billType:"申请",
               itemsList:this.dataList
             }
+
+            this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
             submit(params).then(res =>{
               this.$message.success("操作成功!")
               this.form = res.data.data;
@@ -397,6 +486,11 @@
     color: #323233;
     font-weight: 400;
   }
+  .required_fields{
+    color: #F56C6C;
+    display:inline-block;
+    width: 7%
+  }
   .upper_right_button{
     display: flex;
     position: fixed;

+ 15 - 51
src/views/financialManagement/paymentSettle/configuration/detailsPage.json

@@ -14,87 +14,51 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 120,
+  "menuWidth": 180,
   "column": [
     {
       "label": "合同号",
-      "prop": "accSysNo",
+      "prop": "srcOrderno",
       "overHidden": true,
-      "width": 120,
+      "width": 200,
       "index": 2
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
+      "label": "提单号",
+      "prop": "billNo",
       "overHidden": true,
       "width": 200,
       "index": 3
     },
     {
       "label": "费用名称",
-      "prop": "costType",
+      "prop": "itemName",
       "overHidden": true,
       "width": 150,
       "index": 4
     },
     {
-      "label": "数量",
-      "prop": "quantity",
-      "overHidden": true,
-      "width": 120,
-      "index": 5
-    },
-    {
-      "label": "单价",
-      "prop": "price",
-      "width": 120,
-      "overHidden": true,
-      "index": 6
-    },
-    {
-      "label": "账单金额",
+      "label": "金额",
       "prop": "amount",
       "overHidden": true,
-      "width": 120,
+      "width": 150,
       "index": 7
     },
     {
-      "label": "币别",
-      "prop": "currency",
-      "width": 120,
-      "overHidden": true,
-      "index": 9
-    },
-    {
-      "label": "汇率",
-      "prop": "exchangeRate",
-      "width": 120,
-      "overHidden": true,
-      "index": 10
-    },
-    {
-      "label": "录入人",
-      "prop": "createUserName",
-      "overHidden": true,
-      "index": 11,
-      "width": 120
-    },
-    {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
+      "label": "本次金额",
+      "prop": "thisAmount",
       "overHidden": true,
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "width": 200,
-      "index": 12
+      "cell": true,
+      "width": 150,
+      "index": 7
     },
     {
       "label": "备注",
       "prop": "remark",
       "overHidden": true,
       "index": 13,
-      "width": 200
+      "cell": true,
+      "width": 500
     }
   ]
 }

+ 27 - 20
src/views/financialManagement/paymentSettle/configuration/mainList.json

@@ -21,7 +21,16 @@
       "label": "合同号",
       "prop": "srcOrderno",
       "overHidden": true,
-      "width": 120,
+      "search": true,
+      "width": 150,
+      "index": 1
+    },
+    {
+      "label": "提单号",
+      "prop": "billNo",
+      "search": true,
+      "overHidden": true,
+      "width": 150,
       "index": 1
     },
     {
@@ -29,15 +38,17 @@
       "prop": "corpId",
       "search": true,
       "overHidden": true,
-      "width": 120,
+      "width": 200,
       "index": 2
     },
     {
       "label": "收款日期",
       "prop": "settlementDate",
       "overHidden": true,
+      "unlinkPanels": true,
+      "searchRange": true,
       "search": true,
-      "width": 120,
+      "width": 150,
       "index": 3
     },
     {
@@ -49,46 +60,42 @@
       "index": 4
     },
     {
-      "label": "币别",
-      "prop": "currency",
-      "overHidden": true,
-      "width": 120,
-      "index": 5
-    },
-    {
       "label": "银行名称",
       "prop": "accountBank",
+      "search": true,
       "overHidden": true,
-      "width": 120,
+      "width": 150,
       "index": 6
     },
     {
       "label": "银行户头",
       "prop": "accountName",
+      "search": true,
       "overHidden": true,
-      "width": 120,
+      "width": 150,
       "index": 7
     },
     {
+      "label": "录入人",
+      "prop": "createUserName",
+      "overHidden": true,
+      "index": 9,
+      "width": 120
+    },
+    {
       "label": "录入日期",
       "prop": "createTime",
       "overHidden": true,
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
-      "width": 120,
+      "width": 150,
       "index": 8
     },
     {
-      "label": "录入人",
-      "prop": "createUserName",
-      "overHidden": true,
-      "index": 9,
-      "width": 120
-    },
-    {
       "label": "备注",
       "prop": "remark",
+      "search": true,
       "overHidden": true,
       "index": 10,
       "width": 120

+ 106 - 22
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -5,10 +5,18 @@
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
-        <el-button class="el-button--small-yh add-customer-btn" type="primary"
-                   @click.stop="confirmSettlement"confirmSettlement
-        >{{this.id?"确认修改" :"确认结算"}}
-        </el-button>
+        <div class="upper_right_button">
+          <el-button type="warning"
+                     class="el-button--small-yh"
+                     @click.stop="confirmSettlement"
+          >结算
+          </el-button>
+          <el-button class="el-button--small-yh"
+                     type="primary"
+                     @click.stop="confirmSettlement"
+          >{{this.id?"确认修改" :"确认新增"}}
+          </el-button>
+        </div>
       </div>
     </div>
     <div style="margin-top: 60px">
@@ -18,9 +26,24 @@
           <template slot="corpId">
             <select-component
               v-model="form.corpId"
+              @returnBack="returnBack"
               :configuration="configuration"
             ></select-component>
           </template>
+          <template slot="accountNo">
+            <el-select v-model="form.accountNo"
+                       placeholder="请选择"
+                       @change="accountNoChange"
+                       clearable
+                       filterable>
+              <el-option v-for="(item,index) in form.bankList"
+                         :key="index"
+                         :label="item.accountNo"
+                         :value="item.accountNo"
+              >
+              </el-option>
+            </el-select>
+          </template>
         </avue-form>
       </basic-container>
       <basic-container>
@@ -45,10 +68,27 @@
             <el-button
               type="text"
               size="small"
-              @click.stop=""
+              @click.stop="rowCell(scope.row,scope.index)"
+            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
+            </el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click.stop="rowDel(scope.row,scope.index)"
             >删除
             </el-button>
           </template>
+          <template slot="thisAmount" slot-scope="{ row }">
+            <el-input
+              v-if="row.$cellEdit"
+              v-model="row.thisAmount"
+              placeholder="请输入"
+              size="small"
+              oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
+              @change="thisAmountChange(row)"
+            ></el-input>
+            <span v-else>{{ row.thisAmount }}</span>
+          </template>
         </avue-crud>
       </basic-container>
       <el-dialog
@@ -63,6 +103,7 @@
         top="10vh"
         v-dialog-drag>
         <bill-detail
+          :corpId="corpId"
           :billType="billType"
           @closeFun="!billDetailDialog"
           @importProMent="importProMent"
@@ -79,6 +120,7 @@
   import { getDetails,modify } from "@/api/financialManagement/paymentRequest";
   import { contrastObj,contrastList } from "@/util/contrastData";
   import  billDetail from "@/components/bill/billDetailList";
+  import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
   import _ from "lodash";
 
   export default {
@@ -95,6 +137,7 @@
         itemsOption: option,
         billDetailDialog:false,
         billType:"申请",
+        corpId:"",
         id:"",
         dataList: [],
         currencyDic:[],
@@ -138,17 +181,18 @@
               ]
             },
             {
-              label: '总金额',
-              prop: 'amount',
+              label: '银行账号',
+              prop: 'accountNo',
               span: 8,
               rules: [
                 {
-                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                  required: false,
                   message: ' ',
                   trigger: 'blur'
                 }
               ]
-            },{
+            },
+            {
               label: '开户银行',
               prop: 'accountBank',
               span: 8,
@@ -170,13 +214,14 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '银行账号',
-              prop: 'accountNo',
+            },
+            {
+              label: '总金额',
+              prop: 'amount',
               span: 8,
               rules: [
                 {
-                  required: false,
+                  pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
                   message: ' ',
                   trigger: 'blur'
                 }
@@ -270,7 +315,10 @@
           delete res.data.data.id;
           delete res.data.data.sysNo;
           delete res.data.data.billType;
-          res.data.data.itemsList.map((items)=>{ delete items.id })
+          res.data.data.itemsList.map((items)=>{
+            delete items.id ;
+            items.thisAmount = items.amount
+          })
           this.form = res.data.data;
           this.oldForm = Object.assign({},res.data.data);
           if(res.data.data.itemsList){
@@ -284,6 +332,28 @@
       option.height = window.innerHeight - 640 ;
     },
     methods: {
+      //选择客户
+      returnBack(corpValue){
+        this.corpId = corpValue
+        getlistBankBy(corpValue).then(res =>{
+          this.$set(this.form,"bankList",res.data)
+        })
+      },
+      //选择卡号
+      accountNoChange(value){
+        this.form.bankList.forEach(item =>{
+          if(item.accountNo == value){
+            this.$set(this.form,"accountBank",item.accountBank)
+            this.$set(this.form,"accountName",item.accountName)
+          }
+        })
+      },
+      thisAmountChange(row){
+        if(row.thisAmount > row.amount){
+          this.$message.error("本次金额不得大于金额!")
+          row.thisAmount = 0;
+        }
+      },
       selectPurchase(){
         this.billDetailDialog = true;
       },
@@ -295,6 +365,12 @@
         })
         this.billDetailDialog = false;
       },
+      rowCell(row,index){
+        this.$refs.crud.rowCell(row, index)
+      },
+      rowDel(row,index){
+        this.dataList.splice(index, 1);
+      },
       searchReset() {
         console.log('1')
       },
@@ -318,11 +394,23 @@
               cancelButtonText: "取消",
               type: "warning",
             }).then(()=>{
+              for (let i = 0; i < this.dataList.length; i++) {
+                if (this.dataList[i].thisAmount == null) {
+                  return this.$message.error(`第${i + 1}行的本次金额不能为空`);
+                }
+                if (this.dataList[i].thisAmount === 0) {
+                  return this.$message.error(`第${i + 1}行的本次金额不能为0`);
+                }
+              }
+
+              this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
               const params = {
                 ...this.form,
-                billType:"付款",
+                billType:"付",
                 itemsList:this.dataList
               }
+
               modify(params).then(res =>{
                 this.$message.success("操作成功!")
                 this.form = res.data.data;
@@ -380,14 +468,10 @@
     color: #323233;
     font-weight: 400;
   }
-  .add-customer-btn-two {
-    position: fixed;
-    right: 150px;
-    top: 115px;
-  }
-  .add-customer-btn {
+  .upper_right_button{
+    display: flex;
     position: fixed;
-    right: 36px;
+    right: 20px;
     top: 115px;
   }
 </style>

+ 2 - 2
src/views/financialManagement/receiptSettle/configuration/detailsPage.json

@@ -18,7 +18,7 @@
   "column": [
     {
       "label": "合同号",
-      "prop": "accSysNo",
+      "prop": "srcOrderno",
       "overHidden": true,
       "width": 120,
       "index": 2
@@ -32,7 +32,7 @@
     },
     {
       "label": "费用名称",
-      "prop": "costType",
+      "prop": "itemName",
       "overHidden": true,
       "width": 150,
       "index": 4

+ 2 - 0
src/views/purchase/contract/detailsPage.vue

@@ -946,9 +946,11 @@ export default {
       }
     },
     beforeBillData(type){
+      //采购明细提单号 list
       this.billData = {
         srcOrderno:this.form.orderNo,
         itemType:"采购",
+        billNoList: this.contactsData.map(item =>{return item.billNo}),
         corpsName:this.form.corpsName,
         corpId:this.form.corpId,
         accDate:this.form.businesDate,