Browse Source

货代 11.16

caojunjie 1 year ago
parent
commit
3d2901aad9

+ 16 - 13
src/api/iosBasicData/finstlbills.js

@@ -102,16 +102,19 @@ export const finstlbillsitemsList = (current, size, params) => {
     }
   })
 }
-
-
-
-// /blade-los/finstlbills/   业务-财务对账单和结算 签收接口   post
-// 财务对账单 确认
-//confirmReconciliation
-// 财务对账单 撤销
-// revokeReconciliation
-
-// 财务结算 确认
-// confirmSettlement
-// 财务结算 撤销
-// revokeSettlement
+// 结算 确认
+export const finstlbillsConfirmSettlement = (row) => {
+  return request({
+    url: '/api/blade-los/finstlbills/confirmSettlement',
+    method: 'post',
+    data: row
+  })
+}
+// 结算 撤销
+export const finstlbillsRevokeSettlement = (row) => {
+  return request({
+    url: '/api/blade-los/finstlbills/revokeSettlement',
+    method: 'post',
+    data: row
+  })
+}

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

@@ -1393,6 +1393,10 @@ const columnName = [{
     code: 314,
     name: '货运代理-账单管理-对账中心'
   },
+  {
+    code: 315,
+    name: '货运代理-账单管理-结算单'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 6 - 7
src/router/views/index.js

@@ -2823,21 +2823,20 @@ export default [{
       component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/finstlbills/index.vue')
     }]
   },
-  // 付费申请(F)
+  // 结算单(F)
   {
-    path: '/iosBasicData/settlement/index',
+    path: '/iosBasicData/CollectionSettlement/index',
     component: Layout,
     hidden: true,
     children: [{
-      path: '/iosBasicData/settlement/index',
-      name: '付费申请(F)',
+      path: '/iosBasicData/CollectionSettlement/index',
+      name: '结算单(F)',
       meta: {
-        i18n: '/iosBasicData/settlement/index',
+        i18n: '/iosBasicData/CollectionSettlement/index',
         keepAlive: true,
       },
-      component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/settlement/index.vue')
+      component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/CollectionSettlement/index.vue')
     }]
   },
-  // 收款结算(F)
 
 ]

+ 426 - 0
src/views/iosBasicData/CollectionSettlement/assembly/finstlbillsitems.vue

