Browse Source

1.海运出口 主表新加字段
2.海运进出口 费用明细 新加字段
3.海运进出口 同一费用名称,如果币种不一致系统都给提示
4.封装同类型 特性字段值不一致的公共方法
5.基础资料 费用信息 tree分类和主表都新加字段
6.海运进出口 费用明细费用简称下拉请求接口新加参数

Qukatie 1 month ago
parent
commit
5a4a7a96b2

+ 1 - 0
public/MP_verify_HllQZ2oulZMLbH6i.txt

@@ -0,0 +1 @@
+HllQZ2oulZMLbH6i

+ 7 - 1
src/api/iosBasicData/bills.js

@@ -267,4 +267,10 @@ export const agreementpriceList = (data) => {
     params: data
   })
 }
-
+export const accountsReceivable = (data) => {
+  return request({
+    url: '/api/blade-los/finaccbills/accountsReceivable',
+    method: 'get',
+    params: data
+  })
+}

+ 17 - 0
src/util/verifyData.js

@@ -0,0 +1,17 @@
+//同一类型  某一值需要一致
+export function similarValues(list, name, name2) {
+    let types = []
+    for (let item of list) {
+        types.push(item[name])
+    }
+    let uniqueArr = [...new Set(types)]
+    for (let item of uniqueArr) {
+        let fileterList = list.filter(e => e[name] == item)
+        let obj = fileterList.find(e => e[name2] != fileterList[0][name2])
+        if (obj) {
+            return obj
+        }
+
+    }
+    return
+}

+ 185 - 8
src/views/iosBasicData/OceanFreightImport/bills/assembly/feecenter.vue

@@ -161,7 +161,7 @@
                         :clearable="true" :remote="true" :buttonIf="false"
                         :forParameter="{ key: 'id', label: 'code', value: 'code' }"
                         @remoteMethod="bcurrencyGetExratefun('D')" @corpChange="corpChange($event, 'curCode', row, 'D')"
-                        @corpFocus="bcurrencyGetExratefun('D')">
+                        @corpFocus="bcurrencyGetExratefun('D')" :disabled="row.whetherForceCurNo == 1">
                     </search-query>
                     <span v-else>{{ row.curCode }}</span>
                 </template>
@@ -178,6 +178,16 @@
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>
+                <template slot="taxRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
+                        placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.taxRate }}</span>
+                </template>
+                <template slot="surchargeRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
+                        :precision="3" placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.surchargeRate }}</span>
+                </template>
                 <template slot="remarks" slot-scope="{ row }">
                     <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
                     <span v-else>{{ row.remarks }}</span>
@@ -295,7 +305,7 @@
                         :clearable="true" :remote="true" :buttonIf="false"
                         :forParameter="{ key: 'id', label: 'code', value: 'code' }"
                         @remoteMethod="bcurrencyGetExratefun('C')" @corpChange="corpChange($event, 'curCode', row, 'C')"
-                        @corpFocus="bcurrencyGetExratefun('C')">
+                        @corpFocus="bcurrencyGetExratefun('C')" :disabled="row.whetherForceCurNo == 1">
                     </search-query>
                     <span v-else>{{ row.curCode }}</span>
                 </template>
@@ -312,6 +322,16 @@
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>
+                <template slot="taxRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
+                        placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.taxRate }}</span>
+                </template>
+                <template slot="surchargeRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
+                        :precision="3" placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.surchargeRate }}</span>
+                </template>
                 <template slot="remarks" slot-scope="{ row }">
                     <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
                     <span v-else>{{ row.remarks }}</span>
@@ -586,7 +606,8 @@ import { getWorkDicts } from "@/api/system/dictbiz";
 import {
     feecenterTemplateImport,
     listFeeCountByCorp,
-    losbfeestemplateGetListTemplate
+    losbfeestemplateGetListTemplate,
+    accountsReceivable
 } from "@/api/iosBasicData/bills";
 import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import { popupReminder, requiredMessage } from "@/util/messageReminder";
@@ -598,9 +619,11 @@ import { isProcurement } from "@/api/basicData/configuration";
 import { getList as reportsList } from "@/api/iosBasicData/reports";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
