qinbai преди 3 години
родител
ревизия
4a197532b7

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

@@ -44,6 +44,14 @@ export const getDetails = (id) => {
   })
 }
 
+export const submit = (data) => {
+  return request({
+    url: '/api/trade-finance/settlement/submit',
+    method: 'post',
+    data: data
+  })
+}
+
 //明细
 export const modify = (data) => {
   return request({
@@ -74,3 +82,14 @@ export function getBillList(current,size,params) {
     }
   })
 }
+
+// 销售订单到账单明细
+export const paymentApply = (data) => {
+  return request({
+    url: '/api/trade-finance/settlement/paymentApply',
+    method: 'post',
+    data: data
+  })
+}
+
+

+ 12 - 13
src/components/bill/billDetail.vue → src/components/bill/billDetailList.vue

@@ -22,10 +22,14 @@
 
 <script>
   import option from './config/mainList.json'
+  import { getBillList } from "@/api/financialManagement/paymentRequest";
 
   export default {
     name: "index",
     props: {
+      billType:{
+        type: String
+      },
       itemId: {
         type: String
       },
@@ -61,19 +65,14 @@
         this.selectList = row
       },
       onLoad(page, params = {}){
-        // this.loading = true;
-        // if (params.promentDate != undefined) {
-        //   params.startDate = params.promentDate[0]+ " " + "00:00:00";
-        //   params.endDate = params.promentDate[1] + " " + "23:59:59";
-        //   this.$delete(params,'promentDate')
-        // }
-        // params.tradeType = "JK"
-        // getItemListByConditions(page.currentPage, page.pageSize,params).then(res=>{
-        //   this.data = res.data.data.records
-        //   this.page.total = res.data.data.total
-        // }).finally(()=>{
-        //   this.loading = false;
-        // })
+        this.loading = true;
+        params.billType = this.billType
+        getBillList(page.currentPage, page.pageSize,params).then(res=>{
+          this.data = res.data.data.records
+          this.page.total = res.data.data.total
+        }).finally(()=>{
+          this.loading = false;
+        })
       },
       importProMent(){
         this.$emit('importProMent',this.selectList);

+ 74 - 53
src/components/bill/config/mainList.json

@@ -20,74 +20,95 @@
   "menu": false,
   "menuWidth": 0,
   "dialogClickModal": false,
-  "column":[
+  "column": [
     {
       "label": "合同号",
-      "prop": "orderNo",
+      "prop": "accSysNo",
+      "overHidden": true,
+      "width": 120,
+      "index": 2
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
-      "index": 1,
-      "width":180
+      "overHidden": true,
+      "width": 200,
+      "index": 3
     },
     {
-      "label": "提单号",
-      "prop": "billNo",
-      "index": 2,
-      "width":180
+      "label": "费用名称",
+      "prop": "costType",
+      "overHidden": true,
+      "width": 150,
+      "index": 4
     },
     {
-      "label": "客户",
-      "prop": "corpName",
-      "search": true,
-      "index": 3,
-      "width":180
+      "label": "数量",
+      "prop": "quantity",
+      "overHidden": true,
+      "width": 120,
+      "index": 5
     },
     {
-      "label": "货物品种",
-      "prop": "priceCategoryNames",
-      "index": 4,
-      "width":120
-    },{
-      "label": "规格名称",
-      "prop": "itemType",
-      "index": 5,
-      "width":120
-    },{
-      "label": "件数",
-      "prop": "purchaseQuantity",
-      "index": 6,
-      "width":120
-    },{
-      "label": "发票净重(吨)",
-      "prop": "invoiceWeight",
-      "index": 7,
-      "width":120
-    },{
-      "label": "码单重量(吨)",
-      "prop": "billWeight",
-      "index": 8,
-      "width":120
-    },{
       "label": "单价",
       "prop": "price",
-      "index": 9,
-      "width":120
-    },{
-      "label": "合同金额",
+      "width": 120,
+      "overHidden": true,
+      "index": 6
+    },
+    {
+      "label": "账单金额",
       "prop": "amount",
-      "index": 10,
-      "width":120
-    },{
-      "label": "订单日期",
-      "prop": "marketDate",
-      "hide": true,
+      "search": true,
+      "overHidden": true,
+      "width": 120,
+      "index": 7
+    },
+    {
+      "label": "结算金额",
+      "prop": "settlementAmount",
+      "width": 120,
+      "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",
+      "overHidden": true,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
-      "unlinkPanels": true,
-      "searchRange": true,
-      "search": true,
-      "index": 6,
-      "width":150
+      "width": 200,
+      "index": 12
+    },
+    {
+      "label": "备注",
+      "prop": "remark",
+      "overHidden": true,
+      "index": 13,
+      "width": 200
     }
   ]
 }

+ 35 - 14
src/components/finance/applyPayment.vue

@@ -29,7 +29,7 @@
 </template>
 
 <script>
-  import { applyLoan } from "@/api/financialManagement/paymentRequest";
+  import { applyLoan,paymentApply } from "@/api/financialManagement/paymentRequest";
 
     export default {
       name: "applyPayment",
@@ -93,17 +93,26 @@
                 label: '单价',
                 prop: 'price',
                 span: 12,
+                rules: [
+                  {
+                    pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                    message: ' ',
+                    trigger: 'blur'
+                  }
+                ]
               },
               {
                 label: '数量',
                 prop: 'quantity',
                 value:1,
                 span: 12,
-              },
-              {
-                label: '计价单位',
-                prop: 'unit',
-                span: 12,
+                rules: [
+                  {
+                    pattern: /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/,
+                    message: ' ',
+                    trigger: 'blur'
+                  }
+                ]
               },
               {
                 label: '金额',
@@ -118,15 +127,18 @@
                 ]
               },
               {
+                label: '计价单位',
+                prop: 'unit',
+                span: 12,
+              },
+              {
                 label: '币别',
                 prop: 'currency',
-                // value:this.billData.currency,
                 span: 12,
               },
               {
                 label: '汇率',
                 prop: 'exchangeRate',
-                // value:this.billData.exchangeRate,
                 span: 12,
               },
               {
@@ -169,12 +181,21 @@
             billType : this.billType,
             itemsList: itemsList
           }
-          applyLoan(params).then(res =>{
-             if(res.data.success){
-               this.$message.success("操作成功!")
-               this.$emit("choceFun");
-             }
-          })
+          if(this.billType === "销售"){  //销售订单 =>  账单明细
+            paymentApply(params).then(res=>{
+              if(res.data.success){
+                this.$message.success("操作成功!")
+                this.$emit("choceFun");
+              }
+            })
+          }else{ //采购订单 => 付款申请
+            applyLoan(params).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!")
+                this.$emit("choceFun");
+              }
+            })
+          }
         }
       }
     }

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