@@ -0,0 +1,426 @@
+<template>
+    <div>
+        <el-table
+            ref="tableRef"
+            :row-style="{height:'20px',padding:'0px',fontSize:'12px'}"
+            :cell-style="{padding:'0px',fontSize:'12px'}"
+            :header-cell-style="tableHeaderCellStyle"
+            :data="tableData"
+            border
+            style="width: 100%"
+            @selection-change="handleSelectionChange"
+            @mousedown="handleMouseDown"
+            @mousemove="handleMouseMove"
+            @mouseup="handleMouseUp" >
+            <el-table-column
+                v-if="brfalse"
+                type="selection"
+                width="55">
+                <template slot-scope="scope">
+                    <el-checkbox v-model="scope.row.tableSelect"
+                                 :true-label="1" :false-label="0"
+                                 @change="toggleSelection([scope.row])">
+                    </el-checkbox>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="lineNo"
+                label="行号" width="50px">
+            </el-table-column>
+            <el-table-column
+                prop="lineNo"
+                label="源业务编号" width="120px">
+                <template slot-scope="{ row }">
+                    <span class="textHide" v-if="row.businessBillDivideNo">{{row.businessBillDivideNo}}</span>
+                    <span class="textHide" v-else>{{row.businessBillNo}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="invoiceNo"
+                label="发票号">
+            </el-table-column>
+            <el-table-column
+                prop="corpCnName"
+                label="结算单位" width="130px">
+                <template slot-scope="{ row }">
+                    <avue-text-ellipsis :text="row.corpCnName" :height="50" :width="130">
+                        <small slot="more">...</small>
+                    </avue-text-ellipsis>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="mblno"
+                label="MB/L NO" width="120px">
+                <template slot-scope="{ row }">
+                    <avue-text-ellipsis :text="row.mblno" :height="50" :width="120">
+                        <small slot="more">...</small>
+                    </avue-text-ellipsis>
+                </template>
+            </el-table-column>
+            <el-table-column label="本地结算金额">
+                <!--amount-->
+                <el-table-column
+                    prop="amountRMB"
+                    label="RMB">
+                </el-table-column>
+                <el-table-column
+                    prop="amountUSD"
+                    label="USD">
+                </el-table-column>
+            </el-table-column>
+            <el-table-column
+                prop="currentStlExrate"
+                label="汇率">
+            </el-table-column>
+            <el-table-column
+                prop="tableSelect"
+                label="选择" width="50px" v-if="brfalse">
+                <template slot-scope="scope">
+                    <el-checkbox v-model="scope.row.tableSelect"
+                                 :true-label="1" :false-label="0"
+                                 @change="toggleSelection([scope.row])">
+                    </el-checkbox>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="isChecked"
+                label="对账">
+                <template slot-scope="{row}">
+                    <span v-if="row.isChecked == item.dictKey" v-for="item in ifInvoiceData" :key="item.dictKey">
+                        {{item.dictValue}}
+                    </span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="isSignfor"
+                label="签收">
+                <template slot-scope="{ row }">
+                    <span v-if="row.isSignfor == item.dictKey" v-for="item in ifInvoiceData" :key="item.dictKey">
+                        {{item.dictValue}}
+                    </span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="isInvoice"
+                label="发票状态">
+                <template slot-scope="{row}">
+                    <span v-if="row.isInvoice == item.dictKey" v-for="item in invoicelosDara" :key="item.id">
+                        {{item.dictValue}}
+                    </span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="etd"
+                label="ETD" width="150px">
+                <template slot-scope="{ row }">
+                    <span>{{row.etd}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="accBillNo"
+                label="账单编号">
+            </el-table-column>
+
+            <el-table-column
+                prop="signforName"
+                label="签收人">
+            </el-table-column>
+            <el-table-column
+                prop="signforDate"
+                label="签收日期">
+            </el-table-column>
+
+            <el-table-column
+                prop="billDate"
+                label="销账日期" width="150px">
+                <template slot-scope="{ row }">
+                    <span>{{row.etd}}</span>
+                </template>
+            </el-table-column>
+
+            <el-table-column
+                prop="accBillNo"
+                label="操作">
+            </el-table-column>
+            <el-table-column
+                prop="bookingNo"
+                label="BOOKINGNO" width="150px">
+                <template slot-scope="{ row }">
+                    <span>{{row.bookingNo}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="hblno"
+                label="HB/L NO" width="150px">
+                <template slot-scope="{ row }">
+                    <span class="textHide" >{{row.hblno}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="vesselCnName"
+                label="船名">
+            </el-table-column>
+            <el-table-column
+                prop="voyageNo"
+                label="航次" width="100px">
+                <template slot-scope="{ row }">
+                    <span class="textHide" >{{row.voyageNo}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="发票">
+                <!--currentInvoiceAmount-->
+                <el-table-column
+                    prop="currentInvoiceAmountRMB"
+                    label="RMB">
+                </el-table-column>
+                <el-table-column
+                    prop="currentInvoiceAmountUSD"
+                    label="USD">
+                </el-table-column>
+            </el-table-column>
+            <el-table-column
+                prop="quantityCntrTypesDescr"
+                label="箱型">
+            </el-table-column>
+            <el-table-column
+                prop="quantityCntrTypesDescr"
+                label="箱量">
+            </el-table-column>
+            <el-table-column
+                prop="billNo"
+                label="编号" width="100px">
+                <template slot-scope="{ row }">
+                    <span class="textHide" >{{row.billNo}}</span>
+                </template>
+            </el-table-column>
+            <!--currentStlDiscount-->
+            <el-table-column
+                prop="dc"
+                label="收/付">
+            </el-table-column>
+            <el-table-column label="应结算金额">
+                <!--unsettledAmount-->
+                <el-table-column
+                    prop="unsettledAmountRMB"
+                    label="RMB">
+                </el-table-column>
+                <el-table-column
+                    prop="unsettledAmountUSD"
+                    label="USD">
+                </el-table-column>
+            </el-table-column>
+            <el-table-column label="已结算金额">
+                <!--stlTtlAmount-->
+                <el-table-column
+                    prop="stlTtlAmountRMB"
+                    label="RMB">
+                </el-table-column>
+                <el-table-column
+                    prop="stlTtlAmountUSD"
+                    label="USD">
+                </el-table-column>
+            </el-table-column>
+            <el-table-column
+                prop="voyageNo"
+                label="结算单号">
+                <template slot-scope="{ row }">
+                    <span class="textHide" >{{row.voyageNo}}</span>
+                </template>
+            </el-table-column>
+            <!--paymode-->
+            <el-table-column
+                prop="paymodeH"
+                label="H付费方式">
+            </el-table-column>
+            <el-table-column
+                prop="paymodeM"
+                label="M付费方式">
+            </el-table-column>
+
+            <el-table-column
+                prop="eta"
+                label="ETA">
+                <template slot-scope="{ row }">
+                    <span class="textHide" >{{row.voyageNo}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="eta"
+                label="三检单号">
+                <template slot-scope="{ row }">
+                    <span class="textHide" >{{row.voyageNo}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column
+                label="本次结算币种"
+                prop="currentStlCurCode" width="130px">
+                <template slot-scope="{row}">
+                    <search-query :datalist="curCodeData"
+                                  :selectValue="row.curCode"
+                                  :filterable="true"
+                                  :clearable="true"
+                                  :remote="true"
+                                  :buttonIf="false"
+                                  :forParameter="{key:'id',label:'code',value:'code'}"
+                                  @remoteMethod="getRateListfun"
+                                  @corpChange="corpChange($event,row)"
+                                  @corpFocus="getRateListfun">
+                    </search-query>
+                </template>
+            </el-table-column>
+            <el-table-column label="本次结算金额">
+                <!--默认应结算 可以修改-->
+                <!--currentStlAmount-->
+                <el-table-column
+                    prop="currentStlAmountRMB"
+                    label="RMB" width="100px">
+                    <template slot-scope="scope">
+                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
+                                  size="mini" autocomplete="off"
+                                  clearable placeholder="请输入USD" >
+                        </el-input>
+                        <span v-else>{{scope.row.currentStlAmountRMB}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    prop="currentStlAmountUSD"
+                    label="USD" width="100px">
+                    <template slot-scope="scope">
+                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
+                                  size="mini" autocomplete="off"
+                                  clearable placeholder="请输入USD" >
+                        </el-input>
+                        <span v-else>{{scope.row.currentStlAmountUSD}}</span>
+                    </template>
+                </el-table-column>
+            </el-table-column>
+            <el-table-column
+                prop="remarkss"
+                label="备注" width="150px">
+                <template slot-scope="scope">
+                    <el-input style="width: 100%;" v-model="scope.row.remarkss" v-if="brfalse"
+                              size="mini" autocomplete="off"
+                              clearable placeholder="请输入备注" >
+                    </el-input>
+                    <span v-else>{{scope.row.remarkss}}</span>
+                </template>
+            </el-table-column>
+
+
+        </el-table>
+    </div>
+</template>
+
+<script>
+    import {getWorkDicts} from "@/api/system/dictbiz";
+    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+    import {getRateList} from "@/api/iosBasicData/rateManagement";
+
+    export default {
+        components: {SearchQuery},
+        props:{
+            tableData:{
+                type:Array,
+                default:[],
+            },
+            brfalse:{
+                type:Boolean,
+                default:true,
+            }
+        },
+        data(){
+            return {
+                ifInvoiceData:[], // 是否数据
+                invoicelosDara:[],// 发票
+                curCodeData:[], // 币种
+            }
+        },
+        created() {
+            this.isSignforWorkDicts()
+            this.invoicelosWorkDictsfun()
+        },
+        methods:{
+            // 多选选择的数据
+            handleSelectionChange(arr){
+                // 全选
+                if (arr.length == this.tableData.length) {
+                    for (let item of arr) {
+                        this.$set(item,'tableSelect',1)
+                    }
+                }
+                // 清除全选
+                if (arr.length == 0) {
+                    for (let item of this.tableData) {
+                        this.$set(item,'tableSelect',0)
+                    }
+                }
+                this.$emit('handleSelectionChange',arr)
+            },
+            // 多选
+            toggleSelection(rows){
+                if (rows) {
+                    rows.forEach(row => {
+                        this.$refs.tableRef.toggleRowSelection(row);
+                    });
+                } else {
+                    this.$refs.tableRef.clearSelection();
+                }
+            },
+            handleMouseDown(event) {
+                console.log(event,351)
+                const table = this.$refs.tableRef
+                const cell = event.target.closest('td')
+            },
+            handleMouseMove(event) {
+
+            },
+            handleMouseUp(){
+
+            },
+
+            corpChange(value,row){
+                this.$set(row,'currentStlCurCode',value)
+                console.log(value,383)
+                if (value == 'CNY') {
+                    this.$set(row,'currentStlAmountRMB',Number(row.amount) - Number(row.stlTtlAmount))
+                }else {
+                    this.$set(row,'currentStlAmountUSD',Number(row.amount) - Number(row.stlTtlAmount))
+                }
+            },
+            // 接口请求
+            // 是否接口
+            isSignforWorkDicts(){
+                getWorkDicts('ifInvoice').then(res=>{
+                    this.ifInvoiceData = res.data.data
+                })
+            },
+            // 发票
+            invoicelosWorkDictsfun(){
+                getWorkDicts('invoice_los').then(res=>{
+                    this.invoicelosDara = res.data.data
+                })
+            },
+            // 获取币别数据
+            getRateListfun(cnName){
+                getRateList({current:1,size:10,cnName}).then(res=>{
+                    this.curCodeData = res.data.data.records
+                })
+            },
+
+            // 表头样式
+            tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
+                return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff"
+            },
+        }
+
+    }
+</script>
+
+<style scoped>
+.textHide {
+    width: 100%;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+}
+</style>

+ 751 - 0
src/views/iosBasicData/CollectionSettlement/finstlbillsDetails.vue

@@ -0,0 +1,751 @@
+<template>
+    <div class="borderless" v-loading="pageLoading">
+        <div class="customer-head">
+            <div class="customer-back">
+                <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                           @click="backToList">返回列表
+                </el-button>
+            </div>
+            <div class="add-customer-btn">
+                <el-button  size="small" type="success" style="margin-right: 8px"
+                            :loading="saveLoading" >提取利润及放单
+                </el-button>
+                <el-button  size="small" type="warning" plain  style="margin-right: 8px" :disabled="!form.id"
+                            :loading="saveLoading" @click="finstlbillsRevokeSettlementfun">撤销结算
+                </el-button>
+                <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id"
+                            :loading="saveLoading" @click="finstlbillsConfirmSettlementfun">确认结算
+                </el-button>
+                <el-button  size="small" type="primary" style="margin-right: 8px" v-if="editSave"
+                            :loading="saveLoading" @click="editHandle">编 辑
+                </el-button>
+                <el-button  size="small" type="primary" style="margin-right: 8px" v-else
+                            :loading="saveLoading" @click="editCustomer">保 存
+                </el-button>
+            </div>
+        </div>
+
+        <div style="margin: 55px 5px 0px 5px;'">
+            <el-card class="box-card">
+                <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
+                    <el-row>
+                        <el-row>
+                            <el-col :span="5">
+                                <el-form-item label="结算单号" prop="checkNo">
+                                    <el-input style="width: 100%;" v-model="form.billNo"
+                                              size="small" autocomplete="off"
+                                              :disabled="true"
+                                              clearable placeholder="请输入结算单号" >
+                                    </el-input>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="5">
+                                <el-form-item label="结算日期" prop="billDate">
+                                    <el-date-picker v-model="form.billDate" clearable
+                                                    style="width: 100%;"
+                                                    type="date" size="small"
+                                                    :disabled="editSave"
+                                                    value-format="yyyy-MM-dd HH:mm"
+                                                    placeholder="选择结算日期">
+                                    </el-date-picker>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="5">
+                                <el-form-item label="限定金额" prop="billDate">
+                                    <el-input style="width: 100%;" v-model="form.limitedAmount"
+                                              size="small" autocomplete="off"
+                                              :disabled="editSave"
+                                              clearable placeholder="请输入限定金额" >
+                                    </el-input>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="9">
+                                <el-form-item label="审核期间" prop="etd">
+                                    <el-date-picker
+                                        v-model="form.approvedDate"
+                                        type="datetimerange"
+                                        range-separator="至"
+                                        start-placeholder="开始日期"
+                                        end-placeholder="结束日期"
+                                        style="width: 100%;"
+                                        size="small"
+                                        :disabled="editSave"
+                                        format="yyyy-MM-dd"
+                                        value-format="yyyy-MM-dd"
+                                        placeholder="选择对账日期">
+                                    </el-date-picker>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="10">
+                                <el-form-item label="结算单位" prop="corpCnName">
+                                    <el-col :span="11">
+                                        <search-query :datalist="corpData"
+                                                      :selectValue="form.corpCnName"
+                                                      :clearable="true"
+                                                      :disabled="editSave"
+                                                      :filterable="true"
+                                                      :remote="true"
+                                                      :buttonIf="false"
+                                                      :forParameter="{ key:'id', label:'cnName', value:'cnName'}"
+                                                      @corpChange="corpChange($event,'corpCnName')"
+                                                      @remoteMethod="corpBcorpsListfun"
+                                                      @corpFocus="corpBcorpsListfun" >
+                                        </search-query>
+                                    </el-col>
+                                    <el-col :span="12" :offset="1">
+                                        <el-input style="width: 100%;" v-model="form.corpEnName"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请输入" >
+                                        </el-input>
+                                    </el-col>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="5">
+                                <el-form-item label="业务类型" prop="businessTypes" >
+                                    <search-query :datalist="businessTypesData"
+                                                  :selectValue="form.businessTypes"
+                                                  :clearable="true"
+                                                  :disabled="editSave"
+                                                  :buttonIf="false"
+                                                  @corpChange="corpChange($event,'businessTypes')">
+                                    </search-query>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="5">
+                                <el-form-item label="查询金额" prop="queryAmount">
+                                    <el-input style="width: 100%;" v-model="form.queryAmount"
+                                              size="small" autocomplete="off"
+                                              :disabled="editSave"
+                                              clearable placeholder="请输入查询金额" >
+                                    </el-input>
+                                </el-form-item>
+                            </el-col>
+                            <el-col :span="4">
+                                <el-form-item label="币别" prop="curCode">
+                                    <search-query :datalist="curCodeData"
+                                                  :selectValue="form.curCode"
+                                                  :clearable="true"
+                                                  :disabled="editSave"
+                                                  :buttonIf="false"
+                                                  :filterable="true"
+                                                  :remote="true"
+                                                  :forParameter="{ key:'id', label:'code', value:'code'}"
+                                                  @corpChange="corpChange($event,'curCode')"
+                                                  @remoteMethod="getRateListfun"
+                                                  @corpFocus="getRateListfun" >
+                                    </search-query>
+                                </el-form-item>
+                            </el-col>
+                        </el-row>
+                        <expand :showBtn="true" :showSpan="true">
+                            <el-row>
+                                <el-row>
+                                    <el-col :span="5">
+                                        <el-form-item label="收 / 付" prop="dc">
+                                            <search-query :datalist="dcData"
+                                                          :selectValue="form.dc"
+                                                          :clearable="true"
+                                                          :disabled="editSave"
+                                                          :buttonIf="false"
+                                                          @corpChange="corpChange($event,'dc')">
+                                            </search-query>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="10">
+                                        <el-form-item label="签收日期" prop="etd">
+                                            <el-date-picker
+                                                v-model="form.accountDate"
+                                                type="datetimerange"
+                                                range-separator="至"
+                                                start-placeholder="开始日期"
+                                                end-placeholder="结束日期"
+                                                style="width: 100%;"
+                                                size="small"
+                                                :disabled="editSave"
+                                                format="yyyy-MM-dd"
+                                                value-format="yyyy-MM-dd"
+                                                placeholder="选择签收日期">
+                                            </el-date-picker>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+                                <el-col :span="5">
+                                    <el-form-item label="JOB NO" prop="businessNo">
+                                        <el-input style="width: 100%;" v-model="form.businessNo"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请输入JOB NO" >
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="5">
+                                    <el-form-item label="ACCT NO" prop="accountNo">
+                                        <el-input style="width: 100%;" v-model="form.accountNo"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请输入ACCT NO" >
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="5">
+                                    <el-form-item label="MBL NO" prop="mblno">
+                                        <el-input style="width: 100%;" v-model="form.mblno"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请输入MBL NO" >
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="5">
+                                    <el-form-item label="HBL NO" prop="hblno">
+                                        <el-input style="width: 100%;" v-model="form.hblno"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请输入HBL NO" >
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="4">
+                                    <el-form-item label="CHK NO(无)" prop="hblno">
+                                        <el-input style="width: 100%;" v-model="form.hblno"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请输入CHK NO" >
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="10">
+                                    <el-form-item label="财务日期" prop="etd">
+                                        <el-date-picker
+                                            v-model="form.accountDate"
+                                            type="datetimerange"
+                                            range-separator="至"
+                                            start-placeholder="开始日期"
+                                            end-placeholder="结束日期"
+                                            style="width: 100%;"
+                                            size="small"
+                                            :disabled="editSave"
+                                            format="yyyy-MM-dd"
+                                            value-format="yyyy-MM-dd"
+                                            placeholder="选择财务日期">
+                                        </el-date-picker>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="5">
+                                    <el-form-item label="船 名" prop="vesselCnName" >
+                                        <el-input style="width: 100%;" v-model="form.vesselCnName"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请选择船名" ></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="5">
+                                    <el-form-item label="航 次" prop="voyageNo" >
+                                        <el-input style="width: 100%;" v-model="form.voyageNo"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请选择航次" ></el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="4">
+                                    <el-form-item label="预收帐款" prop="receivableAdvance" >
+                                        <el-input style="width: 100%;" v-model="form.receivableAdvance"
+                                                  size="small" autocomplete="off"
+                                                  :disabled="editSave"
+                                                  clearable placeholder="请输入预收帐款" ></el-input>
+                                    </el-form-item>
+                                </el-col>
+                            </el-row>
+                        </expand>
+
+                        <el-row>
+                            <el-col span="24">
+                                <div style="text-align: right">
+                                    <el-button  size="small" type="" style="margin-right: 8px"
+                                                :loading="saveLoading" @click="ResetFilter">重置条件
+                                    </el-button>
+                                    <el-button  size="small" type="primary"  style="margin-right: 8px"
+                                                :loading="saveLoading" @click="finstlbillslistAccBillV1fun" >检 索
+                                    </el-button>
+                                </div>
+                            </el-col>
+                        </el-row>
+                    </el-row>
+                </el-form>
+            </el-card>
+
+            <el-card style="margin-top: 10px">
+                <el-row>
+                    <el-col :span="4">
+                        <div class="bottomFlex" style="justify-content: space-around">
+                            <!--<div style="text-align: center">-->
+                            <!--    <div class="weightfont">¥</div>-->
+                            <!--    <div>RMB</div>-->
+                            <!--</div>-->
+                            <div>
+                                <div style="color: #81B337">
+                                    <span>税后应收RMB:</span>
+                                    <span class="weightnum">¥0元</span>
+                                </div>
+                                <div style="color: #6BBCD1">
+                                    <span>税后应付Rmb:</span>
+                                    <span class="weightnum">¥0元</span>
+                                </div>
+                            </div>
+                        </div>
+                    </el-col>
+                    <el-col :span="4">
+                        <div class="bottomFlex" style="justify-content: space-around">
+                            <!--<div style="text-align: center">-->
+                            <!--    <div class="weightfont">$</div>-->
+                            <!--    <div>USD</div>-->
+                            <!--</div>-->
+                            <div>
+                                <div style="color: #81B337">
+                                    <span>税后应收USD:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                                <div style="color: #6BBCD1">
+                                    <span>税后应付USD:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                            </div>
+                        </div>
+                    </el-col>
+                    <el-col :span="4">
+                        <div class="bottomFlex" style="justify-content: space-around">
+                            <!--<div style="text-align: center">-->
+                            <!--    <div class="weightfont">¥</div>-->
+                            <!--    <div>税后RMB</div>-->
+                            <!--</div>-->
+                            <div>
+                                <div style="color: #81B337">
+                                    <span>税后应收合计:</span>
+                                    <span class="weightnum">¥0元</span>
+                                </div>
+                                <div style="color: #6BBCD1">
+                                    <span>税后应付合计:</span>
+                                    <span class="weightnum">¥0元</span>
+                                </div>
+                            </div>
+                        </div>
+                    </el-col>
+                    <el-col :span="4">
+                        <div class="bottomFlex" style="justify-content: space-around">
+                            <!--<div style="text-align: center">-->
+                            <!--    <div class="weightfont">$</div>-->
+                            <!--    <div>税后USD</div>-->
+                            <!--</div>-->
+                            <div>
+                                <div style="color: #81B337">
+                                    <span>应收RMB:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                                <div style="color: #6BBCD1">
+                                    <span>应付RMB:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                            </div>
+                        </div>
+                    </el-col>
+                    <el-col :span="4">
+                        <div class="bottomFlex" style="justify-content: space-around">
+                            <!--<div style="text-align: center">-->
+                            <!--    <div class="weightfont">$</div>-->
+                            <!--    <div>税后USD</div>-->
+                            <!--</div>-->
+                            <div>
+                                <div style="color: #81B337">
+                                    <span>应收USD:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                                <div style="color: #6BBCD1">
+                                    <span>应付USD:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                            </div>
+                        </div>
+                    </el-col>
+                    <el-col :span="4">
+                        <div class="bottomFlex" style="justify-content: space-around">
+                            <!--<div style="text-align: center">-->
+                            <!--    <div class="weightfont">$</div>-->
+                            <!--    <div>税后USD</div>-->
+                            <!--</div>-->
+                            <div>
+                                <div style="color: #81B337">
+                                    <span>销项税合计:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                                <div style="color: #6BBCD1">
+                                    <span>进项税合计:</span>
+                                    <span class="weightnum">$0元</span>
+                                </div>
+                            </div>
+                        </div>
+                    </el-col>
+                </el-row>
+            </el-card>
+
+            <el-card style="margin-top: 10px">
+                <div style="margin-bottom: 10px">
+                    <el-button  size="small" type="info" style="margin-right: 8px" :disabled="editSave"
+                                :loading="saveLoading" @click="SelectedRows">确认选定行
+                    </el-button>
+                </div>
+
+                <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+                    <el-tab-pane label="核销明细" name="first">
+                        <finstlbillsitems :tableData="tableData" @handleSelectionChange="handleSelectionChange"></finstlbillsitems>
+                    </el-tab-pane>
+                    <el-tab-pane label="凭证明细" name="second">凭证明细</el-tab-pane>
+                </el-tabs>
+            </el-card>
+        </div>
+
+    </div>
+</template>
+
+<script>
+    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+    import {getRateList} from "@/api/iosBasicData/rateManagement";
+    import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
+    import {
+        finstlbillsConfirmSettlement,
+        finstlbillsConfirmSignFor,
+        finstlbillsDetail,
+        finstlbillslistAccBillV1,
+        finstlbillsRevokeSettlement,
+        finstlbillsRevokeSignFor,
+        finstlbillsSubmit
+    } from '@/api/iosBasicData/finstlbills'
+    import expand from "@/components/basic-container/expand.vue";
+    import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
+
+    export default {
+        components: {SearchQuery,expand,finstlbillsitems},
+        props:{
+            // 编辑还是保存
+            editSave:{
+                type:Boolean,
+                default:true
+            }
+        },
+        data(){
+            return {
+                activeName:'first', // tabs 切换数据
+                tableData:[],
+                pageLoading:false, // 全屏加载动画
+                saveLoading:false, // 按钮动画
+                // 绑定的数据
+                form:{},
+                handleSelectionData:[], // 表格选择的数据
+                corpData:[], // 结算单位 数据
+                curCodeData:[],// 币别
+                srcforParameter:{},
+                // 收 / 付
+                dcData:[
+                    {
+                        label:'Debit',
+                        value: 'D'
+                    },{
+                        label:'Credit',
+                        value: 'C'
+                    }
+                ],
+                // 业务类型
+                businessTypesData:[
+                    {
+                        label:'海运出口',
+                        value:'SE'
+                    },{
+                        label:'海运进口',
+                        value:'SI'
+                    }
+                ],
+            }
+        },
+        watch:{
+
+            // // 监听业务类型 如果不是分单 可以编辑分单号
+            // form:{
+            //     // 执行方法
+            //     handler(oldValue,newValue) {
+            //         // 只要分单不能编辑
+            //         console.log(this.form,619)
+            //         if (!newValue || JSON.stringify(newValue) == '{}') {
+            //             return
+            //         }
+            //         delete this.form.id
+            //         this.tableData = []
+            //         this.form.finStlBillsItemsList = []
+            //         console.log(newValue)
+            //
+            //
+            //     },
+            //     deep: true, // 深度监听
+            //     immediate: true  // 第一次改变就执行
+            // },
+        },
+        created() {
+        },
+        methods:{
+            // 下拉回调
+            corpChange(value,name){
+                // 结算单位
+                if (name == 'corpCnName') {
+                    if (!value) {
+                        this.$set(this.form,'corpId','')
+                        this.$set(this.form,'corpCnName','')
+                        this.$set(this.form,'corpEnName','')
+                        this.$set(this.form,'corpArgreementNo','')
+                    }
+                    for(let item of this.corpData) {
+                        if (item.cnName == value) {
+                            this.$set(this.form,'corpId',item.id)
+                            this.$set(this.form,'corpCnName',item.cnName)
+                            this.$set(this.form,'corpEnName',item.enName)
+                            this.$set(this.form,'corpArgreementNo',item.enName)
+                        }
+                    }
+                }
+                else {
+                    this.$set(this.form,name,value)
+                }
+            },
+            // 编辑
+            editHandle(){
+                this.editSave = false
+            },
+            // 保存
+            editCustomer(){
+                // 对账单位
+                if (!this.form.corpId) {
+                    this.$message.warning('请选择结算单位');
+                    return
+                }
+                // 业务类型
+                if (!this.form.businessTypes) {
+                    this.$message.warning('请选择业务类型');
+                    return
+                }
+                // 是否选择从表数据
+                if (this.handleSelectionData.length == 0) {
+                    this.$message.warning('请选择结算数据');
+                    return;
+                }
+                for (let item of this.handleSelectionData) {
+                    if (!item.currentStlCurCode) {
+                        this.$message.warning('请选择本次结算币种');
+                        return;
+                    }
+                    if (!item.currentStlAmount) {
+                        this.$message.warning('请选择本次结算金额');
+                        return;
+                    }
+                }
+                this.saveLoading = true // 加载动画
+                this.form.billNoFormat = 'HYDZ'
+                this.form.businessTypeCode = 'HYDZ'
+                this.form.businessType = 'STL' // 结算单
+
+                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
+                    item.lineNo = index
+                    item.pType = item.businessType
+                    item.accBillId = item.id
+                    item.accBillNo = item.billNo
+                    item.accDate = item.billDate
+                    if (item.currentStlCurCode == 'CNY') {
+                        item.currentStlAmount = item.currentStlAmountRMB
+                    }else {
+                        item.currentStlAmount = item.currentStlAmountUSD
+                    }
+                    delete item.businessType
+                    delete item.id
+                    delete item.billNo
+                    delete item.billDate
+                    return item
+                })
+                finstlbillsSubmit(this.form).then(res=>{
+                    this.saveLoading = false
+                    this.$message.success('操作成功');
+                    this.finstlbillsDetailfun(res.data.data.id)
+                })
+            },
+            // 详情接口
+            finstlbillsDetailfun(id){
+                this.pageLoading = true
+                finstlbillsDetail(id).then(res=>{
+                    this.form = res.data.data
+                    this.tableData = this.form.finStlBillsItemsList.map(item=>{
+
+                        return item
+                    })
+                    this.pageLoading = false
+                })
+            },
+            // 重置条件
+            ResetFilter(){
+                this.form = {}
+            },
+            // 检索接口
+            finstlbillslistAccBillV1fun(){
+                delete this.form.id
+                // let obj = JSON.parse(JSON.stringify(this.form))
+                let obj = {}
+                obj.corpCnName = this.form.corpId // 结算单位
+                obj.curCode = this.form.curCode // 币别
+                obj.dc = this.form.dc // 收付 D=收 C=付
+                obj.accBillNo = this.form.accountNo // 账单编号  ACCT NO
+                obj.billNo = this.form.businessNo // 单据编号  JOB NO
+                obj.mblno = this.form.mblno // MB/L NO
+                obj.hblno = this.form.hblno // HB/L NO
+                obj.queryAmount = this.form.queryAmount // 查询金额
+                obj.businessType = this.form.businessTypes // 业务类型
+                obj.vesselCnName = this.form.vesselCnName // 中文船名
+                obj.receivableAdvance = this.form.receivableAdvance // 预收帐款
+                obj.voyageNo = this.form.voyageNo // 航次
+                // 审核期间
+                if (this.form.approvedDate) {
+                    obj.approveTimeList = this.form.approvedDate
+                }
+                // 财务期间
+                if (this.form.accountDate) {
+                    obj.billDateList = this.form.accountDate
+                }
+                finstlbillslistAccBillV1(obj).then(res=>{
+                    this.tableData = res.data.data.map(item=>{
+                        if(item.curCode == 'CNY') {
+                            this.$set(item,'amountRMB',item.amount)
+                            this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
+                            this.$set(item,'unsettledAmountRMB',item.unsettledAmount)
+                            this.$set(item,'stlTtlAmountRMB',item.stlTtlAmount)
+                        }else {
+                            this.$set(item,'amountUSD',item.amount)
+                            this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
+                            this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
+                            this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
+                        }
+                        return item
+                    })
+                })
+            },
+            // 结算确认
+            finstlbillsConfirmSettlementfun(){
+                this.$confirm("确定进行对账操作?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                    finstlbillsConfirmSettlement(this.form).then(res=>{
+                        this.$message.success('操作成功');
+                        this.finstlbillsDetailfun(res.data.data.id)
+                    })
+                })
+            },
+            // 结算撤销
+            finstlbillsRevokeSettlementfun(){
+                this.$confirm("确定进行撤销对账操作?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                    finstlbillsRevokeSettlement().then(res=>{
+                        this.$message.success('操作成功');
+                        this.finstlbillsDetailfun(res.data.data.id)
+                    })
+                })
+            },
+            // 确认选定行
+            SelectedRows(){
+                this.editCustomer()
+            },
+            // 下面表格多选
+            handleSelectionChange(arr){
+                this.handleSelectionData = arr
+            },
+            //返回列表
+            backToList() {
+                this.$emit('goBack')
+            },
+            // 请求的接口
+            // 确认签收接口
+            finstlbillsConfirmSignForfun(){
+                this.form.billNoFormat = 'HYDZ'
+                this.form.businessTypeCode = 'HYDZ'
+                this.form.businessType = 'STL' // 结算单
+                // 保留id
+                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
+                    item.lineNo = index
+                    item.pType = item.businessType
+                    item.accBillId = item.id
+                    item.accBillNo = item.billNo
+                    item.accDate = item.billDate
+                    delete item.businessType
+                    delete item.billNo
+                    delete item.billDate
+                    return item
+                })
+                finstlbillsConfirmSignFor(this.form).then(res=>{
+                    this.$message.success('操作成功');
+                    this.finstlbillsDetailfun(res.data.data.id)
+                })
+            },
+            // 撤销签收接口
+            finstlbillsRevokeSignForfun(){
+                this.form.billNoFormat = 'HYDZ'
+                this.form.businessTypeCode = 'HYDZ'
+                this.form.businessType = 'STL' // 结算单
+
+                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
+                    item.lineNo = index
+                    item.pType = item.businessType
+                    item.accBillId = item.id
+                    item.accBillNo = item.billNo
+                    item.accDate = item.billDate
+                    delete item.businessType
+                    delete item.billNo
+                    delete item.billDate
+                    return item
+                })
+                finstlbillsRevokeSignFor(this.form).then(res=>{
+                    this.$message.success('操作成功');
+                    this.finstlbillsDetailfun(res.data.data.id)
+                })
+            },
+
+            // 获取币别数据
+            getRateListfun(cnName){
+                getRateList({current:1,size:10,cnName}).then(res=>{
+                    this.curCodeData = res.data.data.records
+                })
+            },
+            // 获取结算单位数据
+            corpBcorpsListfun(cnName){
+                getBcorpslistByType(1,10,{cnName}).then(res=>{
+                    this.corpData = res.data.data.records
+                })
+            },
+
+        }
+    }
+</script>
+
+<style scoped>
+::v-deep.el-form-item {
+    margin-bottom: 0;
+}
+.bottomFlex {
+    display: flex;
+    align-items: center;
+}
+.weightfont {
+    font-size: 20px;
+    font-weight: bold;
+}
+.weightnum {
+    font-size: 15px;
+    font-weight: 500;
+}
+</style>