+import { similarValues } from "@/util/verifyData";
+import dicSelect from "@/components/dicSelect/main";
 import _ from "lodash";
 export default {
-    components: { reportContainer, SearchQuery, reportformsList },
+    components: { reportContainer, SearchQuery, reportformsList,dicSelect },
     props: {
         pid: {
 
@@ -753,6 +776,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "发票号",
+                        prop: "invoiceNo",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
                         label: "发票申请金额",
                         prop: "appliedInvoiceAmount",
                         width: "120",
@@ -987,6 +1016,22 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "增值税率",
+                        prop: "taxRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
+                        label: "附加费率",
+                        prop: "surchargeRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
                         label: "CNY(含税)",
                         prop: "rmbAmount",
                         width: "100",
@@ -1023,6 +1068,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "发票号",
+                        prop: "invoiceNo",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
                         label: "发票申请金额",
                         prop: "appliedInvoiceAmount",
                         width: "120",
@@ -1145,6 +1196,22 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "增值税率",
+                        prop: "taxRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
+                        label: "附加费率",
+                        prop: "surchargeRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
                         label: "CNY(含税)",
                         prop: "rmbAmount",
                         width: "100",
@@ -1181,6 +1248,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "发票号",
+                        prop: "invoiceNo",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
                         label: "发票申请金额",
                         prop: "appliedInvoiceAmount",
                         width: "120",
@@ -1377,9 +1450,9 @@ export default {
         }
     },
     async created() {
-        isProcurement({ "param": "business" }).then(res => {
-            this.business = res.data.data
-        })
+        // isProcurement({ "param": "business" }).then(res => {
+        //     this.business = res.data.data
+        // })
         isProcurement({ "param": "if.station" }).then(res => {
             console.log(res)
             if (res.data.data == 1) {
@@ -1392,6 +1465,23 @@ export default {
         this.roleName = localStorage.getItem('roleName').split(',') // 获取角色数据
         this.optionD = await this.getColumnData(this.getColumnName(309.2), this.optionDBack);
         this.optionC = await this.getColumnData(this.getColumnName(309.3), this.optionCBack);
+        isProcurement({ "param": "business" }).then(res => {
+            this.business = res.data.data
+            if (res.data.data == 1) {
+                this.optionD.column.forEach(item => {
+                    if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
+                        item.hide = false
+                        item.showColumn = true
+                    }
+                })
+                this.optionC.column.forEach(item => {
+                    if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
+                        item.hide = false
+                        item.showColumn = true
+                    }
+                })
+            }
+        })
         // 导入弹窗的表格
         this.templateOption = await this.getColumnData(this.getColumnName(309.5), this.templateOptionBack);
         this.getBcorpsListfun() // 获取客户数据
@@ -1761,6 +1851,13 @@ export default {
                 obj.corpCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpCnName
                 obj.corpEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpEnName
                 obj.shortName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].shortName
+                obj.dc = 'D'
+                if (this.business == 1) {
+                    accountsReceivable({ corpId: this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpId }).then(res => {
+                        this.$set(obj, 'amountLimit', res.data.data.amountLimit)
+                        this.$set(obj, 'noAmount', res.data.data.amount)
+                    })
+                }
                 // // 费用简称
                 // obj.feeId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeId
                 // obj.feeCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeCnName
@@ -1795,6 +1892,7 @@ export default {
                 obj.corpId = this.assemblyForm.corpId
                 obj.corpCnName = this.assemblyForm.corpCnName.split(' - ')[0]
                 obj.corpEnName = this.assemblyForm.corpEnName
+                obj.dc = 'D'
                 // 预付/到付
                 obj.paymode = this.assemblyForm.mpaymode
                 getBcorpsDetail(this.assemblyForm.corpId).then(res => {
@@ -1847,6 +1945,7 @@ export default {
                 obj.corpCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpCnName
                 obj.corpEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpEnName
                 obj.shortName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].shortName
+                obj.dc = 'C'
                 // // 费用简称
                 // obj.feeId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeId
                 // obj.feeCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeCnName
@@ -1882,6 +1981,7 @@ export default {
                 // obj.corpCnName = this.assemblyForm.corpCnName.split(' - ')[0]
                 // obj.corpEnName = this.assemblyForm.corpEnName
                 // 预付/到付
+                obj.dc = 'D'
                 obj.paymode = this.assemblyForm.mpaymode
                 // getBcorpsDetail(this.assemblyForm.corpId).then(res => {
                 //     obj.shortName = res.data.data.shortName
@@ -2158,6 +2258,12 @@ export default {
                         this.$set(row, 'corpCnName', item.cnName)
                         this.$set(row, 'corpEnName', item.enName)
                         this.$set(row, 'corpId', item.id)
+                        if (dc == 'D' && this.business == 1) {
+                            accountsReceivable({ corpId: item.id }).then(res => {
+                                this.$set(row, 'amountLimit', res.data.data.amountLimit)
+                                this.$set(row, 'noAmount', res.data.data.amount)
+                            })
+                        }
                     }
                 }
             } else if (name == 'feeCnName') {
@@ -2166,6 +2272,9 @@ export default {
                     this.$set(row, 'feeEnName', '')
                     this.$set(row, 'feeId', '')
                     this.$set(row, 'feeCode', '')
+                    if (this.business == 1) {
+                        this.$set(row, 'whetherForceCurNo', '')
+                    }
                     // 选择费用简称带出核算要素
                     this.$set(row, 'elementsId', '')
                     this.$set(row, 'elementsCnName', '')
@@ -2186,6 +2295,10 @@ export default {
                                 this.$set(row, 'feeEnName', '')
                                 this.$set(row, 'feeId', '')
                                 this.$set(row, 'feeCode', '')
+                                if (this.business == 1) {
+                                    this.$set(row, 'whetherForceCurNo', '')
+                                }
+
                                 // 核算要素
                                 this.$set(row, 'elementsId', '')
                                 this.$set(row, 'elementsCnName', '')
@@ -2205,6 +2318,9 @@ export default {
                                 this.$set(row, 'feeEnName', '')
                                 this.$set(row, 'feeId', '')
                                 this.$set(row, 'feeCode', '')
+                                if (this.business == 1) {
+                                    this.$set(row, 'whetherForceCurNo', '')
+                                }
                                 // 核算要素
                                 this.$set(row, 'elementsId', '')
                                 this.$set(row, 'elementsCnName', '')
@@ -2217,6 +2333,9 @@ export default {
                         this.$set(row, 'feeEnName', item.enName)
                         this.$set(row, 'feeId', item.id)
                         this.$set(row, 'feeCode', item.code)
+                        if (this.business == 1) {
+                            this.$set(row, 'whetherForceCurNo', item.whetherForceCurNo)
+                        }
                         // 选择费用简称带出核算要素
                         this.$set(row, 'elementsId', item.accElementId)
                         this.$set(row, 'elementsCnName', item.accElementName)
@@ -2371,6 +2490,31 @@ export default {
             if (!row.curCode) {
                 return;
             }
+            if (row.amountLimit && row.noAmount && row.amount) {
+                if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
+                    this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
+                    delete row.amountLimit
+                    delete row.noAmount
+                }
+            }
+            if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
+                let ywfSumD = 0
+                let ywfSumC = 0
+                for (let item of this.assemblyForm.feeCenterListD) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumD += Number(item.amount)
+                    }
+                }
+                for (let item of this.assemblyForm.feeCenterListC) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumC += Number(item.amount)
+                    }
+                }
+                if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
+                    this.$set(row, 'price', 0)
+                    return this.$message.error('应付的业务费不能超过应收业务费的80%');
+                }
+            }
             if (row.curCode == 'CNY') {
                 this.$set(row, 'rmbAmount', row.amount.toFixed(2))
                 this.$set(row, 'usdAmount', '')
@@ -2398,6 +2542,31 @@ export default {
             if (!row.curCode) {
                 return;
             }
+            if (row.amountLimit && row.noAmount && row.amount) {
+                if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
+                    this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
+                    delete row.amountLimit
+                    delete row.noAmount
+                }
+            }
+            if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
+                let ywfSumD = 0
+                let ywfSumC = 0
+                for (let item of this.assemblyForm.feeCenterListD) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumD += Number(item.amount)
+                    }
+                }
+                for (let item of this.assemblyForm.feeCenterListC) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumC += Number(item.amount)
+                    }
+                }
+                if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
+                    this.$set(row, 'quantity', 1)
+                    return this.$message.error('应付的业务费不能超过应收业务费的80%');
+                }
+            }
             if (row.curCode == 'CNY') {
                 this.$set(row, 'rmbAmount', row.amount.toFixed(2))
                 this.$set(row, 'usdAmount', '')
@@ -2429,7 +2598,7 @@ export default {
         },
         // 获取费用数据
         bfeesListfun(cnName) {
-            bfeesList(1, 10, { cnName, status: 0 }).then(res => {
+            bfeesList(1, 10, { cnName, status: 0, feesTypeCode: 'HYJK' }).then(res => {
                 this.feeCnNameData = res.data.data.records
             })
         },
@@ -2582,6 +2751,14 @@ export default {
                 });
                 return
             }
+            let similarDataD = similarValues(this.assemblyForm.feeCenterListD, 'feeCnName', 'curCode')
+            if (similarDataD) {
+                return this.$message.error(`应收费用简称:${similarDataD.feeCnName}的币别不一致,请重新选择`);
+            }
+            let similarDataC = similarValues(this.assemblyForm.feeCenterListC, 'feeCnName', 'curCode')
+            if (similarDataC) {
+                return this.$message.error(`应付费用简称:${similarDataC.feeCnName}的币别不一致,请重新选择`);
+            }
             // 判断必填项
             let sum = '请输入'
             for (let item of this.assemblyForm.feeCenterListD) {

File diff suppressed because it is too large
+ 255 - 621
src/views/iosBasicData/OceanFreightImport/bills/billsDetails.vue


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

@@ -7,17 +7,27 @@
             @refresh-change="refreshChange" @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 309.1)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 309.1)">
             <template slot="menuLeft">
-                <el-button type="primary" size="small" :disabled="seeDisabled" @click.stop="addfun">新 增</el-button>
-                <el-button type="danger" size="small" plain
-                    :disabled="seeDisabled || assemblyForm.preContainersList.length == 0"
-                    @click.stop="handleDelete">一键删除
-                </el-button>
-                <el-button type="primary" size="small"
-                    :disabled="seeDisabled || assemblyForm.preContainersList.length == 0"
-                    @click="batchSavefun">一键保存</el-button>
-                <el-button type="info" plain size="small"
-                    :disabled="seeDisabled || assemblyForm.preContainersList.length == 0" @click="onclickEdit">一键编辑
-                </el-button>
+                <div style="display: flex;align-items: center;">
+                    <el-button type="primary" size="small" :disabled="seeDisabled" @click.stop="addfun">新 增</el-button>
+                    <el-button type="danger" size="small" plain
+                        :disabled="seeDisabled || assemblyForm.preContainersList.length == 0"
+                        @click.stop="handleDelete">一键删除
+                    </el-button>
+                    <el-button type="primary" size="small"
+                        :disabled="seeDisabled || assemblyForm.preContainersList.length == 0"
+                        @click="batchSavefun">一键保存</el-button>
+                    <el-button type="info" plain size="small"
+                        :disabled="seeDisabled || assemblyForm.preContainersList.length == 0" @click="onclickEdit">一键编辑
+                    </el-button>
+                    <el-checkbox v-if="business == 1" size="medium" :true-label="1" :false-label="0"
+                        :disabled="seeDisabled" v-model="assemblyForm.capitalLettersRule">箱量大写</el-checkbox>
+                    <div v-if="business == 1" style="width: 260px;display: flex;">
+                        <avue-select v-model="assemblyForm.chargeableWeight" placeholder="请选择计费重量" :dic="weightList"
+                            size="mini"></avue-select>
+                        <avue-select v-model="assemblyForm.cntrGoodType" placeholder="请选择装箱货物类型" :dic="goodTypeList"
+                            size="mini"></avue-select>
+                    </div>
+                </div>
             </template>
             <template slot-scope="scope" slot="menu">
                 <el-button size="mini" type="text" @click.stop="editfun(scope.row, scope.index)"
@@ -74,7 +84,7 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import { bcntrtypesList } from "@/api/iosBasicData/bcntrtypes";
 import { containersEqualDistribution } from "@/api/iosBasicData/containers";
 import { requiredMessage } from "@/util/messageReminder";
-
+import { isProcurement } from "@/api/basicData/configuration";
 export default {
     components: { SearchQuery },
     props: {
@@ -94,6 +104,21 @@ export default {
     },
     data() {
         return {
+            weightList: [{
+                label: '方',
+                value: '方'
+            }, {
+                label: '吨',
+                value: '吨'
+            }],
+            goodTypeList: [{
+                label: '滚装',
+                value: 'RO/RO'
+            }, {
+                label: '散货',
+                value: 'BULK'
+            }],
+            business: null,
             // 集装箱尺码箱型
             cntrTypeCodeData: [],
             form: {},
@@ -347,6 +372,9 @@ export default {
     },
     async created() {
         this.option = await this.getColumnData(this.getColumnName(309.1), this.optionBack);
+        isProcurement({ "param": "business" }).then(res => {
+            this.business = res.data.data
+        })
     },
     methods: {
         onclickEdit() {

+ 0 - 2
src/views/iosBasicData/SeafreightExportF/bills/assembly/edicode.vue

@@ -171,8 +171,6 @@
                 </tempalte>
             </avue-form>
         </el-dialog>
-
-
     </div>
 </template>
 

+ 207 - 9
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -163,7 +163,7 @@
                         :clearable="true" :remote="true" :buttonIf="false"
                         :forParameter="{ key: 'id', label: 'code', value: 'code' }"
                         @remoteMethod="bcurrencyGetExratefun('D')" @corpChange="corpChange($event, 'curCode', row, 'D')"
-                        @corpFocus="bcurrencyGetExratefun('D')">
+                        @corpFocus="bcurrencyGetExratefun('D')" :disabled="row.whetherForceCurNo == 1">
                     </search-query>
                     <span v-else>{{ row.curCode }}</span>
                 </template>
@@ -180,6 +180,16 @@
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>
+                <template slot="taxRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
+                        placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.taxRate }}</span>
+                </template>
+                <template slot="surchargeRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
+                        :precision="3" placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.surchargeRate }}</span>
+                </template>
                 <template slot="remarks" slot-scope="{ row }">
                     <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
                     <span v-else>{{ row.remarks }}</span>
@@ -294,7 +304,7 @@
                         :clearable="true" :remote="true" :buttonIf="false"
                         :forParameter="{ key: 'id', label: 'code', value: 'code' }"
                         @remoteMethod="bcurrencyGetExratefun('C')" @corpChange="corpChange($event, 'curCode', row, 'C')"
-                        @corpFocus="bcurrencyGetExratefun('C')">
+                        @corpFocus="bcurrencyGetExratefun('C')" :disabled="row.whetherForceCurNo == 1">
                     </search-query>
                     <span v-else>{{ row.curCode }}</span>
                 </template>
@@ -311,6 +321,16 @@
                         :precision="3" placeholder="请输入" @blur="quantityinputfun(row)"></el-input-number>
                     <span v-else>{{ row.quantity }}</span>
                 </template>
+                <template slot="taxRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.taxRate" size="small" :controls="false" :precision="3"
+                        placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.taxRate }}</span>
+                </template>
+                <template slot="surchargeRate" slot-scope="{ row }">
+                    <el-input-number v-if="row.edit" v-model="row.surchargeRate" size="small" :controls="false"
+                        :precision="3" placeholder="请输入"></el-input-number>
+                    <span v-else>{{ row.surchargeRate }}</span>
+                </template>
                 <template slot="remarks" slot-scope="{ row }">
                     <el-input v-if="row.edit" v-model="row.remarks" size="small" placeholder="请输入"></el-input>
                     <span v-else>{{ row.remarks }}</span>
@@ -585,7 +605,8 @@ import { getWorkDicts } from "@/api/system/dictbiz";
 import {
     feecenterTemplateImport,
     listFeeCountByCorp,
-    losbfeestemplateGetListTemplate
+    losbfeestemplateGetListTemplate,
+    accountsReceivable
 } from "@/api/iosBasicData/bills";
 import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
 import { popupReminder, requiredMessage } from "@/util/messageReminder";
@@ -599,6 +620,7 @@ import { regularBurdenfloating } from "@/util/regularJudgment";
 import { isProcurement } from "@/api/basicData/configuration";
 import { getToken } from "@/util/auth";
 import dicSelect from "@/components/dicSelect/main";
+import { similarValues } from "@/util/verifyData";
 import _ from "lodash";
 export default {
     components: { reportContainer, SearchQuery, reportformsList, dicSelect },
@@ -756,6 +778,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "发票号",
+                        prop: "invoiceNo",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
                         label: "发票申请金额",
                         prop: "appliedInvoiceAmount",
                         width: "120",
@@ -989,6 +1017,22 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "增值税率",
+                        prop: "taxRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
+                        label: "附加费率",
+                        prop: "surchargeRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
                         label: "CNY(含税)",
                         prop: "rmbAmount",
                         width: "100",
@@ -1026,6 +1070,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "发票号",
+                        prop: "invoiceNo",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
                         label: "发票申请金额",
                         prop: "appliedInvoiceAmount",
                         width: "120",
@@ -1148,6 +1198,22 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "增值税率",
+                        prop: "taxRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
+                        label: "附加费率",
+                        prop: "surchargeRate",
+                        width: "120",
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                    },
+                    {
                         label: "CNY(含税)",
                         prop: "rmbAmount",
                         width: "100",
@@ -1185,6 +1251,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "发票号",
+                        prop: "invoiceNo",
+                        width: "120",
+                        overHidden: true,
+                    },
+                    {
                         label: "发票申请金额",
                         prop: "appliedInvoiceAmount",
                         width: "120",
@@ -1405,9 +1477,7 @@ export default {
         }
     },
     async created() {
-        isProcurement({ "param": "business" }).then(res => {
-            this.business = res.data.data
-        })
+
         isProcurement({ "param": "if.station" }).then(res => {
             console.log(res)
             if (res.data.data == 1) {
@@ -1430,6 +1500,24 @@ export default {
 
         this.optionD = await this.getColumnData(this.getColumnName(309.2), this.optionDBack);
         this.optionC = await this.getColumnData(this.getColumnName(309.3), this.optionCBack);
+        isProcurement({ "param": "business" }).then(res => {
+            this.business = res.data.data
+            if (res.data.data == 1) {
+                this.optionD.column.forEach(item => {
+                    if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
+                        item.hide = false
+                        item.showColumn = true
+                    }
+                })
+                this.optionC.column.forEach(item => {
+                    if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
+                        item.hide = false
+                        item.showColumn = true
+                    }
+                })
+            }
+        })
+
         // 导入弹窗的表格
         this.templateOption = await this.getColumnData(this.getColumnName(309.5), this.templateOptionBack);
         this.getBcorpsListfun() // 获取客户数据
@@ -1782,6 +1870,14 @@ export default {
                 obj.corpCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpCnName
                 obj.corpEnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpEnName
                 obj.shortName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].shortName
+                obj.dc = "D"
+                if (this.business == 1) {
+                    accountsReceivable({ corpId: this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].corpId }).then(res => {
+                        this.$set(obj, 'amountLimit', res.data.data.amountLimit)
+                        this.$set(obj, 'noAmount', res.data.data.amount)
+                    })
+                }
+
                 // // 费用简称
                 // obj.feeId = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeId
                 // obj.feeCnName = this.assemblyForm.feeCenterListD[this.assemblyForm.feeCenterListD.length - 1].feeCnName
@@ -1816,6 +1912,7 @@ export default {
                 obj.corpId = this.assemblyForm.corpId
                 obj.corpCnName = this.assemblyForm.corpCnName
                 obj.corpEnName = this.assemblyForm.corpEnName
+                obj.dc = "D"
                 //
                 // 预付/到付
                 obj.paymode = this.assemblyForm.mpaymode
@@ -1868,6 +1965,7 @@ export default {
                 obj.corpCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpCnName
                 obj.corpEnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].corpEnName
                 obj.shortName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].shortName
+                obj.dc = "C"
                 // // 费用简称
                 // obj.feeId = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeId
                 // obj.feeCnName = this.assemblyForm.feeCenterListC[this.assemblyForm.feeCenterListC.length - 1].feeCnName
@@ -1904,6 +2002,7 @@ export default {
                 // obj.corpEnName = this.assemblyForm.corpEnName
                 // 预付/到付
                 obj.paymode = this.assemblyForm.mpaymode
+                obj.dc = "C"
                 // getBcorpsDetail(this.assemblyForm.corpId).then(res => {
                 //     obj.shortName = res.data.data.shortName
                 //     this.assemblyForm.feeCenterListC.push(obj)
@@ -2179,6 +2278,13 @@ export default {
                         this.$set(row, 'corpCnName', item.cnName)
                         this.$set(row, 'corpEnName', item.enName)
                         this.$set(row, 'corpId', item.id)
+                        if (dc == 'D' && this.business == 1) {
+                            accountsReceivable({ corpId: item.id }).then(res => {
+                                this.$set(row, 'amountLimit', res.data.data.amountLimit)
+                                this.$set(row, 'noAmount', res.data.data.amount)
+                            })
+                        }
+
                     }
                 }
             } else if (name == 'feeCnName') {
@@ -2207,6 +2313,9 @@ export default {
                                 this.$set(row, 'feeEnName', '')
                                 this.$set(row, 'feeId', '')
                                 this.$set(row, 'feeCode', '')
+                                if (this.business == 1) {
+                                    this.$set(row, 'whetherForceCurNo', '')
+                                }
                                 // 核算要素
                                 this.$set(row, 'elementsId', '')
                                 this.$set(row, 'elementsCnName', '')
@@ -2226,6 +2335,9 @@ export default {
                                 this.$set(row, 'feeEnName', '')
                                 this.$set(row, 'feeId', '')
                                 this.$set(row, 'feeCode', '')
+                                if (this.business == 1) {
+                                    this.$set(row, 'whetherForceCurNo', '')
+                                }
                                 // 核算要素
                                 this.$set(row, 'elementsId', '')
                                 this.$set(row, 'elementsCnName', '')
@@ -2238,6 +2350,10 @@ export default {
                         this.$set(row, 'feeEnName', item.enName)
                         this.$set(row, 'feeId', item.id)
                         this.$set(row, 'feeCode', item.code)
+                        if (this.business == 1) {
+                            this.$set(row, 'whetherForceCurNo', item.whetherForceCurNo)
+                        }
+
                         // 选择费用简称带出核算要素
                         this.$set(row, 'elementsId', item.accElementId)
                         this.$set(row, 'elementsCnName', item.accElementName)
@@ -2412,6 +2528,31 @@ export default {
             if (!row.curCode) {
                 return;
             }
+            if (row.amountLimit && row.noAmount && row.amount) {
+                if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
+                    this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
+                    delete row.amountLimit
+                    delete row.noAmount
+                }
+            }
+            if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
+                let ywfSumD = 0
+                let ywfSumC = 0
+                for (let item of this.assemblyForm.feeCenterListD) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumD += Number(item.amount)
+                    }
+                }
+                for (let item of this.assemblyForm.feeCenterListC) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumC += Number(item.amount)
+                    }
+                }
+                if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
+                    this.$set(row, 'price', 0)
+                    return this.$message.error('应付的业务费不能超过应收业务费的80%');
+                }
+            }
             if (row.curCode == 'CNY') {
                 this.$set(row, 'rmbAmount', row.amount.toFixed(2))
                 this.$set(row, 'usdAmount', '')
@@ -2444,10 +2585,37 @@ export default {
                 return
             }
             this.$set(row, 'amount', price * qty)
+            this.$set(row, 'amount', price * qty)
+
             // 判断是否有币种
             if (!row.curCode) {
                 return;
             }
+            if (row.amountLimit && row.noAmount && row.amount) {
+                if ((Number(row.amount) + Number(row.noAmount)) > Number(row.amountLimit)) {
+                    this.$message.error(`应收账款:${(Number(row.amount) + Number(row.noAmount))}超出限额:${Number(row.amountLimit)}`);
+                    delete row.amountLimit
+                    delete row.noAmount
+                }
+            }
+            if (this.business == 1 && row.feeCode == 'YWF' && row.dc == 'C') {
+                let ywfSumD = 0
+                let ywfSumC = 0
+                for (let item of this.assemblyForm.feeCenterListD) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumD += Number(item.amount)
+                    }
+                }
+                for (let item of this.assemblyForm.feeCenterListC) {
+                    if (item.feeCode == 'YWF') {
+                        ywfSumC += Number(item.amount)
+                    }
+                }
+                if (Number(ywfSumC) > (Number(ywfSumD) * 0.8)) {
+                    this.$set(row, 'quantity', 1)
+                    return this.$message.error('应付的业务费不能超过应收业务费的80%');
+                }
+            }
             if (row.curCode == 'CNY') {
                 this.$set(row, 'rmbAmount', row.amount.toFixed(2))
                 this.$set(row, 'usdAmount', '')
@@ -2479,9 +2647,16 @@ export default {
         },
         // 获取费用数据
         bfeesListfun(cnName) {
-            bfeesList(1, 10, { cnName, status: 0 }).then(res => {
-                this.feeCnNameData = res.data.data.records
-            })
+            if (this.business == 1) {
+                bfeesList(1, 10, { cnName, status: 0, feesTypeCode: 'HYCK' }).then(res => {
+                    this.feeCnNameData = res.data.data.records
+                })
+            } else {
+                bfeesList(1, 10, { cnName, status: 0 }).then(res => {
+                    this.feeCnNameData = res.data.data.records
+                })
+            }
+
         },
         // 获取费用信息 核算要素信息
         getBaccelementsListfun(cnName) {
@@ -2633,6 +2808,15 @@ export default {
                 });
                 return
             }
