Explorar el Código

1.进场记录 修改列设置 正确获取下拉字典
2.客户托书 新加检索条件 新加选定合计
3.客户订舱 新加检索条件

Qukatie hace 2 meses
padre
commit
e1938076f7

+ 7 - 0
src/util/date.js

@@ -351,4 +351,11 @@ export function checkFullWidthSymbols(text) {
       positions: []                // 符号的详细位置和内容
     };
   }
+}
+//判断一行不能超过35个字符
+export function lineQuantityVerification(text) {
+  if (text) {
+    const matchesItem = [];
+    let lines = text.split('\n')
+  }
 }

+ 3 - 3
src/views/boxManagement/enterRecord/detailsPage.vue

@@ -34,8 +34,8 @@
         <avue-crud :option="option" :data="dataList" id="out-table" ref="crud" :header-cell-class-name="headerClassName"
           :row-style="{ height: '20px', padding: '0px' }" :cell-style="{ height: '20px', padding: '0px' }"
           @selection-change="selectionChange" @select="selectHandle" @row-update="rowUpdate"
-          @resetColumn="resetColumn('crud', 'option', 'optionBack', 515)"
-          @saveColumn="saveColumn('crud', 'option', 'optionBack', 515)">
+          @resetColumn="resetColumn('crud', 'option', 'optionBack', 517)"
+          @saveColumn="saveColumn('crud', 'option', 'optionBack', 517)">
           <template slot="menu" slot-scope="{ row, index }">
             <el-button size="small" type="text" @click="rowEdit(row)">
               {{ row.$cellEdit ? '保存' : '编辑' }}