@@ -13,13 +13,6 @@
                @size-change="sizeChange"
                @refresh-change="refreshChange"
                @on-load="onLoad">
-      <template slot="menuLeft">
-        <el-button type="primary"
-                   size="small"
-                   icon="el-icon-plus"
-                   @click="addReceipt">新 单
-        </el-button>
-      </template>
     </avue-crud>
   </basic-container>
 </template>
@@ -50,7 +43,7 @@
 
     },
     mounted() {
-      option.height = window.innerHeight - 350 ;
+      option.height = window.innerHeight - 310 ;
     },
     methods: {
       //新单打开

+ 58 - 26
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -15,73 +15,105 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
+  "menu": false,
   "menuWidth": 220,
   "column": [
     {
-      "label": "合同号",
-      "prop": "srcOrderno",
+      "label": "单据类型",
+      "prop": "billType",
+      "search": true,
+      "overHidden": true,
       "width": 120,
       "index": 1
     },
     {
-      "label": "客户名称",
-      "prop": "corpId",
-      "search": true,
+      "label": "合同号",
+      "prop": "accSysNo",
+      "overHidden": true,
       "width": 120,
       "index": 2
     },
     {
-      "label": "收款日期",
-      "prop": "settlementDate",
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
-      "width": 120,
+      "overHidden": true,
+      "width": 200,
       "index": 3
     },
     {
-      "label": "金额",
-      "prop": "amount",
-      "search": true,
-      "width": 120,
+      "label": "费用名称",
+      "prop": "costType",
+      "overHidden": true,
+      "width": 150,
       "index": 4
     },
     {
-      "label": "币别",
-      "prop": "currency",
+      "label": "数量",
+      "prop": "quantity",
+      "overHidden": true,
       "width": 120,
       "index": 5
     },
     {
-      "label": "银行名称",
-      "prop": "accountBank",
+      "label": "单价",
+      "prop": "price",
       "width": 120,
+      "overHidden": true,
       "index": 6
     },
     {
-      "label": "银行户头",
-      "prop": "accountName",
+      "label": "账单金额",
+      "prop": "amount",
+      "search": true,
+      "overHidden": true,
       "width": 120,
       "index": 7
     },
     {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
+      "label": "结算金额",
+      "prop": "settlementAmount",
       "width": 120,
+      "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",
-      "index": 9,
+      "overHidden": true,
+      "index": 11,
       "width": 120
     },
     {
+      "label": "录入日期",
+      "prop": "createTime",
+      "type": "date",
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 200,
+      "index": 12
+    },
+    {
       "label": "备注",
       "prop": "remark",
-      "index": 10,
-      "width": 120
+      "overHidden": true,
+      "index": 13,
+      "width": 200
     }
   ]
 }

