Browse Source

货代 11.15

caojunjie 1 year ago
parent
commit
8dff0b5b08

+ 32 - 1
src/api/iosBasicData/finstlbills.js

@@ -74,12 +74,43 @@ export const finstlbillsRevokeSignFor = (row) => {
     data: row
   })
 }
+// 对账确认
+export const finstlbillsConfirmReconciliation = (row) => {
+  return request({
+    url: '/api/blade-los/finstlbills/confirmReconciliation',
+    method: 'post',
+    data: row
+  })
+}
+// 对账撤销
+export const finstlbillsRevokeReconciliation = (row) => {
+  return request({
+    url: '/api/blade-los/finstlbills/revokeReconciliation',
+    method: 'post',
+    data: row
+  })
+}
+// 新增
+export const finstlbillsitemsList = (current, size, params) => {
+  return request({
+    url: '/api/blade-los/finstlbillsitems/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+
 
 // /blade-los/finstlbills/   业务-财务对账单和结算 签收接口   post
 // 财务对账单 确认
-// confirmReconciliation
+//confirmReconciliation
 // 财务对账单 撤销
 // revokeReconciliation
+
 // 财务结算 确认
 // confirmSettlement
 // 财务结算 撤销

+ 18 - 2
src/router/views/index.js

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

+ 13 - 20
src/views/billM/expenseCenter/index.vue

@@ -158,8 +158,6 @@ export default {
             }],
             prop: "dc"
           },
-
-
           {
             label: "计量单位",
             prop: "unitNo"
@@ -611,24 +609,19 @@ export default {
           //     trigger: "blur"
           //   }]
           // },
-          // {
-          //   label: "去税金额",
-          //   prop: "amountNet",
-          //   rules: [{
-          //     required: true,
-          //     message: "请输入去税金额",
-          //     trigger: "blur"
-          //   }]
-          // },
-          // {
-          //   label: "税额",
-          //   prop: "amountTax",
-          //   rules: [{
-          //     required: true,
-          //     message: "请输入税额",
-          //     trigger: "blur"
-          //   }]
-          // },
+          {
+            label: "去税金额",
+            prop: "amountNet",
+          },
+          {
+            label: "税额",
+            prop: "amountTax",
+          },
+          {
+            label: "税额",
+            prop: "amountTax",
+          },
+
           // {
           //   label: "金额,amount_tax + amount_net - amount_discount",
           //   prop: "amount",

+ 1 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/containers.vue

@@ -359,6 +359,7 @@ import {
               type: "success",
               message: "操作成功!"
             });
+            this.$emit('billsDetailfun')
           });
       },
       handleDelete() {

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

@@ -915,7 +915,7 @@ import Vue from "vue";
             // // 包装
             // this.packingUnitBpackagesListfun()
             // // 船公司
-            // this.carrierBcorpslistByTypefun()
+            this.carrierBcorpslistByTypefun()
             // // 船名
             // this.vesselBvesselsListfun()
             // // 航线

+ 0 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -1207,7 +1207,6 @@
             // 获取币别数据
             getRateListfun(cnName){
                 getRateList({current:1,size:10,cnName}).then(res=>{
-                    console.log(res.data.data,1013)
                     this.curCodeData = res.data.data.records
                 })
             },

+ 29 - 50
src/views/iosBasicData/SeafreightExportF/bills/assembly/formbottom.vue

@@ -163,12 +163,12 @@
                         </span>
                         <search-query :datalist="numberOfData"
                                       :selectValue="assemblyForm.numberOfObl"
-                                      :filterable="true"
                                       :clearable="true"
-                                      :remote="true"
                                       :disabled="detailData.seeDisabled"
                                       :buttonIf="false"
-                                      @corpChange="corpChange($event,'numberOfObl')">
+                                      :forParameter="{key:'dictKey',label:'dictValue',value:'dictValue',}"
+                                      @corpChange="corpChange($event,'Obl')"
+                                      @corpFocus="remoteMethod($event, 'numberOfObl')">
                         </search-query>
                     </el-form-item>
                 </el-col>
@@ -179,12 +179,12 @@
                         </span>
                         <search-query :datalist="numberOfData"
                                       :selectValue="assemblyForm.numberOfCopy"
-                                      :filterable="true"
                                       :clearable="true"
-                                      :remote="true"
                                       :disabled="detailData.seeDisabled"
                                       :buttonIf="false"
-                                      @corpChange="corpChange($event,'numberOfCopy')">
+                                      :forParameter="{key:'dictKey',label:'dictValue',value:'dictValue',}"
+                                      @corpChange="corpChange($event,'Copy')"
+                                      @corpFocus="remoteMethod($event, 'numberOfCopy')">
                         </search-query>
                     </el-form-item>
                 </el-col>
@@ -401,48 +401,7 @@
                 inttraTitle:'',
                 inttraData:[],
                 // 份数
-                numberOfData:[
-                    {
-                        label:'ONE',
-                        value:'ONE'
-                    },
-                    {
-                        label:'TWO',
-                        value:'TWO'
-                    },
-                    {
-                        label:'THREE',
-                        value:'THREE'
-                    },
-                    {
-                        label:'FOUR',
-                        value:'FOUR'
-                    },
-                    {
-                        label:'FIVE',
-                        value:'FIVE'
-                    },
-                    {
-                        label:'SIX',
-                        value:'SIX'
-                    },
-                    {
-                        label:'SEVEN',
-                        value:'SEVEN'
-                    },
-                    {
-                        label:'EIGHT',
-                        value:'EIGHT'
-                    },
-                    {
-                        label:'NINE',
-                        value:'NINE'
-                    },
-                    {
-                        label:'TEN',
-                        value:'TEN'
-                    }
-                ],
+                numberOfData:[],
                 // 签单方式
                 issueTypeData:[],
                 // 装箱方式
@@ -492,6 +451,7 @@
             // 远程搜索
             remoteMethod(value,name){
                 let inttraArr = ['inttraDoorTo','inttraToDoor']
+                let numberOfArr = ['numberOfObl','numberOfCopy']
                 if (name == 'cy') {
                     this.cyBcorpslistByType(value)
                 }else if (inttraArr.indexOf(name) != -1) {
@@ -499,11 +459,17 @@
                 }else if (name == 'issueType') {
                     // 签单方式
                     this.getWorkDictsfun()
-                } else {}
+                }
+                // 份数
+                else if (numberOfArr.indexOf(name) != -1) {
+                    this.numberoforiginalWorkDicts()
+                }
+                else {}
             },
             // 选择框的回调
             corpChange(value,name){
                 let inttraArr = ['inttraDoorTo','inttraToDoor']
+                let numberOfArr = ['Obl','Copy']
                 if (name == 'cy') {
                     for(let item of this.cyData) {
                         if (item.cnName == value) {
@@ -528,6 +494,15 @@
                         }
                     }
                 }
+                // 份数
+                else if (numberOfArr.indexOf(name) != -1) {
+                    for(let item of this.numberOfData) {
+                        if (item.dictValue == value) {
+                            this.$set(this.assemblyForm,'numberOf' + name,item.dictValue)
+                            this.$set(this.assemblyForm,'numberOf' + name + 'Digit',item.dictKey)
+                        }
+                    }
+                }
                 else {
                     this.assemblyForm[name] = value
                 }
@@ -595,7 +570,11 @@
                     this.issueTypeData = res.data.data
                 })
             },