+ 17 - 6
src/views/iosBasicData/settlement/index.vue → src/views/iosBasicData/CollectionSettlement/index.vue

@@ -20,8 +20,8 @@
                      @current-change="currentChange"
                      @size-change="sizeChange"
                      @refresh-change="refreshChange"
-                     @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 314)"
-                     @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 314)"
+                     @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 315)"
+                     @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 315)"
                      @on-load="onLoad" @expand-change="expandChange" >
               <template slot="expand" slot-scope="{row}">
                   <finstlbillsitems :tableData="row.finStlBillsItemsList || []" :brfalse="false" ></finstlbillsitems>
@@ -82,9 +82,9 @@
 <script>
   import {finstlbillsList, finstlbillsDetail, finstlbillsSubmit, finstlbillsRemove, finstlbillsitemsList} from "@/api/iosBasicData/finstlbills";
   import {mapGetters} from "vuex";
-  import finstlbillsDetails from '@/views/iosBasicData/finstlbills/finstlbillsDetails.vue'
+  import finstlbillsDetails from '@/views/iosBasicData/CollectionSettlement/finstlbillsDetails.vue'
   import {getWorkDicts} from "@/api/system/dictbiz";
-  import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
+  import finstlbillsitems from "@/views/iosBasicData/CollectionSettlement/assembly/finstlbillsitems.vue";
 
   export default {
       components:{finstlbillsitems, finstlbillsDetails},
@@ -196,6 +196,17 @@
             {
               label: "费用收付",
               prop: "dc",
+                search:true,
+                type: 'select',
+                dicData:[
+                    {
+                        label:'Debit',
+                        value: 'D'
+                    },{
+                        label:'Credit',
+                        value: 'C'
+                    }
+                ]
             },
             {
               label: "币种",
@@ -422,7 +433,7 @@
       }
     },
     async created() {
-      this.option = await this.getColumnData(this.getColumnName(314), this.optionBack);
+      this.option = await this.getColumnData(this.getColumnName(315), this.optionBack);
       this.dictionaryfun() // 获取字典数据
     },
     methods: {
@@ -453,7 +464,7 @@
           if (JSON.stringify(this.$route.query) != "{}") {
               this.$router.$avueRouter.closeTag();
               this.$router.push({
-                  path: "/iosBasicData/finstlbills/index"
+                  path: "/iosBasicData/settlement/index"
               });
           }
           this.isShow = true;

+ 37 - 28
src/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue

@@ -14,6 +14,7 @@
             @mouseup="handleMouseUp" >
             <el-table-column
                 v-if="brfalse"
+                fixed="left"
                 type="selection"
                 width="55">
                 <template slot-scope="scope">
@@ -28,6 +29,10 @@
                 label="行号" width="50px">
             </el-table-column>
             <el-table-column
+                prop="invoiceNo"
+                label="核销(无参数)">
+            </el-table-column>
+            <el-table-column
                 prop="lineNo"
                 label="源业务编号" width="120px">
                 <template slot-scope="{ row }">
@@ -37,6 +42,10 @@
             </el-table-column>
             <el-table-column
                 prop="invoiceNo"
+                label="账单编号(无参数)">
+            </el-table-column>
+            <el-table-column
+                prop="invoiceNo"
                 label="发票号">
             </el-table-column>
             <el-table-column
@@ -236,14 +245,6 @@
                 prop="paymodeM"
                 label="M付费方式">
             </el-table-column>
-
-            <el-table-column
-                prop="eta"
-                label="ETA">
-                <template slot-scope="{ row }">
-                    <span class="textHide" >{{row.voyageNo}}</span>
-                </template>
-            </el-table-column>
             <el-table-column
                 prop="eta"
                 label="三检单号">
@@ -253,7 +254,7 @@
             </el-table-column>
             <el-table-column
                 label="本次结算币种"
-                prop="currentStlCurCode" width="130px">
+                prop="currentStlCurCode" width="100">
                 <template slot-scope="{row}">
                     <search-query :datalist="curCodeData"
                                   :selectValue="row.curCode"
@@ -273,30 +274,32 @@
                 <!--currentStlAmount-->
                 <el-table-column
                     prop="currentStlAmountRMB"
-                    label="RMB" width="100px">
+                    label="RMB" width="60">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
-                                  size="mini" autocomplete="off"
-                                  clearable placeholder="请输入USD" >
-                        </el-input>
-                        <span v-else>{{scope.row.currentStlAmountRMB}}</span>
+                        <!--<el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"-->
+                        <!--          size="mini" autocomplete="off"-->
+                        <!--          clearable placeholder="请输入USD" >-->
+                        <!--</el-input>-->
+                        <!--<span v-else>{{scope.row.currentStlAmountRMB}}</span>-->
+                        <span>{{scope.row.currentStlAmountRMB}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column
                     prop="currentStlAmountUSD"
-                    label="USD" width="100px">
+                    label="USD" width="60">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
-                                  size="mini" autocomplete="off"
-                                  clearable placeholder="请输入USD" >
-                        </el-input>
-                        <span v-else>{{scope.row.currentStlAmountUSD}}</span>
+                        <!--<el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"-->
+                        <!--          size="mini" autocomplete="off"-->
+                        <!--          clearable placeholder="请输入USD" >-->
+                        <!--</el-input>-->
+                        <!--<span v-else>{{scope.row.currentStlAmountUSD}}</span>-->
+                        <span>{{scope.row.currentStlAmountUSD}}</span>
                     </template>
                 </el-table-column>
             </el-table-column>
             <el-table-column
                 prop="remarkss"
-                label="备注" width="150px">
+                label="备注" width="100px">
                 <template slot-scope="scope">
                     <el-input style="width: 100%;" v-model="scope.row.remarkss" v-if="brfalse"
                               size="mini" autocomplete="off"
@@ -379,12 +382,18 @@
             },
 
             corpChange(value,row){
-                this.$set(row,'currentStlCurCode',value)
-                console.log(value,383)
-                if (value == 'CNY') {
-                    this.$set(row,'currentStlAmountRMB',Number(row.amount) - Number(row.stlTtlAmount))
-                }else {
-                    this.$set(row,'currentStlAmountUSD',Number(row.amount) - Number(row.stlTtlAmount))
+                for (let item of this.curCodeData) {
+                    if (item.code == value) {
+                        this.$set(row,'currentStlCurCode',value)
+                        if (value == 'CNY') {
+                            delete row.currentStlAmountUSD
+                            this.$set(row,'currentStlAmountRMB',Number(row.amount) - Number(row.stlTtlAmount))
+                        }else {
+                            delete row.currentStlAmountRMB
+                            let num = (Number(row.amount) - Number(row.stlTtlAmount)) / Number(item.exrate)
+                            this.$set(row,'currentStlAmountUSD',num.toFixed(2))
+                        }
+                    }
                 }
             },
             // 接口请求

+ 30 - 4
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -786,9 +786,18 @@
                 finstlbillsDetail(id).then(res=>{
                     this.form = res.data.data
                     this.tableData = this.form.finStlBillsItemsList.map(item=>{
-
+                        if(item.curCode == 'CNY') {
+                            this.$set(item,'amountRMB',item.amount)
+                            this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
+                            this.$set(item,'unsettledAmountRMB',item.unsettledAmount)
+                            this.$set(item,'stlTtlAmountRMB',item.stlTtlAmount)
+                        }else {
+                            this.$set(item,'amountUSD',item.amount)
+                            this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
+                            this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
+                            this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
+                        }
                         return item
-                        // amount
                     })
                     this.form.isSignfor = this.form.isSignfor + ''
                     this.form.isApproved = this.form.isApproved + ''
@@ -804,6 +813,16 @@
             },
             // 检索接口
             finstlbillslistAccBillV1fun(){
+                // 对账单位
+                if (!this.form.corpId) {
+                    this.$message.warning('请选择对账单位');
+                    return
+                }
+                // 业务类型
+                if (!this.form.businessTypes) {
+                    this.$message.warning('请选择业务类型');
+                    return
+                }
                 delete this.form.id
                 // let obj = JSON.parse(JSON.stringify(this.form))
                 let obj = {}
@@ -845,11 +864,18 @@
                             this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
                             this.$set(item,'unsettledAmountRMB',item.unsettledAmount)
                             this.$set(item,'stlTtlAmountRMB',item.stlTtlAmount)
+                            this.$set(item,'currentStlAmountRMB',Number(item.amount) - Number(item.stlTtlAmount))
                         }else {
                             this.$set(item,'amountUSD',item.amount)
                             this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
                             this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
                             this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
+                            this.$set(item,'currentStlAmountUSD',(Number(item.amount) - Number(item.stlTtlAmount)).toFixed(2))
+                            // this.$set(item,'amountUSD',(Number(item.amount) / Number(item.exrate)).toFixed(2))
+                            // this.$set(item,'currentInvoiceAmountUSD',(Number(item.currentInvoiceAmount) / Number(item.exrate)).toFixed(2))
+                            // this.$set(item,'unsettledAmountUSD',(Number(item.unsettledAmount) / Number(item.exrate)).toFixed(2))
+                            // this.$set(item,'stlTtlAmountUSD',(Number(item.stlTtlAmount) / Number(item.exrate)).toFixed(2))
+                            // this.$set(item,'currentStlAmountUSD',((Number(item.amount) - Number(item.stlTtlAmount)) / Number(item.exrate)).toFixed(2))
                         }
                         return item
                     })
@@ -946,7 +972,7 @@
             finstlbillsConfirmSignForfun(){
                 this.form.billNoFormat = 'HYDZ'
                 this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'CHK'
+                this.form.businessType = 'CHK' //对账单
                 // 保留id
                 this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
                     item.lineNo = index
@@ -968,7 +994,7 @@
             finstlbillsRevokeSignForfun(){
                 this.form.billNoFormat = 'HYDZ'
                 this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'CHK'
+                this.form.businessType = 'CHK' // 对账单
 
                 this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
                     item.lineNo = index