Browse Source

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

QuKatie 3 years ago
parent
commit
022c32c5db
21 changed files with 966 additions and 500 deletions
  1. 11 0
      src/api/financialManagement/paymentRequest.js
  2. 24 4
      src/components/bill/billDetailList.vue
  3. 19 17
      src/components/bill/config/mainList.json
  4. 49 1
      src/views/financialManagement/billDetails/billDetails.vue
  5. 44 14
      src/views/financialManagement/billDetails/configuration/mainList.json
  6. 40 23
      src/views/financialManagement/paymentRequest/configuration/detailsPage.json
  7. 54 12
      src/views/financialManagement/paymentRequest/configuration/mainList.json
  8. 35 5
      src/views/financialManagement/paymentRequest/paymentRequest.vue
  9. 65 33
      src/views/financialManagement/paymentRequest/paymentRequestDetails.vue
  10. 20 9
      src/views/financialManagement/paymentSettle/configuration/detailsPage.json
  11. 58 21
      src/views/financialManagement/paymentSettle/configuration/mainList.json
  12. 34 4
      src/views/financialManagement/paymentSettle/paymentSettle.vue
  13. 85 35
      src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue
  14. 36 57
      src/views/financialManagement/receiptSettle/configuration/detailsPage.json
  15. 85 31
      src/views/financialManagement/receiptSettle/configuration/mainList.json
  16. 35 5
      src/views/financialManagement/receiptSettle/receiptSettle.vue
  17. 202 67
      src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue
  18. 26 52
      src/views/importTrade/invoice/detailsPageEdit.vue
  19. 25 53
      src/views/importTrade/receipt/detailsPageEdit.vue
  20. 8 31
      src/views/purchase/contract/detailsPage.vue
  21. 11 26
      src/views/salesManagement/salesContract/detailsPage.vue

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

@@ -61,6 +61,17 @@ export const modify = (data) => {
   })
 }
 