+ 44 - 14
src/views/financialManagement/paymentRequest/configuration/detailsPage.json

@@ -23,21 +23,57 @@
       "overHidden": true
     },
     {
-      "label": "提单号",
-      "prop": "billNo",
-      "index": 1,
+      "label": "客户名称",
+      "prop": "corpId",
+      "index": 2,
       "overHidden": true
     },
     {
       "label": "费用名称",
-      "prop": "srcOrderno",
-      "index": 1,
+      "prop": "costType",
+      "index": 3,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "quantity",
+      "index": 4,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "单价",
+      "prop": "price",
+      "index": 5,
+      "cell": true,
       "overHidden": true
     },
     {
       "label": "金额",
       "prop": "amount",
-      "index": 2,
+      "index": 6,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "index": 7,
+      "cell": true,
+      "overHidden": true
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "index": 8,
+      "overHidden": true
+    },
+    {
+      "label": "备注",
+      "prop": "remarks",
+      "index": 9,
+      "cell": true,
       "overHidden": true
     },
     {
@@ -47,18 +83,12 @@
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
       "overHidden": true,
-      "index": 3
+      "index": 10
     },
     {
       "label": "录入人",
       "prop": "createUserName",
-      "index": 4,
-      "overHidden": true
-    },
-    {
-      "label": "备注",
-      "prop": "remark",
-      "index": 4,
+      "index": 11,
       "overHidden": true
     }
   ]

+ 10 - 10
src/views/financialManagement/paymentRequest/configuration/mainList.json

@@ -15,7 +15,7 @@
   "viewBtn": false,
   "editBtn": false,
   "delBtn": false,