-
+            numberoforiginalWorkDicts(){
+                getWorkDicts('number_of_original').then(res=>{
+                    this.numberOfData = res.data.data
+                })
+            },
 
 
         }

+ 5 - 1
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -1199,7 +1199,11 @@ import {dateFormat} from "@/util/date";
                 }
                 // 船公司
                 if (this.form.carrierCnName) {
-                    this.form.carrierCnName = this.form.carrierCnName + ' - ' + this.form.carrierCode
+                    let corpType = '1712286570540703745'
+                    getBcorpslistByType(1,10,{cnName:this.form.carrierCnName,corpType}).then(res=>{
+                        this.form.carrierCnName = this.form.carrierCnName + ' - ' + res.data.data.records[0].code
+                    })
+                    // this.form.carrierCnName = this.form.carrierCnName + ' - ' + this.form.carrierCode
                 }
             },
             // tbas切换

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

@@ -310,11 +310,16 @@
                   </span>
               </template>
               <template slot="corpCnName" slot-scope="scope">
-                  <span style="color: #1e9fff;cursor: pointer;"
+                  <span style="color: #1e9fff;cursor: pointer;width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;"
                         @click.stop="rowCellfun(scope.row.id, scope.index)" >
                       {{scope.row.corpCnName}}
                   </span>
               </template>
+              <template slot="corpEnName" slot-scope="scope">
+                  <span style="width: 100%;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;">
+                      {{scope.row.corpEnName}}
+                  </span>
+              </template>
           </avue-crud>
       </basic-container>
 

+ 13 - 2
src/views/iosBasicData/blines/index.vue