@@ -204,7 +204,7 @@ export default {
     detailData: Object
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(515), this.optionBack);
+    this.option = await this.getColumnData(this.getColumnName(517), this.optionBack);
     if (this.detailData.id) {
       // this.editButton = true
       // this.editDisabled = true

+ 2 - 2
src/views/iosBasicData/businessCenter/customerBooking/detailsPage.vue

@@ -2012,7 +2012,7 @@ export default {
         if (row) {
           this.form.placeDeliveryId = row.id;
           this.form.placeDeliveryCode = row.code;
-          this.form.podEnName = row.enName
+          this.form.podEnName = row.enName;
           // this.form.placeDeliveryNamePrint = row.enName;
           if (this.form.placeDeliveryNamePrint) {
             this.$confirm("是否覆盖内容?", "提示", {
@@ -2509,7 +2509,6 @@ export default {
             return;
           }
         }
-
         if (!this.form.preContainersList.length) {
           return this.$message.error("集装箱明细不能为空");
         }
@@ -2805,6 +2804,7 @@ export default {
           //     return this.$message.error("请完善费用明细");
           //   }
           // }
+          this.form.billDate = this.form.etd;
           this.form.businessType = "KHTS";
           this.form.billNoFormat = "KHTS";
           this.form.businessTypeCode = "KHTS";

+ 7 - 2
src/views/iosBasicData/businessCenter/customerBooking/index.vue

@@ -105,7 +105,7 @@ export default {
         menuWidth: 140,
         tip: false,
         searchShow: true,
-        searchMenuSpan: 18,
+        searchMenuSpan: 12,
         border: true,
         index: true,
         addBtn: false,
@@ -231,9 +231,14 @@ export default {
             prop: "etd",
             width: "100",
             overHidden: true,
+            search: true,
             type: "date",
+            searchProp: "etdList",
+            unlinkPanels: true,
+            searchRange: true,
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00"
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            searchDefaultTime: ["00:00:00", "23:59:59"]
           },
           {
             label: "起运港",

+ 1 - 0
src/views/iosBasicData/businessCenter/customerLetter/detailsPage.vue

@@ -2309,6 +2309,7 @@ export default {
           //     return this.$message.error("请完善费用明细");
           //   }
           // }
+          this.form.billDate=this.form.etd;
           this.form.businessType = "KHTS";
           this.form.billNoFormat = "KHTS";
           this.form.businessTypeCode = "KHTS";

+ 20 - 3
src/views/iosBasicData/businessCenter/customerLetter/index.vue

@@ -26,6 +26,8 @@
           <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">创建单据 </el-button>
           <el-button type="success" size="small" :disabled="selectionList.length != 1" @click="copyButton">复制单据 </el-button>
           <el-button type="warning" size="small" @click="outExport">导 出</el-button>
+          <span style="color: #67C23A;font-size: 18px;">选定重量:{{ grossWeightSum }}</span>
+          <span style="margin-left: 20px;color: #67C23A;;font-size: 18px;">选定TEU:{{ teuSum }}</span>
           <div style="margin-top: 10px">
             <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
               <!-- <el-tab-pane label="录入" name="1"></el-tab-pane>
@@ -76,6 +78,8 @@ import _ from "lodash";
 export default {
   data() {
     return {
+      grossWeightSum: 0,
+      teuSum: 0,
       isShow: true,
       form: {},
       query: {
@@ -96,7 +100,7 @@ export default {
         menuWidth: 140,
         tip: false,
         searchShow: true,
-        searchMenuSpan: 18,
+        searchMenuSpan: 12,
         border: true,
         index: true,
         addBtn: false,
@@ -222,9 +226,14 @@ export default {
             prop: "etd",
             width: "100",
             overHidden: true,
+            search: true,
             type: "date",
+            searchProp: "etdList",
+            unlinkPanels: true,
+            searchRange: true,
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00"
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            searchDefaultTime: ["00:00:00", "23:59:59"]
           },
           {
             label: "起运港",
@@ -572,6 +581,14 @@ export default {
       done();
     },
     selectionChange(list) {
+      let grossWeightSum = 0;
+      let teuSum = 0;
+      for (let item of list) {
+        grossWeightSum += Number(item.grossWeight ? item.grossWeight : 0);
+        teuSum += Number(item.teu ? item.teu : 0);
+      }
+      this.grossWeightSum = grossWeightSum.toFixed(2);
+      this.teuSum = teuSum.toFixed(2);
       this.selectionList = list;
     },
     currentChange(currentPage) {
@@ -687,7 +704,7 @@ export default {
         }
       }
       return back;
-    },
+    }
   }
 };
 </script>

+ 34 - 19
src/views/iosBasicData/financeProfit/index.vue

@@ -23,7 +23,7 @@
         <el-button type="success" size="small" plain @click="exportfun">导出</el-button>
       </template>
       <template slot="header">
-        <el-table :data="commodityData" border size="small" @header-click="cellClick" style="width: 100%">
+        <el-table v-loading="itemLoading" :data="commodityData" border size="small" @header-click="cellClick" style="width: 100%">
           <el-table-column v-for="(item, index) in commodityLabel" :key="index" :prop="item.prop" show-overflow-tooltip :label="item.label" />
         </el-table>
       </template>
@@ -185,8 +185,10 @@ export default {
   components: { TreeSelect, SearchQuery },
   data() {
     return {
+      firstLoad: false,
       form: {},
-      loading: true,
+      loading: false,
+      itemLoading: false,
       page: {
         pageSize: 10,
         currentPage: 1,
@@ -914,6 +916,7 @@ export default {
     },
     // 搜索
     searchChange(params, done) {
+      this.firstLoad = true;
       this.query = params;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);
@@ -929,24 +932,36 @@ export default {
       this.onLoad(this.page, this.query);
     },
     onLoad(page, params = {}) {
-      this.loading = true;
-      if (Array.isArray(this.query.businessType)) {
-        this.query.businessType = this.query.businessType.join(",");
-      }
-      financeStatisticsFinanceProfit(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
-        const data = res.data.data;
-        this.page.total = data.total;
-        this.data = data.records;
-        this.loading = false;
-        financeStatisticsFinanceProfitSum(Object.assign(params, this.query)).then(re => {
-          this.commodityData = [re.data.data];
-          this.$nextTick(() => {
-            this.$refs.crud.doLayout();
-            this.$refs.crud.dicInit();
+      if (this.firstLoad) {
+        this.loading = true;
+        this.itemLoading = true;
+        if (Array.isArray(this.query.businessType)) {
+          this.query.businessType = this.query.businessType.join(",");
+        }
+        financeStatisticsFinanceProfit(page.currentPage, page.pageSize, Object.assign(params, this.query))
+          .then(res => {
+            const data = res.data.data;
+            this.page.total = data.total;
+            this.data = data.records;
+            financeStatisticsFinanceProfitSum(Object.assign(params, this.query)).then(re => {
+              this.commodityData = [re.data.data];
+              this.$nextTick(() => {
+                this.$refs.crud.doLayout();
+                this.$refs.crud.dicInit();
+              });
+            })
+          .finally(() => {
+            this.itemLoading = false;
           });
-        });
-        this.selectionClear();
-      });
+            this.selectionClear();
+          })
+          .catch(() => {
+            this.itemLoading = false;
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      }
     },
     selectionClear() {
       this.$refs.crud.toggleSelection();

+ 855 - 766
src/views/iosBasicData/periodManagement/index.vue

@@ -1,33 +1,54 @@
 <template>
-    <div>
-        <basic-container v-show="!detailsOpen">
-            <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-                <el-tab-pane label="会计期间" name="first">
-                    <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading"
-                        :data="dataList" ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange"
-                        @refresh-change="refreshChange"
-                        @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 366)"
-                        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 366)" :page.sync="page">
-                        <template slot-scope="{type,size,row,index}" slot="menu">
-                            <el-button size="small" :type="type" :disabled="row.lockingStatus != 0"
-                                @click="lock(row, 1)">锁定</el-button>
-                            <el-button size="small" :type="type" :disabled="row.lockingStatus != 1 || row.isClosed != 0"
-                                @click="lock(row, 2)">撤销锁定</el-button>
-                            <el-button size="small" :type="type" :disabled="row.lockingStatus != 1 || row.isClosed != 0"
-                                @click="inClose(row, 1)">结转</el-button>
-                            <el-button size="small" :type="type" :disabled="row.isClosed != 1"
-                                @click="inClose(row, 2)">反结转</el-button>
-                        </template>
-                        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-                            <el-button type="success" size="small" @click="openDialog = true; title = '开账'"
-                                v-if="showBut">开
-                                账</el-button>
-                            <el-button type="success" size="small" @click="openDialog = true; title = '账套初始化'"
-                                v-if="!showBut">账套初始化</el-button>
-                        </template>
-                    </avue-crud>
-                </el-tab-pane>
-                <!-- <el-tab-pane label="月末结转" name="second">
+  <div>
+    <basic-container v-show="!detailsOpen">
+      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+        <el-tab-pane label="会计期间" name="first">
+          <avue-crud
+            :option="option"
+            :search.sync="search"
+            v-model="form"
+            :table-loading="loading"
+            :data="dataList"
+            ref="crud"
+            :key="key"
+            @on-load="onLoad"
+            @search-change="searchChange"
+            @refresh-change="refreshChange"
+            @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 366)"
+            @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 366)"
+            :page.sync="page"
+          >
+            <template slot-scope="{ type, size, row, index }" slot="menu">
+              <el-button size="small" :type="type" :disabled="row.lockingStatus != 0" @click="lock(row, 1)">锁定</el-button>
+              <el-button size="small" :type="type" :disabled="row.lockingStatus != 1 || row.isClosed != 0" @click="lock(row, 2)">撤销锁定</el-button>
+              <el-button size="small" :type="type" :disabled="row.lockingStatus != 1 || row.isClosed != 0" @click="inClose(row, 1)">结转</el-button>
+              <el-button size="small" :type="type" :disabled="row.isClosed != 1" @click="inClose(row, 2)">反结转</el-button>
+            </template>
+            <template slot-scope="{ type, size, row, $index }" slot="menuLeft">
+              <el-button
+                type="success"
+                size="small"
+                @click="
+                  openDialog = true;
+                  title = '开账';
+                "
+                v-if="showBut"
+                >开 账</el-button
+              >
+              <el-button
+                type="success"
+                size="small"
+                @click="
+                  openDialog = true;
+                  title = '账套初始化';
+                "
+                v-if="!showBut"
+                >账套初始化</el-button
+              >
+            </template>
+          </avue-crud>
+        </el-tab-pane>
+        <!-- <el-tab-pane label="月末结转" name="second">
                     <avue-crud :option="option2" :search.sync="search2" v-model="form2" :table-loading="loading"
                         :data="dataList2" ref="crud2" :key="key" @on-load="onLoad2" @search-change="searchChange2"
                         @refresh-change="refreshChange2"
@@ -39,762 +60,830 @@
                         </template>
                     </avue-crud>
                 </el-tab-pane> -->
-            </el-tabs>
-        </basic-container>
-        <detailsPage v-if="detailsOpen" @goBack="goBack" :onLoad="form" :detailData="detailData">
-        </detailsPage>
-        <el-dialog v-dialogdrag append-to-body :title="title" :visible.sync="openDialog" width="30%"
-            :before-close="handleClose">
-            <span v-if="title == '汇兑损益汇率'" style="display: flex;align-items: center;">
-                <avue-crud :data="itemData" :option="itemOption"></avue-crud>
-            </span>
-            <span v-if="title == '期间损益汇率'" style="display: flex;align-items: center;">
-                <avue-crud :data="itemData" :option="itemOption"></avue-crud>
-            </span>
-            <span v-else-if="title == '开账'">
-                <span style="display: flex;align-items: center;">
-                    所属公司:
-                    <dic-select v-model="branchName" placeholder="所属公司" key="id" label="deptName"
-                        url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
-                        @selectChange="dicChange('branchName', $event)" style="width:220px"></dic-select>
-                </span>
-                <span style="display: flex;align-items: center;">
-                    开账日期:<avue-date size="small" type="datetime" v-model="openDate" format="yyyy-MM-dd HH:mm:ss"
-                        value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择开张日期"></avue-date>
-                </span>
-            </span>
-            <span v-else-if="title == '账套初始化'">
-                <span style="display: flex;align-items: center;">
-                    所属公司:
-                    <dic-select v-model="branchName" placeholder="所属公司" key="id" label="deptName"
-                        url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
-                        @selectChange="dicChange('branchName', $event)" style="width:220px"></dic-select>
-                </span>
-                <span style="display: flex;align-items: center;">
-                    开账日期:<avue-date size="small" type="datetime" v-model="openDate" format="yyyy-MM-dd HH:mm:ss"
-                        value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择开张日期"></avue-date>
-                </span>
-            </span>
-            <el-dialog v-dialogdrag append-to-body title="凭证明细" :visible.sync="itemOpenDialog" width="50%"
-                :before-close="handleClose2">
-                <span style="display: flex;align-items: center;">
-                    <avue-crud :data="itemForm2.finVouchersItemsList" :option="itemOption2"></avue-crud>
-                </span>
-                <span slot="footer" class="dialog-footer">
-                    <el-button size="mini" @click="itemOpenDialog = false">取 消</el-button>
-                    <el-button size="mini" type="primary" @click="onPeriod()">确 定</el-button>
-                </span>
-            </el-dialog>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="mini" @click="openDialog = false">取 消</el-button>
-                <el-button v-if="title == '开账'" size="mini" type="primary" @click="onBill">确 定</el-button>
-                <el-button v-else-if="title == '账套初始化'" size="mini" type="primary" @click="resetBill">确 定</el-button>
-                <el-button v-else-if="title == '汇兑损益汇率'" size="mini" type="primary" @click="inPeriod">确 定</el-button>
-                <el-button v-else-if="title == '期间损益汇率'" size="mini" type="primary" @click="inPeriod">确 定</el-button>
-            </span>
-        </el-dialog>
-        <el-dialog v-dialogdrag append-to-body title="业务审核未通过明细" :visible.sync="openDialog2" width="50%"
-            :before-close="handleClose3">
-            <span style="display: flex;align-items: center;">
-                <avue-crud :data="dialogData" :option="dialogOption"></avue-crud>
-            </span>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="mini" @click="openDialog2 = false">取 消</el-button>
-                <el-button size="mini" type="primary" @click="exportExcel(1)">导 出</el-button>
-            </span>
-        </el-dialog>
-        <el-dialog v-dialogdrag append-to-body title="凭证未记账数据" :visible.sync="openDialog3" width="50%"
-            :before-close="handleClose4">
-            <span style="display: flex;align-items: center;">
-                <avue-crud :data="dialogData2" :option="dialogOption2"></avue-crud>
-            </span>
-            <span slot="footer" class="dialog-footer">
-                <el-button size="mini" @click="openDialog3 = false">取 消</el-button>
-                <el-button size="mini" type="primary" @click="exportExcel(2)">导 出</el-button>
-            </span>
-        </el-dialog>
-    </div>
+      </el-tabs>
+    </basic-container>
+    <detailsPage v-if="detailsOpen" @goBack="goBack" :onLoad="form" :detailData="detailData"> </detailsPage>
+    <el-dialog v-dialogdrag append-to-body :title="title" :visible.sync="openDialog" width="30%" :before-close="handleClose">
+      <span v-if="title == '汇兑损益汇率'" style="display: flex;align-items: center;">
+        <avue-crud :data="itemData" :option="itemOption"></avue-crud>
+      </span>
+      <span v-if="title == '期间损益汇率'" style="display: flex;align-items: center;">
+        <avue-crud :data="itemData" :option="itemOption"></avue-crud>
+      </span>
+      <span v-else-if="title == '开账'">
+        <span style="display: flex;align-items: center;">
+          所属公司:
+          <dic-select
+            v-model="branchName"
+            placeholder="所属公司"
+            key="id"
+            label="deptName"
+            url="/blade-system/dept/top-list"
+            :filterable="true"
+            :remote="true"
+            dataName="deptName"
+            @selectChange="dicChange('branchName', $event)"
+            style="width:220px"
+          ></dic-select>
+        </span>
+        <span style="display: flex;align-items: center;">
+          开账日期:<avue-date
+            size="small"
+            type="datetime"
+            v-model="openDate"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="请选择开张日期"
+          ></avue-date>
+        </span>
+      </span>
+      <span v-else-if="title == '账套初始化'">
+        <span style="display: flex;align-items: center;">
+          所属公司:
+          <dic-select
+            v-model="branchName"
+            placeholder="所属公司"
+            key="id"
+            label="deptName"
+            url="/blade-system/dept/top-list"
+            :filterable="true"
+            :remote="true"
+            dataName="deptName"
+            @selectChange="dicChange('branchName', $event)"
+            style="width:220px"
+          ></dic-select>
+        </span>
+        <span style="display: flex;align-items: center;">
+          开账日期:<avue-date
+            size="small"
+            type="datetime"
+            v-model="openDate"
+            format="yyyy-MM-dd HH:mm:ss"
+            value-format="yyyy-MM-dd HH:mm:ss"
+            placeholder="请选择开张日期"
+          ></avue-date>
+        </span>
+      </span>
+      <el-dialog v-dialogdrag append-to-body title="凭证明细" :visible.sync="itemOpenDialog" width="50%" :before-close="handleClose2">
+        <span style="display: flex;align-items: center;">
+          <avue-crud :data="itemForm2.finVouchersItemsList" :option="itemOption2"></avue-crud>
+        </span>
+        <span slot="footer" class="dialog-footer">
+          <el-button size="mini" @click="itemOpenDialog = false">取 消</el-button>
+          <el-button size="mini" type="primary" @click="onPeriod()">确 定</el-button>
+        </span>
+      </el-dialog>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="openDialog = false">取 消</el-button>
+        <el-button v-if="title == '开账'" size="mini" type="primary" @click="onBill">确 定</el-button>
+        <el-button v-else-if="title == '账套初始化'" size="mini" type="primary" @click="resetBill">确 定</el-button>
+        <el-button v-else-if="title == '汇兑损益汇率'" size="mini" type="primary" @click="inPeriod">确 定</el-button>
+        <el-button v-else-if="title == '期间损益汇率'" size="mini" type="primary" @click="inPeriod">确 定</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog v-dialogdrag append-to-body title="业务审核未通过明细" :visible.sync="openDialog2" width="50%" :before-close="handleClose3">
+      <span style="display: flex;align-items: center;">
+        <avue-crud :data="dialogData" :option="dialogOption"></avue-crud>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="openDialog2 = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="exportExcel(1)">导 出</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog v-dialogdrag append-to-body title="凭证未记账数据" :visible.sync="openDialog3" width="50%" :before-close="handleClose4">
+      <span style="display: flex;align-items: center;">
+        <avue-crud :data="dialogData2" :option="dialogOption2"></avue-crud>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="openDialog3 = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="exportExcel(2)">导 出</el-button>
+      </span>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-import { getList, currentPeriod, open, init, locking, revokeLocking, close, unclose, generateVouchers, submitPeriod, getPeriodExchangeRate } from "@/api/iosBasicData/periodManagement";
-import detailsPage from "./detailsPage"
+import {
+  getList,
+  currentPeriod,
+  open,
+  init,
+  locking,
+  revokeLocking,
+  close,
+  unclose,
+  generateVouchers,
+  submitPeriod,
+  getPeriodExchangeRate
+} from "@/api/iosBasicData/periodManagement";
+import detailsPage from "./detailsPage";
 import { defaultDate4 } from "@/util/date";
 import { getToken } from "@/util/auth";
 import dicSelect from "@/components/dicSelect/main";
 export default {
-    name: "index",
-    components: {
-        detailsPage,
-        dicSelect
-    },
-    data() {
-        return {
-            itemId: null,
-            dialogOption: {
-                viewBtn: false,
-                editBtn: false,
-                delBtn: false,
-                addBtn: false,
-                index: false,
-                border: true,
-                menu: false,
-                header: false,
-                align: "center",
-                size: "small",
-                column: [
-                    {
-                        label: '业务模块',
-                        prop: 'businessType',
-                        overHidden: true,
-                    },
-                    {
-                        label: '单据号',
-                        prop: 'billNo',
-                        overHidden: true,
-                    },
-                    {
-                        label: '业务日期',
-                        prop: 'businessDate',
-                        overHidden: true,
-                    },
-                    {
-                        label: '提单号',
-                        prop: 'mblno',
-                        overHidden: true,
-                    },
-                    {
-                        label: '操作员',
-                        prop: 'operator',
-                        overHidden: true,
-                    },
-                    {
-                        label: '业务员',
-                        prop: 'salesperson',
-                        overHidden: true,
-                    }
-                ]
-            },
-            openDialog2: false,
-            dialogData: [],
-            dialogOption2: {
-                viewBtn: false,
-                editBtn: false,
-                delBtn: false,
-                addBtn: false,
-                index: false,
-                border: true,
-                menu: false,
-                header: false,
-                align: "center",
-                size: "small",
-                column: [
-                    {
-                        label: '年',
-                        prop: 'year',
-                        overHidden: true,
-                    },
-                    {
-                        label: '月',
-                        prop: 'month',
-                        overHidden: true,
-                    },
-                    {
-                        label: '凭证号',
-                        prop: 'voucherNumber',
-                        overHidden: true,
-                    },
-                    {
-                        label: '凭证日期',
-                        prop: 'voucherDate',
-                        overHidden: true,
-                    },
-                    {
-                        label: '制单人',
-                        prop: 'operator',
-                        overHidden: true,
-                    }
-                ]
-            },
-            openDialog3: false,
-            dialogData2: [],
-            itemForm: {},
-            itemData: [],
-            itemOption: {
-                viewBtn: false,
-                editBtn: false,
-                delBtn: false,
-                addBtn: false,
-                index: false,
-                border: true,
-                menu: false,
-                header: false,
-                align: "center",
-                size: "small",
-                column: [
-                    {
-                        label: '币种代码',
-                        prop: 'curCode'
-                    }, {
-                        label: '币种名称',
-                        prop: 'curName'
-                    }, {
-                        label: '汇率日期',
-                        prop: 'curDate'
-                    }, {
-                        label: '汇率',
-                        prop: 'exrate',
-                        type: 'number',
-                        precision: 4,
-                        step: 4,
-                        cell: true
-                    }
-                ]
-            },
-            itemForm2: {},
-            itemOption2: {
-                viewBtn: false,
-                editBtn: false,
-                delBtn: false,
-                addBtn: false,
-                index: false,
-                border: true,
-                menu: false,
-                header: false,
-                align: "center",
-                size: "small",
-                column: [
-                    {
-                        label: '摘要',
-                        prop: 'descr',
-                        overHidden: true,
-                    },
-                    {
-                        label: '代码名称',
-                        prop: 'accountCode',
-                        overHidden: true,
-                    },
-                    {
-                        label: '本币金额',
-                        overHidden: true,
-                        children: [{
-                            label: '借方',
-                            prop: 'amountDr',
-                            overHidden: true,
-                        }, {
-                            label: '货方',
-                            prop: 'amountCr',
-                            overHidden: true,
-                        }]
-                    },
-                    {
-                        label: '外币金额',
-                        overHidden: true,
-                        children: [{
-                            label: '币种',
-                            prop: 'curCode',
-                            overHidden: true,
-                        }, {
-                            label: '汇率',
-                            prop: 'exrate',
-                            overHidden: true,
-                        }, {
-                            label: '借方',
-                            prop: 'amountDrUsd',
-                            overHidden: true,
-                        }, {
-                            label: '货方',
-                            prop: 'amountCrUsd',
-                            overHidden: true,
-                        }]
-                    }
-                ]
-            },
-            showBut: false,
-            title: '开账',
-            openDate: null,
-            branchName: null,
-            branchId: null,
-            openDialog: false,
-            itemOpenDialog: false,
-            activeName: 'first',
-            detailsOpen: false,
-            loading: false,
-            search: {
-                periodYear: defaultDate4()
-            },
-            form: {},
-            dataList: [],
-            detailData: {},
-            page: {
-                pageSize: 20,
-                currentPage: 1,
-                total: 0,
-                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-            },
-            key: 0,
-            option: {},
-            optionList: {
-                viewBtn: false,
-                editBtn: false,
-                delBtn: false,
-                addBtn: false,
-                index: true,
-                span: 8,
-                border: true,
-                height: "auto",
-                searchMenuPosition: "right",
-                align: "center",
-                size: "small",
-                menuWidth: 200,
-                searchSpan: 8,
-                searchIcon: true,
-                searchIndex: 2,
-                dialogWidth: "70%",
-                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: true,
-                    },
-                    {
-                        label: '会计年度',
-                        prop: "periodYear",
-                        search: true,
-                        overHidden: true,
-                        hide: true,
-                        type: "year",
-                        valueFormat: "yyyy"
-                    },
-                    {
-                        label: '所属公司',
-                        prop: "branchName",
-                        width: "120",
-                        overHidden: true,
-                    },
-                    {
-                        label: '期间',
-                        prop: "periodDate",
-                        overHidden: true,
-                    },
-                    {
-                        label: '开始时间',
-                        prop: "beginDate",
-                        search: true,
-                        overHidden: true,
-                        type: "date",
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd 00:00:00"
-                    },
-                    {
-                        label: '结束时间',
-                        prop: "endDate",
-                        type: "date",
-                        overHidden: true,
-                        search: true,
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd 23:59:59"
-                    },
-                    {
-                        label: '结转状态',
-                        prop: "isClosed",
-                        type: 'select',
-                        overHidden: true,
-                        search: true,
-                        dicData: [
-                            {
-                                label: '未结转',
-                                value: 0,
-                            }, {
-                                label: '已结转',
-                                value: 1,
-                            }
-                        ]
-                    },
-                    {
-                        label: '结转时间',
-                        prop: "closeDate",
-                        searchProp: "closeDateList",
-                        overHidden: true,
-                        search: true,
-                        type: "date",
-                        searchRange: true,
-                        searchDefaultTime: ["00:00:00", "23:59:59"],
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd HH:mm:ss"
-                    }
-                ]
-            },
-            search2: {},
-            form2: {},
-            dataList2: [],
-            detailData2: {},
-            option2: {},
-            optionList2: {
-                viewBtn: false,
-                editBtn: false,
-                delBtn: false,
-                addBtn: false,
-                index: true,
-                span: 8,
-                border: true,
-                height: "auto",
-                searchMenuPosition: "right",
-                align: "center",
-                size: "small",
-                menuWidth: 200,
-                dialogWidth: "70%",
-                column: [
-                    {
-                        label: '结转凭证',
-                        prop: "descr",
-                        overHidden: true,
-                    },
-                    {
-                        label: '开始时间',
-                        prop: "date",
-                        overHidden: true,
-                    },
-                    {
-                        label: '状态',
-                        prop: "status",
-                        type: 'select',
-                        overHidden: true,
-                        dicData: [
-                            {
-                                label: '未生成',
-                                value: 0,
-                            }, {
-                                label: '已生成',
-                                value: 1,
-                            }
-                        ]
-                    }
-                ]
+  name: "index",
+  components: {
+    detailsPage,
+    dicSelect
+  },
+  data() {
+    return {
+      itemId: null,
+      dialogOption: {
+        height: 500,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: false,
+        border: true,
+        menu: false,
+        header: false,
+        align: "center",
+        size: "small",
+        column: [
+          {
+            label: "业务模块",
+            prop: "businessType",
+            overHidden: true
+          },
+          {
+            label: "单据号",
+            prop: "billNo",
+            overHidden: true
+          },
+          {
+            label: "业务日期",
+            prop: "businessDate",
+            overHidden: true
+          },
+          {
+            label: "提单号",
+            prop: "mblno",
+            overHidden: true
+          },
+          {
+            label: "操作员",
+            prop: "operator",
+            overHidden: true
+          },
+          {
+            label: "业务员",
+            prop: "salesperson",
+            overHidden: true
+          }
+        ]
+      },
+      openDialog2: false,
+      dialogData: [],
+      dialogOption2: {
+        height: 500,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: false,
+        border: true,
+        menu: false,
+        header: false,
+        align: "center",
+        size: "small",
+        column: [
+          {
+            label: "年",
+            prop: "year",
+            overHidden: true
+          },
+          {
+            label: "月",
+            prop: "month",
+            overHidden: true
+          },
+          {
+            label: "凭证号",
+            prop: "voucherNumber",
+            overHidden: true
+          },
+          {
+            label: "凭证日期",
+            prop: "voucherDate",
+            overHidden: true
+          },
+          {
+            label: "制单人",
+            prop: "operator",
+            overHidden: true
+          }
+        ]
+      },
+      openDialog3: false,
+      dialogData2: [],
+      itemForm: {},
+      itemData: [],
+      itemOption: {
+        height: 500,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: false,
+        border: true,
+        menu: false,
+        header: false,
+        align: "center",
+        size: "small",
+        column: [
+          {
+            label: "币种代码",
+            prop: "curCode"
+          },
+          {
+            label: "币种名称",
+            prop: "curName"
+          },
+          {
+            label: "汇率日期",
+            prop: "curDate"
+          },
+          {
+            label: "汇率",
+            prop: "exrate",
+            type: "number",
+            precision: 4,
+            step: 4,
+            cell: true
+          }
+        ]
+      },
+      itemForm2: {},
+      itemOption2: {
+        height: 500,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: false,
+        border: true,
+        menu: false,
+        header: false,
+        align: "center",
+        size: "small",
+        column: [
+          {
+            label: "摘要",
+            prop: "descr",
+            overHidden: true
+          },
+          {
+            label: "代码名称",
+            prop: "accountCode",
+            overHidden: true
+          },
+          {
+            label: "本币金额",
+            overHidden: true,
+            children: [
+              {
+                label: "借方",
+                prop: "amountDr",
+                overHidden: true
+              },
+              {
+                label: "货方",
+                prop: "amountCr",
+                overHidden: true
+              }
+            ]
+          },
+          {
+            label: "外币金额",
+            overHidden: true,
+            children: [
+              {
+                label: "币种",
+                prop: "curCode",
+                overHidden: true
+              },
+              {
+                label: "汇率",
+                prop: "exrate",
+                overHidden: true
+              },
+              {
+                label: "借方",
+                prop: "amountDrUsd",
+                overHidden: true
+              },
+              {
+                label: "货方",
+                prop: "amountCrUsd",
+                overHidden: true
+              }
+            ]
+          }
+        ]
+      },
+      showBut: false,
+      title: "开账",
+      openDate: null,
+      branchName: null,
+      branchId: null,
+      openDialog: false,
+      itemOpenDialog: false,
+      activeName: "first",
+      detailsOpen: false,
+      loading: false,
+      search: {
+        periodYear: defaultDate4()
+      },
+      form: {},
+      dataList: [],
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      key: 0,
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        size: "small",
+        menuWidth: 200,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        dialogWidth: "70%",
+        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: true
+          },
+          {
+            label: "会计年度",
+            prop: "periodYear",
+            search: true,
+            overHidden: true,
+            hide: true,
+            type: "year",
+            valueFormat: "yyyy"
+          },
+          {
+            label: "所属公司",
+            prop: "branchName",
+            width: "120",
+            overHidden: true
+          },
+          {
+            label: "期间",
+            prop: "periodDate",
+            overHidden: true
+          },
+          {
+            label: "开始时间",
+            prop: "beginDate",
+            search: true,
+            overHidden: true,
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00"
+          },
+          {
+            label: "结束时间",
+            prop: "endDate",
+            type: "date",
+            overHidden: true,
+            search: true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 23:59:59"
+          },
+          {
+            label: "结转状态",
+            prop: "isClosed",
+            type: "select",
+            overHidden: true,
+            search: true,
+            dicData: [
+              {
+                label: "未结转",
+                value: 0
+              },
+              {
+                label: "已结转",
+                value: 1
+              }
+            ]
+          },
+          {
+            label: "结转时间",
+            prop: "closeDate",
+            searchProp: "closeDateList",
+            overHidden: true,
+            search: true,
+            type: "date",
+            searchRange: true,
+            searchDefaultTime: ["00:00:00", "23:59:59"],
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss"
+          }
+        ]
+      },
+      search2: {},
+      form2: {},
+      dataList2: [],
+      detailData2: {},
+      option2: {},
+      optionList2: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        size: "small",
+        menuWidth: 200,
+        dialogWidth: "70%",
+        column: [
+          {
+            label: "结转凭证",
+            prop: "descr",
+            overHidden: true
+          },
+          {
+            label: "开始时间",
+            prop: "date",
+            overHidden: true
+          },
+          {
+            label: "状态",
+            prop: "status",
+            type: "select",
+            overHidden: true,
+            dicData: [
+              {
+                label: "未生成",
+                value: 0
+              },
+              {
+                label: "已生成",
+                value: 1
+              }
+            ]
+          }
+        ]
+      }
+    };
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(366), this.optionList);
+    this.option2 = await this.getColumnData(this.getColumnName(367), this.optionList2);
+  },
+  methods: {
+    dicChange(name, row) {
+      if (name == "branchName") {
+        if (row) {
+          this.branchId = row.id;
+        } else {
+          this.branchId = null;
+          this.branchName = null;
         }
+      }
     },
-    async created() {
-        this.option = await this.getColumnData(this.getColumnName(366), this.optionList);
-        this.option2 = await this.getColumnData(this.getColumnName(367), this.optionList2);
+    exportExcel(type) {
+      const routeData = this.$router.resolve({
+        path: "/api/blade-los/finperiod/export", //跳转目标窗口的地址
+        query: {
+          "Blade-Auth": getToken(),
+          id: this.itemId
+        }
+      });
+      window.open(routeData.href.slice(1, routeData.href.length));
+      if (type == 1) {
+        this.handleClose3();
+      } else {
+        this.handleClose4();
+      }
     },
-    methods: {
-        dicChange(name, row) {
-            if (name == 'branchName') {
-                if (row) {
-                    this.branchId = row.id
-                } else {
-                    this.branchId = null
-                    this.branchName = null
-                }
-            }
-        },
-        exportExcel(type) {
-            const routeData = this.$router.resolve({
-                path: '/api/blade-los/finperiod/export',      //跳转目标窗口的地址
-                query: {
-                    'Blade-Auth': getToken(),
-                    'id': this.itemId,
-                }
-            })
-            window.open(routeData.href.slice(1, routeData.href.length));
-            if (type == 1) {
-                this.handleClose3()
-            } else {
-                this.handleClose4()
-            }
-        },
-        lock(row, type) {
-            if (type == '1') {
-                this.$confirm('是否锁定?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    this.loading = true
-                    locking({ id: row.id }).then(res => {
-                        if (res.data.msg == '审核未通过') {
-                            this.loading = false
-                            this.openDialog2 = true
-                            this.itemId = row.id
-                            this.dialogData = res.data.data
-                        } else if (res.data.msg == '凭证未记账') {
-                            this.loading = false
-                            this.openDialog3 = true
-                            this.itemId = row.id
-                            this.dialogData2 = res.data.data
-                        } else {
-                            this.loading = false
-                            this.$message.success("锁定成功");
-                            this.handleClick(this.activeName)
-
-                        }
-
-                    }).finally(() => {
-                        this.loading = false
-                    })
-                })
-            } else {
-                this.$confirm('是否撤销锁定?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    this.loading = true
-                    revokeLocking({ id: row.id }).then(res => {
-                        this.loading = false
-                        this.$message.success("撤销锁定");
-                        this.handleClick(this.activeName)
-                    }).finally(() => {
-                        this.loading = false
-                    })
-                })
-            }
-        },
-        inClose(row, type) {
-            if (type == '1') {
-                this.$confirm('是否结转?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    this.loading = true
-                    close({ id: row.id }).then(res => {
-                        this.loading = false
-                        this.$message.success("结转成功");
-                        this.handleClick(this.activeName)
-                    }).finally(() => {
-                        this.loading = false
-                    })
-                })
-            } else {
-                this.$confirm('是否反结转?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    this.loading = true
-                    unclose({ id: row.id }).then(res => {
-                        this.loading = false
-                        this.$message.success("反结转成功");
-                        this.handleClick(this.activeName)
-                    }).finally(() => {
-                        this.loading = false
-                    })
-                })
-            }
-        },
-        onBill() {
-            this.$confirm('确认开账?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                this.loading = true
-                open({ beginDate: this.openDate,branchId: this.branchId, branchName: this.branchName }).then(res => {
-                    this.$message.success("开账成功");
-                    this.handleClick(this.activeName)
-                    this.handleClose()
-                }).finally(() => {
-                    this.loading = false
-                })
-            })
-        },
-        handleClose() {
-            this.itemForm = {}
-            this.openDate = null
-            this.branchId = null
-            this.branchName = null
-            this.openDialog = false
-        },
-        handleClose2() {
-            this.itemData2 = []
-            this.itemOpenDialog = false
-        },
-        handleClose3() {
-            this.itemId = null
-            this.dialogData = []
-            this.openDialog2 = false
-        },
-        handleClose4() {
-            this.itemId = null
-            this.dialogData2 = []
-            this.openDialog3 = false
-        },
-        resetBill() {
-            this.$confirm('确认账套初始化?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                this.loading = true
-                init({ beginDate: this.openDate, branchId: this.branchId, branchName: this.branchName }).then(res => {
-                    this.loading = false
-                    this.$message.success("初始化成功");
-                    this.handleClick(this.activeName)
-                    this.handleClose()
-                }).finally(() => {
-                    this.loading = false
-                })
+    lock(row, type) {
+      if (type == "1") {
+        this.$confirm("是否锁定?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.loading = true;
+          locking({ id: row.id })
+            .then(res => {
+              if (res.data.msg == "审核未通过") {
+                this.loading = false;
+                this.openDialog2 = true;
+                this.itemId = row.id;
+                this.dialogData = res.data.data;
+              } else if (res.data.msg == "凭证未记账") {
+                this.loading = false;
+                this.openDialog3 = true;
+                this.itemId = row.id;
+                this.dialogData2 = res.data.data;
+              } else {
+                this.loading = false;
+                this.$message.success("锁定成功");
+                this.handleClick(this.activeName);
+              }
             })
-        },
-        handleClick(val) {
-            if (val == 'first') {
-                this.onLoad(this.page, this.search)
-            } else {
-                this.onLoad2(this.search2)
-            }
-        },
-        goBack(type) {
-            this.form = {}
-            this.detailsOpen = false
-            this.onLoad(this.page, this.search)
-        },
-        editOpen(row, status) {
-            this.form = row
-            this.detailData = {
-                id: row.id,
-                type: row.bsType,
-                status: status
-            };
-            this.detailsOpen = true;
-        },
-        generate(row) {
-            this.openDialog = true;
-            this.itemForm = row;
-            this.title = row.bsType == 'FM-CURRENCY-PL-TRANSFER' ? '汇兑损益汇率' : '期间损益汇率';
-            getPeriodExchangeRate().then(res => {
-                res.data.data.forEach(e => {
-                    e.$cellEdit = true
-                })
-                this.itemData = res.data.data
+            .finally(() => {
+              this.loading = false;
+            });
+        });
+      } else {
+        this.$confirm("是否撤销锁定?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.loading = true;
+          revokeLocking({ id: row.id })
+            .then(res => {
+              this.loading = false;
+              this.$message.success("撤销锁定");
+              this.handleClick(this.activeName);
             })
-        },
-        inPeriod() {
-            let obj = {}
-            obj = { ...this.itemForm, exchangeRateList: this.itemData }
-
-            generateVouchers(obj).then(res => {
-                console.log(res)
-                this.itemForm2 = res.data.data
-                this.handleClose()
-                this.itemOpenDialog = true
+            .finally(() => {
+              this.loading = false;
+            });
+        });
+      }
+    },
+    inClose(row, type) {
+      if (type == "1") {
+        this.$confirm("是否结转?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.loading = true;
+          close({ id: row.id })
+            .then(res => {
+              this.loading = false;
+              this.$message.success("结转成功");
+              this.handleClick(this.activeName);
             })
-
-        },
-        onPeriod() {
-            if (this.itemForm2.finVouchersItemsList.length == 0) {
-                return this.$message.error("明细不能为空");
-            }
-            this.$confirm('确定保存凭证?', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            }).then(() => {
-                this.loading = true
-                submitPeriod(this.itemForm2).then(res => {
-                    this.$message.success("保存成功");
-                    this.handleClose2()
-                }).finally(() => {
-                    this.loading = false
-                })
+            .finally(() => {
+              this.loading = false;
+            });
+        });
+      } else {
+        this.$confirm("是否反结转?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          this.loading = true;
+          unclose({ id: row.id })
+            .then(res => {
+              this.loading = false;
+              this.$message.success("反结转成功");
+              this.handleClick(this.activeName);
             })
+            .finally(() => {
+              this.loading = false;
+            });
+        });
+      }
+    },
+    onBill() {
+      this.$confirm("确认开账?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.loading = true;
+        open({ beginDate: this.openDate, branchId: this.branchId, branchName: this.branchName })
+          .then(res => {
+            this.$message.success("开账成功");
+            this.handleClick(this.activeName);
+            this.handleClose();
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      });
+    },
+    handleClose() {
+      this.itemForm = {};
+      this.openDate = null;
+      this.branchId = null;
+      this.branchName = null;
+      this.openDialog = false;
+    },
+    handleClose2() {
+      this.itemData2 = [];
+      this.itemOpenDialog = false;
+    },
+    handleClose3() {
+      this.itemId = null;
+      this.dialogData = [];
+      this.openDialog2 = false;
+    },
+    handleClose4() {
+      this.itemId = null;
+      this.dialogData2 = [];
+      this.openDialog3 = false;
+    },
+    resetBill() {
+      this.$confirm("确认账套初始化?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.loading = true;
+        init({ beginDate: this.openDate, branchId: this.branchId, branchName: this.branchName })
+          .then(res => {
+            this.loading = false;
+            this.$message.success("初始化成功");
+            this.handleClick(this.activeName);
+            this.handleClose();
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      });
+    },
+    handleClick(val) {
+      if (val == "first") {
+        this.onLoad(this.page, this.search);
+      } else {
+        this.onLoad2(this.search2);
+      }
+    },
+    goBack(type) {
+      this.form = {};
+      this.detailsOpen = false;
+      this.onLoad(this.page, this.search);
+    },
+    editOpen(row, status) {
+      this.form = row;
+      this.detailData = {
+        id: row.id,
+        type: row.bsType,
+        status: status
+      };
+      this.detailsOpen = true;
+    },
+    generate(row) {
+      this.openDialog = true;
+      this.itemForm = row;
+      this.title = row.bsType == "FM-CURRENCY-PL-TRANSFER" ? "汇兑损益汇率" : "期间损益汇率";
+      getPeriodExchangeRate().then(res => {
+        res.data.data.forEach(e => {
+          e.$cellEdit = true;
+        });
+        this.itemData = res.data.data;
+      });
+    },
+    inPeriod() {
+      let obj = {};
+      obj = { ...this.itemForm, exchangeRateList: this.itemData };
 
-        },
-        //刷新
-        refreshChange() {
-            this.onLoad(this.page, this.search)
-        },
-        searchChange(params, done) {
-            this.page.currentPage = 1
-            done();
-            this.onLoad(this.page, params)
-        },
-        onLoad(page, params = {}) {
-            console.log(params)
-            params = {
-                ...Object.assign(params, this.search),
-                current: page.currentPage,
-                size: page.pageSize,
-            }
-            this.loading = true
-            getList(params).then(res => {
-                this.dataList = res.data.data.records
-                this.page.total = res.data.data.total;
-                this.showBut = res.data.data.records.length == 0 ? true : false;
-                this.loading = false
-                this.$nextTick(() => {
-                    this.$refs.crud.doLayout();
-                    this.$refs.crud.dicInit();
-                });
-            }).finally(() => {
-                this.loading = false
-            })
-        },
-        //刷新
-        refreshChange2() {
-            this.onLoad2(this.search)
-        },
-        searchChange2(params, done) {
-            this.page.currentPage = 1
-            done();
-            this.onLoad(params)
-        },
-        onLoad2(page, params = {}) {
-            params = {
-                ...params
-            }
-            this.loading = true
-            currentPeriod(params).then(res => {
-                this.dataList2 = res.data.data
-                this.loading = false
-            }).finally(() => {
-                this.loading = false
-            })
-        },
-        //自定义列保存
-        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 (inSave) {
-                this.$message.success("重置成功");
-                this.$refs[ref].$refs.dialogColumn.columnBox = false;
-            }
-        }
+      generateVouchers(obj).then(res => {
+        console.log(res);
+        this.itemForm2 = res.data.data;
+        this.handleClose();
+        this.itemOpenDialog = true;
+      });
+    },
+    onPeriod() {
+      if (this.itemForm2.finVouchersItemsList.length == 0) {
+        return this.$message.error("明细不能为空");
+      }
+      this.$confirm("确定保存凭证?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        this.loading = true;
+        submitPeriod(this.itemForm2)
+          .then(res => {
+            this.$message.success("保存成功");
+            this.handleClose2();
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      });
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      done();
+      this.onLoad(this.page, params);
+    },
+    onLoad(page, params = {}) {
+      console.log(params);
+      params = {
+        ...Object.assign(params, this.search),
+        current: page.currentPage,
+        size: page.pageSize
+      };
+      this.loading = true;
+      getList(params)
+        .then(res => {
+          this.dataList = res.data.data.records;
+          this.page.total = res.data.data.total;
+          this.showBut = res.data.data.records.length == 0 ? true : false;
+          this.loading = false;
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+            this.$refs.crud.dicInit();
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    //刷新
+    refreshChange2() {
+      this.onLoad2(this.search);
+    },
+    searchChange2(params, done) {
+      this.page.currentPage = 1;
+      done();
+      this.onLoad(params);
+    },
+    onLoad2(page, params = {}) {
+      params = {
+        ...params
+      };
+      this.loading = true;
+      currentPeriod(params)
+        .then(res => {
+          this.dataList2 = res.data.data;
+          this.loading = false;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    //自定义列保存
+    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 (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
     }
-}
+  }
+};
 </script>
 
 <style scoped>
 .bottomBox {
-    padding: 3px 6px;
-    border-radius: 12px;
-    color: #fff;
-    font-size: 10px;
+  padding: 3px 6px;
+  border-radius: 12px;
+  color: #fff;
+  font-size: 10px;
 }
-</style>
+</style>