+//结算新增修改
+export const saveOrEdit = (data) => {
+  return request({
+    url: '/api/trade-finance/settlement/saveOrEdit',
+    method: 'post',
+    data: data
+  })
+}
+
+
+
 //付款申请 - 请核
 export const paymentCheck = (data) => {
   return request({

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

@@ -3,6 +3,7 @@
     <avue-crud :option="option"
                :table-loading="loading"
                :data="data"
+               :search.sync="search"
                ref="crud"
                @refresh-change="refreshChange"
                @selection-change="selectionChange"
@@ -10,10 +11,16 @@
                @saveColumn="saveColumn"
                :page.sync="page"
                @on-load="onLoad">
+      <template slot="costTypeSearch">
+        <breakdown-select
+          v-model="search.costType"
+          :configuration="breakConfiguration"
+        ></breakdown-select>
+      </template>
     </avue-crud>
     <div style="margin-left: 80%;padding: 15px">
        <span slot="footer" class="dialog-footer" >
-           <el-button @click="closeFun">取 消</el-button>
+           <el-button @click="$emit('closeFun')">取 消</el-button>
            <el-button type="primary" @click="importProMent" :disabled="selectList.length == 0">导入</el-button>
        </span>
     </div>
@@ -30,8 +37,8 @@
       billType:{
         type: String
       },
-      corpId:{
-        type: String
+      params:{
+        type: Object
       },
       itemId: {
         type: String
@@ -44,6 +51,7 @@
       return {
         option:option,
         loading:false,
+        search:{},
         data:[],
         selectList:[],
         page: {
@@ -51,6 +59,16 @@
           pagerCount: 5,
           total: 0,
         },
+        breakConfiguration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
       }
     },
     async created() {
@@ -69,8 +87,10 @@
       },
       onLoad(page, params = {}){
         this.loading = true;
+        params = {
+          ...this.params
+        }
         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

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

@@ -10,7 +10,7 @@
   "cancelBtn":false,
   "refreshBtn": false,
   "searchMenuPosition": "right",
-  "searchMenuSpan": 6,
+  "searchMenuSpan": 24,
   "searchSpan": 8,
   "align": "center",
   "delBtn":true,
@@ -33,48 +33,50 @@
     },
     {
       "label": "提单号",
-      "prop": "billNo",
+      "prop": "srcBillNo",
       "overHidden": true,
       "search": true,
       "width": 150,
       "index": 2
     },
     {
+      "label": "客户名称",
+      "prop": "corpName",
+      "overHidden": true,
+      "hide": true,
+      "search": false,
+      "width": 150,
+      "index": 2
+    },
+    {
       "label": "费用名称",
       "prop": "costType",
       "overHidden": true,
-      "search": true,
+      "hide": true,
+      "search": true
+    },
+    {
+      "label": "费用名称",
+      "prop": "itemName",
+      "overHidden": true,
       "width": 150,
       "index": 4
     },
     {
       "label": "金额",
       "prop": "amount",
-      "search": true,
       "overHidden": true,
       "width": 150,
       "index": 7
     },
     {
-      "label": "本次金额",
+      "label": "结算金额",
       "prop": "settlementAmount",
       "width": 150,
       "overHidden": true,
       "index": 8
     },
     {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
-      "hide": true,
-      "search": true,
-      "overHidden": true,
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "width": 200,
-      "index": 12
-    },
-    {
       "label": "备注",
       "prop": "remark",
       "overHidden": true,

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

@@ -5,6 +5,7 @@
                ref="crud"
                v-model="form"
                :page.sync="page"
+               :search.sync="search"
                :table-loading="loading"
                @search-change="searchChange"
                @search-reset="searchReset"
@@ -13,6 +14,18 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
+      <template slot="costTypeSearch">
+        <breakdown-select
+          v-model="search.costType"
+          :configuration="breakConfiguration"
+        ></breakdown-select>
+      </template>
     </avue-crud>
   </basic-container>
 </template>
@@ -26,6 +39,7 @@
       return {
         loading : false,
         form: {},
+        search:{},
         show:true,
         detailData:{},
         option: option,
@@ -36,7 +50,27 @@
           pagerCount: 5,
           total: 0,
         },
-        query:{}
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
+        breakConfiguration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
       }
     },
     created() {
@@ -44,6 +78,15 @@
     },
     mounted() {
       option.height = window.innerHeight - 310 ;
+      let i = 0;
+      this.option.column.forEach(item => {
+        if (item.search) i++
+      })
+      if (i % 4 !== 0){
+        const num = 4 - Number(i % 4)
+        this.option.searchMenuSpan = num * 8;
+        this.option.searchMenuPosition = "right";
+      }
     },
     methods: {
       //新单打开
@@ -102,6 +145,11 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
+        if (params.createTime != undefined) {  //合同
+          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+          params.createEndDate = params.createTime[1] + " " + "23:59:59";
+          this.$delete(params,'createTime')
+        }
         getBillList(page.currentPage, page.pageSize,params).then(res=>{
           this.dataList = res.data.data.records
           this.page.total = res.data.data.total

+ 44 - 14
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -1,30 +1,46 @@
 {
-  "addBtn":false,
-  "headerAlign": "center",
-  "align": "center",
-  "border": true,
-  "index": true,
   "lazy": true,
   "tip": false,
   "simplePage": true,
   "searchShow": true,
-  "searchSpan": 8,
   "searchMenuSpan": 6,
-  "tree": true,
+  "dialogWidth": "60%",
+  "align": "center",
+  "searchSpan": 8,
   "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
   "selection": false,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menu": false,
-  "menuWidth": 220,
+  "menuWidth": 180,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
   "column": [
     {
-      "label": "单据类型",
+      "label": "单据状态",
       "prop": "billType",
+      "type": "select",
+      "search": true,
+      "searchOrder": 7,
       "overHidden": true,
+      "index": 1,
       "width": 120,
-      "index": 1
+      "dicData": [
+        {
+          "label": "申请",
+          "value": "申请"
+        },
+        {
+          "label": "销售",
+          "value":"销售"
+        }
+      ]
     },
     {
       "label": "合同号",
@@ -36,7 +52,7 @@
     },
     {
       "label": "提单号",
-      "prop": "billNo",
+      "prop": "srcBillNo",
       "search": true,
       "overHidden": true,
       "width": 120,
@@ -46,19 +62,31 @@
       "label": "客户名称",
       "prop": "corpId",
       "search": true,
+      "hide": true,
+      "overHidden": true
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpName",
       "overHidden": true,
       "width": 200,
       "index": 3
     },
     {
       "label": "费用名称",
-      "prop": "costType",
-      "search": true,
+      "prop": "itemName",
       "overHidden": true,
       "width": 150,
       "index": 4
     },
     {
+      "label": "费用名称",
+      "prop": "costType",
+      "search": true,
+      "hide": true,
+      "overHidden": true
+    },
+    {
       "label": "数量",
       "prop": "quantity",
       "overHidden": true,
@@ -112,6 +140,8 @@
       "prop": "createTime",
       "type": "date",
       "search": true,
+      "unlinkPanels": true,
+      "searchRange": true,
       "overHidden": true,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",

+ 40 - 23
src/views/financialManagement/paymentRequest/configuration/detailsPage.json

@@ -1,103 +1,120 @@
 {
-  "addBtn":false,
-  "headerAlign": "center",
-  "align": "center",
-  "border": true,
-  "index": true,
   "lazy": true,
   "tip": false,
   "simplePage": true,
   "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
   "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
   "tree": true,
+  "border": true,
+  "index": true,
   "selection": false,
-  "viewBtn": false,
-  "editBtn": false,
-  "delBtn": false,
-  "menuWidth": 220,
+  "menuWidth": 180,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "合同号",
       "prop": "srcOrderno",
       "index": 1,
+      "width":120,
       "overHidden": true
     },
     {
       "label": "提单号",
       "prop": "billNo",
       "index": 2,
+      "width":120,
       "overHidden": true
     },
     {
       "label": "客户名称",
       "prop": "corpName",
       "index": 2,
+      "width":150,
       "overHidden": true
     },
     {
       "label": "费用名称",
       "prop": "costType",
       "index": 3,
-      "cell": true,
+      "width":150,
       "overHidden": true
     },
     {
       "label": "数量",
       "prop": "quantity",
       "index": 4,
-      "slot": true,
-      "cell": true,
+      "width":120,
       "overHidden": true
     },
     {
       "label": "单价",
       "prop": "price",
+      "width":120,
       "index": 5,
-      "slot": true,
-      "cell": true,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "amount",
       "index": 6,
+      "width":120,
       "overHidden": true
     },
     {
       "label": "币别",
       "prop": "currency",
       "index": 7,
-      "cell": true,
-      "slot": true,
+      "width":120,
       "overHidden": true
     },
     {
       "label": "汇率",
       "prop": "exchangeRate",
       "index": 8,
+      "width":120,
       "overHidden": true
     },
     {
       "label": "备注",
       "prop": "remarks",
       "index": 9,
+      "width":200,
       "cell": true,
       "overHidden": true
     },
     {
-      "label": "录入日期",
+      "label": "申请人",
+      "prop": "createUserName",
+      "index": 11,
+      "width":120,
+      "overHidden": true
+    },
+    {
+      "label": "申请日期",
       "prop": "createTime",
       "type": "date",
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
+      "width":150,
       "overHidden": true,
       "index": 10
-    },
-    {
-      "label": "录入人",
-      "prop": "createUserName",
-      "index": 11,
-      "overHidden": true
     }
   ]
 }

+ 54 - 12
src/views/financialManagement/paymentRequest/configuration/mainList.json

@@ -1,40 +1,75 @@
 {
-  "addBtn":false,
-  "headerAlign": "center",
-  "align": "center",
-  "border": true,
-  "index": true,
   "lazy": true,
   "tip": false,
   "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 6,
-  "tree": true,
+  "dialogWidth": "60%",
+  "align": "center",
+  "searchSpan": 8,
   "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
   "selection": false,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 180,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
   "column": [
     {
+      "label": "客户名称",
+      "prop": "corpId",
+      "searchOrder": 3,
+      "search": true,
+      "hide": true
+    },
+    {
+      "label": "单据状态",
+      "prop": "checkStatus",
+      "type": "select",
+      "search": true,
+      "searchOrder": 7,
+      "overHidden": true,
+      "index": 1,
+      "width": 120,
+      "dicData": [
+        {
+          "label": "未请核",
+          "value":"未请核"
+        },
+        {
+          "label": "请核成功",
+          "value": "请核成功"
+        }
+      ]
+    },
+    {
       "label": "合同号",
       "prop": "srcOrderno",
       "overHidden": true,
+      "search": true,
+      "searchOrder": 1,
       "width": 150,
       "index": 1
     },
     {
       "label": "提单号",
-      "prop": "srcOrderno",
+      "prop": "billNo",
       "overHidden": true,
+      "search": true,
+      "searchOrder": 2,
       "width": 150,
       "index": 1
     },
     {
       "label": "客户名称",
       "prop": "corpName",
-      "search": true,
       "overHidden": true,
       "width": 180,
       "index": 2
@@ -42,7 +77,6 @@
     {
       "label": "总金额",
       "prop": "amount",
-      "search": true,
       "overHidden": true,
       "width": 120,
       "index": 4
@@ -55,8 +89,10 @@
       "index": 6
     },
     {
-      "label": "银行户",
+      "label": "银行户",
       "prop": "accountName",
+      "search": true,
+      "searchOrder": 4,
       "overHidden": true,
       "width": 150,
       "index": 7
@@ -69,9 +105,13 @@
       "index": 7
     },
     {
-      "label": "录入日期",
+      "label": "申请日期",
       "prop": "createTime",
       "type": "date",
+      "search": true,
+      "searchOrder": 5,
+      "unlinkPanels": true,
+      "searchRange": true,
       "overHidden": true,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
@@ -79,7 +119,7 @@
       "index": 8
     },
     {
-      "label": "录入人",
+      "label": "申请人",
       "overHidden": true,
       "prop": "createUserName",
       "index": 9,
@@ -88,6 +128,8 @@
     {
       "label": "备注",
       "overHidden": true,
+      "search": true,
+      "searchOrder": 6,
       "prop": "remark",
       "index": 10,
       "width": 200

+ 35 - 5
src/views/financialManagement/paymentRequest/paymentRequest.vue

@@ -5,6 +5,7 @@
                ref="crud"
                v-model="form"
                :page.sync="page"
+               :search.sync="search"
                :table-loading="loading"
                @search-change="searchChange"
                @search-reset="searchReset"
@@ -20,17 +21,21 @@
                    @click="addReceipt">新 单
         </el-button>
       </template>
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
       <template slot-scope="scope" slot="menu">
         <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)"
         >删除
@@ -56,6 +61,7 @@
       return {
         loading : false,
         form: {},
+        search:{},
         show:true,
         detailData:{},
         option: option,
@@ -66,7 +72,17 @@
           pagerCount: 5,
           total: 0,
         },
-        query:{}
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
       }
     },
     created() {
@@ -82,7 +98,16 @@
       detailPage
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      this.option.height = window.innerHeight - 310;
+      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: {
       //新单打开
@@ -137,9 +162,14 @@
         console.log('1')
       },
       refreshChange() {
-        console.log('1')
+        this.onLoad(this.page);
       },
       onLoad(page, params = {}) {
+        if (params.createTime != undefined) {  //合同
+          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+          params.createEndDate = params.createTime[1] + " " + "23:59:59";
+          this.$delete(params,'createTime')
+        }
         params.billType = "申请"
         this.loading = true
         getList(page.currentPage, page.pageSize,params).then(res =>{

+ 65 - 33
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -1,30 +1,30 @@
 <template>
   <div class="borderless">
-    <div class="main-head">
-      <div class="main-back">
+    <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 class="upper_right_button">
           <el-button type="info"
-                     :disabled="!checkDisabled"
+                     :disabled="checkDisabled"
                      class="el-button--small-yh"
                      @click.stop="paymentCheck">请核
           </el-button>
           <el-button type="warning"
                      class="el-button--small-yh"
-                     :disabled="checkDisabled"
+                     :disabled="!checkDisabled"
                      @click.stop="settlement">结算
           </el-button>
           <el-button type="primary"
                      class="el-button--small-yh"
-                     :disabled="!checkDisabled"
+                     :disabled="checkDisabled"
                      @click.stop="confirmEdit">确认修改
           </el-button>
         </div>
       </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <containerTitle title="基础信息"></containerTitle>
       <basic-container>
         <avue-form ref="form" v-model="form" :option="option">
@@ -33,12 +33,14 @@
               v-model="form.corpId"
               @returnBack="returnBack"
               :configuration="configuration"
+              :disabled="checkDisabled"
             ></select-component>
           </template>
           <template slot="accountNo">
             <el-select v-model="form.accountNo"
                        placeholder="请选择"
                        @change="accountNoChange"
+                       :disabled="checkDisabled"
                        clearable
                        filterable>
               <el-option v-for="(item,index) in form.bankList"
@@ -59,6 +61,7 @@
                    v-model="itemForm"
                    :page.sync="page"
                    @search-reset="searchReset"
+                   @row-update="rowUpdate"
                    @selection-change="selectionChange"
                    @current-change="currentChange"
                    @size-change="sizeChange"
@@ -67,17 +70,26 @@
             <el-button
               type="text"
               size="small"
-              :disabled="!checkDisabled"
-              @click.stop="rowCell(scope.row,scope.index)"
+              :disabled="checkDisabled"
+              @click="rowCell(scope.row,scope.index)"
             >{{ scope.row.$cellEdit ? '修改完成' : '修改' }}
             </el-button>
             <el-button
               type="text"
               size="small"
+              :disabled="checkDisabled"
               @click.stop="rowDel(scope.row,scope.index)"
             >删除
             </el-button>
           </template>
+          <template slot="costType" slot-scope="{ row }">
+            <breakdown-select
+              v-if="row.$cellEdit"
+              v-model="row.costType"
+              :configuration="breakConfiguration">
+            </breakdown-select>
+            <span v-else>{{ row.itemName }}</span>
+          </template>
           <template slot="quantity" slot-scope="{ row }">
             <el-input
               v-if="row.$cellEdit"
@@ -85,7 +97,7 @@
               placeholder="请输入"
               size="small"
               oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
-              @input="priceChange(row)"
+              @input="quantityChange(row)"
             ></el-input>
             <span v-else>{{ row.quantity }}</span>
           </template>
@@ -124,6 +136,7 @@
   import itemOption from "./configuration/detailsPage.json";
   import { contrastObj,contrastList } from "@/util/contrastData";
   import { getDetails,modify,submit, paymentCheck,getlistBankBy } from "@/api/financialManagement/paymentRequest";
+  import _ from "lodash";
 
   export default {
     name: "paymentDetailsPage",
@@ -150,7 +163,7 @@
         breakConfiguration:{
           multipleChoices:false,
           multiple:false,
-          disabled:true,
+          disabled:false,
           searchShow:true,
           collapseTags:false,
           placeholder:'请点击右边按钮选择',
@@ -239,7 +252,7 @@
               ]
             },
             {
-              label: '制单人',
+              label: '申请人',
               prop: 'createUserName',
               span: 8,
               disabled:true,
@@ -251,7 +264,7 @@
                 }
               ]
             }, {
-              label: '制单日期',
+              label: '申请日期',
               prop: 'createTime',
               span: 8,
               type:"date",
@@ -283,7 +296,6 @@
         configuration:{
           multipleChoices:false,
           multiple:false,
-          disabled:false,
           searchShow:true,
           collapseTags:false,
           placeholder:'请点击右边按钮选择',
@@ -301,17 +313,27 @@
       if (this.detailData.id) {
         this.id = this.detailData.id;
         getDetails(this.id).then(res => {
-          this.form = res.data.data;
-          this.oldForm = Object.assign({},res.data.data);
-          this.checkDisabled = res.data.data.checkStatus === "未请核"?true:false;
-          if(res.data.data.itemsList){
-            this.dataList = res.data.data.itemsList
-            this.oldDataList = this.deepClone(res.data.data.itemsList)
-          }
+          this.afterEcho(res.data.data)
         })
       }
     },
     methods: {
+      priceChange(row){
+        if (!row.price) {
+          row.price = "";
+          row.amount = 0
+        } else {
+          row.amount = _.multiply(row.quantity, row.price).toFixed(2);
+        }
+      },
+      quantityChange(row){
+        if (!row.quantity) {
+          row.quantity = "";
+          row.amount = 0
+        } else {
+          row.amount = _.multiply(row.quantity, row.price).toFixed(2);
+        }
+      },
       //选择客户
       returnBack(corpValue){
         getlistBankBy(corpValue).then(res =>{
@@ -339,6 +361,9 @@
           row.exchangeRate = 1
         }
       },
+      rowUpdate(row, index, done, loading) {
+        done(row);
+      },
       rowCell(row, index) {
         this.$refs.crud.rowCell(row, index)
       },
@@ -354,7 +379,7 @@
             cancelButtonText: "取消",
             type: "warning"
           }).then(() => {
-            this.editPayment()
+            this.confirmEdit()
           }).catch(()=>{
             verification = false;  //取消改动数据
           })
@@ -378,7 +403,7 @@
             paymentCheck(params).then(res =>{
               if(res.data.success){
                 this.$message.success("请核成功!");
-                this.checkDisabled = res.data.data.checkStatus === "未请核"?true:false;
+                this.afterEcho(res.data.data)
               }
             })
           })
@@ -420,24 +445,19 @@
         console.log('1')
       },
       confirmEdit(status){
-        this.$refs["form"].validate((valid) => {
+        this.$refs["form"].validate((valid,done) => {
+          done();
           if(valid){
+            this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
             const params = {
               ...this.form,
               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;
-              this.oldForm = Object.assign({},res.data.data);
-              if(res.data.data.itemsList){
-                this.dataList = res.data.data.itemsList
-                this.oldDataList = this.deepClone(res.data.data.itemsList)
-              }
+              this.afterEcho(res.data.data)
             })
             if(status === true){
               this.$emit("goBack");
@@ -445,6 +465,18 @@
           }
         })
       },
+      afterEcho(data){
+        this.form = data;
+        this.oldForm = Object.assign({},data);
+
+        this.checkDisabled = data.checkStatus === "未请核"?false:true;
+        this.$set(this.option,"disabled",this.checkDisabled)
+
+        if(data.itemsList){
+          this.dataList = data.itemsList
+          this.oldDataList = this.deepClone(data.itemsList)
+        }
+      },
       backToList() {
         if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
         ){
@@ -495,6 +527,6 @@
     display: flex;
     position: fixed;
     right: 20px;
-    top: 115px;
+    top: 43px;
   }
 </style>

+ 20 - 9
src/views/financialManagement/paymentSettle/configuration/detailsPage.json

@@ -1,20 +1,32 @@
 {
-  "addBtn":false,
-  "headerAlign": "center",
-  "align": "center",
-  "border": true,
-  "index": true,
   "lazy": true,
   "tip": false,
   "simplePage": true,
   "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
   "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
   "tree": true,
+  "border": true,
+  "index": true,
   "selection": false,
-  "viewBtn": false,
-  "editBtn": false,
-  "delBtn": false,
   "menuWidth": 180,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "合同号",
@@ -48,7 +60,6 @@
       "label": "本次金额",
       "prop": "thisAmount",
       "overHidden": true,
-      "cell": true,
       "width": 150,
       "index": 7
     },

+ 58 - 21
src/views/financialManagement/paymentSettle/configuration/mainList.json

@@ -1,23 +1,54 @@
 {
-  "addBtn":false,
-  "headerAlign": "center",
-  "align": "center",
-  "border": true,
-  "index": true,
   "lazy": true,
   "tip": false,
   "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 6,
-  "tree": true,
+  "dialogWidth": "60%",
+  "align": "center",
+  "searchSpan": 8,
   "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
   "selection": false,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 220,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
   "column": [
     {
+      "label": "客户名称",
+      "prop": "corpId",
+      "search": true,
+      "searchOrder": 2,
+      "hide": true
+    },
+    {
+      "label": "单据状态",
+      "prop": "financeStatus",
+      "type": "select",
+      "search": true,
+      "overHidden": true,
+      "index": 1,
+      "width": 120,
+      "dicData": [
+        {
+          "label": "待结算",
+          "value":"待结算"
+        },
+        {
+          "label": "结算完成",
+          "value": "结算完成"
+        }
+      ]
+    },
+    {
       "label": "合同号",
       "prop": "srcOrderno",
       "overHidden": true,
@@ -35,34 +66,33 @@
     },
     {
       "label": "客户名称",
-      "prop": "corpId",
-      "search": true,
+      "prop": "corpName",
       "overHidden": true,
       "width": 200,
       "index": 2
     },
     {
-      "label": "收款日期",
+      "label": "金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 120,
+      "index": 4
+    },
+    {
+      "label": "结算日期",
       "prop": "settlementDate",
       "overHidden": true,
+      "type": "date",
+      "search": true,
       "unlinkPanels": true,
       "searchRange": true,
-      "search": true,
       "width": 150,
       "index": 3
     },
-    {
-      "label": "金额",
-      "prop": "amount",
-      "overHidden": true,
-      "search": true,
-      "width": 120,
-      "index": 4
-    },
+
     {
       "label": "银行名称",
       "prop": "accountBank",
-      "search": true,
       "overHidden": true,
       "width": 150,
       "index": 6
@@ -76,14 +106,21 @@
       "index": 7
     },
     {
-      "label": "录入人",
+      "label": "银行卡号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 6
+    },
+    {
+      "label": "申请人",
       "prop": "createUserName",
       "overHidden": true,
       "index": 9,
       "width": 120
     },
     {
-      "label": "录入日期",
+      "label": "申请日期",
       "prop": "createTime",
       "overHidden": true,
       "type": "date",

+ 34 - 4
src/views/financialManagement/paymentSettle/paymentSettle.vue

@@ -5,6 +5,7 @@
                ref="crud"
                v-model="form"
                :page.sync="page"
+               :search.sync="search"
                :table-loading="loading"
                @search-change="searchChange"
                @search-reset="searchReset"
@@ -13,6 +14,12 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
       <template slot="menuLeft">
         <el-button type="primary"
                    size="small"
@@ -28,14 +35,12 @@
       <template slot-scope="scope" slot="menu">
         <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)"
         >删除
@@ -61,6 +66,7 @@
       return {
         loading : false,
         form: {},
+        search:{},
         show:true,
         detailData:{},
         option: option,
@@ -71,7 +77,17 @@
           pagerCount: 5,
           total: 0,
         },
-        query:{}
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
       }
     },
     created() {
@@ -87,7 +103,16 @@
       detailPage
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      this.option.height = window.innerHeight - 310;
+      let i = 0;
+      this.option.column.forEach(item => {
+        if (item.search) i++
+      })
+      if (i % 4 !== 0){
+        const num = 4 - Number(i % 4)
+        this.option.searchMenuSpan = num * 8;
+        this.option.searchMenuPosition = "right";
+      }
     },
     methods: {
       //新单打开
@@ -148,6 +173,11 @@
       },
       onLoad(page, params = {}) {
         params.billType = "付费"
+        if (params.settlementDate != undefined) {  //合同
+          params.settlementStartDate = params.settlementDate[0]+ " " + "00:00:00";
+          params.settlementEndDate = params.settlementDate[1] + " " + "23:59:59";
+          this.$delete(params,'settlementDate')
+        }
         this.loading = true
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records

+ 85 - 35
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="borderless">
-    <div class="main-head">
-      <div class="main-back">
+    <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>
@@ -11,15 +11,15 @@
                      @click.stop="confirmSettlement"
           >结算
           </el-button>
-          <el-button class="el-button--small-yh"
+         <!-- <el-button class="el-button&#45;&#45;small-yh"
                      type="primary"
-                     @click.stop="confirmSettlement"
-          >{{this.id?"确认修改" :"确认新增"}}
-          </el-button>
+                     @click.stop="saveSettlement"
+          >{{form.id?"确认修改" :"确认新增"}}
+          </el-button>-->
         </div>
       </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <containerTitle title="基础信息"></containerTitle>
       <basic-container>
         <avue-form ref="form" v-model="form" :option="option">
@@ -53,6 +53,7 @@
                    v-model="itemsForm"
                    :page.sync="page"
                    @search-reset="searchReset"
+                   @row-update="rowUpdate"
                    @selection-change="selectionChange"
                    @current-change="currentChange"
                    @size-change="sizeChange"
@@ -103,9 +104,9 @@
         top="10vh"
         v-dialog-drag>
         <bill-detail
-          :corpId="corpId"
+          :params="params"
           :billType="billType"
-          @closeFun="!billDetailDialog"
+          @closeFun="closeBillDetail"
           @importProMent="importProMent"
         >
         </bill-detail>
@@ -117,7 +118,7 @@
 <script>
   import option from "./configuration/detailsPage.json";
   import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
-  import { getDetails,modify } from "@/api/financialManagement/paymentRequest";
+  import { getDetails,modify,saveOrEdit } from "@/api/financialManagement/paymentRequest";
   import { contrastObj,contrastList } from "@/util/contrastData";
   import  billDetail from "@/components/bill/billDetailList";
   import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
@@ -136,8 +137,9 @@
         itemsForm:{},
         itemsOption: option,
         billDetailDialog:false,
+        financeDisabled:false,
         billType:"申请",
-        corpId:"",
+        params:{},
         id:"",
         dataList: [],
         currencyDic:[],
@@ -174,7 +176,7 @@
               span: 8,
               rules: [
                 {
-                  required: false,
+                  required: true,
                   message: ' ',
                   trigger: 'blur'
                 }
@@ -224,6 +226,11 @@
                   pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
                   message: ' ',
                   trigger: 'blur'
+                },
+                {
+                  required: true,
+                  message: ' ',
+                  trigger: 'blur'
                 }
               ]
             },
@@ -298,15 +305,11 @@
       this.getWorkDicts("currency").then(res =>{
         this.currencyDic = res.data.data
       })
+
       if (this.detailData.id) {
         this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
         getDetail(this.id).then(res => {
-          this.form = res.data.data;
-          this.oldForm = Object.assign({},res.data.data);
-          if(res.data.data.itemsList){
-            this.dataList = res.data.data.itemsList
-            this.oldDataList = this.deepClone(res.data.data.itemsList)
-          }
+          this.afterEcho(res.data.data)
         })
       }
 
@@ -319,14 +322,10 @@
             delete items.id ;
             items.thisAmount = items.amount
           })
-          this.form = res.data.data;
-          this.oldForm = Object.assign({},res.data.data);
-          if(res.data.data.itemsList){
-            this.dataList = res.data.data.itemsList
-            this.oldDataList = this.deepClone(res.data.data.itemsList)
-          }
+          this.afterEcho(res.data.data)
         })
       }
+
     },
     mounted() {
       option.height = window.innerHeight - 640 ;
@@ -349,22 +348,45 @@
         })
       },
       thisAmountChange(row){
-        if(row.thisAmount > row.amount){
-          this.$message.error("本次金额不得大于金额!")
+        if(row.thisAmount > row.maxThisAmount){
+          this.$message.error("本次结算金额不能大于剩余结算金额!")
           row.thisAmount = 0;
         }
       },
       selectPurchase(){
+        if(!this.form.corpId){
+          this.$message.warning("请先选择客户!")
+          return
+        }
+        this.params = {
+          corpId: this.form.corpId
+        }
         this.billDetailDialog = true;
       },
+      closeBillDetail(){
+        this.billDetailDialog = false;
+      },
       importProMent(list){
         list.forEach((item,index) =>{
           item.accId = item.id;
+          item.srcOrderno  = item.accSysNo
+          item.billNo  = item.srcBillNo
+          item.thisAmount = _.subtract(item.amount, item.settlementAmount)  //设置本次结算最大限度
+          item.maxThisAmount = item.thisAmount
           delete item.id;
+
           this.$refs.crud.rowCellAdd(item);
         })
+        //明细列表金额总和等于form总金额
+        this.form.amount =  _.sum(this.dataList.map(item =>{ return parseFloat(item.amount)}));
+        this.form.srcOrderno = this.dataList.map(item =>{return item.srcOrderno}).join(",")
+
+
         this.billDetailDialog = false;
       },
+      rowUpdate(row, index, done, loading) {
+        done(row);
+      },
       rowCell(row,index){
         this.$refs.crud.rowCell(row, index)
       },
@@ -387,10 +409,11 @@
         console.log('1')
       },
       confirmSettlement(status){
-        this.$refs["form"].validate((valid) => {
+        this.$refs["form"].validate((valid,done) => {
+          done();
           if(valid){
             this.$confirm("是否确认结算?", "提示", {
-              confirmButtonText: "保存",
+              confirmButtonText: "确认",
               cancelButtonText: "取消",
               type: "warning",
             }).then(()=>{
@@ -413,12 +436,7 @@
 
               modify(params).then(res =>{
                 this.$message.success("操作成功!")
-                this.form = res.data.data;
-                this.oldForm = Object.assign({},res.data.data);
-                if(res.data.data.itemsList){
-                  this.dataList = res.data.data.itemsList
-                  this.oldDataList = this.deepClone(res.data.data.itemsList)
-                }
+                this.afterEcho(res.data.data)
               })
             })
             if(status === true){
@@ -427,6 +445,38 @@
           }
         })
       },
+      saveSettlement(){
+        this.$refs["form"].validate((valid,done) => {
+          if(valid){
+            console.log(132)
+            this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
+            const params = {
+              ...this.form,
+              billType:"付费",
+              itemsList:this.dataList
+            }
+
+            saveOrEdit(params).then(res=>{
+              this.$message.success("操作成功!")
+              this.afterEcho(res.data.data)
+              done();
+            })
+          }})
+      },
+      afterEcho(data){
+        this.form = data;
+        this.oldForm = Object.assign({},data);
+
+        this.financeDisabled = data.financeStatus === "待结算"?false:true;
+        console.log(this.financeDisabled )
+        this.$set(this.option,"disabled",this.financeDisabled)
+
+        if(data.itemsList){
+          this.dataList = data.itemsList
+          this.oldDataList = this.deepClone(data.itemsList)
+        }
+      },
       backToList() {
         if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
         ){
@@ -472,6 +522,6 @@
     display: flex;
     position: fixed;
     right: 20px;
-    top: 115px;
+    top: 43px;
   }
 </style>

+ 36 - 57
src/views/financialManagement/receiptSettle/configuration/detailsPage.json

@@ -1,31 +1,47 @@
 {
-  "addBtn":false,
-  "headerAlign": "center",
-  "align": "center",
-  "border": true,
-  "index": true,
   "lazy": true,
   "tip": false,
   "simplePage": true,
   "searchShow": true,
+  "addBtn":false,
+  "editBtn":false,
+  "addRowBtn":false,
+  "cellBtn":false,
+  "cancelBtn":false,
+  "refreshBtn": false,
   "searchMenuSpan": 6,
+  "align": "center",
+  "delBtn":false,
+  "dialogWidth": "60%",
   "tree": true,
+  "border": true,
+  "index": true,
   "selection": false,
-  "viewBtn": false,
-  "editBtn": false,
-  "delBtn": false,
-  "menuWidth": 220,
+  "menuWidth": 180,
+  "dialogClickModal": false,
+  "showSummary": true,
+  "summaryText": "合计",
+  "sumColumnList": [
+    {
+      "name": "amount",
+      "type": "sum"
+    },
+    {
+      "name": "thisAmount",
+      "type": "sum"
+    }
+  ],
   "column": [
     {
       "label": "合同号",
       "prop": "srcOrderno",
       "overHidden": true,
-      "width": 120,
+      "width": 200,
       "index": 2
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
+      "label": "提单号",
+      "prop": "billNo",
       "overHidden": true,
       "width": 200,
       "index": 3
@@ -38,63 +54,26 @@
       "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
+      "width": 150,
+      "index": 7
     },
     {
       "label": "备注",
       "prop": "remark",
       "overHidden": true,
       "index": 13,
-      "width": 200
+      "cell": true,
+      "width": 500
     }
   ]
 }

+ 85 - 31
src/views/financialManagement/receiptSettle/configuration/mainList.json

@@ -1,85 +1,139 @@
 {
-  "addBtn":false,
-  "headerAlign": "center",
-  "align": "center",
-  "border": true,
-  "index": true,
   "lazy": true,
   "tip": false,
   "simplePage": true,
   "searchShow": true,
   "searchMenuSpan": 6,
-  "tree": true,
+  "dialogWidth": "60%",
+  "align": "center",
+  "searchSpan": 8,
   "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
   "selection": false,
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
   "menuWidth": 220,
+  "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
   "column": [
     {
+      "label": "客户名称",
+      "prop": "corpId",
+      "search": true,
+      "searchOrder": 2,
+      "hide": true
+    },
+    {
+      "label": "单据状态",
+      "prop": "status",
+      "type": "select",
+      "search": true,
+      "overHidden": true,
+      "index": 1,
+      "width": 120,
+      "dicData": [
+        {
+          "label": "待结算",
+          "value":"待结算"
+        },
+        {
+          "label": "结算完成",
+          "value": "结算完成"
+        }
+      ]
+    },
+    {
       "label": "合同号",
       "prop": "srcOrderno",
-      "width": 120,
+      "overHidden": true,
+      "search": true,
+      "width": 150,
       "index": 1
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
+      "label": "提单号",
+      "prop": "billNo",
       "search": true,
-      "width": 120,
-      "index": 2
+      "overHidden": true,
+      "width": 150,
+      "index": 1
     },
     {
-      "label": "收款日期",
-      "prop": "settlementDate",
-      "search": true,
-      "width": 120,
-      "index": 3
+      "label": "客户名称",
+      "prop": "corpName",
+      "overHidden": true,
+      "width": 200,
+      "index": 2
     },
     {
       "label": "金额",
       "prop": "amount",
-      "search": true,
+      "overHidden": true,
       "width": 120,
       "index": 4
     },
     {
-      "label": "币别",
-      "prop": "currency",
-      "width": 120,
-      "index": 5
+      "label": "收款日期",
+      "prop": "settlementDate",
+      "overHidden": true,
+      "type": "date",
+      "search": true,
+      "unlinkPanels": true,
+      "searchRange": true,
+      "width": 150,
+      "index": 3
     },
+
     {
       "label": "银行名称",
       "prop": "accountBank",
-      "width": 120,
+      "overHidden": true,
+      "width": 150,
       "index": 6
     },
     {
       "label": "银行户头",
       "prop": "accountName",
-      "width": 120,
+      "search": true,
+      "overHidden": true,
+      "width": 150,
       "index": 7
     },
     {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "width": 120,
-      "index": 8
+      "label": "银行卡号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 6
     },
     {
-      "label": "录入人",
+      "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": 150,
+      "index": 8
+    },
+    {
       "label": "备注",
       "prop": "remark",
+      "search": true,
+      "overHidden": true,
       "index": 10,
       "width": 120
     }

+ 35 - 5
src/views/financialManagement/receiptSettle/receiptSettle.vue

@@ -5,6 +5,7 @@
                ref="crud"
                v-model="form"
                :page.sync="page"
+               :search.sync="search"
                :table-loading="loading"
                @search-change="searchChange"
                @search-reset="searchReset"
@@ -13,6 +14,12 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
       <template slot="menuLeft">
         <el-button type="primary"
                    size="small"
@@ -28,14 +35,12 @@
       <template slot-scope="scope" slot="menu">
         <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)"
         >删除
@@ -61,6 +66,7 @@
       return {
         loading : false,
         form: {},
+        search:{},
         option: option,
         parentId:0,
         show:true,
@@ -73,7 +79,17 @@
           pagerCount: 5,
           total: 0,
         },
-        query:{}
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
       }
     },
     components:{
@@ -89,7 +105,16 @@
       }
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      this.option.height = window.innerHeight - 310;
+      let i = 0;
+      this.option.column.forEach(item => {
+        if (item.search) i++
+      })
+      if (i % 4 !== 0){
+        const num = 4 - Number(i % 4)
+        this.option.searchMenuSpan = num * 8;
+        this.option.searchMenuPosition = "right";
+      }
     },
     methods: {
       //新单打开
@@ -147,7 +172,12 @@
         console.log('1')
       },
       onLoad(page, params = {}) {
-        params.billType = "付费"
+        if (params.settlementDate != undefined) {  //合同
+          params.settlementStartDate = params.settlementDate[0]+ " " + "00:00:00";
+          params.settlementEndDate = params.settlementDate[1] + " " + "23:59:59";
+          this.$delete(params,'settlementDate')
+        }
+        params.billType = "收费"
         this.loading = true
         getList(page.currentPage, page.pageSize,params).then(res =>{
           this.dataList = res.data.data.records

+ 202 - 67
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -1,26 +1,51 @@
 <template>
   <div class="borderless">
-    <div class="main-head">
-      <div class="main-back">
+    <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>
-        <el-button class="el-button--small-yh add-customer-btn" type="primary"
-                   @click.stop="editReceipt "
-        >{{this.id?"确认修改" :"确认结算"}}
-        </el-button>
+        <div class="upper_right_button">
+          <el-button type="warning"
+                     class="el-button--small-yh"
+                     :disabled="financeDisabled"
+                     @click.stop="confirmSettlement"
+          >结算
+          </el-button>
+        <!--  <el-button class="el-button&#45;&#45;small-yh"
+                     type="primary"
+                     :disabled="financeDisabled"
+                     @click.stop="saveSettlement"
+          >{{form.id?"确认修改" :"确认新增"}}
+          </el-button>-->
+        </div>
       </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <containerTitle title="基础信息"></containerTitle>
       <basic-container>
         <avue-form ref="form" v-model="form" :option="option">
           <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>
@@ -30,6 +55,7 @@
                    v-model="itemsForm"
                    :page.sync="page"
                    @search-reset="searchReset"
+                   @row-update="rowUpdate"
                    @selection-change="selectionChange"
                    @current-change="currentChange"
                    @size-change="sizeChange"
@@ -38,24 +64,36 @@
             <el-button type="primary"
                        size="small"
                        icon="el-icon-shopping-cart-2"
+                       :disabled="financeDisabled"
                        @click="selectRecipt"
             >选择销售合同
             </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>
           <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
-              icon="el-icon-view"
               size="small"
-              @click.stop=""
-            >费用确认
+              :disabled="financeDisabled"
+              @click.stop="rowCell(scope.row,scope.index)"
+            > {{ scope.row.$cellEdit ? '修改完成' : '修改' }}
             </el-button>
             <el-button
               type="text"
-              icon="el-icon-edit"
               size="small"
-              @click.stop=""
-            >移除数据
+              :disabled="financeDisabled"
+              @click.stop="rowDel(scope.row,scope.index)"
+            >删除
             </el-button>
           </template>
         </avue-crud>
@@ -72,8 +110,9 @@
         top="10vh"
         v-dialog-drag>
         <bill-detail
+          :params="params"
           :billType="billType"
-          @closeFun="!billDetailDialog"
+          @closeFun="closeBillDetail"
           @importProMent="importProMent"
         >
         </bill-detail>
@@ -84,9 +123,11 @@
 
 <script>
   import option from "./configuration/detailsPage.json";
-  import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
-  import { detailSaleList } from "@/api/importTrade/salesContract"
+  import { getDetail } from "@/api/financialManagement/financialManagement"
+  import { getDetails,modify,saveOrEdit } from "@/api/financialManagement/paymentRequest";
   import  billDetail from "@/components/bill/billDetailList";
+  import _ from "lodash";
+  import { getlistBankBy } from "@/api/financialManagement/paymentRequest";
 
   export default {
     name: "receiptDetailsPage",
@@ -102,6 +143,7 @@
       return {
         form: {},
         itemsForm:{},
+        params:{},
         itemsOption: option,
         option: {
           menuBtn: false,
@@ -130,24 +172,25 @@
               span: 8,
               rules: [
                 {
-                  required: false,
+                  required: true,
                   message: ' ',
                   trigger: 'blur'
                 }
               ]
             },
             {
-              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,
@@ -169,13 +212,19 @@
                   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'
+                },
+                {
+                  required: true,
                   message: ' ',
                   trigger: 'blur'
                 }
@@ -231,10 +280,11 @@
           total: 0,
         },
         billDetailDialog:false,
+        financeDisabled:false,
         billType:"销售",
         //新旧数据对比
         oldForm:{},
-        oldItemList:[],
+        oldDataList:[],
         //客户组件配置控制
         configuration:{
           multipleChoices:false,
@@ -263,48 +313,89 @@
       if (this.detailData.id) {
         this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
         getDetail(this.id).then(res => {
-          this.form = res.data.data;
-          this.oldForm = Object.assign({},res.data.data);
-          this.configuration.dicData = res.data.data.customerModel;
-          if(res.data.data.itemsList){
-            this.dataList = res.data.data.itemsList
-            this.oldItemList = this.deepClone(res.data.data.itemsList)
-          }
+          this.afterEcho(res.data.data)
         })
       }
 
-      if(this.detailData.params){
-        detailSaleList(this.detailData.params).then(res =>{
-          delete res.data.data.id;
-          delete res.data.data.sysNo;
-          delete res.data.data.billType;
-
-          this.form = res.data.data;
-          this.oldForm = Object.assign({},res.data.data);
-          if(res.data.data.orderItemsList){
-            this.dataList = res.data.data.orderItemsList
-            this.oldDataList = this.deepClone(res.data.data.orderItemsList)
-          }
-          this.configuration.dicData = this.form.corpName
-
-        })
-      }
+      // if(this.detailData.params){
+      //   getDetails(this.detailData.params).then(res =>{
+      //     delete res.data.data.id;
+      //     delete res.data.data.sysNo;
+      //     delete res.data.data.billType;
+      //     res.data.data.itemsList.map((items)=>{
+      //       delete items.id ;
+      //       items.thisAmount = items.amount
+      //     })
+      //     this.afterEcho(res.data.data)
+      //   })
+      // }
     },
     mounted() {
       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)
+          }
+        })
+      },
       selectRecipt(){
+        if(!this.form.corpId){
+          this.$message.warning("请先选择客户!")
+          return
+        }
+        this.params = {
+          corpId: this.form.corpId
+        }
         this.billDetailDialog = true;
       },
+      closeBillDetail(){
+        this.billDetailDialog = false;
+      },
       importProMent(list){
         list.forEach((item,index) =>{
           item.accId = item.id;
+          item.srcOrderno  = item.accSysNo
+          item.billNo  = item.srcBillNo
+          item.thisAmount = _.subtract(item.amount, item.settlementAmount)
+          item.maxThisAmount = item.thisAmount
           delete item.id;
           this.$refs.crud.rowCellAdd(item);
         })
+
+        //明细列表金额总和等于form总金额
+        this.form.amount =  _.sum(this.dataList.map(item =>{ return parseFloat(item.amount)}));
+        this.form.srcOrderno = this.dataList.map(item =>{return item.srcOrderno}).join(",")
         this.billDetailDialog = false;
       },
+      thisAmountChange(row){
+        console.log(row.thisAmount)
+        console.log(row.maxThisAmount)
+        if(row.thisAmount > row.maxThisAmount){
+          this.$message.error("本次结算金额不能大于剩余结算金额!")
+          row.thisAmount = 0;
+        }
+      },
+      rowUpdate(row, index, done, loading) {
+        done(row);
+      },
+      rowCell(row,index){
+        this.$refs.crud.rowCell(row, index)
+      },
+      rowDel(row,index){
+        this.dataList.splice(index, 1);
+      },
       searchReset() {
         console.log('1')
       },
@@ -320,18 +411,36 @@
       refreshChange() {
         console.log('1')
       },
-      editReceipt(status){
-        this.$refs["form"].validate((valid) => {
+      confirmSettlement(status){
+        this.$refs["form"].validate((valid,done) => {
+          done();
           if(valid){
-            const params = {
-              ...this.form,
-              billType:"收费",
-              itemsList: this.dataList,
-            }
-            editFinance(params).then(res =>{
-              if(res.data.success){
-                this.$message.success("操作成功!")
+            this.$confirm("是否确认结算?", "提示", {
+              confirmButtonText: "确认",
+              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:"收费",
+                itemsList:this.dataList
               }
+
+              modify(params).then(res =>{
+                this.$message.success("操作成功!")
+                this.afterEcho(res.data.data)
+              })
             })
             if(status === true){
               this.$emit("goBack");
@@ -339,6 +448,36 @@
           }
         })
       },
+      saveSettlement(){
+        this.$refs["form"].validate((valid,done) => {
+          done();
+          if(valid){
+
+            this.form.billNo = this.dataList.map(item =>{return item.billNo}).join(",")
+
+            const params = {
+              ...this.form,
+              billType:"收费",
+              itemsList:this.dataList
+            }
+            saveOrEdit(params).then(res=>{
+              this.$message.success("操作成功!")
+              this.afterEcho(res.data.data)
+            })
+          }})
+      },
+      afterEcho(data){
+        this.form = data;
+        this.oldForm = Object.assign({},data);
+
+        this.financeDisabled = data.financeStatus === "待结算"?false:true;
+        this.$set(this.option,"disabled",this.financeDisabled)
+
+        if(data.itemsList){
+          this.dataList = data.itemsList
+          this.oldDataList = this.deepClone(data.itemsList)
+        }
+      },
       backToList(){
         this.$confirm("是否保存当前页面?", "提示", {
           confirmButtonText: "保存",
@@ -375,14 +514,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;
-    top: 115px;
+    right: 20px;
+    top: 43px;
   }
 </style>

+ 26 - 52
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -6,26 +6,28 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
-      <el-button type="primary"
-                 class="el-button--small-yh add-customer-btn-three"
-                 :disabled="!form.id"
-                 @click.stop="confirmGoods">
-        {{goodsDisable ? "撤回发货":"确认发货"}}
-      </el-button>
-      <el-button type="success"
-                 class="el-button--small-yh add-customer-btn-two"
-                 :disabled="true"
-                 @click.stop="">复制新单
-      </el-button>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        type="primary"
-        :disabled="disabled  || goodsDisable"
-        @click="editCustomer"
-      >{{ form.id ? '确认修改' : '确认新增' }}
-      </el-button>
+      <div class="upper_right_button">
+        <el-button type="primary"
+                   class="el-button--small-yh"
+                   :disabled="!form.id"
+                   @click.stop="confirmGoods">
+          {{goodsDisable ? "撤回发货":"确认发货"}}
+        </el-button>
+        <el-button type="success"
+                   class="el-button--small-yh"
+                   :disabled="true"
+                   @click.stop="">复制新单
+        </el-button>
+        <el-button
+          class="el-button--small-yh"
+          type="primary"
+          :disabled="disabled  || goodsDisable"
+          @click="editCustomer"
+        >{{ form.id ? '确认修改' : '确认新增' }}
+        </el-button>
+      </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
         <containerTitle title="基础信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
@@ -515,6 +517,7 @@ export default {
       this.form.sysNo = null
       this.form.orderItemsList.forEach((item,index) =>{
         item.srcId = item.id
+        item.itemId = item.itemId
         item.orgOrderNo = this.form.orgOrderNo
         item.contractNumber = item.orgOrderNo
         item.contractAmount = item.amount
@@ -936,43 +939,13 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.customer-head {
-  position: fixed;
-  top: 105px;
-  width: 100%;
-  margin-left: -10px;
-  height: 62px;
-  background: #ffffff;
-  box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
-  z-index: 999;
-  /* display: flex;
-  justify-content: left; */
-}
 
-.customer-back {
-  cursor: pointer;
-  line-height: 62px;
-  font-size: 16px;
-  color: #323233;
-  font-weight: 400;
-}
-.add-customer-btn-two {
-  position: fixed;
-  right: 150px;
-  top: 115px;
-}
 .back-icon {
   line-height: 64px;
   font-size: 20px;
   margin-right: 8px;
 }
 
-.add-customer-btn {
-  position: fixed;
-  right: 36px;
-  top: 115px;
-}
-
 ::v-deep .el-form-item {
   margin-bottom: 0;
 }
@@ -993,10 +966,11 @@ export default {
   display:inline-block;
   width: 7%
 }
-.add-customer-btn-three {
+.upper_right_button{
+  display: flex;
   position: fixed;
-  right: 266px;
-  top: 115px;
+  right: 20px;
+  top: 43px;
 }
 ::v-deep .el-form-item__content{
   line-height: 32px;

+ 25 - 53
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -6,26 +6,28 @@
                    @click="backToList">返回列表
         </el-button>
       </div>
-      <el-button type="primary"
-                 class="el-button--small-yh add-customer-btn-three"
-                 :disabled="!form.id"
-                 @click.stop="confirmReceipt">
-        {{receiptDisable ?"撤销收货":"确认收货"}}
-      </el-button>
-      <el-button type="success"
-                 class="el-button--small-yh add-customer-btn-two"
-                 :disabled="true"
-                 @click.stop="">复制新单
-      </el-button>
-      <el-button
-        class="el-button--small-yh add-customer-btn"
-        type="primary"
-        :disabled="disabled || receiptDisable"
-        @click="editCustomer"
-      >{{ form.id ? '确认修改' : '确认新增' }}
-      </el-button>
+      <div class="upper_right_button">
+        <el-button type="primary"
+                   class="el-button--small-yh"
+                   :disabled="!form.id"
+                   @click.stop="confirmReceipt">
+          {{receiptDisable ?"撤销收货":"确认收货"}}
+        </el-button>
+        <el-button type="success"
+                   class="el-button--small-yh "
+                   :disabled="true"
+                   @click.stop="">复制新单
+        </el-button>
+        <el-button
+          class="el-button--small-yh"
+          type="primary"
+          :disabled="disabled || receiptDisable"
+          @click="editCustomer"
+        >{{ form.id ? '确认修改' : '确认新增' }}
+        </el-button>
+      </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <el-form :model="form" ref="form" label-width="130px" class="demo-ruleForm">
         <containerTitle title="基础信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
@@ -954,26 +956,6 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.customer-head {
-  position: fixed;
-  top: 105px;
-  width: 100%;
-  margin-left: -10px;
-  height: 62px;
-  background: #ffffff;
-  box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
-  z-index: 999;
-  /* display: flex;
-  justify-content: left; */
-}
-
-.customer-back {
-  cursor: pointer;
-  line-height: 62px;
-  font-size: 16px;
-  color: #323233;
-  font-weight: 400;
-}
 
 .back-icon {
   line-height: 64px;
@@ -981,11 +963,6 @@ export default {
   margin-right: 8px;
 }
 
-.add-customer-btn {
-  position: fixed;
-  right: 36px;
-  top: 115px;
-}
 
 ::v-deep .el-form-item {
   margin-bottom: 0;
@@ -995,18 +972,13 @@ export default {
   display:inline-block;
   width: 7%
 }
-.add-customer-btn-two {
-  position: fixed;
-  right: 150px;
-  top: 115px;
-}
 
-.add-customer-btn-three {
+.upper_right_button{
+  display: flex;
   position: fixed;
-  right: 266px;
-  top: 115px;
+  right: 20px;
+  top: 43px;
 }
-
 .el-dialogDeep {
   ::v-deep .el-dialog {
     margin: 1vh auto 0 !important;

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

@@ -8,25 +8,21 @@
       </div>
       <div class="upper_right_button">
         <el-button type="primary"
-                   class="el-button--small-yh add-customer-btn-five"
+                   class="el-button--small-yh "
                    :disabled="true"
                    @click.stop="">请核
         </el-button>
         <el-button type="warning"
-                   class="el-button--small-yh add-customer-btn-four"
+                   class="el-button--small-yh "
                    @click.stop="applyPayment()">申请货款
         </el-button>
-        <el-button type="warning"
-                   class="el-button--small-yh add-customer-btn-three"
-                   @click.stop="">生成销售单
-        </el-button>
-        <el-button type="success"
-                   class="el-button--small-yh add-customer-btn-two"
+<!--        <el-button type="success"
+                   class="el-button&#45;&#45;small-yh "
                    :disabled="true"
                    @click.stop="">复制新单
-        </el-button>
+        </el-button>-->
         <el-button
-          class="el-button--small-yh add-customer-btn"
+          class="el-button--small-yh "
           type="primary"
           :disabled="disabled"
           @click="editCustomer"
@@ -35,7 +31,7 @@
         </el-button>
       </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <el-form :model="form" ref="form" label-width="130px">
         <containerTitle title="基础信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
@@ -1169,31 +1165,12 @@ export default {
 </script>
 
 <style scoped lang="scss">
-.customer-head {
-  position: fixed;
-  top: 105px;
-  width: 100%;
-  margin-left: -10px;
-  height: 62px;
-  background: #ffffff;
-  box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
-  z-index: 999;
-  /* display: flex;
-  justify-content: left; */
-}
 
-.customer-back {
-  cursor: pointer;
-  line-height: 62px;
-  font-size: 16px;
-  color: #323233;
-  font-weight: 400;
-}
 .upper_right_button{
   display: flex;
   position: fixed;
   right: 20px;
-  top: 115px;
+  top: 43px;
 }
 .required_fields{
   color: #F56C6C;

+ 11 - 26
src/views/salesManagement/salesContract/detailsPage.vue

@@ -15,13 +15,13 @@
         <el-button type="warning"
                    class="el-button--small-yh"
                    :disabled="!form.id"
-                   @click.stop="applySettlement">申请结算
+                   @click.stop="applySettlement">生成账单
         </el-button>
-        <el-button type="success"
-                   class="el-button--small-yh"
+     <!--   <el-button type="success"
+                   class="el-button&#45;&#45;small-yh"
                    :disabled="true"
                    @click.stop="">复制新单
-        </el-button>
+        </el-button>-->
         <el-button
           class="el-button--small-yh"
           type="primary"
@@ -31,7 +31,7 @@
         </el-button>
       </div>
     </div>
-    <div style="margin-top: 60px">
+    <div class="customer-main">
       <el-form :model="form" ref="form" label-width="130px">
         <containerTitle title="基础信息"></containerTitle>
         <basic-container style="margin-bottom: 10px">
@@ -713,7 +713,7 @@ export default {
     //首付比例  带出金额
     downPaymentChange(){
       if(this.form.orderAmount){
-        this.form.advancePayment = _.multiply(this.form.orderAmount,(this.form.downPayment*0.01)).toFixed(2)
+        this.$set(this.form,"advancePayment",_.multiply(this.form.orderAmount,(this.form.downPayment*0.01)).toFixed(2))
       }
     },
     //合计
@@ -765,6 +765,9 @@ export default {
       this.billData = {
         srcOrderno:this.form.orderNo,
         itemType:"销售",
+        billNoList: this.importInventoryData.map(item =>{return item.billNo}),
+        corpsName:this.form.corpName,
+        corpId:this.form.corpId,
         accDate:this.form.businesDate,
         currency:this.form.currency,
         exchangeRate:this.form.exchangeRate,
@@ -952,6 +955,7 @@ export default {
         if(res.data.length != 0){
           this.contractDic = res.data;
           row.orgOrderNo =  res.data[0].orderNo
+          row.itemId = res.data.itemId;
           row.priceCategoryNames  = res.data[0].itemName[0].cname
           row.priceCategory  = res.data[0].itemName[0].id
         }else{
@@ -1147,25 +1151,6 @@ export default {
 </script>
 
 <style scoped lang="scss">
-.customer-head {
-  position: fixed;
-  top: 105px;
-  width: 100%;
-  margin-left: -10px;
-  height: 62px;
-  background: #ffffff;
-  box-shadow: 0 4px 12px 0px rgba(232, 232, 235, 1);
-  z-index: 999;
-  /* display: flex;
-  justify-content: left; */
-}
-.customer-back {
-  cursor: pointer;
-  line-height: 62px;
-  font-size: 16px;
-  color: #323233;
-  font-weight: 400;
-}
 .required_fields{
   color: #F56C6C;
   display:inline-block;
@@ -1176,7 +1161,7 @@ export default {
   display: flex;
   position: fixed;
   right: 20px;
-  top: 115px;
+  top: 43px;
 }
 
 ::v-deep .el-form-item {