@@ -453,6 +453,9 @@ export default {
       // this.form.extendedDataArr.map(item => {
       //   item.edit = false
       // })
+        if (!(this.form.extendedDataArr instanceof Array)) {
+            this.form.extendedDataArr = []
+        }
       this.form.extendedDataArr.push({
         edit: true
       })
@@ -531,7 +534,11 @@ export default {
       row.extendedDataArr.map(item => {
         delete item.edit
       })
-      row.extendedData = JSON.stringify(row.extendedDataArr)
+        if (row.extendedDataArr.length == 0) {
+            row.extendedData = null
+        }else {
+            row.extendedData = JSON.stringify(row.extendedDataArr)
+        }
       delete row.extendedDataArr
       blinesSubmit(row).then(() => {
         this.onLoad(this.page);
@@ -549,7 +556,11 @@ export default {
       row.extendedDataArr.map(item => {
         delete item.edit
       })
-      row.extendedData = JSON.stringify(row.extendedDataArr)
+        if (row.extendedDataArr.length == 0) {
+            row.extendedData = null
+        }else {
+            row.extendedData = JSON.stringify(row.extendedDataArr)
+        }
       delete row.extendedDataArr
       blinesSubmit(row).then(() => {
         this.onLoad(this.page);

+ 10 - 2
src/views/iosBasicData/bvessels/index.vue

@@ -618,7 +618,11 @@ export default {
           delete item.edit
         })
       }
-      row.extendedData = JSON.stringify(row.extendedDataArr)
+      if (row.extendedDataArr.length == 0) {
+          row.extendedData = null
+      }else {
+          row.extendedData = JSON.stringify(row.extendedDataArr)
+      }
       delete row.extendedDataArr
       addBvessels(row).then(() => {
         this.onLoad(this.page);
@@ -639,7 +643,11 @@ export default {
           delete item.edit
         })
       }
-      row.extendedData = JSON.stringify(row.extendedDataArr)
+        if (row.extendedDataArr.length == 0) {
+            row.extendedData = null
+        }else {
+            row.extendedData = JSON.stringify(row.extendedDataArr)
+        }
       delete row.extendedDataArr
       updateBvessels(row).then(() => {
         this.onLoad(this.page);

+ 105 - 13
src/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue

@@ -8,8 +8,12 @@
             :data="tableData"
             border
             style="width: 100%"
-            @selection-change="handleSelectionChange" >
+            @selection-change="handleSelectionChange"
+            @mousedown="handleMouseDown"
+            @mousemove="handleMouseMove"
+            @mouseup="handleMouseUp" >
             <el-table-column
+                v-if="brfalse"
                 type="selection"
                 width="55">
                 <template slot-scope="scope">
@@ -21,7 +25,7 @@
             </el-table-column>
             <el-table-column
                 prop="lineNo"
-                label="行号">
+                label="行号" width="50px">
             </el-table-column>
             <el-table-column
                 prop="lineNo"
@@ -70,7 +74,7 @@
             </el-table-column>
             <el-table-column
                 prop="tableSelect"
-                label="选择" width="50px">
+                label="选择" width="50px" v-if="brfalse">
                 <template slot-scope="scope">
                     <el-checkbox v-model="scope.row.tableSelect"
                                  :true-label="1" :false-label="0"
@@ -81,17 +85,29 @@
             <el-table-column
                 prop="isChecked"
                 label="对账">
-                <template slot-scope="scope">
-                    12313
+                <template slot-scope="{row}">
+                    <span v-if="row.isChecked == item.dictKey" v-for="item in ifInvoiceData" :key="item.dictKey">
+                        {{item.dictValue}}
+                    </span>
                 </template>
             </el-table-column>
             <el-table-column
                 prop="isSignfor"
                 label="签收">
+                <template slot-scope="{ row }">
+                    <span v-if="row.isSignfor == item.dictKey" v-for="item in ifInvoiceData" :key="item.dictKey">
+                        {{item.dictValue}}
+                    </span>
+                </template>
             </el-table-column>
             <el-table-column
                 prop="isInvoice"
                 label="发票状态">
+                <template slot-scope="{row}">
+                    <span v-if="row.isInvoice == item.dictKey" v-for="item in invoicelosDara" :key="item.id">
+                        {{item.dictValue}}
+                    </span>
+                </template>
             </el-table-column>
             <el-table-column
                 prop="etd"
@@ -177,6 +193,7 @@
                     <span class="textHide" >{{row.billNo}}</span>
                 </template>
             </el-table-column>
+            <!--currentStlDiscount-->
             <el-table-column
                 prop="dc"
                 label="收/付">
@@ -234,28 +251,46 @@
                     <span class="textHide" >{{row.voyageNo}}</span>
                 </template>
             </el-table-column>
-
+            <el-table-column
+                label="本次结算币种"
+                prop="currentStlCurCode" width="130px">
+                <template slot-scope="{row}">
+                    <search-query :datalist="curCodeData"
+                                  :selectValue="row.curCode"
+                                  :filterable="true"
+                                  :clearable="true"
+                                  :remote="true"
+                                  :buttonIf="false"
+                                  :forParameter="{key:'id',label:'code',value:'code'}"
+                                  @remoteMethod="getRateListfun"
+                                  @corpChange="corpChange($event,row)"
+                                  @corpFocus="getRateListfun">
+                    </search-query>
+                </template>
+            </el-table-column>
             <el-table-column label="本次结算金额">
                 <!--默认应结算 可以修改-->
                 <!--currentStlAmount-->
                 <el-table-column
                     prop="currentStlAmountRMB"
-                    label="RMB">
+                    label="RMB" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB"
+                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
                                   size="mini" autocomplete="off"
                                   clearable placeholder="请输入USD" >
                         </el-input>
+                        <span v-else>{{scope.row.currentStlAmountRMB}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column
                     prop="currentStlAmountUSD"
-                    label="USD" width="150px">
+                    label="USD" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD"
+                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
                                   size="mini" autocomplete="off"
                                   clearable placeholder="请输入USD" >
                         </el-input>
+                        <span v-else>{{scope.row.currentStlAmountUSD}}</span>
                     </template>
                 </el-table-column>
             </el-table-column>
@@ -263,10 +298,11 @@
                 prop="remarkss"
                 label="备注" width="150px">
                 <template slot-scope="scope">
-                    <el-input style="width: 100%;" v-model="scope.row.remarkss"
+                    <el-input style="width: 100%;" v-model="scope.row.remarkss" v-if="brfalse"
                               size="mini" autocomplete="off"
                               clearable placeholder="请输入备注" >
                     </el-input>
+                    <span v-else>{{scope.row.remarkss}}</span>
                 </template>
             </el-table-column>
 
@@ -276,18 +312,33 @@
 </template>
 
 <script>
+    import {getWorkDicts} from "@/api/system/dictbiz";
+    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+    import {getRateList} from "@/api/iosBasicData/rateManagement";
+
     export default {
+        components: {SearchQuery},
         props:{
             tableData:{
                 type:Array,
-                default:[]
+                default:[],
+            },
+            brfalse:{
+                type:Boolean,
+                default:true,
             }
         },
         data(){
             return {
-
+                ifInvoiceData:[], // 是否数据
+                invoicelosDara:[],// 发票
+                curCodeData:[], // 币种
             }
         },
+        created() {
+            this.isSignforWorkDicts()
+            this.invoicelosWorkDictsfun()
+        },
         methods:{
             // 多选选择的数据
             handleSelectionChange(arr){
@@ -315,6 +366,47 @@
                     this.$refs.tableRef.clearSelection();
                 }
             },
+            handleMouseDown(event) {
+                console.log(event,351)
+                const table = this.$refs.tableRef
+                const cell = event.target.closest('td')
+            },
+            handleMouseMove(event) {
+
+            },
+            handleMouseUp(){
+
+            },
+
+            corpChange(value,row){
+                this.$set(row,'currentStlCurCode',value)
+                console.log(value,383)
+                if (value == 'CNY') {
+                    this.$set(row,'currentStlAmountRMB',Number(row.amount) - Number(row.stlTtlAmount))
+                }else {
+                    this.$set(row,'currentStlAmountUSD',Number(row.amount) - Number(row.stlTtlAmount))
+                }
+            },
+            // 接口请求
+            // 是否接口
+            isSignforWorkDicts(){
+                getWorkDicts('ifInvoice').then(res=>{
+                    this.ifInvoiceData = res.data.data
+                })
+            },
+            // 发票
+            invoicelosWorkDictsfun(){
+                getWorkDicts('invoice_los').then(res=>{
+                    this.invoicelosDara = res.data.data
+                })
+            },
+            // 获取币别数据
+            getRateListfun(cnName){
+                getRateList({current:1,size:10,cnName}).then(res=>{
+                    this.curCodeData = res.data.data.records
+                })
+            },
+
             // 表头样式
             tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
                 return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff"

+ 119 - 29
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -8,10 +8,13 @@
             </div>
             <div class="add-customer-btn">
                 <el-button  size="small" type="success" style="margin-right: 8px"
-                            :loading="saveLoading" @click="editHandle">提取利润及放单
+                            :loading="saveLoading" >提取利润及放单
                 </el-button>
-                <el-button  size="small" type="warning" plain  style="margin-right: 8px"
-                            :loading="saveLoading" @click="editHandle">撤销确认
+                <el-button  size="small" type="warning" plain  style="margin-right: 8px" :disabled="!form.id" v-if="form.isChecked == 1"
+                            :loading="saveLoading" @click="finstlbillsRevokeReconciliationfun">撤销对账
+                </el-button>
+                <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-else
+                            :loading="saveLoading" @click="finstlbillsConfirmReconciliationfun">确认对账
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px" v-if="editSave"
                             :loading="saveLoading" @click="editHandle">编 辑
@@ -304,13 +307,13 @@
                                     </el-form-item>
                                 </el-col>
                                 <el-col :span="5">
-                                    <el-form-item label="业务类型" prop="businessType" >
-                                        <search-query :datalist="businessTypeData"
-                                                      :selectValue="form.businessType"
+                                    <el-form-item label="业务类型" prop="businessTypes" >
+                                        <search-query :datalist="businessTypesData"
+                                                      :selectValue="form.businessTypes"
                                                       :clearable="true"
                                                       :disabled="editSave"
                                                       :buttonIf="false"
-                                                      @corpChange="corpChange($event,'businessType')">
+                                                      @corpChange="corpChange($event,'businessTypes')">
                                         </search-query>
                                     </el-form-item>
                                 </el-col>
@@ -487,7 +490,7 @@
                     <el-col :span="8">
                         <div style="text-align: right">
                             <el-button  size="small" type="primary" style="margin-right: 8px"
-                                        :loading="saveLoading" @click="editHandle">计算合计值
+                                        :loading="saveLoading" >计算合计值
                             </el-button>
                             <el-button  size="small" type="primary" style="margin-right: 8px" :disabled="!form.id"
                                         :loading="saveLoading" @click="ConfirmReceiptfun">批量签收
@@ -505,16 +508,15 @@
                     <el-button  size="small" type="primary" style="margin-right: 8px" :disabled="editSave"
                                 :loading="saveLoading" @click="Confirminvoicefun">确认发票
                     </el-button>
-                    <el-button  size="small" type="primary" style="margin-right: 8px"
-                                :loading="saveLoading" @click="editHandle">批量确认发票
-                    </el-button>
-                    <el-button  size="small" type="primary" style="margin-right: 8px"
-                                :loading="saveLoading" @click="editHandle">不开发票
-                    </el-button>
-                    <el-button  size="small" type="primary" style="margin-right: 8px"
-                                :loading="saveLoading" @click="editHandle">批量不开发票
+                    <!--<el-button  size="small" type="primary" style="margin-right: 8px"-->
+                    <!--            :loading="saveLoading" @click="editHandle">批量确认发票-->
+                    <!--</el-button>-->
+                    <el-button  size="small" type="primary" style="margin-right: 8px" :disabled="editSave"
+                                :loading="saveLoading" @click="Notinvoicingfun">不开发票
                     </el-button>
-
+                    <!--<el-button  size="small" type="primary" style="margin-right: 8px"-->
+                    <!--            :loading="saveLoading" @click="editHandle">批量不开发票-->
+                    <!--</el-button>-->
                     <el-button  size="small" type="info" style="margin-right: 8px" :disabled="editSave"
                                 :loading="saveLoading" @click="SelectedRows">确认选定行
                     </el-button>
@@ -539,9 +541,10 @@
     import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
     import {getDeptLazyTree} from "@/api/system/dept";
     import {
+        finstlbillsConfirmReconciliation,
         finstlbillsConfirmSignFor,
         finstlbillsDetail,
-        finstlbillslistAccBillV1, finstlbillsRevokeSignFor,
+        finstlbillslistAccBillV1, finstlbillsRevokeReconciliation, finstlbillsRevokeSignFor,
         finstlbillsSubmit
     } from '@/api/iosBasicData/finstlbills'
     import expand from "@/components/basic-container/expand.vue";
@@ -598,7 +601,7 @@
                 srcData:[], // 业务来源数据
                 srcforParameter:{},
                 // 业务类型
-                businessTypeData:[
+                businessTypesData:[
                     {
                         label:'海运出口',
                         value:'SE'
@@ -609,11 +612,34 @@
                 ],
             }
         },
+        watch:{
+
+            // // 监听业务类型 如果不是分单 可以编辑分单号
+            // form:{
+            //     // 执行方法
+            //     handler(oldValue,newValue) {
+            //         // 只要分单不能编辑
+            //         console.log(this.form,619)
+            //         if (!newValue || JSON.stringify(newValue) == '{}') {
+            //             return
+            //         }
+            //         delete this.form.id
+            //         this.tableData = []
+            //         this.form.finStlBillsItemsList = []
+            //         console.log(newValue)
+            //
+            //
+            //     },
+            //     deep: true, // 深度监听
+            //     immediate: true  // 第一次改变就执行
+            // },
+        },
         created() {
             this.allyesnoWorkDictsfun() // 获取 字典数据
             this.invoiceWorkDictsfun() // 获取 发票的数据
         },
         methods:{
+            finstlbillsRevokeReconciliation,
             // 下拉回调
             corpChange(value,name){
                 // 对账单位
@@ -707,7 +733,7 @@
                     return
                 }
                 // 业务类型
-                if (!this.form.businessType) {
+                if (!this.form.businessTypes) {
                     this.$message.warning('请选择业务类型');
                     return
                 }
@@ -716,9 +742,20 @@
                     this.$message.warning('请选择对账数据');
                     return;
                 }
+                for (let item of this.handleSelectionData) {
+                    if (!item.currentStlCurCode) {
+                        this.$message.warning('请选择本次结算币种');
+                        return;
+                    }
+                    if (!item.currentStlAmount) {
+                        this.$message.warning('请选择本次结算金额');
+                        return;
+                    }
+                }
                 this.saveLoading = true // 加载动画
                 this.form.billNoFormat = 'HYDZ'
                 this.form.businessTypeCode = 'HYDZ'
+                this.form.businessType = 'CHK' // 对账单
 
                 this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
                     item.lineNo = index
@@ -726,6 +763,11 @@
                     item.accBillId = item.id
                     item.accBillNo = item.billNo
                     item.accDate = item.billDate
+                    if (item.currentStlCurCode == 'CNY') {
+                        item.currentStlAmount = item.currentStlAmountRMB
+                    }else {
+                        item.currentStlAmount = item.currentStlAmountUSD
+                    }
                     delete item.businessType
                     delete item.id
                     delete item.billNo
@@ -743,7 +785,11 @@
                 this.pageLoading = true
                 finstlbillsDetail(id).then(res=>{
                     this.form = res.data.data
-                    this.tableData = this.form.finStlBillsItemsList
+                    this.tableData = this.form.finStlBillsItemsList.map(item=>{
+
+                        return item
+                        // amount
+                    })
                     this.form.isSignfor = this.form.isSignfor + ''
                     this.form.isApproved = this.form.isApproved + ''
                     this.form.isCleared = this.form.isCleared + ''
@@ -759,9 +805,6 @@
             // 检索接口
             finstlbillslistAccBillV1fun(){
                 delete this.form.id
-                for(let i in this.form) {
-                    console.log(i,737)
-                }
                 // let obj = JSON.parse(JSON.stringify(this.form))
                 let obj = {}
                 obj.auditStatus = this.form.isApproved // 审核状态 0 新建费用 1 已请核 2 审核中 3 驳回 4 通过
@@ -778,7 +821,7 @@
                 obj.hblno = this.form.hblno // HB/L NO
                 obj.isChecked = this.form.isChecked // 是否对账(0 未对账 1 已对账)
                 obj.queryAmount = this.form.queryAmount // 查询金额
-                obj.businessType = this.form.businessType // 业务类型
+                obj.businessType = this.form.businessTypes // 业务类型
                 obj.invoiceStatus = this.form.isInvoice // 发票状态 0 = 未开 9=已开 2 待开 3 不开
                 obj.vesselCnName = this.form.vesselCnName // 中文船名
                 obj.invoiceNo = this.form.invoiceNo // 发票号
@@ -795,10 +838,19 @@
                 if (this.form.accountDate) {
                     obj.billDateList = this.form.accountDate
                 }
-                console.log(obj,754)
-                // return
                 finstlbillslistAccBillV1(obj).then(res=>{
                     this.tableData = res.data.data.map(item=>{
+                        if(item.curCode == 'CNY') {
+                            this.$set(item,'amountRMB',item.amount)
+                            this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
+                            this.$set(item,'unsettledAmountRMB',item.unsettledAmount)
+                            this.$set(item,'stlTtlAmountRMB',item.stlTtlAmount)
+                        }else {
+                            this.$set(item,'amountUSD',item.amount)
+                            this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
+                            this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
+                            this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
+                        }
                         return item
                     })
                 })
@@ -807,6 +859,36 @@
             Confirminvoicefun(){
 
             },
+            // 不开发票
+            Notinvoicingfun(){
+
+            },
+            // 对账确认
+            finstlbillsConfirmReconciliationfun(){
+                this.$confirm("确定进行对账操作?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                    finstlbillsConfirmReconciliation(this.form).then(res=>{
+                        this.$message.success('操作成功');
+                        this.finstlbillsDetailfun(res.data.data.id)
+                    })
+                })
+            },
+            // 对账撤销
+            finstlbillsRevokeReconciliationfun(){
+                this.$confirm("确定进行撤销对账操作?", {
+                    confirmButtonText: "确定",
+                    cancelButtonText: "取消",
+                    type: "warning"
+                }).then(()=>{
+                    finstlbillsRevokeReconciliation().then(res=>{
+                        this.$message.success('操作成功');
+                        this.finstlbillsDetailfun(res.data.data.id)
+                    })
+                })
+            },
             // 确认签收
             ConfirmReceiptfun(){
                 if (this.handleSelectionData.length === 0) {
@@ -815,7 +897,7 @@
                 }
                 for (let item of this.handleSelectionData) {
                     if (item.isSignfor == 1) {
-                        this.$message.warning('请选择未签收的数据');
+                        this.$message.warning('请选择未签收的数据进行签收');
                         return;
                     }
                 }
@@ -833,6 +915,12 @@
                     this.$message.warning("请选择至少一条数据");
                     return;
                 }
+                for (let item of this.handleSelectionData) {
+                    if (item.isSignfor == 0) {
+                        this.$message.warning('请选择已签收的数据进行撤销');
+                        return;
+                    }
+                }
                 this.$confirm("确定将选择数据撤销签收?", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
@@ -858,7 +946,8 @@
             finstlbillsConfirmSignForfun(){
                 this.form.billNoFormat = 'HYDZ'
                 this.form.businessTypeCode = 'HYDZ'
-
+                this.form.businessType = 'CHK'
+                // 保留id
                 this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
                     item.lineNo = index
                     item.pType = item.businessType
@@ -879,6 +968,7 @@
             finstlbillsRevokeSignForfun(){
                 this.form.billNoFormat = 'HYDZ'
                 this.form.businessTypeCode = 'HYDZ'
+                this.form.businessType = 'CHK'
 
                 this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
                     item.lineNo = index

+ 133 - 24
src/views/iosBasicData/finstlbills/index.vue

@@ -22,7 +22,10 @@
                      @refresh-change="refreshChange"
                      @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 314)"
                      @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 314)"
-                     @on-load="onLoad" >
+                     @on-load="onLoad" @expand-change="expandChange" >
+              <template slot="expand" slot-scope="{row}">
+                  <finstlbillsitems :tableData="row.finStlBillsItemsList || []" :brfalse="false" ></finstlbillsitems>
+              </template>
               <template slot="menuLeft">
                   <el-button type="success"
                              size="small"
@@ -47,11 +50,27 @@
                              @click="rowDel(row)">删除
                   </el-button>
               </template>
+              <template slot-scope="scope" slot="billNo">
+                  <avue-text-ellipsis :text="scope.row.billNo" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
               <template slot-scope="scope" slot="corpCnName">
                   <avue-text-ellipsis :text="scope.row.corpCnName" :height="30" use-tooltip placement="top">
                       <small slot="more">...</small>
                   </avue-text-ellipsis>
               </template>
+              <template slot-scope="scope" slot="corpEnName">
+                  <avue-text-ellipsis :text="scope.row.corpEnName" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
+              <template slot-scope="scope" slot="corpArgreementNo">
+                  <avue-text-ellipsis :text="scope.row.corpArgreementNo" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
+
           </avue-crud>
       </basic-container>
 
@@ -61,12 +80,14 @@
 </template>
 
 <script>
-  import {finstlbillsList, finstlbillsDetail, finstlbillsSubmit, finstlbillsRemove} from "@/api/iosBasicData/finstlbills";
+  import {finstlbillsList, finstlbillsDetail, finstlbillsSubmit, finstlbillsRemove, finstlbillsitemsList} from "@/api/iosBasicData/finstlbills";
   import {mapGetters} from "vuex";
   import finstlbillsDetails from '@/views/iosBasicData/finstlbills/finstlbillsDetails.vue'
+  import {getWorkDicts} from "@/api/system/dictbiz";
+  import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
 
   export default {
-      components:{finstlbillsDetails},
+      components:{finstlbillsitems, finstlbillsDetails},
     data() {
       return {
           // 详情页面和列表切换
@@ -92,6 +113,9 @@
           viewBtn: true,
           selection: true,
           dialogClickModal: false,
+            menuWidth:100,
+            expand: true,
+            rowKey:'id',
           column: [
             {
               label: "业务类型",
@@ -120,6 +144,11 @@
               label: "客户是否已签约",
               prop: "corpIsSigned",
               width:"120",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
             },
             {
               label: "客户约号",
@@ -195,18 +224,22 @@
             {
               label: "财务开始日期",
               prop: "accountDateFrom",
+                width: "140"
             },
             {
               label: "财务结束日期",
               prop: "accountDateTo",
+                width: "140"
             },
             {
               label: "审核开始日期",
               prop: "auditDateFrom",
+                width: "140"
             },
             {
               label: "审核结束日期",
               prop: "auditDateTo",
+                width: "140"
             },
             {
               label: "发票号",
@@ -215,45 +248,81 @@
             {
               label: "检验检疫 NO",
               prop: "iqNo",
+                width: "140"
             },
             {
               label: "费用中文名称",
               prop: "feeCode",
+                width: "140"
             },
             {
               label: "费用中文名称",
               prop: "feeCnName",
+                width: "140"
             },
             {
               label: "费用英文名称",
               prop: "feeEnName",
+                width: "140"
             },
             {
-              label: "是否审核,用于查询费用, 0 全部, 1 是, 2 否",
+              label: "是否审核",
               prop: "isApproved",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
             },
             {
-              label: "是否签收,用于查询费用, 0 全部, 1 是, 2 否",
+              label: "是否签收",
               prop: "isSignfor",
+              dicData:[],
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
             },
             {
-              label: "是否对账,用于查询费用, 0 全部, 1 是, 2 否",
+              label: "是否对账",
               prop: "isChecked",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
             },
             {
-              label: "是否销账(结算),用于查询费用(0 全部, 1 是, 2 否)",
+              label: "是否销账",
               prop: "isCleared",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
             },
             {
-              label: "是否开发票,用于查询费用, 0 全部, 1 待开 2 已开 3 不开",
+              label: "是否开发票",
               prop: "isInvoice",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+                width: "140"
             },
             {
-              label: "是否含税价计算, 0 否, 1 是",
+              label: "是否含税价计算",
               prop: "isTax",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+                width: "140"
             },
             {
-              label: "凭证类型,记 转",
+              label: "凭证类型",
               prop: "voucherType",
             },
             {
@@ -267,62 +336,62 @@
             {
               label: "本位币应收(CNY)",
               prop: "amountDr",
+                width: "160"
             },
             {
               label: "本位币应付(CNY)",
               prop: "amountCr",
+                width: "160"
             },
             {
               label: "综合 USD 应收(USD) - 非 USD 外币转换为 USD",
               prop: "amountDrUsd",
+                width: "160"
             },
             {
               label: "综合 USD 应付(USD) - 非 USD 外币转换为 USD",
               prop: "amountCrUsd",
+                width: "160"
             },
             {
               label: "合计本位币应收(CNY )",
               prop: "amountDrLoc",
+                width: "160"
             },
             {
               label: "合计本位币应付(CNY)",
               prop: "amountCrLoc",
+                width: "160"
             },
             {
               label: "本位币税后应收(CNY)",
               prop: "amountDrNet",
+                width: "160"
             },
             {
               label: "本位币税后应付(CNY)",
               prop: "amountCrNet",
+                width: "160"
             },
             {
               label: "综合 USD 税后应收(USD) - 非 USD 外币转换为 USD",
               prop: "amountDrUsdNet",
+                width: "160"
             },
             {
               label: "综合 USD 税后应付(USD) - 非 USD 外币转换为 USD",
               prop: "amountCrUsdNet",
+                width: "160"
             },
             {
               label: "合计本位币税后应收(CNY )",
               prop: "amountDrLocNet",
+                width: "160"
             },
             {
               label: "合计本位币税后应付(CNY)",
               prop: "amountCrLocNet",
-            },
-            {
-              label: "版本",
-              prop: "version",
-            },
-            {
-              label: "状态(0 正常 1停用)",
-              prop: "status",
-            },
-            {
-              label: "是否已删除(0 否 1是)",
-              prop: "isDeleted",
+                width: "160"
             },
             {
               label: "备注",
@@ -354,8 +423,15 @@
     },
     async created() {
       this.option = await this.getColumnData(this.getColumnName(314), this.optionBack);
+      this.dictionaryfun() // 获取字典数据
     },
     methods: {
+          // 展开行
+        expandChange(row,expendList){
+            finstlbillsitemsList(1,20,{pid:row.id}).then(res=>{
+                row.finStlBillsItemsList = res.data.data.records
+            })
+        },
       // 新建账单
       newbillFun(){
           this.isShow = false
@@ -489,15 +565,48 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
-        finstlbillsList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+        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;
+          this.data = data.records.map(item=>{
+              item.isApproved = item.isApproved + ''
+              item.isSignfor = item.isSignfor + ''
+              item.isChecked = item.isChecked + ''
+              item.isCleared = item.isCleared + ''
+              item.isInvoice = item.isInvoice + ''
+              item.isTax = item.isTax + ''
+              item.corpIsSigned = item.corpIsSigned + ''
+              return item
+          })
           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, "isChecked").dicData = res.data.data
+                this.findObject(this.option.column, "isCleared").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) {
             /**

+ 664 - 0
src/views/iosBasicData/settlement/index.vue

@@ -0,0 +1,664 @@
+<template>
+  <div>
+      <basic-container v-if="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"
+                     @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>
+              <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="editFun(row)">编辑
+                  </el-button>
+                  <el-button type="text"
+                             size="small"
+                             @click="rowDel(row)">删除
+                  </el-button>
+              </template>
+              <template slot-scope="scope" slot="billNo">
+                  <avue-text-ellipsis :text="scope.row.billNo" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
+              <template slot-scope="scope" slot="corpCnName">
+                  <avue-text-ellipsis :text="scope.row.corpCnName" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
+              <template slot-scope="scope" slot="corpEnName">
+                  <avue-text-ellipsis :text="scope.row.corpEnName" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
+              <template slot-scope="scope" slot="corpArgreementNo">
+                  <avue-text-ellipsis :text="scope.row.corpArgreementNo" :height="30" use-tooltip placement="top">
+                      <small slot="more">...</small>
+                  </avue-text-ellipsis>
+              </template>
+
+          </avue-crud>
+      </basic-container>
+
+      <finstlbillsDetails ref="finstlbillsDetails" v-if="!isShow" :editSave="editSave" @goBack="goBack"></finstlbillsDetails>
+
+  </div>
+</template>
+
+<script>
+  import {finstlbillsList, finstlbillsDetail, finstlbillsSubmit, finstlbillsRemove, finstlbillsitemsList} from "@/api/iosBasicData/finstlbills";
+  import {mapGetters} from "vuex";
+  import finstlbillsDetails from '@/views/iosBasicData/finstlbills/finstlbillsDetails.vue'
+  import {getWorkDicts} from "@/api/system/dictbiz";
+  import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
+
+  export default {
+      components:{finstlbillsitems, finstlbillsDetails},
+    data() {
+      return {
+          // 详情页面和列表切换
+          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,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+            menuWidth:100,
+            expand: true,
+            rowKey:'id',
+          column: [
+            {
+              label: "业务类型",
+              prop: "businessType",
+            },
+            {
+              label: "单据编号",
+              prop: "billNo",
+            },
+            {
+              label: "对账/结算日期",
+              prop: "billDate",
+              width:"150",
+            },
+            {
+              label: "客户中文名称",
+              prop: "corpCnName",
+              width:"120",
+            },
+            {
+              label: "客户英文名称",
+              prop: "corpEnName",
+              width:"120",
+            },
+            {
+              label: "客户是否已签约",
+              prop: "corpIsSigned",
+              width:"120",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+            },
+            {
+              label: "客户约号",
+              prop: "corpArgreementNo",
+            },
+            {
+              label: "客户账期备注",
+              prop: "corpAccRemarks",
+              width:"120",
+            },
+            {
+              label: "业务类型",
+              prop: "businessTypes",
+              width:"120",
+            },
+            {
+              label: "业务单据编号",
+              prop: "businessNo",
+              width:"120",
+            },
+            {
+              label: "账单编号",
+              prop: "accountNo",
+              width:"100",
+            },
+            {
+              label: "对账单编号",
+              prop: "checkNo",
+              width:"100",
+            },
+            {
+              label: "业务所在部门",
+              prop: "deptName",
+              width:"120",
+            },
+            {
+              label: "业务操作",
+              prop: "operatorName",
+              width:"100",
+            },
+            {
+              label: "业务员",
+              prop: "salesName",
+            },
+            {
+              label: "费用收付",
+              prop: "dc",
+            },
+            {
+              label: "币种",
+              prop: "curCode",
+            },
+            {
+              label: "中文船名",
+              prop: "vesselCnName",
+            },
+            {
+              label: "英文船名",
+              prop: "vesselEnName",
+            },
+            {
+              label: "航次",
+              prop: "voyageNo",
+            },
+            {
+              label: "MB/L NO",
+              prop: "mblno",
+            },
+            {
+              label: "HB/L NO",
+              prop: "hblno",
+            },
+            {
+              label: "财务开始日期",
+              prop: "accountDateFrom",
+                width: "140"
+            },
+            {
+              label: "财务结束日期",
+              prop: "accountDateTo",
+                width: "140"
+            },
+            {
+              label: "审核开始日期",
+              prop: "auditDateFrom",
+                width: "140"
+            },
+            {
+              label: "审核结束日期",
+              prop: "auditDateTo",
+                width: "140"
+            },
+            {
+              label: "发票号",
+              prop: "invoiceNo",
+            },
+            {
+              label: "检验检疫 NO",
+              prop: "iqNo",
+                width: "140"
+            },
+            {
+              label: "费用中文名称",
+              prop: "feeCode",
+                width: "140"
+            },
+            {
+              label: "费用中文名称",
+              prop: "feeCnName",
+                width: "140"
+            },
+            {
+              label: "费用英文名称",
+              prop: "feeEnName",
+                width: "140"
+            },
+            {
+              label: "是否审核",
+              prop: "isApproved",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+            },
+            {
+              label: "是否签收",
+              prop: "isSignfor",
+              dicData:[],
+              props: {
+                label: "dictValue",
+                value: "dictKey"
+              },
+            },
+            {
+              label: "是否对账",
+              prop: "isChecked",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+            },
+            {
+              label: "是否销账",
+              prop: "isCleared",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+            },
+            {
+              label: "是否开发票",
+              prop: "isInvoice",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+                width: "140"
+            },
+            {
+              label: "是否含税价计算",
+              prop: "isTax",
+                dicData:[],
+                props: {
+                    label: "dictValue",
+                    value: "dictKey"
+                },
+                width: "140"
+            },
+            {
+              label: "凭证类型",
+              prop: "voucherType",
+            },
+            {
+              label: "凭证号",
+              prop: "voucherNo",
+            },
+            {
+              label: "凭证日期",
+              prop: "voucherDate",
+            },
+            {
+              label: "本位币应收(CNY)",
+              prop: "amountDr",
+                width: "160"
+            },
+            {
+              label: "本位币应付(CNY)",
+              prop: "amountCr",
+                width: "160"
+            },
+            {
+              label: "综合 USD 应收(USD) - 非 USD 外币转换为 USD",
+              prop: "amountDrUsd",
+                width: "160"
+            },
+            {
+              label: "综合 USD 应付(USD) - 非 USD 外币转换为 USD",
+              prop: "amountCrUsd",
+                width: "160"
+            },
+            {
+              label: "合计本位币应收(CNY )",
+              prop: "amountDrLoc",
+                width: "160"
+            },
+            {
+              label: "合计本位币应付(CNY)",
+              prop: "amountCrLoc",
+                width: "160"
+            },
+            {
+              label: "本位币税后应收(CNY)",
+              prop: "amountDrNet",
+                width: "160"
+            },
+            {
+              label: "本位币税后应付(CNY)",
+              prop: "amountCrNet",
+                width: "160"
+            },
+            {
+              label: "综合 USD 税后应收(USD) - 非 USD 外币转换为 USD",
+              prop: "amountDrUsdNet",
+                width: "160"
+            },
+            {
+              label: "综合 USD 税后应付(USD) - 非 USD 外币转换为 USD",
+              prop: "amountCrUsdNet",
+                width: "160"
+            },
+            {
+              label: "合计本位币税后应收(CNY )",
+              prop: "amountDrLocNet",
+                width: "160"
+            },
+            {
+              label: "合计本位币税后应付(CNY)",
+              prop: "amountCrLocNet",
+                width: "160"
+            },
+            {
+              label: "备注",
+              prop: "remarks",
+            },
+          ]
+        },
+        data: [],
+        editSave:false, // 编辑保存打印状态
+      };
+    },
+    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.option = await this.getColumnData(this.getColumnName(314), this.optionBack);
+      this.dictionaryfun() // 获取字典数据
+    },
+    methods: {
+          // 展开行
+        expandChange(row,expendList){
+            finstlbillsitemsList(1,20,{pid:row.id}).then(res=>{
+                row.finStlBillsItemsList = res.data.data.records
+            })
+        },
+      // 新建账单
+      newbillFun(){
+          this.isShow = false
+          this.editSave = false
+          // this.$refs.finstlbillsDetails
+      },
+        // 编辑
+        editFun(row) {
+            this.isShow = false
+            this.editSave = true
+            this.$nextTick(()=>{
+                this.$refs.finstlbillsDetails.finstlbillsDetailfun(row.id)
+            })
+        },
+      // 详情的返回列表
+      goBack() {
+          // 初始化数据
+          // this.detailData = this.$options.data().detailData;
+          if (JSON.stringify(this.$route.query) != "{}") {
+              this.$router.$avueRouter.closeTag();
+              this.$router.push({
+                  path: "/iosBasicData/finstlbills/index"
+              });
+          }
+          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;
+        }
+        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();
+          });
+      },
+        // 详情
+      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();
+      },
+      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:'STL'},
+        ).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.isCleared = item.isCleared + ''
+              item.isInvoice = item.isInvoice + ''
+              item.isTax = item.isTax + ''
+              item.corpIsSigned = item.corpIsSigned + ''
+              return item
+          })
+          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, "isChecked").dicData = res.data.data
+                this.findObject(this.option.column, "isCleared").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 (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;
+}
+</style>