Ver Fonte

修改bug

Qukatie há 1 ano atrás
pai
commit
5563a929c5

+ 14 - 0
src/router/views/index.js

@@ -3585,4 +3585,18 @@ export default [{
     component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/statisticAnalysis/profitLedger/index')
   }]
 },
+{
+  path: '/iosBasicData/decisionAnalysis/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/iosBasicData/decisionAnalysis/index',
+    name: '海运箱量利润统计',
+    meta: {
+      i18n: '/iosBasicData/decisionAnalysis/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views//iosBasicData/decisionAnalysis/index')
+  }]
+},
 ]

+ 545 - 20
src/views/iosBasicData/decisionAnalysis/index.vue

@@ -1,30 +1,56 @@
 <template>
     <basic-container>
-        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" v-model="form"
-            ref="crud" id="out-table" :header-cell-class-name="headerClassName" @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', 372)"
-            @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 372)" @on-load="onLoad">
-            <template slot="menuLeft">
-                <el-button type="success" size="small" plain @click="Export">导出</el-button>
-            </template>
-            <template slot="header">
-                <avue-crud :data="commodityData" :table-loading="itemLoading" :option="itemOption"></avue-crud>
-            </template>
-        </avue-crud>
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+            <el-tab-pane label="明细" name="first">
+                <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :search.sync="query"
+                    v-model="form" ref="crud" id="out-table" :header-cell-class-name="headerClassName" @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', 372)"
+                    @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 372)" @on-load="onLoad"
+                    @search-criteria-switch="searchCriteriaSwitch">
+                    <template slot="menuLeft">
+                        <el-button type="success" size="small" plain @click="Export">导出</el-button>
+                    </template>
+                    <template slot="header">
+                        <avue-crud :data="commodityData" :table-loading="itemLoading" :option="itemOption"></avue-crud>
+                    </template>
+                </avue-crud>
+            </el-tab-pane>
+            <el-tab-pane label="图表" name="second">
+                <avue-crud :option="chartOption" :table-loading="loading" :data="chartList" :search.sync="search"
+                    v-model="form" ref="chartCrud" id="out-table" :header-cell-class-name="headerClassName"
+                    @search-change="chartSearchChange" @search-reset="chartSearchReset">
+                    <template slot="chartSearch">
+                        <avue-radio v-model="search.chart" :dic="chartDic" @change="chartChange"></avue-radio>
+                    </template>
+                    <template slot="typeSearch">
+                        <avue-radio v-model="search.type" :dic="typeDic" @change="typeChange"></avue-radio>
+                    </template>
+                </avue-crud>
+                <div v-loading="loading" ref="echartsContainer" style="width: 90vw; height: 56vh;margin-top: 10px;"></div>
+            </el-tab-pane>
+        </el-tabs>
     </basic-container>
 </template>
   
 <script>
-import { getList, boxNumberProfitStatisticsSum} from "@/api/iosBasicData/decisionAnalysis";
+import { getList, boxNumberProfitStatisticsSum } from "@/api/iosBasicData/decisionAnalysis";
 import { getToken } from "@/util/auth";
