Просмотр исходного кода

优化对账中心 修改付费申请 海运进出口新加状态

Qukatie 8 месяцев назад
Родитель
Сommit
f99a089e81

+ 34 - 6
src/api/iosBasicData/finstlbills.js

@@ -57,6 +57,14 @@ export const finstlbillslistAccBillV1 = (params) => {
     params: params
   })
 }
+// 检索2
+export const listAccBillV2 = (params) => {
+  return request({
+    url: '/api/blade-los/finaccbills/listAccBillV2',
+    method: 'get',
+    params: params
+  })
+}
 // 单号检索
 export const finstlbillslistAccBillByCorp = (params) => {
   return request({
@@ -181,14 +189,20 @@ export const approveDetail = (data) => {
     params: data
   })
 }
+// 费用明细同步
+export const finstlbillsitemsRemove = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/feeItemsDelete',
+    method: 'post',
+    data: data
+  })
+}
 // 付费申请删除从表数据
-export const finstlbillsitemsRemove = (ids) => {
+export const feeItemsSynchronize = (data) => {
   return request({
-    url: '/api/blade-los/finstlbillsitems/remove',
+    url: '/api/blade-los/finstlbills/feeItemsSynchronize',
     method: 'post',
-    params: {
-      ids,
-    }
+    data: data
   })
 }
 // 生成凭证
@@ -199,4 +213,18 @@ export const finstlbillsGenerateVoucher = (data) => {
     data: data
   })
 }
-
+// 确认对账
+export const confirmReconciliationV1 = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/confirmReconciliationV1',
+    method: 'post',
+    data: data
+  })
+}
+export const revokeReconciliationV1 = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/revokeReconciliationV1',
+    method: 'post',
+    data: data
+  })
+}

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