-  "menuWidth": 220,
+  "menuWidth": 180,
   "column": [
     {
       "label": "合同号",
@@ -33,7 +33,7 @@
       "index": 2
     },
     {
-      "label": "金额",
+      "label": "金额",
       "prop": "amount",
       "search": true,
       "overHidden": true,
@@ -41,14 +41,7 @@
       "index": 4
     },
     {
-      "label": "币别",
-      "prop": "currency",
-      "overHidden": true,
-      "width": 120,
-      "index": 5
-    },
-    {
-      "label": "银行名称",
+      "label": "开户银行",
       "prop": "accountBank",
       "overHidden": true,
       "width": 150,
@@ -62,6 +55,13 @@
       "index": 7
     },
     {
+      "label": "银行账号",
+      "prop": "accountNo",
+      "overHidden": true,
+      "width": 150,
+      "index": 7
+    },
+    {
       "label": "录入日期",
       "prop": "createTime",
       "type": "date",

+ 10 - 21
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -16,6 +16,11 @@
                      :disabled="checkDisabled"
                      @click.stop="settlement">结算
           </el-button>
+          <el-button type="primary"
+                     class="el-button--small-yh"
+                     :disabled="!checkDisabled"
+                     @click.stop="confirmEdit">确认修改
+          </el-button>
         </div>
       </div>
     </div>
@@ -46,14 +51,13 @@
           <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
-              icon="el-icon-view"
               size="small"
+              :disabled="!checkDisabled"
               @click.stop="rowCell(scope.row,scope.index)"
             >修改
             </el-button>
             <el-button
               type="text"
-              icon="el-icon-edit"
               size="small"
               @click.stop=""
             >删除
@@ -68,7 +72,7 @@
 <script>
   import itemOption from "./configuration/detailsPage.json";
   import { contrastObj,contrastList } from "@/util/contrastData";
-  import { getDetails,modify, paymentCheck } from "@/api/financialManagement/paymentRequest";
+  import { getDetails,modify,submit, paymentCheck } from "@/api/financialManagement/paymentRequest";
 
   export default {
     name: "paymentDetailsPage",
@@ -127,7 +131,7 @@
               ]
             },
             {
-              label: '金额',
+              label: '金额',
               prop: 'amount',
               span: 8,
               rules: [
@@ -137,23 +141,8 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '币别',
-              prop: 'currency',
-              span: 8,
             },
             {
-              label: '汇率',
-              prop: 'exchangeRate',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
-            },{
               label: '开户银行',
               prop: 'accountBank',
               span: 8,
@@ -344,7 +333,7 @@
       refreshChange() {
         console.log('1')
       },
-      editPayment(status){
+      confirmEdit(status){
         this.$refs["form"].validate((valid) => {
           if(valid){
             const params = {
@@ -352,7 +341,7 @@
               billType:"申请",
               itemsList:this.dataList
             }
-            modify(params).then(res =>{
+            submit(params).then(res =>{
               this.$message.success("操作成功!")
               this.form = res.data.data;
               this.oldForm = Object.assign({},res.data.data);

+ 59 - 24
src/views/financialManagement/paymentSettle/configuration/detailsPage.json

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

+ 1 - 3
src/views/financialManagement/paymentSettle/paymentSettle.vue

@@ -65,9 +65,7 @@
         detailData:{},
         option: option,
         parentId:0,
-        dataList: [{
-          canem:""
-        }],
+        dataList: [],
         page: {
           pageSize: 10,
           pagerCount: 5,

+ 16 - 32
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -44,14 +44,6 @@
           <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
-              icon="el-icon-view"
-              size="small"
-              @click.stop=""
-            >修改
-            </el-button>
-            <el-button
-              type="text"
-              icon="el-icon-edit"
               size="small"
               @click.stop=""
             >删除
@@ -63,7 +55,7 @@
         title="导入采购"
         append-to-body
         class="el-dialogDeep"
-        :visible.sync="procurementDialog"
+        :visible.sync="billDetailDialog"
         width="60%"
         :close-on-click-modal="false"
         :destroy-on-close="true"
@@ -71,7 +63,8 @@
         top="10vh"
         v-dialog-drag>
         <bill-detail
-          @closeFun="!procurementDialog"
+          :billType="billType"
+          @closeFun="!billDetailDialog"
           @importProMent="importProMent"
         >
         </bill-detail>
@@ -85,7 +78,8 @@
   import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
   import { getDetails,modify } from "@/api/financialManagement/paymentRequest";
   import { contrastObj,contrastList } from "@/util/contrastData";
-  import  billDetail from "@/components/bill/billDetail";
+  import  billDetail from "@/components/bill/billDetailList";
+  import _ from "lodash";
 
   export default {
     name: "paymentDetailsPage",
@@ -99,7 +93,8 @@
         form: {},
         itemsForm:{},
         itemsOption: option,
-        procurementDialog:false,
+        billDetailDialog:false,
+        billType:"申请",
         id:"",
         dataList: [],
         currencyDic:[],
@@ -143,7 +138,7 @@
               ]
             },
             {
-              label: '金额',
+              label: '金额',
               prop: 'amount',
               span: 8,
               rules: [
@@ -153,22 +148,6 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '币别',
-              prop: 'currency',
-              span: 8,
-            },
-            {
-              label: '汇率',
-              prop: 'exchangeRate',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
             },{
               label: '开户银行',
               prop: 'accountBank',
@@ -306,10 +285,15 @@
     },
     methods: {
       selectPurchase(){
-        this.procurementDialog = true;
+        this.billDetailDialog = true;
       },
-      importProMent(){
-
+      importProMent(list){
+        list.forEach((item,index) =>{
+          item.accId = item.id;
+          delete item.id;
+          this.$refs.crud.rowCellAdd(item);
+        })
+        this.billDetailDialog = false;
       },
       searchReset() {
         console.log('1')

+ 63 - 16
src/views/financialManagement/receiptSettle/configuration/detailsPage.json

@@ -18,36 +18,83 @@
   "column": [
     {
       "label": "合同号",
-      "prop": "srcOrderno",
-      "index": 1,
-      "overHidden": true
+      "prop": "accSysNo",
+      "overHidden": true,
+      "width": 120,
+      "index": 2
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpId",
+      "overHidden": true,
+      "width": 200,
+      "index": 3
     },
     {
-      "label": "金额",
+      "label": "费用名称",
+      "prop": "costType",
+      "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": "账单金额",
       "prop": "amount",
-      "index": 2,
-      "overHidden": true
+      "overHidden": true,
+      "width": 120,
+      "index": 7
     },
     {
-      "label": "录入日期",
-      "prop": "createTime",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
+      "label": "币别",
+      "prop": "currency",
+      "width": 120,
       "overHidden": true,
-      "index": 3
+      "index": 9
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 120,
+      "overHidden": true,
+      "index": 10
     },
     {
       "label": "录入人",
       "prop": "createUserName",
-      "index": 4,
-      "overHidden": true
+      "overHidden": true,
+      "index": 11,
+      "width": 120
+    },
+    {
+      "label": "录入日期",
+      "prop": "createTime",
+      "type": "date",
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 200,
+      "index": 12
     },
     {
       "label": "备注",
       "prop": "remark",
-      "index": 4,
-      "overHidden": true
+      "overHidden": true,
+      "index": 13,
+      "width": 200
     }
   ]
 }

+ 37 - 30
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -5,11 +5,6 @@
         <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                    @click="backToList">返回列表
         </el-button>
-        <el-button type="info"
-                   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"
                    @click.stop="editReceipt "
         >{{this.id?"确认修改" :"确认结算"}}
@@ -43,16 +38,10 @@
             <el-button type="primary"
                        size="small"
                        icon="el-icon-shopping-cart-2"
-                       @click=""
+                       @click="selectRecipt"
             >选择销售合同
             </el-button>
           </template>
-          <template slot="menuRight">
-            <el-button type="info"
-                       size="small"
-                       @click="">发送收款信息
-            </el-button>
-          </template>
           <template slot-scope="scope" slot="menu">
             <el-button
               type="text"
@@ -71,6 +60,24 @@
           </template>
         </avue-crud>
       </basic-container>
+      <el-dialog
+        title="导入销售"
+        append-to-body
+        class="el-dialogDeep"
+        :visible.sync="billDetailDialog"
+        width="60%"
+        :close-on-click-modal="false"
+        :destroy-on-close="true"
+        :close-on-press-escape="false"
+        top="10vh"
+        v-dialog-drag>
+        <bill-detail
+          :billType="billType"
+          @closeFun="!billDetailDialog"
+          @importProMent="importProMent"
+        >
+        </bill-detail>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -79,6 +86,7 @@
   import option from "./configuration/detailsPage.json";
   import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
   import { detailSaleList } from "@/api/importTrade/salesContract"
+  import  billDetail from "@/components/bill/billDetailList";
 
   export default {
     name: "receiptDetailsPage",
@@ -87,6 +95,9 @@
         type: Object
       }
     },
+    components:{
+      billDetail
+    },
     data() {
       return {
         form: {},
@@ -126,7 +137,7 @@
               ]
             },
             {
-              label: '金额',
+              label: '金额',
               prop: 'amount',
               span: 8,
               rules: [
@@ -136,22 +147,6 @@
                   trigger: 'blur'
                 }
               ]
-            }, {
-              label: '币别',
-              prop: 'currency',
-              span: 8,
-            },
-            {
-              label: '汇率',
-              prop: 'exchangeRate',
-              span: 8,
-              rules: [
-                {
-                  required: false,
-                  message: ' ',
-                  trigger: 'blur'
-                }
-              ]
             },{
               label: '开户银行',
               prop: 'accountBank',
@@ -235,7 +230,8 @@
           pagerCount: 5,
           total: 0,
         },
-        query:{},
+        billDetailDialog:false,
+        billType:"销售",
         //新旧数据对比
         oldForm:{},
         oldItemList:[],
@@ -298,6 +294,17 @@
       option.height = window.innerHeight - 640 ;
     },
     methods: {
+      selectRecipt(){
+        this.billDetailDialog = true;
+      },
+      importProMent(list){
+        list.forEach((item,index) =>{
+          item.accId = item.id;
+          delete item.id;
+          this.$refs.crud.rowCellAdd(item);
+        })
+        this.billDetailDialog = false;
+      },
       searchReset() {
         console.log('1')
       },

+ 1 - 3
src/views/purchase/contract/detailsPage.vue

@@ -204,8 +204,6 @@
         <fee-info
           ref="feeInfo"
           :orderFeesList="orderFeesList"
-          :billData="billData"
-          :beforeBillData="beforeBillData"
           feeUrl=""
         />
         <upload-file
@@ -294,7 +292,7 @@
       <apply-payment
         :billType="billType"
         :billData="billData"
-        :choceFun="choceFun"
+        @choceFun="choceFun"
       >
       </apply-payment>
     </el-dialog>

+ 62 - 21
src/views/salesManagement/salesContract/detailsPage.vue

@@ -272,6 +272,23 @@
           <el-button @click="payeeDialog = false ">关 闭</el-button>
         </span>
     </el-dialog>
+    <el-dialog
+      append-to-body
+      class="el-dialogDeep"
+      :visible.sync="applySettlementDialog"
+      width="60%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <apply-payment
+        :billType="billType"
+        :billData="billData"
+        @choceFun="choceFun"
+      >
+      </apply-payment>
+    </el-dialog>
   </div>
 </template>
 
@@ -295,6 +312,8 @@ import uploadFile from "@/components/upload-file/main";
 import { contrastObj,contrastList } from "@/util/contrastData";
 import _ from "lodash";
 import option from "./config/mainList.json";
+//账单组件
+import ApplyPayment from "../../../components/finance/applyPayment";
 
 export default {
   name: "detailsPage",
@@ -307,6 +326,7 @@ export default {
     return {
       disabled: false,
       dialogCommodity: false,
+      applySettlementDialog:false,
       dialogVisible: false,
       form: {},
       orderFeesList:[],
@@ -314,6 +334,8 @@ export default {
       currencyDic:[],
       contractDic:[],
       selectKind:-1,
+      billType:"销售",
+      billData:{},
       configuration:{
         multipleChoices:false,
         multiple:false,
@@ -683,6 +705,7 @@ export default {
     }
   },
   components: {
+    ApplyPayment,
     feeInfo,
     uploadFile
   },
@@ -738,6 +761,19 @@ export default {
         row.amount =_.multiply(row.invoiceWeight,row.price).toFixed(2);
       }
     },
+    beforeBillData(type){
+      this.billData = {
+        srcOrderno:this.form.orderNo,
+        itemType:"销售",
+        accDate:this.form.businesDate,
+        currency:this.form.currency,
+        exchangeRate:this.form.exchangeRate,
+        srcParentId:this.form.id,
+      }
+      if(type){ //申请货款
+        this.billData.srcId = -1
+      }
+    },
     //申请结算
     applySettlement(){
       if(contrastObj(this.form,this.oldForm) || contrastList(this.importInventoryData,this.oldInventoryData)
@@ -751,27 +787,29 @@ export default {
           this.editCustomer();
         })
       }else{
-        this.$confirm("是否确认申请结算!", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          if(this.$store.getters.takeStatus){
-            this.$alert("结算页面已存在,请关闭收货单再进行操作", "温馨提示", {
-              confirmButtonText: "确定",
-              type: 'warning',
-              callback: action => {
-              }
-            });
-          }else{
-            //关闭一下存在的列表页  跳转
-            this.$router.$avueRouter.closeTag('/receipt_settle');
-            this.$router.push({
-              path: "/receipt_settle",
-              query: {params: this.form.id},
-            });
-          }
-        })
+        this.beforeBillData(true)
+        this.applySettlementDialog = true;
+        // this.$confirm("是否确认申请结算!", {
+        //   confirmButtonText: "确定",
+        //   cancelButtonText: "取消",
+        //   type: "warning"
+        // }).then(() => {
+        //   if(this.$store.getters.takeStatus){
+        //     this.$alert("结算页面已存在,请关闭收货单再进行操作", "温馨提示", {
+        //       confirmButtonText: "确定",
+        //       type: 'warning',
+        //       callback: action => {
+        //       }
+        //     });
+        //   }else{
+        //     //关闭一下存在的列表页  跳转
+        //     this.$router.$avueRouter.closeTag('/receipt_settle');
+        //     this.$router.push({
+        //       path: "/receipt_settle",
+        //       query: {params: this.form.id},
+        //     });
+        //   }
+        // })
       }
     },
     //修改
@@ -846,6 +884,9 @@ export default {
         }
       });
     },
+    choceFun(){
+      this.applySettlementDialog  = false
+    },
     //刷新
     payeeRefreshChange(){