-import {defaultDate3} from "@/util/date";
+import { boxNumberProfitStatisticsChart } from "@/api/iosBasicData/horizontalStatistics";
+import * as echarts from 'echarts';
 export default {
     data() {
         return {
+            activeName: 'first',
             form: {},
+            search: {
+                chart: 1,
+                type: 1,
+            },
             query: {
+                chart: 1,
+                type: 1,
             },
             loading: false,
             itemLoading: false,
@@ -348,6 +374,12 @@ export default {
                 height: '90',
                 column: [
                     {
+                        label: "Teu",
+                        prop: "teu",
+                        width: '100',
+                        overHidden: true,
+                    },
+                    {
                         label: "20",
                         prop: "quantityV20",
                         width: '100',
@@ -433,18 +465,224 @@ export default {
                     }
                 ]
             },
+            chartOption: {
+                height: '130px',
+                calcHeight: 30,
+                searchShow: true,
+                searchMenuSpan: 12,
+                border: true,
+                addBtn: false,
+                menu: false,
+                header: false,
+                searchLabelWidth: "80",
+                align: 'center',
+                column: [
+                    {
+                        label: "业务来源",
+                        prop: "srcType",
+                        search: true,
+                        type: 'select',
+                        filterable: true,
+                        dicUrl: '/api/blade-system/dict-biz/dictionary?code=src_type_los',
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        disabled: true,
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey"
+                        },
+                    },
+                    {
+                        label: "委托人",
+                        prop: "corpCnName",
+                        type: 'select',
+                        search: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
+                        props: {
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
+                        },
+                        width: '100',
+                        overHidden: true,
+                    },
+                    {
+                        label: "业务员",
+                        prop: "srcCnName",
+                        search: true,
+                        width: '100',
+                        overHidden: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+                        props: {
+                            label: "account",
+                            value: "account",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "场站",
+                        prop: "cyCnName",
+                        search: true,
+                        width: '100',
+                        overHidden: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "/api/blade-los/bcorps/listByType?status=0&current=1&size=10&corpTypeName=场站&cnName={{key}}",
+                        props: {
+                            label: "cnName",
+                            value: "cnName",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "船公司",
+                        prop: "carrierCnName",
+                        search: true,
+                        width: '100',
+                        overHidden: true,
+                        filterable: true,
+                        hide: true,
+                        showColumn: false,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "/api/blade-los/bcorps/listByType?status=0&corpTypeName=船公司&current=1&size=10&cnName={{key}}",
+                        props: {
+                            label: "cnName",
+                            value: "cnName",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "开船日期",
+                        prop: "date",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        searchProp: "etdList",
+                        type: "date",
+                        unlinkPanels: true,
+                        searchRange: true,
+                        format: "yyyy-MM-dd",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
+                        searchDefaultTime: ["00:00:00", "23:59:59"],
+                    },
+                    {
+                        label: "航线",
+                        prop: "lineCnName",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        filterable: true,
+                        remote: true,
+                        type: "select",
+                        dicUrl: "api/blade-los/blines/list?status=0&current=1&size=10&cnName={{key}}",
+                        props: {
+                            label: "cnName",
+                            value: "cnName",
+                            res: 'data.records'
+                        }
+                    },
+                    {
+                        label: "业务类型",
+                        prop: "businessType",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
+                        filterable: true,
+                        type: 'select',
+                        dicUrl: '/api/blade-system/dict-biz/dictionary?code=decisionAnalysis_business_type',
+                        props: {
+                            label: "dictValue",
+                            value: "dictKey"
+                        },
+                    },
+                    {
+                        label: "选择图表",
+                        prop: "chart",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                    },
+                    {
+                        label: "类型",
+                        prop: "type",
+                        search: true,
+                        hide: true,
+                        showColumn: false,
+                    }],
+            },
+            chartDic: [{
+                label: '箱量图',
+                value: 1
+            }, {
+                label: '利润图',
+                value: 2
+            }, {
+                label: '利润率图',
+                value: 3
+            }],
+            typeDic: [{
+                label: '船公司',
+                value: 1
+            }, {
+                label: '客户',
+                value: 2
+            }, {
+                label: '业务员',
+                value: 3
+            }],
+            chartList: [],
+            chartData: []
         };
     },
     async created() {
         this.option = await this.getColumnData(this.getColumnName(372), this.optionBack)
+        this.option.height = window.innerHeight - 370;
     },
     methods: {
+        handleClick() {
+            if (this.activeName == 'first') {
+                this.query = this.search
+                this.onLoad(this.page, this.query)
+            } else {
+                this.search = this.deepClone(this.query)
+                this.chartOnLoad()
+            }
+        },
         searchReset() {
-            this.query = this.$options.data.query;
+            this.query = {
+                chart: 1,
+                type: 1,
+            };
             this.onLoad(this.page);
         },
+        searchCriteriaSwitch(type) {
+            if (type) {
+                this.option.height = this.option.height - 73;
+            } else {
+                this.option.height = this.option.height + 73;
+            }
+            this.$refs.crud.getTableHeight();
+        },
         // 搜索点击回调
         searchChange(params, done) {
+            this.page.currentPage = 1;
             if (params.etdList) {
                 params = {
                     ...params,
@@ -452,9 +690,7 @@ export default {
                     dateEnd: params.etdList[1],
                 }
             }
-            this.query = params;
-            this.page.currentPage = 1;
-            console.log()
+            this.query = params
             this.onLoad(this.page, params);
             done();
         },
@@ -472,12 +708,19 @@ export default {
         },
         onLoad(page, params = {}) {
             this.loading = true;
+            if (params.etdList) {
+                params = {
+                    ...params,
+                    dateStart: params.etdList[0],
+                    dateEnd: params.etdList[1],
+                }
+            }
             getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
                 this.page.total = res.data.data.total;
                 this.data = res.data.data.records
                 this.getStatisticsSum(Object.assign(params, this.query))
                 this.$nextTick(() => {
-                    this.$refs.crud.doLayout()
+                    this.$refs.crud.refreshTable()
                     this.$refs.crud.dicInit()
                 })
             }).finally(() => {
@@ -502,6 +745,288 @@ export default {
             })
             window.open(routeData.href.slice(1, routeData.href.length));
         },
+        resetData() {
+            this.chartOption.column = [
+                {
+                    label: "业务来源",
+                    prop: "srcType",
+                    search: true,
+                    type: 'select',
+                    filterable: true,
+                    dicUrl: '/api/blade-system/dict-biz/dictionary?code=src_type_los',
+                    hide: true,
+                    showColumn: false,
+                    overHidden: true,
+                    disabled: true,
+                    props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                    },
+                },
+                {
+                    label: "委托人",
+                    prop: "corpCnName",
+                    type: 'select',
+                    search: true,
+                    filterable: true,
+                    hide: true,
+                    showColumn: false,
+                    remote: true,
+                    dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
+                    props: {
+                        label: 'cnName',
+                        value: 'cnName',
+                        res: 'data.records'
+                    },
+                    width: '100',
+                    overHidden: true,
+                },
+                {
+                    label: "业务员",
+                    prop: "srcCnName",
+                    search: true,
+                    width: '100',
+                    overHidden: true,
+                    filterable: true,
+                    hide: true,
+                    showColumn: false,
+                    remote: true,
+                    type: "select",
+                    dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+                    props: {
+                        label: "account",
+                        value: "account",
+                        res: 'data.records'
+                    }
+                },
+                {
+                    label: "场站",
+                    prop: "cyCnName",
+                    search: true,
+                    width: '100',
+                    overHidden: true,
+                    filterable: true,
+                    hide: true,
+                    showColumn: false,
+                    remote: true,
+                    type: "select",
+                    dicUrl: "/api/blade-los/bcorps/listByType?status=0&current=1&size=10&corpTypeName=场站&cnName={{key}}",
+                    props: {
+                        label: "cnName",
+                        value: "cnName",
+                        res: 'data.records'
+                    }
+                },
+                {
+                    label: "船公司",
+                    prop: "carrierCnName",
+                    search: true,
+                    width: '100',
+                    overHidden: true,
+                    filterable: true,
+                    hide: true,
+                    showColumn: false,
+                    remote: true,
+                    type: "select",
+                    dicUrl: "/api/blade-los/bcorps/listByType?status=0&corpTypeName=船公司&current=1&size=10&cnName={{key}}",
+                    props: {
+                        label: "cnName",
+                        value: "cnName",
+                        res: 'data.records'
+                    }
+                },
+                {
+                    label: "开船日期",
+                    prop: "date",
+                    search: true,
+                    hide: true,
+                    showColumn: false,
+                    overHidden: true,
+                    searchProp: "etdList",
+                    type: "date",
+                    unlinkPanels: true,
+                    searchRange: true,
+                    format: "yyyy-MM-dd",
+                    valueFormat: "yyyy-MM-dd HH:mm:ss",
+                    searchDefaultTime: ["00:00:00", "23:59:59"],
+                },
+                {
+                    label: "航线",
+                    prop: "lineCnName",
+                    search: true,
+                    hide: true,
+                    showColumn: false,
+                    overHidden: true,
+                    filterable: true,
+                    remote: true,
+                    type: "select",
+                    dicUrl: "api/blade-los/blines/list?status=0&current=1&size=10&cnName={{key}}",
+                    props: {
+                        label: "cnName",
+                        value: "cnName",
+                        res: 'data.records'
+                    }
+                },
+                {
+                    label: "业务类型",
+                    prop: "businessType",
+                    search: true,
+                    hide: true,
+                    showColumn: false,
+                    overHidden: true,
+                    filterable: true,
+                    type: 'select',
+                    dicUrl: '/api/blade-system/dict-biz/dictionary?code=decisionAnalysis_business_type',
+                    props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                    },
+                },
+                {
+                    label: "选择图表",
+                    prop: "chart",
+                    search: true,
+                    hide: true,
+                    showColumn: false,
+                },
+                {
+                    label: "类型",
+                    prop: "type",
+                    search: true,
+                    hide: true,
+                    showColumn: false,
+                }]
+        },
+        chartOnLoad() {
+            this.loading = true;
+            this.search = this.deepClone(this.search)
+            if (this.search.etdList) {
+                this.search = {
+                    ...this.search,
+                    dateStart: this.search.etdList[0],
+                    dateEnd: this.search.etdList[1],
+                }
+            }
+            boxNumberProfitStatisticsChart(this.search).then(res => {
+                let obj = {}
+                this.resetData()
+                res.data.data.forEach((e, index) => {
+                    obj['teu' + (index + 1)] = e.teu
+                    obj['amountProfitLoc' + (index + 1)] = e.amountProfitLoc
+                    obj['profitMargin' + (index + 1)] = e.profitMargin
+                    this.chartOption.column.push({
+                        label: e.corpName ? e.corpName : '',
+                        overHidden: true,
+                        children: [{
+                            label: 'Teu',
+                            prop: 'teu' + (index + 1),
+                            width: 120,
+                            overHidden: true,
+                        }, {
+                            label: '利润',
+                            prop: 'amountProfitLoc' + (index + 1),
+                            width: 120,
+                            overHidden: true,
+                        },
+                        {
+                            label: '利润率',
+                            prop: 'profitMargin' + (index + 1),
+                            width: 120,
+                            overHidden: true,
+                        }
+                        ]
+                    })
+                })
+                this.chartList = [obj]
+                this.chartData = res.data.data
+                this.search = this.deepClone(this.search)
+                this.getChart(res.data.data)
+                this.$nextTick(() => {
+                    this.$refs.chartCrud.refreshTable()
+                    this.$refs.chartCrud.dicInit()
+                })
+            }).finally(() => {
+                this.loading = false;
+            })
+        },
+        getChart(chartData) {
+            let texts = ''
+            let typeName = ''
+            let seriesData = []
+            texts = this.chartDic.find(item => item.value == this.search.chart).label
+            typeName = this.typeDic.find(item => item.value == this.search.type).label
+            if (this.search.chart == 1) {
+                chartData.forEach(e => {
+                    if (e.corpName != '总计') {
+                        seriesData.push({
+                            value: e.teu,
+                            name: e.corpName
+                        })
+                    }
+                })
+            } else if (this.search.chart == 2) {
+                chartData.forEach(e => {
+                    if (e.corpName != '总计') {
+                        seriesData.push({
+                            value: e.amountProfitLoc,
+                            name: e.corpName
+                        })
+                    }
+                })
+            } else if (this.search.chart == 3) {
+                chartData.forEach(e => {
+                    if (e.corpName != '总计') {
+                        seriesData.push({
+                            value: e.profitMargin,
+                            name: e.corpName
+                        })
+                    }
+                })
+            }
+            let myChart = echarts.init(this.$refs.echartsContainer);
+            // 指定图表的配置项和数据
+            let option = {
+                title: {
+                    text: texts,
+                    left: 'center'
+                },
+                tooltip: {},
+                legend: {
+                    data: []
+                },
+                series: [{
+                    name: typeName,
+                    type: 'pie',
+                    radius: '80%',
+                    data: seriesData,
+                    emphasis: {
+                        itemStyle: {
+                            shadowBlur: 10,
+                            shadowOffsetX: 0,
+                            shadowColor: 'rgba(0, 0, 0, 0.5)'
+                        }
+                    }
+                }]
+            };
+            myChart.setOption(option);
+        },
+        chartChange() {
+            this.getChart(this.chartData)
+        },
+        typeChange() {
+            this.chartOnLoad()
+        },
+        chartSearchChange(params, done) {
+            this.chartOnLoad();
+            done();
+        },
+        chartSearchReset() {
+            this.search = {
+                chart: 1,
+                type: 1,
+            };
+            this.chartOnLoad();
+        },
         //自定义列保存
         async saveColumnTwo(ref, option, optionBack, code) {
             /**

+ 338 - 376
src/views/iosBasicData/finvouchers/finvouchersitems.vue

@@ -3,15 +3,15 @@
         <div class="customer-head">
             <div class="customer-back">
                 <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
-                           @click="backToList">返回列表
+                    @click="backToList">返回列表
                 </el-button>
             </div>
             <div class="add-customer-btn">
-                <el-button  size="small" type="success" style="margin-right: 8px"
-                            :loading="saveLoading" :disabled="form.voucherStatus==1">凭证标错
+                <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
+                    :disabled="form.voucherStatus == 1">凭证标错
                 </el-button>
-                <el-button  size="small" type="primary" style="margin-right: 8px"
-                            :loading="saveLoading" @click="finvouchersSubmitfun" :disabled="form.voucherStatus==1">保 存
+                <el-button size="small" type="primary" style="margin-right: 8px" :loading="saveLoading"
+                    @click="finvouchersSubmitfun" :disabled="form.voucherStatus == 1">保 存
                 </el-button>
             </div>
         </div>
@@ -21,56 +21,42 @@
                     <el-row>
                         <el-col :span="6">
                             <el-form-item label="凭证类型" prop="voucherType">
-                                <search-query :datalist="voucherTypeData"
-                                              :selectValue="form.voucherType"
-                                              :clearable="true"
-                                              :buttonIf="false"
-                                              :disabled="form.voucherStatus==1"
-                                              :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
-                                              placeholder="请选择凭证类型"
-                                              @corpChange="corpChange($event,'voucherType')">
+                                <search-query :datalist="voucherTypeData" :selectValue="form.voucherType" :clearable="true"
+                                    :buttonIf="false" :disabled="form.voucherStatus == 1"
+                                    :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
+                                    placeholder="请选择凭证类型" @corpChange="corpChange($event, 'voucherType')">
                                 </search-query>
                             </el-form-item>
                         </el-col>
                         <el-col :span="6">
                             <el-form-item label="凭证号" prop="voucherNo">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
-                                          size="small" autocomplete="off"
-                                          :disabled="true"
-                                          clearable placeholder="请输入凭证号" >
+                                <el-input style="width: 100%;" v-model="form.voucherNo" size="small" autocomplete="off"
+                                    :disabled="true" clearable placeholder="请输入凭证号">
                                 </el-input>
                             </el-form-item>
                         </el-col>
                         <el-col :span="6">
                             <el-form-item label="凭证日期" prop="voucherDate">
-                                <el-date-picker v-model="form.voucherDate" clearable
-                                                style="width: 100%;"
-                                                type="date" size="small"
-                                                value-format="yyyy-MM-dd HH:mm"
-                                                :disabled="form.voucherStatus==1"
-                                                placeholder="选择凭证日期">
+                                <el-date-picker v-model="form.voucherDate" clearable style="width: 100%;" type="date"
+                                    size="small" value-format="yyyy-MM-dd HH:mm" :disabled="form.voucherStatus == 1"
+                                    placeholder="选择凭证日期">
                                 </el-date-picker>
                             </el-form-item>
                         </el-col>
                         <el-col :span="6">
                             <el-form-item label="凭证来源" prop="voucherSource">
-                                <search-query :datalist="voucherSourceData"
-                                              :selectValue="form.voucherSource"
-                                              :clearable="true"
-                                              :buttonIf="false"
-                                              :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
-                                              placeholder="请选择凭证类型"
-                                              :disabled="form.voucherStatus==1"
-                                              @corpChange="corpChange($event,'voucherSource')">
+                                <search-query :datalist="voucherSourceData" :selectValue="form.voucherSource"
+                                    :clearable="true" :buttonIf="false"
+                                    :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
+                                    placeholder="请选择凭证类型" :disabled="form.voucherStatus == 1"
+                                    @corpChange="corpChange($event, 'voucherSource')">
                                 </search-query>
                             </el-form-item>
                         </el-col>
                         <el-col :span="6">
                             <el-form-item label="REF NO" prop="billNo">
-                                <el-input style="width: 100%;" v-model="form.billNo"
-                                          size="small" autocomplete="off"
-                                          :disabled="true"
-                                          clearable placeholder="请输入编号" >
+                                <el-input style="width: 100%;" v-model="form.billNo" size="small" autocomplete="off"
+                                    :disabled="true" clearable placeholder="请输入编号">
                                 </el-input>
                             </el-form-item>
                         </el-col>
@@ -88,46 +74,37 @@
 
             <el-card style="margin-top: 10px">
                 <div style="margin-bottom: 10px">
-                    <el-button  size="small" type="primary" style="margin-right: 8px"
-                                :loading="saveLoading" @click="addEntryfun"  :disabled="form.voucherStatus==1">添加分录
+                    <el-button size="small" type="primary" style="margin-right: 8px" :loading="saveLoading"
+                        @click="addEntryfun" :disabled="form.voucherStatus == 1">添加分录
                     </el-button>
-                    <el-button  size="small" type="danger" style="margin-right: 8px"
-                                :loading="saveLoading" @click="deleteEntryfun" :disabled="form.voucherStatus==1" >删除分录
+                    <el-button size="small" type="danger" style="margin-right: 8px" :loading="saveLoading"
+                        @click="deleteEntryfun" :disabled="form.voucherStatus == 1">删除分录
                     </el-button>
-                    <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" :disabled="form.voucherStatus==1">项目属性
+                    <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
+                        :disabled="form.voucherStatus == 1">项目属性
                     </el-button>
-                    <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" :disabled="form.voucherStatus==1">凭证断号观察器
+                    <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
+                        :disabled="form.voucherStatus == 1">凭证断号观察器
                     </el-button>
-                    <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" :disabled="form.voucherStatus==1">断号优化
+                    <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
+                        :disabled="form.voucherStatus == 1">断号优化
                     </el-button>
-                    <el-button  size="small" type="success" style="margin-right: 8px"
-                                :loading="saveLoading" :disabled="form.voucherStatus==1">科目余额查询
+                    <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
+                        :disabled="form.voucherStatus == 1">科目余额查询
                     </el-button>
                 </div>
-                <fromtable-details :tableData="form.finVouchersItemsList"
-                                   :handleSelectionData="handleSelectionData"
-                                   :disabled="form.voucherStatus==1"
-                                   @handleSelectionChange="handleSelectionChange"
-                                   @addRowsfun="addRowsfun"
-                                   @deletefun="deletefun"
-                                   @auxiliaryAccountingfun="auxiliaryAccountingfun">
+                <fromtable-details :tableData="form.finVouchersItemsList" :handleSelectionData="handleSelectionData"
+                    :disabled="form.voucherStatus == 1" @handleSelectionChange="handleSelectionChange"
+                    @addRowsfun="addRowsfun" @deletefun="deletefun" @auxiliaryAccountingfun="auxiliaryAccountingfun">
                 </fromtable-details>
             </el-card>
         </div>
 
 
         <!--辅助核算-->
-        <el-dialog
-            title=" "
-            append-to-body
-            :visible.sync="auxiliaryVisible"
-            class="el-dialogDeep"
-            width="40%"
+        <el-dialog title=" " append-to-body :visible.sync="auxiliaryVisible" class="el-dialogDeep" width="40%"
             :before-close="handleClose">
-            <div>科目名称:{{subjectRow.accountCnName}}</div>
+            <div>科目名称:{{ subjectRow.accountCnName }}</div>
             <div style="margin-top: 10px">
                 <el-form :model="subjectRow" ref="subjectRow" label-width="70px" class="demo-ruleForm">
                     <!--#region-->
@@ -240,57 +217,36 @@
                         <el-col :span="12" v-if="subjectAccount.isCorp">
                             <!--<div>客户核算:</div>-->
                             <el-form-item label="客户名称:" prop="corpCnName">
-                                <search-query style="width: 100%"
-                                              ref="searchQueryRef"
-                                              :datalist="corpCnNameData"
-                                              :selectValue="subjectRow.corpCnName"
-                                              :filterable="true"
-                                              :clearable="true"
-                                              :remote="true"
-                                              :buttonIf="true"
-                                              placeholder="请选择客户名称"
-                                              :forParameter="{key:'id',label:'cnName',value:'cnName'}"
-                                              @corpFocus="getBcorpsListfun"
-                                              @remoteMethod="getBcorpsListfun"
-                                              @corpChange="corpChange($event,'corpCnName')"
-                                              @eldialogConfirm="eldialogConfirm('bcorps')"
-                                              @bottonSearchfun="bottonSearchfun('bcorps')" >
-                                    <bcorps ref="bcorps"
-                                            :eldialog="true"
-                                            @selectionChange="eldialogMultipleChoice($event,'bcorps')" ></bcorps>
+                                <search-query style="width: 100%" ref="searchQueryRef" :datalist="corpCnNameData"
+                                    :selectValue="subjectRow.corpCnName" :filterable="true" :clearable="true" :remote="true"
+                                    :buttonIf="true" placeholder="请选择客户名称"
+                                    :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
+                                    @corpFocus="getBcorpsListfun" @remoteMethod="getBcorpsListfun"
+                                    @corpChange="corpChange($event, 'corpCnName')"
+                                    @eldialogConfirm="eldialogConfirm('bcorps')"
+                                    @bottonSearchfun="bottonSearchfun('bcorps')">
+                                    <bcorps ref="bcorps" :eldialog="true"
+                                        @selectionChange="eldialogMultipleChoice($event, 'bcorps')"></bcorps>
                                 </search-query>
                             </el-form-item>
                         </el-col>
                         <el-col :span="12" v-if="subjectAccount.isDept">
                             <!--<div>部门核算:</div>-->
                             <el-form-item label="部门名称:" prop="deptName">
-                                <tree-select v-model="subjectRow.deptName"
-                                             filterable
-                                             :data="deptData"
-                                             :props="{label:'title',children:'children'}"
-                                             nodeKey="title"
-                                             size="small"
-                                             :multiple="false"
-                                             placeholder="请选择部门名称"
-                                             @focus="getDeptTreefun"
-                                             @input="corpChange($event,'deptName')">
+                                <tree-select v-model="subjectRow.deptName" filterable :data="deptData"
+                                    :props="{ label: 'title', children: 'children' }" nodeKey="title" size="small"
+                                    :multiple="false" placeholder="请选择部门名称" @focus="getDeptTreefun"
+                                    @input="corpChange($event, 'deptName')">
                                 </tree-select>
                             </el-form-item>
                         </el-col>
                         <el-col :span="12" v-if="subjectAccount.isEmpl">
                             <!--<div>职员核算:</div>-->
                             <el-form-item label="职员名称:" prop="emplName">
-                                <search-query :datalist="emplData"
-                                              :selectValue="subjectRow.emplName"
-                                              :clearable="true"
-                                              :buttonIf="false"
-                                              :filterable="true"
-                                              :remote="true"
-                                              placeholder="请选择职员名称"
-                                              :forParameter="{ key:'id', label:'name', value:'name'}"
-                                              @corpFocus="userGetListfun"
-                                              @corpChange="corpChange($event,'emplName')"
-                                              @remoteMethod="userGetListfun" >
+                                <search-query :datalist="emplData" :selectValue="subjectRow.emplName" :clearable="true"
+                                    :buttonIf="false" :filterable="true" :remote="true" placeholder="请选择职员名称"
+                                    :forParameter="{ key: 'id', label: 'name', value: 'name' }" @corpFocus="userGetListfun"
+                                    @corpChange="corpChange($event, 'emplName')" @remoteMethod="userGetListfun">
                                 </search-query>
                             </el-form-item>
                         </el-col>
@@ -329,306 +285,309 @@
 </template>
 
 <script>
-    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
-    import {getWorkDicts} from "@/api/system/dictbiz";
-    import {finvouchersDetail, finvouchersitemsRemove, finvouchersSubmit} from "@/api/iosBasicData/finvouchers";
-    import {getCurrentDate, getYearDate} from "@/util/date";
-    import fromtableDetails from "@/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue";
-    import {accountsDetail} from "@/api/iosBasicData/accounts";
-    import {getBcorpsList} from "@/api/iosBasicData/bcorps";
-    import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
-    import {getDeptLazyTree, getDeptTree} from "@/api/system/dept";
-    import {getList as userGetList} from '@/api/system/user'
-    import {baccitemstypeList} from "@/api/iosBasicData/baccitemstype";
-    import bcorps from "@/views/iosBasicData/bcorps/index.vue";
+import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+import { getWorkDicts } from "@/api/system/dictbiz";
+import { finvouchersDetail, finvouchersitemsRemove, finvouchersSubmit } from "@/api/iosBasicData/finvouchers";
+import { getCurrentDate, getYearDate } from "@/util/date";
+import fromtableDetails from "@/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue";
+import { accountsDetail } from "@/api/iosBasicData/accounts";
+import { getBcorpsList } from "@/api/iosBasicData/bcorps";
+import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
+import { getDeptLazyTree, getDeptTree } from "@/api/system/dept";
+import { getList as userGetList } from '@/api/system/user'
+import { baccitemstypeList } from "@/api/iosBasicData/baccitemstype";
+import bcorps from "@/views/iosBasicData/bcorps/index.vue";
 
-    export default {
-        components: {bcorps, TreeSelect, SearchQuery,fromtableDetails},
-        data(){
-            return {
-                pageLoading:false, // 整个的动画
-                saveLoading:false, // 按钮动画
-                // 获取的数据
-                form:{
-                    voucherType:'PZDH-J', // 凭证类型
-                    voucherDate:getCurrentDate(),
-                    finVouchersItemsList:[],
-                },
-                voucherTypeData:[], // 凭证字数据
-                voucherSourceData:[], // 业务类型
-                auxiliaryVisible:false, // 辅助核算弹窗
-                handleSelectionData:[], // 分录多选的数据
-                subjectRow:{}, // 科目弹窗的显示数据
-                subjectAccount:{},// 当前选择科目的数据
-                corpCnNameData:[], // 客户核算 下拉数据
-                deptData:[], // 部门核算 下拉数据
-                emplData:[], // 职员核算 下拉数据
-                itemData:[], // 项目核算 下拉数据
-            }
+export default {
+    components: { bcorps, TreeSelect, SearchQuery, fromtableDetails },
+    data() {
+        return {
+            pageLoading: false, // 整个的动画
+            saveLoading: false, // 按钮动画
+            // 获取的数据
+            form: {
+                voucherType: 'PZDH-J', // 凭证类型
+                voucherDate: getCurrentDate(),
+                finVouchersItemsList: [],
+            },
+            voucherTypeData: [], // 凭证字数据
+            voucherSourceData: [], // 业务类型
+            auxiliaryVisible: false, // 辅助核算弹窗
+            handleSelectionData: [], // 分录多选的数据
+            subjectRow: {}, // 科目弹窗的显示数据
+            subjectAccount: {},// 当前选择科目的数据
+            corpCnNameData: [], // 客户核算 下拉数据
+            deptData: [], // 部门核算 下拉数据
+            emplData: [], // 职员核算 下拉数据
+            itemData: [], // 项目核算 下拉数据
+        }
+    },
+    created() {
+        this.getWorkDictsfun()
+    },
+    methods: {
+        // 下拉弹窗打开操作
+        bottonSearchfun(name) {
+            this.$nextTick(() => {
+                if (this.$refs.bcorps.selectionList.length == 0) return
+                this.$refs.bcorps.$refs.crud.toggleSelection() // 先清空所以选择的数据
+            })
         },
-        created() {
-            this.getWorkDictsfun()
+        // 下拉多选弹窗的确认
+        eldialogConfirm(name) {
+            if (name == 'bcorps') {
+                if (this.$refs.bcorps.isShow) {
+                    console.log('列表确认')
+                    this.$set(this.subjectRow, 'corpCnName', this.$refs.bcorps.selectionList[0].cnName)
+                    this.$set(this.subjectRow, 'corpEnName', this.$refs.bcorps.selectionList[0].enName)
+                    this.$set(this.subjectRow, 'corpId', this.$refs.bcorps.selectionList[0].id)
+                } else {
+                    console.log('详情确认')
+                    this.$refs.bcorps.$refs.detail.submitForm()
+                    this.$set(this.subjectRow, 'corpCnName', this.$refs.bcorps.$refs.detail.formData.cnName)
+                    this.$set(this.subjectRow, 'corpEnName', this.$refs.bcorps.$refs.detail.formData.enName)
+                    this.$set(this.subjectRow, 'corpId', this.$refs.bcorps.$refs.detail.formData.id)
+                }
+            } else {
+                console.log('其他的组件')
+            }
+            this.$refs.searchQueryRef.corpVisible = false
         },
-        methods:{
-            // 下拉弹窗打开操作
-            bottonSearchfun(name){
-                this.$nextTick(()=>{
-                    if (this.$refs.bcorps.selectionList.length == 0) return
+        // 下拉多选弹窗数据多选回调
+        eldialogMultipleChoice(list, name) {
+            if (name == 'bcorps') {
+                let arr = []
+                if (list.length > 1) {
                     this.$refs.bcorps.$refs.crud.toggleSelection() // 先清空所以选择的数据
-                })
-            },
-            // 下拉多选弹窗的确认
-            eldialogConfirm(name){
-                if (name == 'bcorps') {
-                    if (this.$refs.bcorps.isShow) {
-                        console.log('列表确认')
-                        this.$set(this.subjectRow,'corpCnName',this.$refs.bcorps.selectionList[0].cnName)
-                        this.$set(this.subjectRow,'corpEnName',this.$refs.bcorps.selectionList[0].enName)
-                        this.$set(this.subjectRow,'corpId',this.$refs.bcorps.selectionList[0].id)
-                    }else {
-                        console.log('详情确认')
-                        this.$refs.bcorps.$refs.detail.submitForm()
-                        this.$set(this.subjectRow,'corpCnName',this.$refs.bcorps.$refs.detail.formData.cnName)
-                        this.$set(this.subjectRow,'corpEnName',this.$refs.bcorps.$refs.detail.formData.enName)
-                        this.$set(this.subjectRow,'corpId',this.$refs.bcorps.$refs.detail.formData.id)
-                    }
-                }else {
-                    console.log('其他的组件')
-                }
-                this.$refs.searchQueryRef.corpVisible = false
-            },
-            // 下拉多选弹窗数据多选回调
-            eldialogMultipleChoice(list,name){
-                if (name == 'bcorps') {
-                    let arr = []
-                    if (list.length > 1) {
-                        this.$refs.bcorps.$refs.crud.toggleSelection() // 先清空所以选择的数据
-                        arr = [list[list.length -1]] // 获取最新点击的数组
-                        this.$refs.bcorps.$refs.crud.toggleSelection(arr,true) // 把刚点击的数组变成选择状态
-                    }else {
-                        arr = list
-                    }
-                    this.$refs.bcorps.selectionList = arr
-                }else {
-                    console.log('其他的组件')
+                    arr = [list[list.length - 1]] // 获取最新点击的数组
+                    this.$refs.bcorps.$refs.crud.toggleSelection(arr, true) // 把刚点击的数组变成选择状态
+                } else {
+                    arr = list
                 }
-            },
-            // 详情接口
-            finvouchersDetailfun(id) {
-                this.pageLoading = true
-                finvouchersDetail(id).then(res=>{
-                    this.pageLoading = false
-                    this.form = res.data.data
-                })
-            },
-            // 添加分录
-            addEntryfun(){
-                let obj = {}
-                if (this.form.finVouchersItemsList.length > 0){
-                    obj.descr = this.form.finVouchersItemsList[this.form.finVouchersItemsList.length - 1].descr
-                }
-                this.form.finVouchersItemsList.push(obj)
-            },
-            // 行添加
-            addRowsfun(row,index){
-                //第二个参数为0的时候,是可以添加参数的,1的时候是删除
-                this.form.finVouchersItemsList.splice(index,0,{
-                    descr:row.descr
-                });
-            },
-            // 行删除
-            deletefun(row,index){
-                if (row.id) {
-                    this.finvouchersitemsRemovefun(row.id)
-                }
-                this.form.finVouchersItemsList.splice(index,1)
-            },
-            // 删除分录
-            deleteEntryfun(){
-                if (this.handleSelectionData.length == 0) {
-                    return this.$message.warning('请选择至少一条数据')
-                }
-                let multiList = this.handleSelectionData
-                let arr = this.form.finVouchersItemsList
-                // 获取有id 的数据
-                const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
-                let arrIds = itemsWithId.map(item=>item.id) // 获取id 数据
-                // 把选中的删除掉
-                multiList.forEach((item)=>{
-                    for (let index in arr) {
-                        if (JSON.stringify(item) == JSON.stringify(arr[index])) {
-                            arr.splice(Number(index),1)
-                        }
+                this.$refs.bcorps.selectionList = arr
+            } else {
+                console.log('其他的组件')
+            }
+        },
+        // 详情接口
+        finvouchersDetailfun(id) {
+            this.pageLoading = true
+            finvouchersDetail(id).then(res => {
+                this.form = res.data.data
+            }).finally(() => {
+                this.pageLoading = false
+            });
+        },
+        // 添加分录
+        addEntryfun() {
+            let obj = {}
+            if (this.form.finVouchersItemsList.length > 0) {
+                obj.descr = this.form.finVouchersItemsList[this.form.finVouchersItemsList.length - 1].descr
+            }
+            this.form.finVouchersItemsList.push(obj)
+        },
+        // 行添加
+        addRowsfun(row, index) {
+            //第二个参数为0的时候,是可以添加参数的,1的时候是删除
+            this.form.finVouchersItemsList.splice(index, 0, {
+                descr: row.descr
+            });
+        },
+        // 行删除
+        deletefun(row, index) {
+            if (row.id) {
+                this.finvouchersitemsRemovefun(row.id)
+            }
+            this.form.finVouchersItemsList.splice(index, 1)
+        },
+        // 删除分录
+        deleteEntryfun() {
+            if (this.handleSelectionData.length == 0) {
+                return this.$message.warning('请选择至少一条数据')
+            }
+            let multiList = this.handleSelectionData
+            let arr = this.form.finVouchersItemsList
+            // 获取有id 的数据
+            const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
+            let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
+            // 把选中的删除掉
+            multiList.forEach((item) => {
+                for (let index in arr) {
+                    if (JSON.stringify(item) == JSON.stringify(arr[index])) {
+                        arr.splice(Number(index), 1)
                     }
-                })
-                // 有id 的处理
-                if(itemsWithId.length != 0) {
-                    this.finvouchersitemsRemovefun(arrIds.join(','))
-                }
-            },
-            // 大保存
-            finvouchersSubmitfun(){
-                this.form.businessTypeCode = 'PZDH'
-                this.form.billNoFormat = this.form.voucherType
-                if (this.form.finVouchersItemsList.length < 2) {
-                    return this.$message.warning('请填写至少凭证两笔分录后再保存!')
                 }
-                // // 判断币种是否一样
-                // for (let item of this.form.finVouchersItemsList) {
-                //     if (this.form.finVouchersItemsList[0].curCode != item.curCode) {
-                //         return this.$message.warning('请选择相同币种的科目')
-                //     }
+            })
+            // 有id 的处理
+            if (itemsWithId.length != 0) {
+                this.finvouchersitemsRemovefun(arrIds.join(','))
+            }
+        },
+        // 大保存
+        finvouchersSubmitfun() {
+            this.form.businessTypeCode = 'PZDH'
+            this.form.billNoFormat = this.form.voucherType
+            if (this.form.finVouchersItemsList.length < 2) {
+                return this.$message.warning('请填写至少凭证两笔分录后再保存!')
+            }
+            // // 判断币种是否一样
+            // for (let item of this.form.finVouchersItemsList) {
+            //     if (this.form.finVouchersItemsList[0].curCode != item.curCode) {
+            //         return this.$message.warning('请选择相同币种的科目')
+            //     }
+            // }
+            // 判断借方金额合计 是否等于 贷方金额合计
+            let amountDrSum = 0
+            let amountCrSum = 0
+            for (let item of this.form.finVouchersItemsList) {
+                amountDrSum += Number(item.amountDr)
+                amountCrSum += Number(item.amountCr)
+                // if (item.curCode == 'USD') {
+                //     amountDrSum += Number(item.amountDrUsd)
+                //     amountCrSum += Number(item.amountCrUsd)
+                // }else {
+                //     amountDrSum += Number(item.amountDr)
+                //     amountCrSum += Number(item.amountCr)
                 // }
-                // 判断借方金额合计 是否等于 贷方金额合计
-                let amountDrSum = 0
-                let amountCrSum = 0
-                for (let item of this.form.finVouchersItemsList) {
-                    amountDrSum += Number(item.amountDr)
-                    amountCrSum += Number(item.amountCr)
-                    // if (item.curCode == 'USD') {
-                    //     amountDrSum += Number(item.amountDrUsd)
-                    //     amountCrSum += Number(item.amountCrUsd)
-                    // }else {
-                    //     amountDrSum += Number(item.amountDr)
-                    //     amountCrSum += Number(item.amountCr)
-                    // }
-                }
-                if (amountDrSum != amountCrSum) {
-                    return this.$message.warning('凭证借贷金额不平衡')
-                }
-                console.log(this.form,379)
+            }
+            if (amountDrSum != amountCrSum) {
+                return this.$message.warning('凭证借贷金额不平衡')
+            }
+            console.log(this.form, 379)
 
-                this.pageLoading = true
-                finvouchersSubmit(this.form).then(res=>{
-                    this.$message.success('操作成功')
-                    this.pageLoading = false
-                    this.finvouchersDetailfun(res.data.data.id)
-                })
-            },
-            // 分录删除接口
-            finvouchersitemsRemovefun(id){
-                finvouchersitemsRemove(id).then(res=>{
-                    this.$message.success('操作成功')
-                    this.finvouchersDetailfun()
-                })
-            },
-            // 科目编辑打开辅助核算弹窗
-            auxiliaryAccountingfun(row){
-                // 获取状态
-                accountsDetail(row.accountId).then(res=>{
-                    this.subjectAccount = res.data.data
-                    this.subjectRow = row
-                    // 如果三个都没有勾选 直接不自动打开弹窗
-                    if (res.data.data.isCorp || res.data.data.isDept || res.data.data.isEmpl) {
-                        this.auxiliaryVisible = true
-                    }
-                })
-            },
-            // 辅助核算弹窗确认按钮
-            auxiliaryDeterminefun(){
-                this.auxiliaryVisible = false
-            },
-            // 下拉回调
-            corpChange(value,name){
-                // 客户名称
-                if (name == 'corpCnName') {
-                    for (let item of this.corpCnNameData) {
-                        if (item.cnName == value) {
-                            this.$set(this.subjectRow,'corpEnName',item.enName)
-                            this.$set(this.subjectRow,'corpCnName',item.cnName)
-                            this.$set(this.subjectRow,'corpId',item.id)
-                        }
-                    }
+            this.pageLoading = true
+            finvouchersSubmit(this.form).then(res => {
+                this.$message.success('操作成功')
+                this.finvouchersDetailfun(res.data.data.id)
+            }).finally(() => {
+                this.pageLoading = false
+            });
+        },
+        // 分录删除接口
+        finvouchersitemsRemovefun(id) {
+            finvouchersitemsRemove(id).then(res => {
+                this.$message.success('操作成功')
+                this.finvouchersDetailfun()
+            })
+        },
+        // 科目编辑打开辅助核算弹窗
+        auxiliaryAccountingfun(row) {
+            // 获取状态
+            accountsDetail(row.accountId).then(res => {
+                this.subjectAccount = res.data.data
+                this.subjectRow = row
+                // 如果三个都没有勾选 直接不自动打开弹窗
+                if (res.data.data.isCorp || res.data.data.isDept || res.data.data.isEmpl) {
+                    this.auxiliaryVisible = true
                 }
-                // 核算
-                else if (name == 'deptName') {
-                    for (let item of this.deptData) {
-                        if (item.title == value) {
-                            this.$set(this.subjectRow,'deptName',item.title)
-                            this.$set(this.subjectRow,'deptId',item.id)
-                        }
+            })
+        },
+        // 辅助核算弹窗确认按钮
+        auxiliaryDeterminefun() {
+            this.auxiliaryVisible = false
+        },
+        // 下拉回调
+        corpChange(value, name) {
+            // 客户名称
+            if (name == 'corpCnName') {
+                for (let item of this.corpCnNameData) {
+                    if (item.cnName == value) {
+                        this.$set(this.subjectRow, 'corpEnName', item.enName)
+                        this.$set(this.subjectRow, 'corpCnName', item.cnName)
+                        this.$set(this.subjectRow, 'corpId', item.id)
                     }
                 }
-                // 职员
-                else if (name == 'emplName') {
-                    for (let item of this.emplData) {
-                        if (item.name == value) {
-                            this.$set(this.subjectRow,'emplName',item.name)
-                            this.$set(this.subjectRow,'emplId',item.id)
-                        }
+            }
+            // 核算
+            else if (name == 'deptName') {
+                for (let item of this.deptData) {
+                    if (item.title == value) {
+                        this.$set(this.subjectRow, 'deptName', item.title)
+                        this.$set(this.subjectRow, 'deptId', item.id)
                     }
                 }
-                // 项目核算
-                else if (name == 'itemName') {
-                    for (let item of this.itemData) {
-                        if (item.cnName == value) {
-                            this.$set(this.subjectRow,'itemName',item.cnName)
-                            this.$set(this.subjectRow,'itemId',item.id)
-                        }
+            }
+            // 职员
+            else if (name == 'emplName') {
+                for (let item of this.emplData) {
+                    if (item.name == value) {
+                        this.$set(this.subjectRow, 'emplName', item.name)
+                        this.$set(this.subjectRow, 'emplId', item.id)
                     }
-                }else if (name == 'voucherType' || name == 'voucherSource') {
-                    this.$set(this.form,name,value)
                 }
-            },
-            // 接口数据调用
-            // 客户
-            getBcorpsListfun(cnName){
-                getBcorpsList(1,10,{cnName}).then(res=>{
-                    this.corpCnNameData = res.data.data.records
-                })
-            },
-            // 部门
-            getDeptTreefun(){
-                getDeptLazyTree(JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]).then(res=>{
-                    this.deptData = res.data.data
-                })
-            },
-            // 职员
-            userGetListfun(account = undefined,type = false,){
-                userGetList(1,10,{account},JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]).then(res=>{
-                    this.emplData = res.data.data.records
-                })
-            },
+            }
             // 项目核算
-            baccitemstypeListfun(cnName){
-                baccitemstypeList(1,10,{cnName}).then(res=>{
-                    this.itemData = res.data.data.records
-                })
-            },
-            // 表格多选数据
-            handleSelectionChange(list){
-                this.handleSelectionData = list
-            },
-            // 弹窗点击差号
-            handleClose(done) {
-                this.$confirm('确认关闭?')
-                    .then(_ => {
-                        done();
-                    })
-                    .catch(_ => {});
-            },
-            // 获取字典数据
-            getWorkDictsfun(){
-                // 凭证字数据
-                getWorkDicts('voucher_word_los').then(res=>{
-                    this.voucherTypeData = res.data.data
-                })
-                getWorkDicts('voucher_source_los').then(res=>{
-                    this.voucherSourceData = res.data.data
+            else if (name == 'itemName') {
+                for (let item of this.itemData) {
+                    if (item.cnName == value) {
+                        this.$set(this.subjectRow, 'itemName', item.cnName)
+                        this.$set(this.subjectRow, 'itemId', item.id)
+                    }
+                }
+            } else if (name == 'voucherType' || name == 'voucherSource') {
+                this.$set(this.form, name, value)
+            }
+        },
+        // 接口数据调用
+        // 客户
+        getBcorpsListfun(cnName) {
+            getBcorpsList(1, 10, { cnName }).then(res => {
+                this.corpCnNameData = res.data.data.records
+            })
+        },
+        // 部门
+        getDeptTreefun() {
+            getDeptLazyTree(JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]).then(res => {
+                this.deptData = res.data.data
+            })
+        },
+        // 职员
+        userGetListfun(account = undefined, type = false,) {
+            userGetList(1, 10, { account }, JSON.parse(localStorage.getItem('saber-userInfo')).content.dept_pid.split(',')[0]).then(res => {
+                this.emplData = res.data.data.records
+            })
+        },
+        // 项目核算
+        baccitemstypeListfun(cnName) {
+            baccitemstypeList(1, 10, { cnName }).then(res => {
+                this.itemData = res.data.data.records
+            })
+        },
+        // 表格多选数据
+        handleSelectionChange(list) {
+            this.handleSelectionData = list
+        },
+        // 弹窗点击差号
+        handleClose(done) {
+            this.$confirm('确认关闭?')
+                .then(_ => {
+                    done();
                 })
-            },
-            //返回列表
-            backToList() {
-                this.$emit('goBack')
-            },
-        }
+                .catch(_ => { });
+        },
+        // 获取字典数据
+        getWorkDictsfun() {
+            // 凭证字数据
+            getWorkDicts('voucher_word_los').then(res => {
+                this.voucherTypeData = res.data.data
+            })
+            getWorkDicts('voucher_source_los').then(res => {
+                this.voucherSourceData = res.data.data
+            })
+        },
+        //返回列表
+        backToList() {
+            this.$emit('goBack')
+        },
     }
+}
 </script>
 
 <style scoped lang="scss">
 ::v-deep.el-form-item {
     margin-bottom: 0;
 }
+
 .borderBox {
     border: 1px solid #b6b6b6;
     padding: 5px;
@@ -637,20 +596,23 @@
     position: relative;
     margin-right: 10px;
 }
+
 .positionCheckbox {
     position: absolute;
     top: -10px;
     left: 10px;
     background: #fff;
 }
+
 .cardRight {
     margin-right: 10px;
     height: 220px;
 }
+
 .borderCheckbox {
     border-bottom: 1px solid #4a9de6;
     padding-bottom: 5px;
-    color:#4a9de6;
+    color: #4a9de6;
     margin-bottom: 5px;
 }
 

+ 4 - 3
src/views/iosBasicData/horizontalStatistics/index.vue

@@ -1,8 +1,8 @@
 <template>
     <basic-container>
-        <avue-crud :option="option" :table-loading="loading" :data="data" v-model="query" ref="crud" id="out-table"
-            :header-cell-class-name="headerClassName" @search-change="searchChange" @search-reset="searchReset"
-            @on-load="onLoad">
+        <avue-crud :option="chartOption" :table-loading="loading" :data="chartList" v-model="query" ref="chartCrud"
+            id="out-table" :header-cell-class-name="headerClassName" @search-change="searchChange"
+            @search-reset="searchReset" @on-load="onLoad">
             <template slot="chartSearch">
                 <avue-radio v-model="query.chart" :dic="chartDic" @change="chartChange"></avue-radio>
             </template>
@@ -78,6 +78,7 @@ export default {
                 label: '业务员',
                 value: 3
             }],
+            chartList: [],
             chartData: []
         };
     },