@@ -2210,6 +2210,9 @@ const columnName = [{
 }, {
   code: 519,
   name: '永发-OW-perDiem明细'
+}, {
+  code: 520,
+  name: '货代-财务管理-对账中心(F)查询表'
 }
 ]
 export const getColumnName = (key) => {

+ 29 - 11
src/views/iosBasicData/OceanFreightImport/bills/assembly/EntrustmentLnformation.vue

@@ -452,16 +452,33 @@
                                 </el-form-item>
                             </div>
                             <div style="margin-top: 4px">
-                                <el-form-item label="箱属" prop="boxBelongsTo" label-width="60px">
-                                    <span slot="label">
-                                        <span style="color: #1e9fff">箱属</span>
-                                    </span>
-                                    <div>
-                                        <dic-select v-model="assemblyForm.boxBelongsTo" placeholder="箱属" key="dictKey"
-                                            label="dictValue" url="/blade-system/dict-biz/dictionary?code=boxBelongsTo"
-                                            :filterable="true" :disabled="detailData.seeDisabled"></dic-select>
-                                    </div>
-                                </el-form-item>
+                                <el-row>
+                                    <el-col :span="12">
+                                        <el-form-item label="箱属" prop="boxBelongsTo" label-width="60px">
+                                            <span slot="label">
+                                                <span style="color: #1e9fff">箱属</span>
+                                            </span>
+                                            <div>
+                                                <dic-select v-model="assemblyForm.boxBelongsTo" placeholder="箱属"
+                                                    key="dictKey" label="dictValue"
+                                                    url="/blade-system/dict-biz/dictionary?code=boxBelongsTo"
+                                                    :filterable="true" :disabled="detailData.seeDisabled"></dic-select>
+                                            </div>
+                                        </el-form-item>
+                                    </el-col>
+                                    <el-col :span="12">
+                                        <el-form-item label="接单状态" prop="billOfLadingStatus">
+                                            <span slot="label">
+                                                <span style="color: #1e9fff">接单状态</span>
+                                            </span>
+                                            <dic-select v-model="assemblyForm.billOfLadingStatus" placeholder="接单状态"
+                                                key="id" label="dictValue"
+                                                url="/blade-system/dict-biz/dictionary?code=billOfLadingStatus"
+                                                :disabled="detailData.seeDisabled"></dic-select>
+                                        </el-form-item>
+                                    </el-col>
+                                </el-row>
+
                             </div>
                         </el-row>
                     </el-col>
@@ -725,7 +742,8 @@
                                     <el-input ref="grossWeightRef" step="0.01" style="width: 100%;"
                                         v-model="assemblyForm.grossWeight" size="small" autocomplete="off"
                                         :disabled="detailData.seeDisabled" @input="floatingInput($event, 'grossWeight')"
-                                        @focus="quantityFocus" clearable placeholder="请输入毛重" @change="grossWeightChange"></el-input>
+                                        @focus="quantityFocus" clearable placeholder="请输入毛重"
+                                        @change="grossWeightChange"></el-input>
                                 </el-form-item>
                             </el-col>
                             <el-col :span="12">

+ 21 - 1
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -108,6 +108,16 @@
                         @click.stop="rowCellfun(scope.row.id, scope.row)">编辑
                     </el-button>
                 </template>
+                <template slot="billOfLadingStatus" slot-scope="{ row }">
+                    <div>
+                        <span v-if="row.billOfLadingStatus == item.dictValue"
+                            v-for="(item, index) in billOfLadingStatusData" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
+                </template>
                 <temolate slot="billStatus" slot-scope="{ row }">
                     <div>
                         <span v-if="row.billStatus == item.dictKey" v-for="(item, index) in billStatusData" :key="index"
@@ -153,7 +163,7 @@
                 <template slot="eta" slot-scope="scope">
                     <span>{{
                         scope.row.eta ? scope.row.eta.slice(0, 10) : ""
-                        }}</span>
+                    }}</span>
                 </template>
                 <template slot="updateTime" slot-scope="scope">
                     <span>{{
@@ -273,6 +283,7 @@ export default {
     },
     data() {
         return {
+            billOfLadingStatusData: [],
             ediData_SO: [],
             roleName: [],
             dcDic: [
@@ -1260,6 +1271,12 @@ export default {
                         overHidden: true
                     },
                     {
+                        label: '接单状态',
+                        prop: 'billOfLadingStatus',
+                        overHidden: true,
+                        width: 100,
+                    },
+                    {
                         label: "业务状态",
                         prop: "billStatus",
                         type: "select",
@@ -1906,6 +1923,9 @@ export default {
                     res.data.data;
                 this.billStatusData = res.data.data;
             });
+            getWorkDicts("billOfLadingStatus").then(res => {
+                this.billOfLadingStatusData = res.data.data;
+            });
         },
         // 获取财务状态字典数据
         accountStatusWorkDictsfun() {

+ 12 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -1054,6 +1054,18 @@
                             </el-form-item>
                         </el-col>
                     </el-row>
+                    <el-row>
+                        <el-col :span="12">
+                            <el-form-item label="接单状态" prop="billOfLadingStatus">
+                                <span slot="label">
+                                    <span style="color: #1e9fff">接单状态</span>
+                                </span>
+                                <dic-select v-model="assemblyForm.billOfLadingStatus" placeholder="接单状态" key="id"
+                                    label="dictValue" url="/blade-system/dict-biz/dictionary?code=billOfLadingStatus"
+                                    :disabled="detailData.seeDisabled"></dic-select>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
                 </el-col>
 
             </el-row>

+ 22 - 1
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -184,7 +184,7 @@
                 <template slot="eta" slot-scope="scope">
                     <span>{{
                         scope.row.eta ? scope.row.eta.slice(0, 10) : ""
-                    }}</span>
+                        }}</span>
                 </template>
                 <template slot="updateTime" slot-scope="scope">
                     <span>{{
@@ -289,6 +289,16 @@
                         </span>
                     </div>
                 </template>
+                <template slot="billOfLadingStatus" slot-scope="{ row }">
+                    <div>
+                        <span v-if="row.billOfLadingStatus == item.dictValue"
+                            v-for="(item, index) in billOfLadingStatusData" :key="index"
+                            :style="{ 'background-color': item.colour }"
+                            style="color: #fff;border-radius: 30px;padding: 2px 15px;text-align: center;">
+                            {{ item.dictValue }}
+                        </span>
+                    </div>
+                </template>
                 <template slot="logisticsStatus" slot-scope="{ row }">
                     <span v-if="row.logisticsStatus == '录入'"
                         style="color: #fff;border-radius: 30px;padding: 2px 15px;background-color: #409EFF;">{{
@@ -407,6 +417,7 @@ export default {
     },
     data() {
         return {
+            billOfLadingStatusData:[],
             isHq: JSON.parse(localStorage.getItem('user-Information')).isHq,
             radioRow: {},
             roleName: [], // 当前登录人的角色权限
@@ -954,6 +965,12 @@ export default {
                         overHidden: true
                     },
                     {
+                        label: '接单状态',
+                        prop: 'billOfLadingStatus',
+                        overHidden: true,
+                        width:100,
+                    },
+                    {
                         label: "物流状态",
                         prop: "logisticsStatus",
                         type: "select",
@@ -1948,6 +1965,10 @@ export default {
             getWorkDicts("KHDC_Status").then(res => {
                 this.khdcStatus = res.data.data;
             });
+            getWorkDicts("billOfLadingStatus").then(res => {
+                this.billOfLadingStatusData = res.data.data;
+            });
+
         },
         // 获取财务状态字典数据
         accountStatusWorkDictsfun() {

+ 1542 - 0
src/views/iosBasicData/financialManagement/finstlbills/detailsPage.vue

@@ -0,0 +1,1542 @@
+<template>
+    <div class="borderless">
+        <div class="customer-head">
+            <div class="customer-back">
+                <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                    @click="backToList">返回列表
+                </el-button>
+                <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
+                <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">下一票</el-button>
+            </div>
+            <div class="add-customer-btn">
+
+                <el-button size="small" style="margin-right: 8px" :loading="saveLoading" :disabled="!form.id"
+                    @click="previewreportfun">预 览
+                </el-button>
+                <el-button size="small" style="margin-right: 8px" v-if="roleName.indexOf('admin') != -1"
+                    :loading="saveLoading" :disabled="!form.id" @click="DesignreportDialog = true">报表设计
+                </el-button>
+                <el-button type="success" size="small" :disabled="!form.id" plain @click="newbill">新建账单
+                </el-button>
+                <el-button size="small" type="warning" plain style="margin-right: 8px" :disabled="!form.id || editPower"
+                    v-if="form.billStatus == 1" :loading="saveLoading" @click="allClick('撤销对账')">撤销对账
+                </el-button>
+                <el-button size="small" type="success" plain style="margin-right: 8px" :disabled="!form.id || editPower"
+                    v-else :loading="saveLoading" @click="allClick('确认对账')">确认对账
+                </el-button>
+                <el-button size="small" type="primary" style="margin-right: 8px" v-if="editButton"
+                    :loading="saveLoading" @click="inEdit">编 辑
+                </el-button>
+                <el-button size="small" type="primary" style="margin-right: 8px" v-else :loading="saveLoading"
+                    @click="submit()">保 存
+                </el-button>
+            </div>
+        </div>
+
+        <div style="margin: 55px 5px 0px 5px;'">
+            <el-tabs type="border-card">
+                <el-tab-pane label="基础信息">
+                    <el-row>
+                        <el-col :span="8">
+                            <trade-card title="基础信息">
+                                <avue-form :option="optionForm" v-model="form" ref="form">
+                                    <tempalte slot="branchName">
+                                        <dic-select v-model="form.branchName" placeholder="所属公司" key="id"
+                                            label="deptName" url="/blade-system/dept/top-list" :filterable="true"
+                                            :remote="true" dataName="deptName"
+                                            :disabled="editButton || !(roleName.includes('admin') || roleName.includes('总部')) || tableData.length"
+                                            @selectChange="dicChange('branchName', $event)"></dic-select>
+                                    </tempalte>
+                                    <tempalte slot="corpCnName">
+                                        <dic-select v-model="form.corpCnName" placeholder="对账单位" key="id" res="records"
+                                            label="cnName" url="/blade-los/bcorps/selectList?status=0&current=1&size=5"
+                                            :filterable="true" :remote="true" dataName="cnName"
+                                            :disabled="editButton || !(roleName.includes('admin') || roleName.includes('总部')) || tableData.length"
+                                            @selectChange="dicChange('corpCnName', $event)">
+                                        </dic-select>
+                                    </tempalte>
+                                </avue-form>
+                            </trade-card>
+                        </el-col>
+                        <el-col :span="16">
+                            <trade-card title="费用信息">
+                                <avue-crud :option="option" :data="pageData" id="out-table" ref="crud"
+                                    @selection-change="handleSelectionChange" :header-cell-style="tableHeaderCellStyle"
+                                    :row-class-name="rowClassName" :cell-style="cellStyle" :page.sync="page"
+                                    @size-change="sizeChange" @current-change="currentChange"
+                                    @resetColumn="resetColumn('crud', 'option', 'optionBack', 492)"
+                                    @saveColumn="saveColumn('crud', 'option', 'optionBack', 492)">
+                                    <template slot="menuLeft">
+                                        <el-button size="small" type="danger" style="margin-left: 10px"
+                                            :disabled="editButton" @click="batchDeletefun">一键删除
+                                        </el-button>
+                                        <span style="font-size:18px;font-weight:600;margin-left:10px;">
+                                            <span style="color:#F56C6C;">总行数:{{
+                                                form.finStlBillsItemsList.length }}</span>
+                                            <span style="color: #67C23A;margin-right: 10px;">
+                                                应收本币:{{ form.amountDr || 0 }}元
+                                            </span>
+                                            <span style="color: #E6A23C;margin-right: 10px;">
+                                                应付本币:{{ form.amountCr || 0 }}元
+                                            </span>
+                                            <span style="color: #67C23A;margin-right: 10px;">
+                                                应收外币:{{ form.amountDrUsd || 0 }}元
+                                            </span>
+                                            <span style="color: #E6A23C;margin-right: 10px;">
+                                                应付外币:{{ form.amountCrUsd || 0 }}元
+                                            </span>
+                                        </span>
+                                    </template>
+                                </avue-crud>
+                            </trade-card>
+                        </el-col>
+                    </el-row>
+                    <el-row>
+
+                        <el-col :span="16">
+                            <trade-card title="业务费用信息">
+                                <avue-crud :option="option2" :data="tableData" id="out-table" ref="crud2"
+                                    @selection-change="selectionChange" :header-cell-style="tableHeaderCellStyle"
+                                    :row-class-name="rowClassName" :cell-style="cellStyle" :search.sync="search"
+                                    @search-change="searchChange" @search-reset="searchReset"
+                                    @row-dblclick="handleRowDBLClick"
+                                    @resetColumn="resetColumn('crud2', 'option2', 'optionBack2', 520)"
+                                    @saveColumn="saveColumn('crud2', 'option2', 'optionBack2', 520)">
+                                    <template slot="menuLeft">
+                                        <el-button size="small" type="success" style="margin-right: 8px"
+                                            :disabled="editButton || selectionList.length == 0"
+                                            @click="allClick('单据加入')">单据加入
+                                        </el-button>
+                                        <span style="font-size:18px;font-weight:600;margin-left:10px;">
+                                            <span style="color: #67C23A;margin-right: 10px;">
+                                                应收本币:{{ sumDRMB }}元
+                                            </span>
+                                            <span style="color: #E6A23C;margin-right: 10px;">
+                                                应付本币:{{ sumCRMB }}元
+                                            </span>
+                                            <span style="color: #67C23A;margin-right: 10px;">
+                                                应收外币:{{ sumDUSD }}元
+                                            </span>
+                                            <span style="color: #E6A23C;margin-right: 10px;">
+                                                应付付币:{{ sumCUSD }}元
+                                            </span>
+                                        </span>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="mblnoSearch">
+                                        <el-input v-model="search.mblno" placeholder="请输入 MB/L NO" size="small"
+                                            :disabled="editButton"></el-input>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="hblnoSearch">
+                                        <el-input v-model="search.hblno" placeholder="请输入 HB/L NO" size="small"
+                                            :disabled="editButton"></el-input>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="accountDcSearch">
+                                        <el-select v-model="search.accountDc" placeholder="请选择 收付"
+                                            :disabled="editButton">
+                                            <el-option v-for="item in dcOptions" :key="item.value" :label="item.label"
+                                                :value="item.value">
+                                            </el-option>
+                                        </el-select>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="businessDateStartSearch">
+                                        <el-date-picker v-model="search.businessDateStart" type="date"
+                                            placeholder="选择日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
+                                            :disabled="editButton">
+                                        </el-date-picker>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="businessDateEndSearch">
+                                        <el-date-picker v-model="search.businessDateEnd" type="date" placeholder="选择日期"
+                                            format="yyyy-MM-dd" value-format="yyyy-MM-dd 00:00:00"
+                                            :disabled="editButton">
+                                        </el-date-picker>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="voyageNoSearch">
+                                        <el-input v-model="search.voyageNo" placeholder="请选择 航次" size="small"
+                                            :disabled="editButton"></el-input>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="feeCnNameSearch">
+                                        <dic-select v-model="search.feeCnName" placeholder="费用名称" label="cnName"
+                                            url="/blade-los/bfees/listAll" dataType="string" :filterable="true"
+                                            :multiple="true" :collapseTags="true" :disabled="editButton"></dic-select>
+                                    </template>
+                                    <template slot-scope="{disabled,size}" slot="curCodeSearch">
+                                        <dic-select v-model="search.curCode" placeholder="币别" label="code"
+                                            :url="'/blade-los/bcurrency/obtainRate?deptId=' + form.branchId + '&date=' + form.billDate + '&type=2'"
+                                            :filterable="true" :disabled="editButton"></dic-select>
+                                    </template>
+                                    <tempalte slot="vesselCnNameSearch" slot-scope="{ row }">
+                                        <dic-select v-model="search.vesselCnName" placeholder="船名" label="cnName"
+                                            res="records" url="/blade-los/bvessels/list?status=0&current=1&size=5"
+                                            :filterable="true" :remote="true" dataName="cnName" :slotRight="true"
+                                            rightLabel="code" :disabled="editButton"></dic-select>
+                                    </tempalte>
+                                </avue-crud>
+                            </trade-card>
+                        </el-col>
+                        <el-col :span="8">
+                            <trade-card title="费用明细">
+                                <avue-crud :option="feeOption" :data="finAccBillsVOList" id="out-table" ref="crud3"
+                                    @selection-change="itemSelectionChange" :header-cell-style="tableHeaderCellStyle"
+                                    :row-class-name="rowClassName" :cell-style="cellStyle">
+                                    <template slot="menuLeft">
+                                        <el-button size="small" type="success" style="margin-right: 8px"
+                                            :disabled="editButton || itemSelectionList.length == 0"
+                                            @click="allClick('明细加入')">明细加入
+                                        </el-button>
+                                        <span style="font-size:18px;font-weight:600;margin-left:10px;">
+                                            <span style="color: #67C23A;margin-right: 10px;">
+                                                金额合计:{{ amountSum }}元
+                                            </span>
+                                        </span>
+                                    </template>
+                                    <tempalte slot="reconciliationCurrentAmount" slot-scope="{ row }">
+                                        <el-input-number v-model="row.reconciliationCurrentAmount"
+                                            @change="armbChange(row)" :controls="false" placeholder="请输入 金额" size="mini"
+                                            style="width: 100%;"></el-input-number>
+                                    </tempalte>
+                                </avue-crud>
+                            </trade-card>
+                        </el-col>
+                    </el-row>
+                </el-tab-pane>
+                <el-tab-pane label="文件中心">
+                    <containerTitle title="上传附件"></containerTitle>
+                    <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
+                        display :pId="form.id" @upDate="upDate" :saveBtn="true"></c-upload>
+                </el-tab-pane>
+            </el-tabs>
+        </div>
+        <!--选择数据弹窗-->
+        <el-dialog title="选择数据" class="el-dialogDeep" :visible.sync="retrievePopupsType" append-to-body width="70%"
+            :close-on-click-modal="false">
+            <div>
+                <avue-crud :option="retrievePopupsOption" :data="retrievePopupsData" ref="retrievePopupsRef"
+                    id="out-table">
+                    <template slot="menu" slot-scope="{ row }">
+                        <el-button type="text" icon="" size="small" @click.stop="retrievePopupsSelect(row)">选择
+                        </el-button>
+                    </template>
+                </avue-crud>
+            </div>
+        </el-dialog>
+
+        <!--设计报表弹窗-->
+        <el-dialog append-to-body title="设计报表" class="el-dialogDeep" :visible.sync="DesignreportDialog" width="70%"
+            :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+            <reports :id="form.id" :assemblyForm="form" businessValue="DZZX"></reports>
+        </el-dialog>
+
+        <!--预览-->
+        <el-dialog title="打印" :visible.sync="selectPrintingDialog" append-to-body width="70%"
+            :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+            <div>
+                <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" @click="selectPrintingDialog = false;">取 消</el-button>
+            </span>
+        </el-dialog>
+
+
+        <!--报表组件-->
+        <reportContainer ref="reportContainer"></reportContainer>
+
+    </div>
+</template>
+
+<script>
+import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+import {
+    finstlbillsDetail,
+    listAccBillV2,
+    finstlbillsSubmit, feeItemsSynchronize, confirmReconciliationV1, revokeReconciliationV1,
+    finstlbillsitemsRemove, finstlbillslistAccBillByCorp,
+} from '@/api/iosBasicData/finstlbills'
+import expand from "@/components/basic-container/expand.vue";
+import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
+import { dateFormat } from "@/util/date";
+import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
+import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
+import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
+import { getList as getreportsList, reportsGetReportData } from "@/api/iosBasicData/reports";
+import dicSelect from "@/components/dicSelect/main";
+export default {
+    components: { reportContainer, reportformsList, reports, SearchQuery, expand, finstlbillsitems, dicSelect },
+    props: {
+        detailData: {
+            type: Object
+        },
+        pageIds: {
+            type: Array, // 指定 prop 的类型为 Array
+            default: () => [], // 提供一个默认值,这里使用函数形式返回一个空数组
+        }
+    },
+    data() {
+        return {
+            submitType: true,
+            sumDRMB: 0,
+            sumCRMB: 0,
+            sumDUSD: 0,
+            sumCUSD: 0,
+            amountSum: 0,
+            selectionList: [],
+            itemSelectionList: [],
+            handleSelectionData: [],
+            editButton: false,
+            pageData: [],
+            tableData: [],
+            finAccBillsVOList: [],
+            form: {
+                branchId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
+                branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
+                billDate: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00:00', // 对账日期 默认 当天
+                finStlBillsItemsList: [],
+                fileList: []
+            },
+            search: {
+                mblno: null,
+                hblno: null,
+                accountDc: "D",
+                feeCnName: null,
+                curCode: null,
+                businessDateStart: null,
+                businessDateEnd: null,
+                vesselCnName: null,
+                voyageNo: null
+            },
+            optionForm: {
+                menuBtn: false,
+                span: 24,
+                disabled: false,
+                labelWidth: 100,
+                column: [
+                    {
+                        label: "所属公司 ",
+                        prop: 'branchName',
+                        disabled: false
+                    },
+                    {
+                        label: '对账单位',
+                        prop: 'corpCnName',
+                        disabled: false
+                    },
+                    {
+                        label: '对账日期',
+                        prop: 'billDate',
+                        type: "date",
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd 00:00:00",
+                        rules: [{
+                            required: true,
+                            message: " ",
+                            trigger: "blur"
+                        }],
+                        disabled: false
+                    },
+                    {
+                        label: '备注',
+                        prop: 'remarks',
+                        type: 'textarea',
+                        minRows: 2,
+                    }]
+            },
+            option: {},
+            optionBack: {
+                height: '300px',
+                maxHeight: '300px',
+                calcHeight: 30,
+                menuWidth: 60,
+                tip: false,
+                menu: false,
+                border: true,
+                addBtn: false,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                refreshBtn: false,
+                index: true,
+                selection: true,
+                align: 'center',
+                column: [
+                    {
+                        label: "所属公司",
+                        prop: "branchName",
+                        width: 120,
+                        overHidden: true
+                    },
+                    {
+                        label: "客户名称",
+                        prop: "corpCnName",
+                        width: 120,
+                        overHidden: true
+                    },
+                    {
+                        label: "收付",
+                        prop: "dc",
+                        width: 60,
+                        type: 'select',
+                        dicData: [{
+                            label: '收',
+                            value: 'D'
+                        }, {
+                            label: '付',
+                            value: 'C'
+                        }],
+                        overHidden: true,
+                    },
+                    {
+                        label: "费用名称",
+                        prop: "feeCnName",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "对账金额",
+                        prop: "currentStlAmount",
+                        width: 100,
+                        overHidden: true
+                    },
+                    {
+                        label: "币别",
+                        prop: "currentStlCurCode",
+                        width: 60,
+                        overHidden: true
+                    },
+                    {
+                        label: "汇率",
+                        prop: "currentStlExrate",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "MB/L NO",
+                        prop: "mblno",
+                        width: 100,
+                        overHidden: true
+                    },
+                    {
+                        label: "HB/L NO",
+                        prop: "hblno",
+                        width: 100,
+                        overHidden: true
+                    },
+
+                    {
+                        label: "起运港",
+                        prop: "polCnName",
+                        width: 100,
+                        overHidden: true
+                    },
+                    {
+                        label: "目的港",
+                        prop: "podCnName",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "箱型箱量",
+                        prop: "quantityCntrDescr",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "船名",
+                        prop: "vesselCnName",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "航次",
+                        prop: "voyageNo",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "备注",
+                        prop: "remarks",
+                        width: 120,
+                        overHidden: true
+                    }
+                ]
+            },
+            dcOptions: [{
+                label: '收',
+                value: 'D'
+            }, {
+                label: '付',
+                value: 'C'
+            }],
+            option2: {},
+            optionBack2: {
+                height: '300px',
+                maxHeight: '300px',
+                calcHeight: 30,
+                menuWidth: 60,
+                searchShow: true,
+                searchMenuSpan: 18,
+                searchIcon: true,
+                searchIndex: 3,
+                tip: false,
+                menu: false,
+                border: true,
+                addBtn: false,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                refreshBtn: false,
+                index: true,
+                selection: true,
+                align: 'center',
+                column: [
+                    {
+                        label: "所属公司",
+                        prop: "branchName",
+                        width: 120,
+                        overHidden: true
+                    },
+                    {
+                        label: "客户名称",
+                        prop: "corpCnName",
+                        width: 120,
+                        overHidden: true
+                    },
+                    {
+                        label: "MB/L NO",
+                        prop: "mblno",
+                        width: 100,
+                        search: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "HB/L NO",
+                        prop: "hblno",
+                        width: 100,
+                        search: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "收付",
+                        prop: "accountDc",
+                        width: 60,
+                        search: true,
+                        searchValue: 'D',
+                        type: 'select',
+                        overHidden: true,
+                    },
+                    {
+                        label: "费用名称",
+                        prop: "feeCnName",
+                        width: 80,
+                        search: true,
+                        hide: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "金额",
+                        prop: "reconciliationCurrentAmount",
+                        width: 100,
+                        overHidden: true
+                    },
+                    {
+                        label: "币别",
+                        prop: "curCode",
+                        width: 60,
+                        search: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "汇率",
+                        prop: "exrate",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "起运港",
+                        prop: "polCnName",
+                        width: 100,
+                        overHidden: true
+                    },
+                    {
+                        label: "目的港",
+                        prop: "podCnName",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "箱型箱量",
+                        prop: "quantityCntrDescr",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "业务开始",
+                        prop: "businessDateStart",
+                        width: 80,
+                        search: true,
+                        hide: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "业务结束",
+                        prop: "businessDateEnd",
+                        width: 80,
+                        search: true,
+                        hide: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "船名",
+                        prop: "vesselCnName",
+                        width: 80,
+                        search: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "航次",
+                        prop: "voyageNo",
+                        width: 80,
+                        search: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "业务日期",
+                        prop: "billDate",
+                        width: 80,
+                        overHidden: true
+                    },
+                    {
+                        label: "备注",
+                        prop: "remarks",
+                        width: 120,
+                        overHidden: true
+                    }
+                ]
+            },
+            page: {
+                currentPage: 1,
+                total: 0,
+                pageSize: 10
+            },
+            feeOption: {
+                height: '280px',
+                calcHeight: 30,
+                menu: false,
+                border: true,
+                addBtn: false,
+                viewBtn: false,
+                editBtn: false,
+                delBtn: false,
+                refreshBtn: false,
+                columnBtn: false,
+                tip: false,
+                selection: true,
+                align: 'center',
+                column: [
+                    {
+                        label: "收付",
+                        prop: "accountDc",
+                        width: 60,
+                        type: 'select',
+                        dicData: [{
+                            label: '收',
+                            value: 'D'
+                        }, {
+                            label: '付',
+                            value: 'C'
+                        }],
+                        overHidden: true
+                    },
+                    {
+                        label: "费用名称",
+                        prop: "feeCnName",
+                        overHidden: true
+                    },
+                    {
+                        label: "金额",
+                        prop: "reconciliationCurrentAmount",
+                        width: 100,
+                        overHidden: true
+                    },
+                    {
+                        label: "币别",
+                        prop: "curCode",
+                        overHidden: true
+                    },
+                    {
+                        label: "汇率",
+                        prop: "exrate",
+                        overHidden: true
+                    },
+                ]
+            },
+            roleName: localStorage.getItem('roleName').split(','), // 当前的角色权限
+            saberUserInfo: JSON.parse(localStorage.getItem('saber-userInfo')).content, // 当前登录人信息
+            retrievePopupsType: false, // 弹窗开启关闭
+            retrievePopupsData: [], // 选择弹窗数据
+            retrievePopupsOption: {
+                border: true,
+                calcHeight: 30,
+                tip: false,
+                height: 'auto',
+                index: true,
+                addBtn: false,
+                viewBtn: false,
+                delBtn: false,
+                editBtn: false,
+                refreshBtn: false,
+                columnBtn: false,
+                menuWidth: '60',
+                column: [
+                    {
+                        label: "客户中文名",
+                        prop: "cnName",
+                        overHidden: true,
+                    },
+                    {
+                        label: "客户英文文名",
+                        prop: "cnName",
+                        overHidden: true,
+                    },
+                ]
+            },
+            DesignreportDialog: false, // 设计报表弹窗
+            selectPrintingDialog: false, // 预览报表
+        }
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(492), this.optionBack);
+        this.option2 = await this.getColumnData(this.getColumnName(520), this.optionBack2);
+        this.saveLocalCurrency(JSON.parse(localStorage.getItem('sysitemData')).deptId)
+        if (this.detailData && this.detailData.id) {
+            this.editButton = true
+            this.optionForm.disabled = true
+            this.getDetail(this.detailData.id)
+        }
+    },
+    methods: {
+        inEdit() {
+            if (this.form.billStatus == 1) {
+                return this.$message.error('已确认对账不允许编辑')
+            }
+            this.editButton = false
+            this.optionForm.disabled = false
+        },
+        lastPage() {
+            if (this.pageIds.length) {
+                const index = this.pageIds.indexOf(this.form.id)
+                if (index == 0) {
+                    return this.$message.error('没有上一票了');
+                }
+                const lastIndex = index - 1
+                // if (this.form.id) {
+                //     this.unLock({
+                //         moduleName: "SE",
+                //         tableName: "SE_order",
+                //         billId: this.form.id,
+                //         billNo: this.form.mblno
+                //     });
+                // }
+                this.getDetail(this.pageIds[lastIndex])
+            }
+        },
+        nextPage() {
+            if (this.pageIds.length) {
+                const index = this.pageIds.indexOf(this.form.id)
+                if (this.pageIds[this.pageIds.length - 1] == this.form.id) {
+                    return this.$message.error('没有下一票了');
+                }
+                const nextIndex = index + 1
+                // if (this.form.id) {
+                //     this.unLock({
+                //         moduleName: "SE",
+                //         tableName: "SE_order",
+                //         billId: this.form.id,
+                //         billNo: this.form.mblno
+                //     });
+                // }
+                this.getDetail(this.pageIds[nextIndex])
+            }
+        },
+        sizeChange(val) {
+            console.log('size', val)
+            this.page.currentPage = 1
+            this.page.pageSize = val
+            this.getList()
+        },
+        currentChange(val) {
+            console.log('current', val)
+            this.page.currentPage = val
+            this.getList()
+        },
+        getList() {
+            const start = (this.page.currentPage - 1) * this.page.pageSize
+            const end = start + this.page.pageSize
+            this.pageData = this.form.finStlBillsItemsList.slice(start, end)
+        },
+        searchChange(params, done) {
+            this.$refs.form.validate((valid, done) => {
+                done()
+                if (!valid) return
+                if (!this.form.corpId && (this.search.hblno || this.search.mblno)) {
+                    this.finstlbillslistAccBillByCorpfun()
+                } else {
+                    if (!this.form.corpId) {
+                        return this.$message.error('请填写对账单位')
+                    }
+                    this.finstlbillslistAccBillV1fun()
+                }
+            })
+            done();
+        },
+        searchReset() {
+            this.search = {
+                mblno: null,
+                hblno: null,
+                accountDc: null,
+                feeCnName: null,
+                curCode: null,
+                businessDateStart: null,
+                businessDateEnd: null,
+                vesselCnName: null,
+                voyageNo: null
+            }
+        },
+        allClick(name) {
+            if (name == '单据加入') {
+                let itemData = []
+                for (let item of this.selectionList) {
+                    if (item.finAccBillsVOList) {
+                        itemData = itemData.concat(item.finAccBillsVOList)
+                    }
+
+                }
+                if (itemData.length == 0) {
+                    return this.$message.error("费用明细暂无数据,请重新选择");
+                }
+                let obj = {
+                    id: this.form.id,
+                    finAccBillsVOList: itemData,
+                    type: 1
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                feeItemsSynchronize(obj).then(res => {
+                    this.selectionList = []
+                    this.itemSelectionList = []
+                    this.tableData = []
+                    this.finAccBillsVOList = []
+                    this.getDetail(this.form.id)
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+            if (name == '明细加入') {
+                let obj = {
+                    id: this.form.id,
+                    finAccBillsVOList: this.itemSelectionList,
+                    type: 1
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                feeItemsSynchronize(obj).then(res => {
+                    this.selectionList = []
+                    this.itemSelectionList = []
+                    this.tableData = []
+                    this.finAccBillsVOList = []
+                    this.getDetail(this.form.id)
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+            if (name == '确认对账') {
+                this.$refs.form.validate((valid, done) => {
+                    done()
+                    if (!valid) return
+                    // 对账单位
+                    if (!this.form.corpId) {
+                        return this.$message.error('请选择对账单位');
+
+                    }
+                    this.form.billNoFormat = 'HYDZ'
+                    this.form.businessTypeCode = 'HYDZ'
+                    this.form.businessType = 'CHK' // 对账
+                    this.form.dc = this.search.accountDc
+                    this.form.url = '/iosBasicData/finstlbills/index'
+                    this.form.pageStatus = "this.$store.getters.paidapplication"
+                    this.form.pageLabel = "对账中心(F)"
+                    delete this.search.mblno
+                    delete this.search.hblno
+                    let obj = {
+                        ...this.form,
+                        ...this.search
+
+                    }
+                    this.$confirm('是否确认对账?', '提示', {
+                        confirmButtonText: '确定',
+                        cancelButtonText: '取消',
+                        type: 'warning'
+                    }).then(() => {
+                        const loading = this.$loading({
+                            lock: true,
+                            text: '加载中',
+                            spinner: 'el-icon-loading',
+                            background: 'rgba(255,255,255,0.7)'
+                        });
+                        confirmReconciliationV1(obj).then(res => {
+                            this.getDetail(res.data.data.id)
+                        }).finally(() => {
+                            loading.close();
+                        })
+                    })
+
+                });
+            }
+            if (name == '撤销对账') {
+                this.$refs.form.validate((valid, done) => {
+                    done()
+                    if (!valid) return
+                    // 对账单位
+                    if (!this.form.corpId) {
+                        return this.$message.error('请选择对账单位');
+
+                    }
+                    this.form.billNoFormat = 'HYDZ'
+                    this.form.businessTypeCode = 'HYDZ'
+                    this.form.businessType = 'CHK' // 对账
+                    this.form.dc = this.search.accountDc
+                    delete this.search.mblno
+                    delete this.search.hblno
+                    let obj = {
+                        ...this.form,
+                        ...this.search
+                    }
+                    this.$confirm('是否撤销对账?', '提示', {
+                        confirmButtonText: '确定',
+                        cancelButtonText: '取消',
+                        type: 'warning'
+                    }).then(() => {
+                        const loading = this.$loading({
+                            lock: true,
+                            text: '加载中',
+                            spinner: 'el-icon-loading',
+                            background: 'rgba(255,255,255,0.7)'
+                        });
+                        revokeReconciliationV1(obj).then(res => {
+                            this.getDetail(res.data.data.id)
+                        }).finally(() => {
+                            loading.close();
+                        })
+                    })
+
+                });
+            }
+        },
+        armbChange(row) {
+            if (Number(row.reconciliationCurrentAmountOriginal) > 0) {
+                if (Number(row.reconciliationCurrentAmount) > Number(row.reconciliationCurrentAmountOriginal)) {
+                    this.$nextTick(() => {
+                        row.reconciliationCurrentAmount = Number(row.reconciliationCurrentAmountOriginal)
+                    })
+
+                    return this.$message.error("本次对账金额不能超过未对账金额");
+                }
+            }
+            if (Number(row.reconciliationCurrentAmountOriginal) < 0) {
+                if (Number(row.reconciliationCurrentAmount) < Number(row.reconciliationCurrentAmountOriginal)) {
+                    this.$nextTick(() => {
+                        row.reconciliationCurrentAmount = Number(row.reconciliationCurrentAmountOriginal)
+                    })
+                    return this.$message.error("本次对账金额不能超过未对账金额");
+                }
+            }
+        },
+        upDate(list) {
+            this.form.fileList = list
+        },
+        dicChange(name, row) {
+            if (name == 'branchName') {
+                if (row) {
+                    this.form.branchId = row.id
+                    this.saveLocalCurrency(row.id)
+                } else {
+                    this.form.branchId = null
+                    this.form.branchName = null
+                }
+            }
+            if (name == 'corpCnName') {
+                if (row) {
+                    this.form.corpId = row.id
+                    this.form.corpEnName = row.enName
+                    this.form.corpArgreementNo = row.enName
+                } else {
+                    this.form.corpId = null
+                    this.form.corpEnName = null
+                    this.form.corpCnName = null
+                    this.form.corpArgreementNo = null
+                }
+
+            }
+        },
+        // 打印
+        reportRadio(val) {
+            // 获取报表数据
+            reportsGetReportData({
+                billId: this.form.id,
+                reportCode: val.classifyCode,
+                groupCode: val.groupCode,
+                type: 'DZZX'
+            }).then(res => {
+                this.handleReportPreview(val.url, res.data.data.data)
+            })
+        },
+        // 报表预览
+        previewreportfun() {
+            getreportsList(1, 10, {
+                businessType: 'DZZX',
+                // classifyCode:'结算中心',
+                // groupCode:'付费结算'
+            }).then(res => {
+                if (res.data.data.records.length == 1) {
+                    this.reportRadio(res.data.data.records[0])
+                } else {
+                    this.saveLoading = true
+                    this.selectPrintingDialog = true
+                    this.saveLoading = false
+                    let page = {
+                        pageSize: 10,
+                        currentPage: 1,
+                        total: 0
+                    }
+                    this.$nextTick(() => {
+                        this.$refs.reportformsList.onLoad(page, {
+                            businessType: 'DZZX',
+                            // classifyCode:'结算中心',
+                            // groupCode:'付费结算'
+                        })
+                    })
+                }
+            })
+        },
+        newbill() {
+            this.$emit('toAddEdit')
+        },
+        submit() {
+            this.$refs.form.validate((valid, done) => {
+                done()
+                if (!valid) return
+                // 对账单位
+                if (!this.form.corpId) {
+                    return this.$message.error('请选择对账单位');
+
+                }
+                this.form.billNoFormat = 'HYDZ'
+                this.form.businessTypeCode = 'HYDZ'
+                this.form.businessType = 'CHK' // 对账
+                this.form.dc = this.search.accountDc
+                delete this.search.mblno
+                delete this.search.hblno
+                let obj = {
+                    ...this.form,
+                    ...this.search
+                }
+                const loading = this.$loading({
+                    lock: true,
+                    text: '加载中',
+                    spinner: 'el-icon-loading',
+                    background: 'rgba(255,255,255,0.7)'
+                });
+                finstlbillsSubmit(obj).then(res => {
+                    this.getDetail(res.data.data.id)
+                }).finally(() => {
+                    loading.close();
+                })
+            });
+
+        },
+        // 详情接口
+        getDetail(id) {
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            finstlbillsDetail(id).then(res => {
+                this.search = {
+                    accountDc: res.data.data.dc,
+                    feeCnName: res.data.data.feeCnName,
+                    curCode: res.data.data.curCode,
+                    businessDateStart: res.data.data.businessDateStart,
+                    businessDateEnd: res.data.data.businessDateEnd,
+                    vesselCnName: res.data.data.vesselCnName,
+                    voyageNo: res.data.data.voyageNo
+                }
+                if (res.data.data.billStatus == 1) {
+                    this.editButton = true
+                    this.optionForm.disabled = true
+                }
+                this.form = res.data.data
+                this.page.total = res.data.data.finStlBillsItemsList.length
+                this.saveLocalCurrency(res.data.data.branchId)
+
+            }).finally(() => {
+                loading.close();
+            })
+        },
+        // 弹窗选择
+        retrievePopupsSelect(row) {
+            // this.form = row
+            this.$set(this.form, 'corpId', row.id)
+            this.$set(this.form, 'corpCnName', row.cnName)
+            this.$set(this.form, 'corpEnName', row.enName)
+            this.$set(this.form, 'corpArgreementNo', row.enName)
+            this.retrievePopupsType = false
+            this.finstlbillslistAccBillV1fun()
+        },
+        // 检索出的弹窗
+        finstlbillslistAccBillByCorpfun() {
+            delete this.form.id
+            // let obj = JSON.parse(JSON.stringify(this.form))
+            let obj = {}
+            obj.type = '1'
+            obj.branchId = this.form.branchId
+            obj.branchName = this.form.branchName
+            obj.corpCnName = this.form.corpId // 对账单位
+            obj.createUserName = this.form.updateUser ? this.form.updateUser : null // 操作员id
+            obj.dc = this.search.dc // 收付 D=收 C=付
+            obj.curCode = this.search.curCode // 币别
+            obj.mblno = this.search.mblno // MB/L NO
+            obj.hblno = this.search.hblno // HB/L NO
+            obj.vesselCnName = this.search.vesselCnName // 中文船名
+            obj.voyageNo = this.search.voyageNo // 航次
+            obj.feeCnName = this.search.feeCnName//
+            obj.businessDateStart = this.search.businessDateStart
+            obj.businessDateEnd = this.search.businessDateEnd
+            finstlbillslistAccBillByCorp(obj).then(res => {
+                this.retrievePopupsType = true
+                this.retrievePopupsData = res.data.data
+            })
+        },
+        // 检索接口
+        finstlbillslistAccBillV1fun() {
+            let obj = {}
+            obj.type = '1'
+            obj.branchId = this.form.branchId
+            obj.branchName = this.form.branchName
+            obj.corpCnName = this.form.corpId // 对账单位
+            obj.createUserName = this.form.updateUser ? this.form.updateUser : null // 操作员id
+            obj.dc = this.search.accountDc // 收付 D=收 C=付
+            obj.curCode = this.search.curCode // 币别
+            obj.mblno = this.search.mblno // MB/L NO
+            obj.hblno = this.search.hblno // HB/L NO
+            obj.vesselCnName = this.search.vesselCnName // 中文船名
+            obj.voyageNo = this.search.voyageNo // 航次
+            obj.feeCnName = this.search.feeCnName//
+            obj.businessDateStart = this.search.businessDateStart
+            obj.businessDateEnd = this.search.businessDateEnd
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            listAccBillV2(obj).then(res => {
+                this.tableData = res.data.data
+                if (this.tableData.length == 0) {
+                    this.$message.warning('当前检索暂无数据!')
+                }
+            }).finally(() => {
+                loading.close();
+            })
+        },
+        // 一键删除
+        batchDeletefun() {
+            if (this.handleSelectionData.length == 0) {
+                return this.$message.warning('请选择要删除的数据')
+            }
+            this.$confirm("确定将选择数据删除?", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning"
+            }).then(() => {
+                // 获取有id 的数据
+                const itemsWithId = this.handleSelectionData.filter(item => item.hasOwnProperty('id'));
+                let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
+                // 把选中的删除掉
+                this.handleSelectionData.forEach((item) => {
+                    for (let index in this.tableData) {
+                        if (item.accBillNo == this.tableData[index].accBillNo) {
+                            this.tableData.splice(Number(index), 1)
+                        }
+                    }
+                })
+                // 有id 的处理
+                if (itemsWithId.length != 0) {
+                    let obj = {
+                        id: this.form.id,
+                        ids: arrIds.join(','),
+                        type: 1,
+                    }
+                    const loading = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    finstlbillsitemsRemove(obj).then(res => {
+                        this.$message.success("删除成功");
+                        this.getDetail(this.form.id)
+                    }).finally(() => {
+                        loading.close();
+                    })
+                }
+            })
+        },
+        // 下面表格多选
+        handleSelectionChange(list) {
+            this.handleSelectionData = list
+        },
+        selectionChange(list) {
+            this.sumDRMB = 0
+            this.sumCRMB = 0
+            this.sumDUSD = 0
+            this.sumCUSD = 0
+            if (list.length) {
+                list.forEach(item => {
+                    if (item.curCode == this.getLocalCurrency()) {
+                        if (item.accountDc == 'D') {
+                            this.sumDRMB += Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0)
+                        }
+                        if (item.accountDc == 'C') {
+                            this.sumCRMB += Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0)
+                        }
+                    }
+                    if (item.curCode != this.getLocalCurrency()) {
+                        if (item.accountDc == 'D') {
+                            this.sumDUSD += Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0)
+                        }
+                        if (item.accountDc == 'C') {
+                            this.sumCUSD += Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0)
+                        }
+                    }
+                })
+            }
+            this.selectionList = list
+        },
+        itemSelectionChange(list) {
+            this.amountSum = 0
+            if (list.length) {
+                list.forEach(item => {
+                    this.amountSum += Number(item.reconciliationCurrentAmount ? item.reconciliationCurrentAmount : 0)
+                })
+            }
+            this.itemSelectionList = list
+        },
+        handleRowDBLClick(row, event) {
+            this.finAccBillsVOList = row.finAccBillsVOList
+        },
+        //返回列表
+        backToList() {
+            this.$emit('goBack')
+        },
+        // 预览报表
+        handleReportPreview(url, data) {
+            console.log(url, 1670)
+            console.log(data, 1671)
+            Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
+            // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
+            Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
+            Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml')
+            // 工具栏
+            var options = new Stimulsoft.Viewer.StiViewerOptions()
+            options.height = '100%'
+            options.appearance.scrollbarsMode = true // 滚动条模式
+            options.toolbar.showDesignButton = false // 显示设计按钮
+            options.toolbar.showAboutButton = false // 显示关于按钮
+            options.toolbar.showResourcesButton = false // 显示资源按钮
+            options.toolbar.showFullScreenButton = false // 显示全屏按钮
+            options.toolbar.showOpenButton = false // 显示打开按钮
+            options.appearance.showTooltips = false // 显示工具提示
+            options.appearance.showDialogsHelp = false // 显示对话框帮助
+            options.exports.showExportToDocument = false // 显示导出到文档
+            options.toolbar.showParametersButton = true // 显示参数按钮
+            options.appearance.bookmarksPrint = true // 书签打印
+            // options.toolbar.showPrintButton = false // 打印按钮是否显示   下面直接自定义控制打印弹窗是否开启
+
+            // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
+            // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
+            // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
+            options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
+            // htmlRenderMode html渲染模式
+            options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
+            // 是创建一个 Stimulsoft 报表查看器的实例的代码
+            let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
+
+            // 报表
+            console.log("创建一个报表实例");
+            console.log()
+            let report = new window.Stimulsoft.Report.StiReport();
+
+            // 加载文件
+            console.log("从url加载报表");
+            // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
+            report.load(url)
+
+            data.pageOne = 'Page : 1 of 1'
+            // 处理超长数据
+            if (data.hshipperDetails) {
+                var consignerIndex2 = data.hshipperDetails.indexOf('\n')
+                for (let i = 0; i < 4; i++) {
+                    consignerIndex2 = data.hshipperDetails.indexOf('\n', consignerIndex2 + 1);
+                }
+                if (consignerIndex2 != -1) {
+                    var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails.length)
+                    data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + ' *'
+                    data.commodityDescr += '\n*' + hshipperDetails
+                }
+            }
+
+            if (data.hconsigneeDetails) {
+                var consigneeIndex2 = data.hconsigneeDetails.indexOf('\n')
+                for (let i = 0; i < 3; i++) {
+                    consigneeIndex2 = data.hconsigneeDetails.indexOf('\n', consigneeIndex2 + 1);
+                }
+                if (consigneeIndex2 != -1) {
+                    var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data.hconsigneeDetails.length)
+                    data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + ' **'
+                    data.commodityDescr += '\n**' + hconsigneeDetails
+                }
+            }
+
+            if (data.hnotifyDetails) {
+                var notifierIndex2 = data.hnotifyDetails.indexOf('\n')
+                for (let i = 0; i < 3; i++) {
+                    notifierIndex2 = data.hnotifyDetails.indexOf('\n', notifierIndex2 + 1);
+                }
+                if (notifierIndex2 != -1) {
+                    var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails.length)
+                    data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + ' ***'
+                    data.commodityDescr += '\n***' + hnotifyDetails
+                }
+            }
+
+            // 处理箱号
+            if (this.isPrintTheBoxNumber) {
+                data.commodityDescr += '\n.\n.\n'
+            }
+
+            // PLACE & DATE OF ISSUE
+            data.placeAndDateOfIssue = ''
+            if (data.issueAt) {
+                data.placeAndDateOfIssue += data.issueAt
+            }
+            if (data.issueDate) {
+                let date = new Date(data.issueDate.replace(/-/g, '/'));
+                let yyyy = date.getFullYear();
+                let mmmm = date.toDateString().split(" ")[1]
+                let dd = date.getDate()
+                data.placeAndDateOfIssue += ', ' + dd + '-' + mmmm + '-' + yyyy
+            }
+
+            // Total number of containers or packages received by the Carriers
+            if (data.preContainersList) {
+                let boxMap = new Map();
+                for (let boxQuantity of data.preContainersList) {
+                    if (boxMap.get(boxQuantity.cntrTypeCode)) {
+                        let v = boxMap.get(boxQuantity.cntrTypeCode)
+                        boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity)
+                    } else {
+                        boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity)
+                    }
+                }
+                let boxs = ''
+                boxMap.forEach(function (value, key, map) {
+                    boxs += value + 'x' + key + ', '
+                })
+                boxs = boxs.substring(0, boxs.length - 2)
+
+                data.boxQuantity = boxs + ' CONTAINER(S) ONLY'
+            }
+
+            // Number of original B/Ls
+            if (data.numberOfObl) {
+                data.numberOfObl += ' (' + data.numberOfOblDigit + ')'
+            }
+
+            if (data.commodityDescr) {
+                var descriptionIndex2 = data.commodityDescr.indexOf('\n')
+                for (let i = 0; i < 19; i++) {
+                    descriptionIndex2 = data.commodityDescr.indexOf('\n', descriptionIndex2 + 1);
+                }
+                if (descriptionIndex2 != -1) {
+                    data.pageOne = 'Page : 1 of 2'
+                    data.pageTwo = 'Page : 2 of 2'
+                    var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr.length)
+                    data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2)
+                    data.extraLongTips = '** TO BE CONTINUED ON ATTACHED LIST **'
+                    data.extraLongText = extraLongText
+                }
+            }
+
+            // console.log(data.hshipperDetails, 'hshipperDetails2')
+
+            // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
+            var dataSet = new Stimulsoft.System.Data.DataSet(
+                'reportData'
+            )
+
+            dataSet.readJson(data) // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
+            // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
+            // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
+            report.regData('reportData', 'reportData', dataSet)
+            // 从模版和数据加载报表
+            // loadReport(report, '', {})
+
+            // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
+            viewer.report = report;
+
+            this.$refs.reportContainer.showContainer(
+                () => {
+                    setTimeout(() => {
+                        viewer.renderHtml('reportContainer')
+                        this.createViewerButtons(viewer)
+                    }, 50)
+                },
+                () => {
+                },
+            )
+            console.log("加载成功完成!");
+        },
+        createViewerButtons(viewer) {
+            viewer.jsObject.collections.images['myClose.png'] =
+                'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
+            const closeBtn = viewer.jsObject.SmallButton(
+                'closeBtn',
+                '关闭',
+                'myClose.png'
+            )
+            // 增加打印弹窗配置
+            const printBtn = viewer.jsObject.SmallButton(
+                'printBtn',
+                '打印报表',
+                'myClose.png'
+            )
+            // console.log(viewer.jsObject.print(),'1013')
+            // 获取 关闭按钮的dom元素位置
+            const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
+            const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
+            const userButtonCell = buttonsTable.rows[0].insertCell(0)
+            // 获取打印按钮的位置
+            const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild // 打印按钮
+            const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0] // 打印按钮dom位置
+
+
+            userButtonPrint.addEventListener("click", (event) => {
+                console.log("打印点击");
+                // event.preventDefault()
+            });
+            userButtonPrint.addEventListener("mouseover", (event) => {
+                console.log("移入打印按钮");
+                console.log(event, 1035)
+
+            });
+
+            userButtonCell.className = 'stiJsViewerClearAllStyles'
+            userButtonCell.appendChild(closeBtn) // 添加关闭节点
+
+            // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
+
+
+            let that = this
+            // 关闭按钮的监听点击
+            closeBtn.action = function () {
+                console.log(that.$refs.ReportContainer, '1022')
+                if (that.$refs.reportContainer)
+                    that.$refs.reportContainer.hideContainer()
+            }
+
+            // // // 打印按钮监听
+            // printBtn.action = (e)=>{
+            //     console.log('打印')
+            //     window.print()
+            // }
+
+        },
+        cellStyle({ row, rowIndex, columnIndex }) {
+            let rowStyle = ''
+            if (row.accountDc == 'D' || row.dc == 'D') {
+                rowStyle = 'color:#8cb24b;'
+            } else if (row.accountDc == 'C' || row.dc == 'C') {
+                rowStyle = 'color:#F56C6C;'
+            }
+            return rowStyle + 'padding:0px;fontSize:12px'
+        },
+        //自定义列保存
+        async saveColumn(ref, option, optionBack, code) {
+            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+            if (inSave) {
+                this.$message.success("保存成功");
+                //关闭窗口
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+        //自定义列重置
+        async resetColumn(ref, option, optionBack, code) {
+            this[option] = this[optionBack];
+            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+            if (inSave) {
+                this.$message.success("重置成功");
+                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            }
+        },
+    },
+    watch: {
+        'form.finStlBillsItemsList': {
+            // 执行方法
+            handler(oldValue, newValue) {
+                this.page.total = oldValue.length
+                this.getList()
+            },
+            deep: true, // 深度监听
+            immediate: true  // 第一次改变就执行,
+        },
+    }
+}
+</script>
+
+<style scoped>
+::v-deep .el-form-item__error {
+    display: none;
+}
+
+::v-deep .el-form-item {
+    margin-bottom: 0;
+}
+
+::v-deep .el-card__body {
+    padding: 4px;
+}
+
+.bottomFlex {
+    display: flex;
+    align-items: center;
+}
+
+.weightfont {
+    font-size: 20px;
+    font-weight: bold;
+}
+
+.weightnum {
+    font-size: 15px;
+    font-weight: 500;
+}
+</style>

+ 952 - 0
src/views/iosBasicData/financialManagement/finstlbills/index.vue

@@ -0,0 +1,952 @@
+<template>
+  <div>
+    <basic-container v-show="isShow">
+      <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
+        id="out-table" :header-cell-class-name="headerClassName" :before-open="beforeOpen" v-model="form" ref="crud"
+        @row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange"
+        @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+        @size-change="sizeChange" @refresh-change="refreshChange" :search.sync="search"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 314)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 314)" @on-load="onLoad"
+        @expand-change="expandChange">
+        <template slot="expand" slot-scope="{row}">
+          <finstlbillsitems :tableData="row.finStlBillsItemsList || []" :brfalse="false"></finstlbillsitems>
+        </template>
+        <tempalte slot="feeCnNameSearch">
+          <dic-select v-model="search.feeCnName" placeholder="费用名称" key="id" label="cnName" res="records"
+            url="/blade-los/bfees/list" :filterable="true" :remote="true" dataName="cnName"></dic-select>
+        </tempalte>
+        <template slot="menuLeft">
+          <el-button type="success" size="small" icon="el-icon-plus" plain @click="newbillFun">新建账单
+          </el-button>
+          <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">一键删除
+          </el-button>
+        </template>
+        <template slot="menu" slot-scope="{row}">
+          <el-button type="text" size="small" @click="rowEdit(row)">编辑
+          </el-button>
+          <!--:disabled="saberUserInfo.role_name.indexOf('允许修改他人业务') == -1?saberUserInfo.user_id != row.createUser:false"-->
+          <el-button type="text" size="small"
+            v-if="saberUserInfo.role_name.indexOf('admin') == -1 ? saberUserInfo.role_name.indexOf('允许修改他人业务') == -1 ? saberUserInfo.user_id == row.createUser : true : true"
+            :disabled="row.billStatus == 1" @click="rowDel(row)">删除
+          </el-button>
+        </template>
+        <template slot-scope="{ row }" slot="billNo">
+          <span class="pointerClick" @click="rowEdit(row)">{{ row.billNo }}
+          </span>
+        </template>
+        <template slot-scope="{ row }" slot="billStatus">
+          <span v-if="row.billStatus == 1" style="color: #7fbb41">是</span>
+          <span v-if="row.billStatus == 0" style="color: #d2983c">否</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit" :pageIds="pageIds"
+      :key="datekey">
+    </detailsPage>
+  </div>
+</template>
+
+<script>
+import { finstlbillsList, finstlbillsDetail, finstlbillsSubmit, finstlbillsRemove, finstlbillsitemsList } from "@/api/iosBasicData/finstlbills";
+import { mapGetters } from "vuex";
+import detailsPage from "./detailsPage";
+import { getWorkDicts } from "@/api/system/dictbiz";
+import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
+import dicSelect from "@/components/dicSelect/main";
+export default {
+  components: { finstlbillsitems, dicSelect, detailsPage },
+  data() {
+    return {
+      pageIds: [],
+      datekey: Date.now(),
+      search: {},
+      // 详情页面和列表切换
+      isShow: true,
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        searchIcon: true,
+        searchIndex: 3,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth: 100,
+        expand: true,
+        rowKey: 'id',
+        column: [
+          {
+            label: "所属公司",
+            prop: "branchId",
+            width: "120",
+            overHidden: true,
+            hide: true,
+            showColumn: false,
+            type: "select",
+            filterable: true,
+            dicUrl: "/api/blade-system/dept/lazy-list",
+            props: {
+              label: "deptName",
+              value: "id",
+            },
+            search: false,
+            searchOrder: 1
+          },
+          {
+            label: "所属公司",
+            prop: "branchName",
+            width: "120",
+            overHidden: true,
+            hide: true,
+            showColumn: false,
+          },
+          {
+            label: "客户名称",
+            prop: "corpCnName",
+            search: true,
+            width: "300",
+            searchOrder: 1.1,
+            overHidden: true,
+          },
+          {
+            label: "MB/L NO",
+            prop: "mblno",
+            search: true,
+            searchOrder: 2,
+            overHidden: true
+          },
+          {
+            label: "HB/L NO",
+            prop: "hblno",
+            search: true,
+            searchOrder: 4,
+            overHidden: true
+          },
+          {
+            label: "单据编号",
+            prop: "billNo",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "对账日期",
+            prop: "billDate",
+            overHidden: true,
+            width: "150",
+          },
+          {
+            label: "业务开始日期",
+            prop: "businessDateStart",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: "100",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "业务结束日期",
+            prop: "businessDateEnd",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: "100",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "对账开始日期",
+            prop: "billDateStart",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: "100",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "对账结束日期",
+            prop: "billDateEnd",
+            search: true,
+            overHidden: true,
+            hide: true,
+            searchLabelWidth: "100",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+          },
+          {
+            label: "客户英文名称",
+            prop: "corpEnName",
+            width: "120",
+            overHidden: true,
+          },
+          /*          {
+                      label: "JOB NO",
+                      prop: "businessNo",
+                      width: "120",
+                      search: true,
+                      searchOrder: 3,
+                      overHidden: true
+                    },*/
+          /*          {
+                      label: "ACCT NO",
+                      prop: "accountNo",
+                      width: "100",
+                      search: true,
+                      searchOrder: 5,
+                      overHidden: true
+                    },*/
+          /*          {
+                      label: "对账单号",
+                      prop: "checkNo",
+                      search: true,
+                      width: "100",
+                      searchOrder: 6,
+                      overHidden: true
+                    },*/
+          {
+            label: "船名",
+            prop: "vesselCnName",
+            search: true,
+            searchOrder: 7,
+            overHidden: true
+          },
+          {
+            label: "航次",
+            prop: "voyageNo",
+            search: true,
+            searchOrder: 8,
+            overHidden: true
+          },
+          // {
+          //   label: "客户是否已签约",
+          //   prop: "corpIsSigned",
+          //   width:"120",
+          //   dicData:[],
+          //   props: {
+          //       label: "dictValue",
+          //       value: "dictKey"
+          //   },
+          //   overHidden:true,
+          // },
+          /*          {
+                      label: "客户约号",
+                      prop: "corpArgreementNo",
+                      overHidden: true,
+                    },*/
+          // {
+          //   label: "客户账期备注",
+          //   prop: "corpAccRemarks",
+          //   width:"120",
+          //   overHidden:true,
+          // },
+          {
+            label: "业务类型",
+            prop: "businessType",
+            width: "120",
+            overHidden: true,
+            type: 'select',
+            multiple: true,
+            dicData: [
+              {
+                label: '海运出口',
+                value: 'SE'
+              }, {
+                label: '海运进口',
+                value: 'SI'
+              }
+            ],
+          },
+          {
+            label: "本币应收",
+            prop: "amountDr",
+            width: "160"
+          },
+          {
+            label: "本币应付",
+            prop: "amountCr",
+            width: "160"
+          },
+          // {
+          //   label: "综合 USD 应收 - 非 USD 外币转换为 USD",
+          //   prop: "amountDrUsd",
+          //     width: "160"
+          // },
+          // {
+          //   label: "综合 USD 应付 - 非 USD 外币转换为 USD",
+          //   prop: "amountCrUsd",
+          //     width: "160"
+          // },
+          {
+            label: "合计本币应收",
+            prop: "amountDrLoc",
+            width: "160"
+          },
+          {
+            label: "合计本币应付",
+            prop: "amountCrLoc",
+            width: "160"
+          },
+          /*
+                    {
+                      label: "本币税后应收",
+                      prop: "amountDrNet",
+                      width: "160"
+                    },
+                    {
+                      label: "本币税后应付",
+                      prop: "amountCrNet",
+                      width: "160"
+                    },
+          */
+          // {
+          //   label: "综合 USD 税后应收 - 非 USD 外币转换为 USD",
+          //   prop: "amountDrUsdNet",
+          //     width: "160"
+          // },
+          // {
+          //   label: "综合 USD 税后应付 - 非 USD 外币转换为 USD",
+          //   prop: "amountCrUsdNet",
+          //     width: "160"
+          // },
+          /*
+                    {
+                      label: "合计本币税后应收",
+                      prop: "amountDrLocNet",
+                      width: "170"
+                    },
+                    {
+                      label: "合计本币税后应付",
+                      prop: "amountCrLocNet",
+                      width: "170"
+                    },
+          */
+          {
+            label: "业务单据编号",
+            prop: "businessNo",
+            width: "120",
+            overHidden: true,
+          },
+          /*          {
+                      label: "账单编号",
+                      prop: "accountNo",
+                      width: "100",
+                      overHidden: true,
+                    },*/
+          // {
+          //   label: "对账单编号",
+          //   prop: "checkNo",
+          //   width: "100",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "业务所在部门",
+          //   prop: "deptName",
+          //   width: "120",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "业务操作",
+          //   prop: "operatorName",
+          //   width: "100",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "业务员",
+          //   prop: "salesName",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "费用收付",
+          //   prop: "dc",
+          //   search: true,
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "币种",
+          //   prop: "curCode",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "中文船名",
+          //   prop: "vesselCnName",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "英文船名",
+          //   prop: "vesselEnName",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "航次",
+          //   prop: "voyageNo",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "财务开始日期",
+          //   prop: "accountDateFrom",
+          //   width: "140",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "财务结束日期",
+          //   prop: "accountDateTo",
+          //   width: "140",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "审核开始日期",
+          //   prop: "auditDateFrom",
+          //   width: "140",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "审核结束日期",
+          //   prop: "auditDateTo",
+          //   width: "140",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "发票号",
+          //   prop: "invoiceNo",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "检验检疫 NO",
+          //   prop: "iqNo",
+          //   width: "140",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "费用中文名称",
+          //   prop: "feeCode",
+          //     width: "140",
+          //     overHidden:true,
+          // },
+          // {
+          //   label: "费用名称",
+          //   prop: "feeCnName",
+          //   searchLabelWidth: "100",
+          //   width: "140",
+          //   search: true,
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "费用英文名称",
+          //   prop: "feeEnName",
+          //   width: "140",
+          //   overHidden: true,
+          // },
+          /*
+                    {
+                      label: "是否审核",
+                      prop: "isApproved",
+                      dicData: [],
+                      props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                      },
+                      overHidden: true,
+                    },
+                    {
+                      label: "是否签收",
+                      prop: "isSignfor",
+                      dicData: [],
+                      props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                      },
+                      overHidden: true,
+                    },
+          */
+          {
+            label: "是否对账",
+            prop: "isChecked",
+            dicData: [],
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            overHidden: true,
+          },
+          {
+            label: "是否生成对账",
+            prop: "billStatus",
+            dicData: [],
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            width: "100",
+            overHidden: true,
+          },
+          /*
+                    {
+                      label: "是否销账",
+                      prop: "isCleared",
+                      dicData: [],
+                      props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                      },
+                      overHidden: true,
+                    },
+                    {
+                      label: "是否开发票",
+                      prop: "isInvoice",
+                      dicData: [],
+                      props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                      },
+                      width: "140",
+                      overHidden: true,
+                    },
+                    {
+                      label: "是否含税价计算",
+                      prop: "isTax",
+                      dicData: [],
+                      props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                      },
+                      width: "140",
+                      overHidden: true,
+                    },
+          */
+          // {
+          //   label: "凭证类型",
+          //   prop: "voucherType",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "凭证号",
+          //   prop: "voucherNo",
+          //   overHidden: true,
+          // },
+          // {
+          //   label: "凭证日期",
+          //   prop: "voucherDate",
+          //   overHidden: true,
+          // },
+          {
+            label: "制单人",
+            prop: "createUserName",
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            overHidden: true,
+          },
+        ]
+      },
+      data: [],
+      editSave: false, // 编辑保存打印状态
+      saberUserInfo: {}, // 当前登录人个人信息
+      detailData: {},
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
+      return {
+        addBtn: this.vaildData(this.permission.finstlbills_add, false),
+        viewBtn: this.vaildData(this.permission.finstlbills_view, false),
+        delBtn: this.vaildData(this.permission.finstlbills_delete, false),
+        editBtn: this.vaildData(this.permission.finstlbills_edit, false)
+      };
+    },
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  async created() {
+    // 获取当前登录人个人信息
+    this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
+    this.option = await this.getColumnData(this.getColumnName(314), this.optionBack);
+    if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
+      this.option.searchMenuSpan = 24
+      this.option.column.forEach(item => {
+        if (item.prop == 'branchId') {
+          item.search = true
+        }
+        if (item.prop == 'branchName') {
+          item.hide = false
+          item.showColumn = true
+        }
+      })
+    }
+    if (this.$route.query.billId) {
+      // 从审批里查看跳进来的
+      this.rowEdit({ id: this.$route.query.billId })
+    }
+    this.$store.commit('DZZXF_IN_DETAIL')
+    this.dictionaryfun() // 获取字典数据
+  },
+  methods: {
+    // 展开行
+    expandChange(row, expendList) {
+      finstlbillsitemsList(1, 20, { pid: row.id }).then(res => {
+        console.log(res.data.data.records, 476)
+        row.finStlBillsItemsList = res.data.data.records.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)
+            this.$set(item, 'currentStlAmountRMB', item.currentStlAmount)
+          } 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', item.currentStlAmount)
+          }
+          return item
+        })
+      })
+    },
+    // 新建账单
+    newbillFun() {
+      this.pageIds = []
+      this.isShow = false
+      this.editSave = false
+      // this.$refs.finstlbillsDetails
+    },
+    toAddEdit() {
+      this.detailData = {}
+      this.datekey = Date.now()
+      this.isShow = false
+      // this.editSave = false
+    },
+    // 编辑
+    rowEdit(row) {
+      this.pageIds = []
+      this.data.forEach(item => {
+        this.pageIds.push(item.id)
+      })
+      // this.isShow = false
+      // this.editSave = true
+      // this.$nextTick(() => {
+      //   this.$refs.finstlbillsDetails.finstlbillsDetailfun(row.id)
+      // })
+      this.detailData = {
+        id: row.id
+      };
+      this.isShow = false
+    },
+    // 详情的返回列表
+    goBack() {
+      // 初始化数据
+      this.pageIds = []
+      // this.detailData = this.$options.data().detailData;
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/iosBasicData/finstlbills/index"
+        });
+      }
+      this.detailData = {}
+      this.isShow = true;
+      this.onLoad(this.page, this.search);
+    },
+    // 添加
+    rowSave(row, done, loading) {
+      finstlbillsSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    // 保存
+    rowUpdate(row, index, done, loading) {
+      finstlbillsSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    // 删除
+    rowDel(row) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return finstlbillsRemove(row.id);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+        });
+    },
+    // 批量删除
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      // 判断是否可以编辑别人业务 true 就没有权限
+      if (this.ModifyOthersfun()) return;
+      // 已经提交请核的提示不让删除
+      let sumArr = []
+      const h = this.$createElement
+      for (let item of this.selectionList) {
+        if (item.billStatus == 1) {
+          sumArr.push(h('p', `序号${item.$index + 1}的数据已经确认对账请勿删除`))
+        }
+      }
+      if (sumArr.length != 0) {
+        this.$confirm('提示', {
+          message: h('div', sumArr),
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+        return;
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return finstlbillsRemove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
+        });
+    },
+    // 判断是否可以编辑别人业务
+    ModifyOthersfun() {
+      let sumArr = []
+      const h = this.$createElement
+      // 判断是否有权限
+      if (this.saberUserInfo.role_name.indexOf('允许修改他人业务') != -1) return false
+      // 当前登录人和选择的创建人对比是不是一个人
+      for (let item of this.selectionList) {
+        if (this.saberUserInfo.user_id != item.createUser) {
+          sumArr.push(h('p', `你没有"允许修改他人业务"权限,请重新选择数据`))
+        }
+      }
+      if (sumArr.length != 0) {
+        this.$confirm('提示', {
+          message: h('div', sumArr),
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).catch(err => { })
+        return true
+      }
+    },
+    // 详情
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        finstlbillsDetail(this.form.id).then(res => {
+          this.form = res.data.data;
+        });
+      }
+      done();
+    },
+    searchReset() {
+      this.query = {};
+      this.onLoad(this.page);
+    },
+    // 搜索
+    searchChange(params, done) {
+      this.query = params;
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    selectionClear() {
+      this.selectionList = [];
+      this.$refs.crud.toggleSelection();
+      this.$refs.crud.refreshTable();
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      this.loading = true;
+      finstlbillsList(
+        page.currentPage,
+        page.pageSize,
+        { ...Object.assign(params, this.query), businessType: 'CHK' }
+      ).then(res => {
+        const data = res.data.data;
+        this.page.total = data.total;
+        this.data = data.records.map(item => {
+          item.isApproved = item.isApproved + ''
+          item.isSignfor = item.isSignfor + ''
+          item.isChecked = item.isChecked + ''
+          item.billStatus = item.billStatus + ''
+          item.isCleared = item.isCleared + ''
+          item.isInvoice = item.isInvoice + ''
+          item.isTax = item.isTax + ''
+          item.corpIsSigned = item.corpIsSigned + ''
+          return item
+        })
+        this.$nextTick(() => {
+          this.$refs.crud.dicInit();
+        });
+        this.loading = false;
+        this.selectionClear();
+      });
+    },
+
+    // 获取字典数据
+    dictionaryfun() {
+      // 全部是否
+      getWorkDicts('ifInvoice').then(res => {
+        this.findObject(this.option.column, "isApproved").dicData = res.data.data
+        this.findObject(this.option.column, "isSignfor").dicData = res.data.data
+        this.findObject(this.option.column, "isCleared").dicData = res.data.data
+        this.findObject(this.option.column, "billStatus").dicData = res.data.data
+      })
+      // 对账状态字典
+      getWorkDicts('los_check_status').then(res => {
+        this.findObject(this.option.column, "isChecked").dicData = res.data.data
+      })
+      // 是否开发票
+      getWorkDicts('invoice_los').then(res => {
+        this.findObject(this.option.column, "isInvoice").dicData = res.data.data
+      })
+      // 是否
+      getWorkDicts('ifInvoice').then(res => {
+        // this.findObject(this.option.column, "corpIsSigned").dicData = res.data.data
+        this.findObject(this.option.column, "isTax").dicData = res.data.data
+      })
+    },
+
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
+        this.option.searchMenuSpan = 24
+        this.option.column.forEach(item => {
+          if (item.prop == 'branchId') {
+            item.search = true
+          }
+          if (item.prop == 'branchName') {
+            item.hide = false
+            item.showColumn = true
+          }
+        })
+      }
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = ""
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one"
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two"
+        }
+      }
+      return back;
+    },
+
+
+
+  }
+};
+</script>
+
+<style scoped>
+::v-deep#out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+::v-deep#out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+.pointerClick {
+  cursor: pointer;
+  color: #1e9fff;
+}
+
+/deep/ .el-col-md-8 {
+  width: 24.33333%;
+}
+</style>