+
+            let similarDataD = similarValues(this.assemblyForm.feeCenterListD, 'feeCnName', 'curCode')
+            if (similarDataD) {
+                return this.$message.error(`应收费用简称:${similarDataD.feeCnName}的币别不一致,请重新选择`);
+            }
+            let similarDataC = similarValues(this.assemblyForm.feeCenterListC, 'feeCnName', 'curCode')
+            if (similarDataC) {
+                return this.$message.error(`应付费用简称:${similarDataC.feeCnName}的币别不一致,请重新选择`);
+            }
             // 判断必填项
             let sum = '请输入'
             // for (let item of this.assemblyForm.feeCenterListD) {
@@ -3082,6 +3266,20 @@ export default {
         async resetColumnTwo(ref, option, optionBack, code) {
             this[option] = this[optionBack];
             const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+            if (this.business == 1) {
+                this.optionD.column.forEach(item => {
+                    if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
+                        item.hide = false
+                        item.showColumn = true
+                    }
+                })
+                this.optionC.column.forEach(item => {
+                    if (item.prop == 'taxRate' || item.prop == 'surchargeRate') {
+                        item.hide = false
+                        item.showColumn = true
+                    }
+                })
+            }
             if (inSave) {
                 this.$message.success("重置成功");
                 this.$refs[ref].$refs.dialogColumn.columnBox = false;

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

@@ -300,7 +300,7 @@
                             v-model="assemblyForm.isNeedIq">需三检</el-checkbox>
                         <el-checkbox size="medium" :true-label="1" :false-label="0" :disabled="detailData.seeDisabled"
                             v-model="assemblyForm.isLargeCargo">大件货</el-checkbox>
-                        <el-checkbox v-if="business != 1" size="medium" :true-label="1" :false-label="0" :disabled="detailData.seeDisabled"
+                        <el-checkbox  size="medium" :true-label="1" :false-label="0" :disabled="detailData.seeDisabled"
                             v-model="assemblyForm.whetherAmericaMoney">美国货</el-checkbox>
                     </div>
                 </el-col>

+ 31 - 3
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -19,7 +19,7 @@
                 </el-button>
                 <el-button type="success" size="small" style="margin-right: 8px" @click="CopyDocumentsfun">复制单据
                 </el-button>
-                <el-dropdown style="line-height: 0" v-if="saberTenantId == '409341' || saberTenantId == '607913'">
+                <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
                     <el-button size="small" type="warning" style="margin-right: 8px"
                         :disabled="form.status > 0 || showLock || !form.id">
                         导入模板<i class="el-icon-arrow-down el-icon--right"></i>
@@ -101,7 +101,7 @@
                                                                 }} {{ item[0].label }}
                                                             </span>
                                                             <span v-else style="color: #1e9fff">{{ item[0].label
-                                                            }}</span>
+                                                                }}</span>
                                                         </span>
                                                         <span v-if="item[0].type == 'button'"></span>
                                                         <!--<el-button v-if="item[0].type == 'button'" :disabled="detailData.seeDisabled || item[0].disabled"-->