+ 3 - 3
src/views/iosBasicData/fininvoices/index.vue

@@ -15,7 +15,7 @@
           </el-button>
         </template>
         <template slot="menu" slot-scope="{row}">
-          <el-button type="text" size="small" @click="editFun(row)">编辑
+          <el-button type="text" size="small" @click="rowDeit(row)">编辑
           </el-button>
           <el-button type="text" size="small"
             :disabled="saberUserInfo.role_name.indexOf('admin') == -1 ? saberUserInfo.role_name.indexOf('允许修改他人业务') == -1 ? saberUserInfo.user_id != row.createUser : false : false"
@@ -32,7 +32,7 @@
           {{ row.invoiceDate ? row.invoiceDate.slice(0, 10) : '' }}
         </template>
         <template slot-scope="{ row }" slot="billNo">
-          <span class="pointerClick" @click="editFun(row)">{{ row.billNo }}
+          <span class="pointerClick" @click="rowDeit(row)">{{ row.billNo }}
           </span>
         </template>
         <tempalte slot="feeCnNameSearch">
@@ -668,7 +668,7 @@ export default {
       this.editSave = false
     },
     // 编辑
-    editFun(row) {
+    rowDeit(row) {
       this.isShow = false
       this.editSave = true
       this.$nextTick(() => {