@@ -346,6 +346,7 @@ import { verifyEnglish, checkFullWidthSymbols } from "@/util/date";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import { selectListLos } from "@/api/approval/processConfig";
 import { isProcurement } from "@/api/basicData/configuration";
+import { similarValues } from "@/util/verifyData";
 import _ from "lodash";
 export default {
     components: {
@@ -427,6 +428,7 @@ export default {
                 placeDeliveryNamePrint: '',
                 potEnName: '',
                 potNamePrint: '',
+                chargeableWeight:'方',
                 detail: {},
                 hmmEdi: {},
             },
@@ -467,6 +469,7 @@ export default {
                 placeDeliveryNamePrint: '',
                 potEnName: '',
                 potNamePrint: '',
+                chargeableWeight:'方',
                 detail: {},
                 hmmEdi: {},
             },
@@ -791,6 +794,7 @@ export default {
             excelBox: false,
             saberTenantId: 0,
             business: null,
+            importTemplate: null,
         }
     },
     watch: {
@@ -854,6 +858,10 @@ export default {
         isProcurement({ "param": "business" }).then(res => {
             this.business = res.data.data
         })
+
+        isProcurement({ "param": "import.template" }).then(res => {
+            this.importTemplate = res.data.data
+        })
         if (this.detailData.billType) {
             this.form.billType = this.detailData.billType
         }
@@ -1679,10 +1687,16 @@ export default {
                 // 主单付费方式
                 this.form[name] = value
                 if (value == 'PP') {
+                    if (this.business == 1) {
+                        this.$set(this.form, 'hpaymode', 'PP')
+                        this.$set(this.form, 'hpayplace', this.form.polEnName ? this.form.polEnName : '')
+                    }
                     this.$set(this.form, 'mpayplace', this.form.polEnName ? this.form.polEnName : '')
                 } else {
                     if (this.business == 1) {
+                        this.$set(this.form, 'hpaymode', 'CC')
                         this.$set(this.form, 'mpayplace', 'DESTINATION')
+                        this.$set(this.form, 'hpayplace', 'DESTINATION')
                     } else {
                         this.$set(this.form, 'mpayplace', this.form.podEnName ? this.form.podEnName : '')
                     }
@@ -1693,9 +1707,15 @@ export default {
                 // 分单付费方式
                 this.form[name] = value
                 if (value == 'PP') {
-                    this.$set(this.form, 'hpayplace', this.form.polEnName)
+                    if (this.business == 1) {
+                        this.$set(this.form, 'mpaymode', 'PP')
+                        this.$set(this.form, 'mpayplace', this.form.polEnName ? this.form.polEnName : '')
+                    }
+                    this.$set(this.form, 'hpayplace', this.form.polEnName ? this.form.polEnName : '')
                 } else {
                     if (this.business == 1) {
+                        this.$set(this.form, 'mpaymode', 'CC')
+                        this.$set(this.form, 'mpayplace', 'DESTINATION')
                         this.$set(this.form, 'hpayplace', 'DESTINATION')
                     } else {
                         this.$set(this.form, 'hpayplace', this.form.podEnName ? this.form.podEnName : '')
@@ -2191,6 +2211,14 @@ export default {
             // 把拼接的数据拆开 结束 💩💩💩💩💩💩💩💩💩💩💩💩💩💩
             // 费用 收 赋值数据
             // this.form.shortName=this.form.corpCnName.split('-')[1]
+            let similarDataD = similarValues(this.form.feeCenterListD, 'feeCnName', 'curCode')
+            if (similarDataD) {
+                return this.$message.error(`应收费用简称:${similarDataD.feeCnName}的币别不一致,请重新选择`);
+            }
+            let similarDataC = similarValues(this.form.feeCenterListC, 'feeCnName', 'curCode')
+            if (similarDataC) {
+                return this.$message.error(`应付费用简称:${similarDataC.feeCnName}的币别不一致,请重新选择`);
+            }
             this.form.feeCenterListD.map((row, index) => {
                 row.dc = 'D'
                 row.sort = Number(index) + 1

+ 385 - 393
src/views/iosBasicData/bfeesdefine/bfeesdetype.vue

@@ -1,330 +1,287 @@
 <template>
-    <basic-container>
-        <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', 302.1)"
-                   @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 302.1)"
-                   @on-load="onLoad">
-            <template slot="menuLeft">
-                <el-button type="danger"
-                           size="small"
-                           icon="el-icon-delete"
-                           plain
-                           @click="handleDelete">删 除
-                </el-button>
-            </template>
-            <template slot-scope="scope" slot="menu">
-                <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
-                           @click.stop="statusfun(scope.row.id,0)">
-                    启用
-                </el-button>
-                <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
-                           @click.stop="statusfun(scope.row.id,1)">
-                    停用
-                </el-button>
-            </template>
-        </avue-crud>
-    </basic-container>
+  <basic-container>
+    <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', 302.1)"
+      @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 302.1)" @on-load="onLoad">
+      <template slot="menuLeft">
+        <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
+        </el-button>
+      </template>
+      <template slot-scope="scope" slot="menu">
+        <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
+          @click.stop="statusfun(scope.row.id, 0)">
+          启用
+        </el-button>
+        <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
+          @click.stop="statusfun(scope.row.id, 1)">
+          停用
+        </el-button>
+      </template>
+    </avue-crud>
+  </basic-container>
 </template>
 
 <script>
-  import {bfeesdefineList, bfeesdefineDetail, bfeesdefineSubmit, bfeesdefineRemove} from "@/api/iosBasicData/bfeesdefine";
-  import {mapGetters} from "vuex";
+import { bfeesdefineList, bfeesdefineDetail, bfeesdefineSubmit, bfeesdefineRemove } from "@/api/iosBasicData/bfeesdefine";
+import { mapGetters } from "vuex";
 
-  export default {
-    data() {
+export default {
+  data() {
+    return {
+      form: {},
+      query: {},
+      loading: true,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0,
+        ageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        addBtnText: '新建类别',
+        addTitle: '新建类别',
+        editBtnText: '编辑',
+        editTitle: '编辑类别',
+        viewBtnText: '查看',
+        viewTitle: '查看类别',
+        height: 'auto',
+        calcHeight: 30,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        viewBtn: true,
+        selection: true,
+        dialogClickModal: false,
+        menuWidth: 260,
+        column: [
+          {
+            label: "中文名称",
+            prop: "cnName",
+            search: true,
+            rules: [{
+              required: true,
+              message: "请输入中文名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "英文名称",
+            prop: "enName",
+            search: true,
+            rules: [{
+              required: true,
+              message: "请输入英文名称",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "编码",
+            prop: "code",
+            search: true,
+            rules: [{
+              required: true,
+              message: "请输入编码",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "排序",
+            prop: "sort",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "版本",
+            prop: "version",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "状态",
+            prop: "status",
+            type: 'select',
+            dicData: [{
+              label: '启用',
+              value: 0
+            }, {
+              label: '停用',
+              value: 1
+            }],
+            rules: [{
+              required: true,
+              message: "请选择状态",
+              trigger: "blur"
+            }]
+          },
+          {
+            label: "主键",
+            prop: "id",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "创建人 Id",
+            prop: "createUser",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "创建人",
+            prop: "createUserName",
+            display: false,
+          },
+          {
+            label: "创建部门 Id",
+            prop: "createDept",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "创建部门",
+            prop: "createDeptName",
+            display: false,
+          },
+          {
+            label: "创建时间",
+            prop: "createTime",
+            width: 160,
+            display: false,
+          },
+          {
+            label: "修改人 Id",
+            prop: "updateUser",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "修改人",
+            prop: "updateUserName",
+            display: false,
+          },
+          {
+            label: "修改时间",
+            prop: "updateTime",
+            width: 160,
+            display: false,
+          },
+          {
+            label: "父主键",
+            prop: "parentId",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "祖籍列表",
+            prop: "ancestors",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "是否已删除(0 否 1是)",
+            prop: "isDeleted",
+            hide: true,
+            display: false,
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            span: 24,
+            type: 'textarea',
+            width: "180",
+            slot: true,
+            minRows: 3,
+          },
+        ]
+      },
+      data: []
+    };
+  },
+  computed: {
+    ...mapGetters(["permission"]),
+    permissionList() {
       return {
-        form: {},
-        query: {},
-        loading: true,
-        page: {
-          pageSize: 10,
-          currentPage: 1,
-          total: 0,
-          ageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
-        },
-        selectionList: [],
-        option:{},
-        optionBack: {
-            addBtnText: '新建类别',
-            addTitle: '新建类别',
-            editBtnText: '编辑',
-            editTitle: '编辑类别',
-            viewBtnText: '查看',
-            viewTitle: '查看类别',
-          height:'auto',
-          calcHeight: 30,
-          tip: false,
-          searchShow: true,
-          searchMenuSpan: 6,
-          border: true,
-          index: true,
-          viewBtn: true,
-          selection: true,
-          dialogClickModal: false,
-            menuWidth:260,
-          column: [
-            {
-              label: "中文名称",
-              prop: "cnName",
-                search: true,
-              rules: [{
-                required: true,
-                message: "请输入中文名称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "英文名称",
-              prop: "enName",
-                search: true,
-              rules: [{
-                required: true,
-                message: "请输入英文名称",
-                trigger: "blur"
-              }]
-            },
-            {
-              label: "排序",
-              prop: "sort",
-                hide:true,
-                display:false,
-            },
-            {
-              label: "版本",
-              prop: "version",
-                hide:true,
-                display:false,
-            },
-            {
-              label: "状态",
-              prop: "status",
-                type:'select',
-                dicData:[{
-                    label:'启用',
-                    value:0
-                },{
-                    label:'停用',
-                    value:1
-                }],
-              rules: [{
-                required: true,
-                message: "请选择状态",
-                trigger: "blur"
-              }]
-            },
-              {
-                  label: "主键",
-                  prop: "id",
-                  hide:true,
-                  display:false,
-              },
-              {
-                  label: "创建人 Id",
-                  prop: "createUser",
-                  hide:true,
-                  display:false,
-              },
-              {
-                  label: "创建人",
-                  prop: "createUserName",
-                  display:false,
-              },
-              {
-                  label: "创建部门 Id",
-                  prop: "createDept",
-                  hide:true,
-                  display:false,
-              },
-              {
-                  label: "创建部门",
-                  prop: "createDeptName",
-                  display:false,
-              },
-              {
-                  label: "创建时间",
-                  prop: "createTime",
-                  width: 160,
-                  display:false,
-              },
-              {
-                  label: "修改人 Id",
-                  prop: "updateUser",
-                  hide:true,
-                  display:false,
-              },
-              {
-                  label: "修改人",
-                  prop: "updateUserName",
-                  display:false,
-              },
-              {
-                  label: "修改时间",
-                  prop: "updateTime",
-                  width:160,
-                  display:false,
-              },
-              {
-                  label: "父主键",
-                  prop: "parentId",
-                  hide:true,
-                  display:false,
-              },
-              {
-                  label: "祖籍列表",
-                  prop: "ancestors",
-                  hide:true,
-                  display:false,
-              },
-            {
-              label: "是否已删除(0 否 1是)",
-              prop: "isDeleted",
-                hide:true,
-                display:false,
-            },
-            {
-              label: "备注",
-              prop: "remarks",
-                span:24,
-                type: 'textarea',
-                width: "180",
-                slot: true,
-                minRows: 3,
-            },
-          ]
-        },
-        data: []
+        // addBtn: this.vaildData(this.permission.bfeesdefine_add, false),
+        // viewBtn: this.vaildData(this.permission.bfeesdefine_view, false),
+        // delBtn: this.vaildData(this.permission.bfeesdefine_delete, false),
+        // editBtn: this.vaildData(this.permission.bfeesdefine_edit, false)
       };
     },
-    computed: {
-      ...mapGetters(["permission"]),
-      permissionList() {
-        return {
-          // addBtn: this.vaildData(this.permission.bfeesdefine_add, false),
-          // viewBtn: this.vaildData(this.permission.bfeesdefine_view, false),
-          // delBtn: this.vaildData(this.permission.bfeesdefine_delete, false),
-          // editBtn: this.vaildData(this.permission.bfeesdefine_edit, false)
-        };
-      },
-      ids() {
-        let ids = [];
-        this.selectionList.forEach(ele => {
-          ids.push(ele.id);
-        });
-        return ids.join(",");
-      }
+    ids() {
+      let ids = [];
+      this.selectionList.forEach(ele => {
+        ids.push(ele.id);
+      });
+      return ids.join(",");
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(302.1), this.optionBack);
+  },
+  methods: {
+    // 禁用启用按钮
+    statusfun(id, status) {
+      this.$confirm("确定将选择数据更改状态?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        bfeesdefineDetail(id).then(res => {
+          let obj = res.data.data;
+          obj.status = status
+          bfeesdefineSubmit(obj).then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          })
+        })
+      })
     },
-      async created() {
-          this.option = await this.getColumnData(this.getColumnName(302.1), this.optionBack);
-      },
-    methods: {
-        // 禁用启用按钮
-        statusfun(id,status){
-            this.$confirm("确定将选择数据更改状态?", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(()=>{
-                bfeesdefineDetail(id).then(res=>{
-                    let obj = res.data.data;
-                    obj.status = status
-                    bfeesdefineSubmit(obj).then(()=>{
-                        this.onLoad(this.page);
-                        this.$message({
-                            type: "success",
-                            message: "操作成功!"
-                        });
-                    })
-                })
-            })
-        },
 
-      rowSave(row, done, loading) {
-        bfeesdefineSubmit(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          loading();
-          window.console.log(error);
+    rowSave(row, done, loading) {
+      bfeesdefineSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
         });
-      },
-      rowUpdate(row, index, done, loading) {
-        bfeesdefineSubmit(row).then(() => {
-          this.onLoad(this.page);
-          this.$message({
-            type: "success",
-            message: "操作成功!"
-          });
-          done();
-        }, error => {
-          loading();
-          console.log(error);
+        done();
+      }, error => {
+        loading();
+        window.console.log(error);
+      });
+    },
+    rowUpdate(row, index, done, loading) {
+      bfeesdefineSubmit(row).then(() => {
+        this.onLoad(this.page);
+        this.$message({
+          type: "success",
+          message: "操作成功!"
         });
-      },
-      rowDel(row) {
-        if (row.status === 1) {
-            this.$confirm("确定将选择数据删除?", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            })
-                .then(() => {
-                    return bfeesdefineRemove(row.id);
-                })
-                .then(() => {
-                    this.onLoad(this.page);
-                    this.$message({
-                        type: "success",
-                        message: "操作成功!"
-                    });
-                });
-        }else {
-            this.$message({
-                message: '非禁用状态无法删除',
-                type: 'warning'
-            });
-        }
-
-      },
-      handleDelete() {
-        if (this.selectionList.length === 0) {
-          this.$message.warning("请选择至少一条数据");
-          return;
-        }
-          for (const selection of this.selectionList) {
-              if (selection.status == 0) {
-                  this.$message.warning("选中的数据中有启用数据,启用数据不可删除!");
-                  return;
-              }
-          }
+        done();
+      }, error => {
+        loading();
+        console.log(error);
+      });
+    },
+    rowDel(row) {
+      if (row.status === 1) {
         this.$confirm("确定将选择数据删除?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         })
           .then(() => {
-            return bfeesdefineRemove(this.ids);
+            return bfeesdefineRemove(row.id);
           })
           .then(() => {
             this.onLoad(this.page);
@@ -332,98 +289,133 @@
               type: "success",
               message: "操作成功!"
             });
-            this.$refs.crud.toggleSelection();
-          });
-      },
-      beforeOpen(done, type) {
-        if (["edit", "view"].includes(type)) {
-          bfeesdefineDetail(this.form.id).then(res => {
-            this.form = res.data.data;
           });
+      } else {
+        this.$message({
+          message: '非禁用状态无法删除',
+          type: 'warning'
+        });
+      }
+
+    },
+    handleDelete() {
+      if (this.selectionList.length === 0) {
+        this.$message.warning("请选择至少一条数据");
+        return;
+      }
+      for (const selection of this.selectionList) {
+        if (selection.status == 0) {
+          this.$message.warning("选中的数据中有启用数据,启用数据不可删除!");
+          return;
         }
-        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;
-        bfeesdefineList(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;
-          this.selectionClear();
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          return bfeesdefineRemove(this.ids);
+        })
+        .then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          this.$refs.crud.toggleSelection();
         });
-      },
-        //自定义列保存
-        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;
-        },
-    }
-  };
+    },
+    beforeOpen(done, type) {
+      if (["edit", "view"].includes(type)) {
+        bfeesdefineDetail(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;
+      bfeesdefineList(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;
+        this.selectionClear();
+      });
+    },
+    //自定义列保存
+    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;
+  background: #ecf5ff !important;
 }
+
 ::v-deep#out-table .back-two {
-    background: #ecf5ff !important;
+  background: #ecf5ff !important;
 }
 </style>

+ 142 - 126
src/views/iosBasicData/bfeesdefine/index.vue

@@ -19,12 +19,12 @@
       </el-col>
       <el-col :span="20">
         <basic-container>
-          <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" :search.sync="search"
-            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', 302)"
+          <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" :search.sync="search" 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', 302)"
             @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 302)" @on-load="onLoad">
             <template slot="menuLeft">
               <el-button type="danger" size="small" icon="el-icon-delete" plain @click="handleDelete">删 除
@@ -33,54 +33,47 @@
               </el-button>
               <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
             </template>
-              <template slot-scope="scope" slot="menu">
-                  <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
-                             @click.stop="statusfun(scope.row.id,0)">
-                      启用
-                  </el-button>
-                  <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
-                             @click.stop="statusfun(scope.row.id,1)">
-                      停用
-                  </el-button>
-              </template>
+            <template slot-scope="scope" slot="menu">
+              <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967"
+                size="small" @click.stop="statusfun(scope.row.id, 0)">
+                启用
+              </el-button>
+              <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a"
+                size="small" @click.stop="statusfun(scope.row.id, 1)">
+                停用
+              </el-button>
+            </template>
             <template slot="unitNoForm">
-              <search-query ref="SearchQuery"
-                            :disabled="searchDisabled"
-                            :selectValue="form.unitNo"
-                            :datalist="unitNoData"
-                            title="计量单位"
-                            :filterable="true"
-                            :clearable="true"
-                            :buttonIf="false"
-                            :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
-                            @corpChange="unitNoCorpChange">
+              <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.unitNo"
+                :datalist="unitNoData" title="计量单位" :filterable="true" :clearable="true" :buttonIf="false"
+                :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }" @corpChange="unitNoCorpChange">
               </search-query>
             </template>
             <template slot="curNoForm">
-              <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.curNo" :datalist="curNoData" title="币别" :filterable="true" :clearable="true"
-                :remote="true" :forParameter="{ key: 'id', label: 'code', value: 'code' }"
-                @remoteMethod="getRateListfun" @corpChange="curNoCorpChange">
+              <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.curNo" :datalist="curNoData"
+                title="币别" :filterable="true" :clearable="true" :remote="true"
+                :forParameter="{ key: 'id', label: 'code', value: 'code' }" @remoteMethod="getRateListfun"
+                @corpChange="curNoCorpChange">
                 <rateManagement></rateManagement>
               </search-query>
             </template>
             <template slot="feesTypeNameForm">
-              <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.feesTypeName" :datalist="feesTypeData" title="费用类别"
-                            :filterable="true" :clearable="true"
-                :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
-                @remoteMethod="bfeesdefineListfun" @corpChange="feesTypeCorpChange">
+              <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.feesTypeName"
+                :datalist="feesTypeData" title="费用类别" :filterable="true" :clearable="true" :remote="true"
+                :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }" @remoteMethod="bfeesdefineListfun"
+                @corpChange="feesTypeCorpChange">
                 <bfeesdetype></bfeesdetype>
               </search-query>
             </template>
 
-              <template slot-scope="scope" slot="accElementNameForm">
-                  <search-query ref="SearchQuery" :disabled="searchDisabled"
-                                :selectValue="form.accElementName" :datalist="accElementData" title="费用类别"
-                                :filterable="true" :clearable="true"
-                                :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
-                                @remoteMethod="getBaccelementsListfun" @corpChange="accElementCorpChange">
-                      <baccelements></baccelements>
-                  </search-query>
-              </template>
+            <template slot-scope="scope" slot="accElementNameForm">
+              <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.accElementName"
+                :datalist="accElementData" title="费用类别" :filterable="true" :clearable="true" :remote="true"
+                :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }" @remoteMethod="getBaccelementsListfun"
+                @corpChange="accElementCorpChange">
+                <baccelements></baccelements>
+              </search-query>
+            </template>
           </avue-crud>
         </basic-container>
       </el-col>
@@ -128,16 +121,16 @@ import rateManagement from '@/views/iosBasicData/rateManagement/index.vue'
 import baccelements from "@/views/iosBasicData/baccelements/index.vue";
 
 import { getToken } from "@/util/auth";
-import {getBaccelementsList} from "@/api/iosBasicData/baccelements";
-import {getWorkDicts} from "@/api/system/dictbiz";
+import { getBaccelementsList } from "@/api/iosBasicData/baccelements";
+import { getWorkDicts } from "@/api/system/dictbiz";
 
 
 export default {
   components: { bunits, bfeesdetype, rateManagement, SearchQuery, baccelements },
   data() {
     return {
-        // 是否禁用
-        searchDisabled:false,
+      // 是否禁用
+      searchDisabled: false,
       // 类别弹窗的开启
       corpTypeVisible: false,
       // 费用类别数据
@@ -146,8 +139,8 @@ export default {
       unitNoData: [],
       // 币别数据
       curNoData: [],
-        // 核算名称
-        accElementData:[],
+      // 核算名称
+      accElementData: [],
 
       treeOption: {
         nodeKey: "id",
@@ -226,7 +219,7 @@ export default {
         viewBtn: false,
         selection: true,
         dialogClickModal: false,
-          menuWidth:220,
+        menuWidth: 220,
         column: [
           // {
           //     label: "凭证",
@@ -248,7 +241,7 @@ export default {
               message: "请输入费用编码",
               trigger: "blur"
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "中文名称",
@@ -260,7 +253,7 @@ export default {
               message: "请输入中文名称",
               trigger: "blur"
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "英文名称",
@@ -272,13 +265,13 @@ export default {
               message: "请输入英文名称",
               trigger: "blur"
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "费用类别",
             prop: "feesTypeName",
             formslot: true,
-              overHidden:true,
+            overHidden: true,
             // rules: [{
             //       required: true,
             //       message: "请选择费用类别",
@@ -289,12 +282,12 @@ export default {
             label: "计量单位",
             prop: "unitNo",
             formslot: true,
-            overHidden:true,
+            overHidden: true,
             type: 'select',
             dicData: [],
             props: {
-                label: "dictValue",
-                value: "dictKey"
+              label: "dictValue",
+              value: "dictKey"
             },
             rules: [{
               required: true,
@@ -306,7 +299,7 @@ export default {
             label: "币别",
             prop: "curNo",
             formslot: true,
-              overHidden:true,
+            overHidden: true,
             // rules: [{
             //   required: true,
             //   message: "请输入币别",
@@ -325,18 +318,18 @@ export default {
           {
             label: "核算名称",
             prop: "accElementName",
-              formslot: true,
+            formslot: true,
             rules: [{
               required: true,
               message: "请输入财务核算要素名称",
               trigger: "blur"
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "科目 Id",
             prop: "accId",
-              overHidden:true,
+            overHidden: true,
             // rules: [{
             //     required: true,
             //     message: "请输入科目 Id",
@@ -346,7 +339,7 @@ export default {
           {
             label: "科目编号",
             prop: "accNo",
-              overHidden:true,
+            overHidden: true,
             // rules: [{
             //   required: true,
             //   message: "请输入科目编号",
@@ -356,7 +349,7 @@ export default {
           {
             label: "科目全称",
             prop: "accFullName",
-              overHidden:true,
+            overHidden: true,
             // rules: [{
             //   required: true,
             //   message: "请输入科目全称",
@@ -368,7 +361,7 @@ export default {
             prop: "version",
             hide: true,
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "收付",
@@ -381,13 +374,28 @@ export default {
               label: '付',
               value: 'C'
             }],
-              overHidden:true,
+            overHidden: true,
+          },
+          {
+            label: "强制币别",
+            prop: "whetherForceCurNo",
+            type: 'select',
+            search: true,
+            dicData: [{
+              label: '是',
+              value: 1
+            }, {
+              label: '否',
+              value: 0
+            }],
+            value: 0,
+            overHidden: true,
           },
           {
             label: "状态",
             prop: "status",
             type: 'select',
-              search: true,
+            search: true,
             dicData: [{
               label: '启用',
               value: 0
@@ -396,7 +404,7 @@ export default {
               value: 1
             }],
             value: 0,
-              overHidden:true,
+            overHidden: true,
             // rules: [{
             //   required: true,
             //   message: "请输入状态",
@@ -407,40 +415,40 @@ export default {
             label: "创建人",
             prop: "createUserName",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "创建部门",
             prop: "createDeptName",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "创建时间",
             prop: "createTime",
             width: 160,
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "修改人",
             prop: "updateUserName",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "修改时间",
             prop: "updateTime",
             width: 160,
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "是否已删除(0 否 1是)",
             prop: "isDeleted",
             hide: true,
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "备注",
@@ -450,7 +458,7 @@ export default {
             width: "180",
             slot: true,
             minRows: 3,
-              overHidden:true,
+            overHidden: true,
           },
         ]
       },
@@ -480,29 +488,29 @@ export default {
     this.bfeesdefineListfun()
     this.getBunitsListfun()
     this.getRateListfun()
-      this.getBaccelementsListfun()
+    this.getBaccelementsListfun()
   },
   methods: {
-      // 禁用启用按钮
-      statusfun(id,status){
-          this.$confirm("确定将选择数据更改状态?", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-          }).then(()=>{
-              bfeesDetail(id).then(res=>{
-                  let obj = res.data.data;
-                  obj.status = status
-                  bfeesSubmit(obj).then(()=>{
-                      this.onLoad(this.page);
-                      this.$message({
-                          type: "success",
-                          message: "操作成功!"
-                      });
-                  })
-              })
+    // 禁用启用按钮
+    statusfun(id, status) {
+      this.$confirm("确定将选择数据更改状态?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        bfeesDetail(id).then(res => {
+          let obj = res.data.data;
+          obj.status = status
+          bfeesSubmit(obj).then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
           })
-      },
+        })
+      })
+    },
     // 导出
     handleExport() {
       var condition = ''
@@ -556,10 +564,10 @@ export default {
     },
     // 获取计算单位数据
     getBunitsListfun() {
-        getWorkDicts('number_rule').then(res=>{
-            this.unitNoData = res.data.data
-            this.findObject(this.option.column, "unitNo").dicData = res.data.data
-        })
+      getWorkDicts('number_rule').then(res => {
+        this.unitNoData = res.data.data
+        this.findObject(this.option.column, "unitNo").dicData = res.data.data
+      })
     },
 
     // 获取币别数据
@@ -572,33 +580,41 @@ export default {
         this.curNoData = res.data.data.records
       })
     },
-      // 获取核算要素数据
-      getBaccelementsListfun(cnName){
-          getBaccelementsList(1, 10, { cnName }).then(res=>{
-              this.accElementData = res.data.data.records
-          })
-      },
-      // 核算要素的监听
-      accElementCorpChange(value){
-          for(let item of this.accElementData) {
-              if(item.cnName == value) {
-                  this.$set(this.form,'accElementId',item.id)
-                  this.$set(this.form,'accElementName',item.cnName)
-                  this.$set(this.form,'elementsCode',item.code)
-                  this.$set(this.form,'elementsEnName',item.enName)
-              }
-          }
+    // 获取核算要素数据
+    getBaccelementsListfun(cnName) {
+      getBaccelementsList(1, 10, { cnName }).then(res => {
+        this.accElementData = res.data.data.records
+      })
+    },
+    // 核算要素的监听
+    accElementCorpChange(value) {
+      for (let item of this.accElementData) {
+        if (item.cnName == value) {
+          this.$set(this.form, 'accElementId', item.id)
+          this.$set(this.form, 'accElementName', item.cnName)
+          this.$set(this.form, 'elementsCode', item.code)
+          this.$set(this.form, 'elementsEnName', item.enName)
+        }
+      }
 
-      },
+    },
 
     // 费用信息选中回调
     feesTypeCorpChange(value) {
-      this.feesTypeData.map(item => {
-        if (item.cnName == value) {
-          this.form.feesTypeId = item.id
-          this.form.feesTypeName = item.cnName
-        }
-      })
+      if (value) {
+        this.feesTypeData.map(item => {
+          if (item.cnName == value) {
+            this.form.feesTypeId = item.id
+            this.form.feesTypeName = item.cnName
+            this.form.feesTypeCode = item.code
+          }
+        })
+      } else {
+        this.form.feesTypeId = null
+        this.form.feesTypeName = null
+        this.form.feesTypeCode = null
+      }
+
     },
     // 计量单位选中的回调
     unitNoCorpChange(value) {
@@ -697,11 +713,11 @@ export default {
         });
     },
     beforeOpen(done, type) {
-        if (["edit", "add"].includes(type)) {
-            this.searchDisabled = false
-        } else {
-            this.searchDisabled = true
-        }
+      if (["edit", "add"].includes(type)) {
+        this.searchDisabled = false
+      } else {
+        this.searchDisabled = true
+      }
       if (["edit", "view"].includes(type)) {
         bfeesDetail(this.form.id).then(res => {
           this.form = res.data.data;
@@ -747,7 +763,7 @@ export default {
     },
     // 类别弹窗关闭
     corpTypeClose(done) {
-        done();
+      done();
       // this.$confirm('确认关闭?')
       //   .then(_ => {
       //     done();

Some files were not shown because too many files changed in this diff