Sfoglia il codice sorgente

货代科目管理和凭证样式修改 2023-12-15

caojunjie 1 anno fa
parent
commit
74c6844cdb

+ 42 - 0
src/api/iosBasicData/accounts.js

@@ -0,0 +1,42 @@
+import request from '@/router/axios';
+
+export const accountsList = (current, size, params) => {
+  return request({
+    url: '/api/blade-los/accounts/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const accountsDetail = (id) => {
+  return request({
+    url: '/api/blade-los/accounts/detail',
+    method: 'get',
+    params: {
+      id
+    }
+  })
+}
+
+export const accountsRemove = (ids) => {
+  return request({
+    url: '/api/blade-los/accounts/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}
+
+export const accountsSubmit = (row) => {
+  return request({
+    url: '/api/blade-los/accounts/submit',
+    method: 'post',
+    data: row
+  })
+}
+

+ 10 - 0
src/api/iosBasicData/finvouchers.js

@@ -55,3 +55,13 @@ export const revokeFinVouchers = (row) => {
     data: row
   })
 }
+// 分录明细删除
+export const finvouchersitemsRemove = (ids) => {
+  return request({
+    url: '/api/blade-los/finvouchersitems/remove',
+    method: 'post',
+    params: {
+      ids,
+    }
+  })
+}

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

@@ -1460,6 +1460,14 @@ const columnName = [{
     code: 322,
     name: '货运代理-amends'
   },
+  {
+    code: 323,
+    name: '货运代理-财务管理-科目管理'
+  },
+  {
+    code: 323.1,
+    name: '货运代理-财务管理-科目管理-明细'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

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

@@ -2938,5 +2938,20 @@ export default [{
       component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/salesManagement/outboundWorkOrderL/index')
     }]
   },
+  // 科目管理(F)
+  {
+    path: '/iosBasicData/accounts/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/iosBasicData/accounts/index',
+      name: '科目管理(F)',
+      meta: {
+        i18n: '/iosBasicData/accounts/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/accounts/index')
+    }]
+  },
 
 ]

+ 1 - 0
src/views/exportTrade/salesContract/detailsPage.vue

@@ -2326,6 +2326,7 @@ export default {
                           this.data[i].shareAmount = 0;
                           this.data[i].internationalAmount = 0;
                           this.data[i].totalValue = sellingCal(productCal(item.purchaseAmount, 0, item.coefficient), this.form.exchangeRate);
+                          // this.data[i].orderQuantity = 1;
                           this.data[i].insurance = 0;
                           this.data[i].freight = 0;
                           this.data[i].discount = null;

+ 82 - 0
src/views/iosBasicData/accounts/accountsDetails.vue

@@ -0,0 +1,82 @@
+<template>
+    <div class="borderless" v-loading="pageLoading">
+        <div class="customer-head">
+            <div class="customer-back">
+                <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+                           @click="backToList">返回列表
+                </el-button>
+            </div>
+            <div class="add-customer-btn">
+                <el-button  size="small" type="primary" style="margin-right: 8px"
+                            :loading="saveLoading" @click="bigSavefun" >保 存
+                </el-button>
+            </div>
+        </div>
+        <div style="margin: 55px 5px 0px 5px;'">
+            <el-card class="box-card">
+                <accounts-dialog :form="form"></accounts-dialog>
+            </el-card>
+            <el-card class="box-card" style="margin-top: 10px">
+                <accitemsopenblc :form="form" :crudData="form.accItemsOpenblcList"></accitemsopenblc>
+            </el-card>
+        </div>
+    </div>
+</template>
+
+<script>
+    import accountsDialog from "@/views/iosBasicData/accounts/assembly/accountsDialog.vue";
+    import accitemsopenblc from "@/views/iosBasicData/accounts/assembly/accitemsopenblc.vue";
+    import {accountsSubmit} from "@/api/iosBasicData/accounts";
+
+    export default {
+        components: {accountsDialog,accitemsopenblc},
+        data(){
+            return{
+                pageLoading:false,
+                saveLoading:false,
+                form:{
+                    accItemsOpenblcList:[]
+                },
+
+            }
+        },
+        methods:{
+            // 大保存
+            bigSavefun(){
+                let sum = '请填写'
+                if (!this.form.code) {
+                    sum += '科目编码'
+                }
+                if (!this.form.cnName) {
+                    sum += '科目名称'
+                }
+                if (!this.form.cnName) {
+                    sum += '科目英文'
+                }
+                if (!this.form.dc) {
+                    sum += '方向'
+                }
+                for(let i in this.form) {
+                    if (!this.form[i] && this.form[i] != 0) {
+
+                    }
+                }
+            },
+            // 保存
+            accountsSubmitfun(){
+                console.log(this.form,46)
+                // accountsSubmit().then(res=>{
+                //
+                // })
+            },
+            //返回列表
+            backToList() {
+                this.$emit('goBack')
+            },
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 393 - 0
src/views/iosBasicData/accounts/assembly/accitemsopenblc.vue

@@ -0,0 +1,393 @@
+<template>
+    <div>
+        <avue-crud :option="option"
+                   :table-loading="loading"
+                   :data="crudData"
+                   ref="crud"
+                   id="out-table"
+                   :header-cell-class-name="headerClassName"
+                   @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 323.1)"
+                   @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 323.1)">
+            <template slot="menuLeft">
+                <el-button type="primary"
+                           size="small"
+                           :disabled="form.isItem == 0"
+                           icon="el-icon-plus">新 增
+                </el-button>
+                <el-button type="danger"
+                           size="small"
+                           icon="el-icon-delete"
+                           plain
+                           :disabled="form.isItem == 0"
+                           @click="handleDelete">删 除
+                </el-button>
+            </template>
+        </avue-crud>
+    </div>
+</template>
+
+<script>
+    export default {
+        props:{
+            crudData:{
+                type:Array,
+                default:[]
+            },
+            form:{
+                type:Object,
+                default: {}
+            }
+        },
+        data(){
+            return {
+                option:{},
+                optionBack: {
+                    height:'auto',
+                    calcHeight: 30,
+                    tip: false,
+                    searchShow: true,
+                    searchMenuSpan: 6,
+                    border: true,
+                    index: true,
+                    selection: true,
+                    dialogClickModal: false,
+                    addBtn:false,
+                    viewBtn:false,
+                    delBtn:false,
+                    editBtn:false,
+                    column: [
+                        {
+                            label: "核算客户 id",
+                            prop: "corpId",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算客户 id",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算客户中文名称",
+                            prop: "corpCnName",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算客户中文名称",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算客户英文名称",
+                            prop: "corpEnName",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算客户英文名称",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算部门 Id",
+                            prop: "deptId",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算部门 Id",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算部门",
+                            prop: "deptName",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算部门",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算职员 Id",
+                            prop: "emplId",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算职员 Id",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算职员",
+                            prop: "emplName",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算职员",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算项目类别 Id",
+                            prop: "itemClassifyId",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算项目类别 Id",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算项目类别",
+                            prop: "itemClassify",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算项目类别",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算项目 Id",
+                            prop: "itemId",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算项目 Id",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "核算项目",
+                            prop: "itemName",
+                            rules: [{
+                                required: true,
+                                message: "请输入核算项目",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "单价",
+                            prop: "price",
+                            rules: [{
+                                required: true,
+                                message: "请输入单价",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初借方数量",
+                            prop: "quantityOpenDr",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初借方数量",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初贷方数量",
+                            prop: "quantityOpenCr",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初贷方数量",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初数量期初余额",
+                            prop: "quantityOpenBlc",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初数量期初余额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初外币借方金额",
+                            prop: "amountOpenDrUsd",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初外币借方金额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初外币贷方金额",
+                            prop: "amountOpenCrUsd",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初外币贷方金额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初外币期初余额",
+                            prop: "amountOpenUsdBlc",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初外币期初余额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初本币借方金额(CNY)",
+                            prop: "amountOpenDr",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初本币借方金额(CNY)",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初本币贷方金额(CNY)",
+                            prop: "amountOpenCr",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初本币贷方金额(CNY)",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "期初本币余额(CNY)",
+                            prop: "amountOpenBlc",
+                            rules: [{
+                                required: true,
+                                message: "请输入期初本币余额(CNY)",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期数量借方",
+                            prop: "quantityDr",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期数量借方",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期数量贷方",
+                            prop: "quantityCr",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期数量贷方",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期数量余额",
+                            prop: "quantityBlc",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期数量余额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期外币借方金额",
+                            prop: "amountDrUsd",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期外币借方金额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期外币贷方金额",
+                            prop: "amountCrUsd",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期外币贷方金额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期外币余额",
+                            prop: "amountUsdBlc",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期外币余额",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期本币借方金额(CNY)",
+                            prop: "amountDr",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期本币借方金额(CNY)",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期本币贷方金额(CNY)",
+                            prop: "amountCr",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期本币贷方金额(CNY)",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "本期本币余额(CNY)",
+                            prop: "amountBlc",
+                            rules: [{
+                                required: true,
+                                message: "请输入本期本币余额(CNY)",
+                                trigger: "blur"
+                            }]
+                        },
+                        {
+                            label: "备注",
+                            prop: "remarks",
+                        },
+                    ]
+                },
+                loading:false,
+
+            }
+        },
+        async created() {
+            this.option = await this.getColumnData(this.getColumnName(323.1), this.optionBack);
+        },
+        methods:{
+            //自定义列保存
+            async saveColumnTwo(ref, option, optionBack, code) {
+                /**
+                 * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+                 * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+                 * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+                 */
+                const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+                if (inSave) {
+                    this.$message.success("保存成功");
+                    //关闭窗口
+                    this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                }
+            },
+            //自定义列重置
+            async resetColumnTwo(ref, option, optionBack, code) {
+                this[option] = this[optionBack];
+                const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+                if (inSave) {
+                    this.$message.success("重置成功");
+                    this.$refs[ref].$refs.dialogColumn.columnBox = false;
+                }
+            },
+            // 更改表格颜色
+            headerClassName(tab){
+                //颜色间隔
+                let back = ""
+                if (tab.columnIndex >= 0 && tab.column.level === 1) {
+                    if (tab.columnIndex % 2 === 0) {
+                        back = "back-one"
+                    } else if (tab.columnIndex % 2 === 1) {
+                        back = "back-two"
+                    }
+                }
+                return back;
+            },
+
+        }
+    }
+</script>
+
+<style scoped>
+::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+</style>

+ 376 - 0
src/views/iosBasicData/accounts/assembly/accountsDialog.vue

@@ -0,0 +1,376 @@
+<template>
+    <div>
+        <el-form :model="form" ref="form" label-width="70px" class="demo-ruleForm">
+            <el-row :gutter="20">
+                <el-col :span="6">
+                    <el-form-item label="科目编码:" prop="code">
+                        <el-input style="width: 100%;" v-model="form.code"
+                                  size="small" autocomplete="off"
+                                  clearable placeholder="请输入科目编码" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="科目名称:" prop="cnName">
+                        <el-input style="width: 100%;" v-model="form.cnName"
+                                  size="small" autocomplete="off"
+                                  clearable placeholder="请输入科目名称" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="科目英文:" prop="enName">
+                        <el-input style="width: 100%;" v-model="form.enName"
+                                  size="small" autocomplete="off"
+                                  clearable placeholder="请输入科目英文" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="方向:" prop="dc">
+                        <search-query :datalist="dcData"
+                                      :selectValue="form.dc"
+                                      :filterable="true"
+                                      :clearable="true"
+                                      :remote="true"
+                                      :buttonIf="false"
+                                      placeholder="请选择方向"
+                                      @corpChange="corpChange($event,'dc')">
+                        </search-query>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="24">
+                    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isCash">是否现金科目</el-checkbox>
+                    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isCashEq">是否现金等价物</el-checkbox>
+                    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isBank">是否银行科目</el-checkbox>
+                    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isDiary">是否出日记账</el-checkbox>
+                    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isForeign">是否外币科目</el-checkbox>
+                    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isQuantity">是否数量科目</el-checkbox>
+                    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isBudget">是否预算科目</el-checkbox>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="核算类别:" prop="itemClassify">
+                        <search-query :datalist="itemClassifyData"
+                                      :selectValue="form.itemClassify"
+                                      :filterable="true"
+                                      :clearable="true"
+                                      :remote="true"
+                                      :buttonIf="false"
+                                      placeholder="请选择核算项目类别"
+                                      :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                      @remoteMethod="baccitemstypeListfun"
+                                      @corpChange="corpChange($event,'itemClassify')"
+                                      @corpFocus="baccitemstypeListfun">
+                        </search-query>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="上级科目:" prop="parentCode">
+                        <el-input style="width: 100%;" v-model="form.parentCode"
+                                  size="small" autocomplete="off" :disabled="true"
+                                  clearable placeholder="请输入上级科目" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="币种:" prop="curCode">
+                        <search-query :datalist="curData"
+                                      :selectValue="form.curCode"
+                                      :filterable="true"
+                                      :clearable="true"
+                                      :remote="true"
+                                      :buttonIf="false"
+                                      placeholder="请选择币种"
+                                      :forParameter="{key:'id',label:'code',value:'code'}"
+                                      @remoteMethod="getRateListfun"
+                                      @corpChange="corpChange($event,'curCode')"
+                                      @corpFocus="getRateListfun">
+                        </search-query>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="汇率:" prop="exrate">
+                        <el-input style="width: 100%;" v-model="form.exrate"
+                                  size="small" autocomplete="off" :disabled="true"
+                                  clearable placeholder="请输入汇率" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="12">
+                    <el-form-item label="辅助核算:">
+                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isItem">项目</el-checkbox>
+                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isCorp">客户</el-checkbox>
+                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isDept">部门</el-checkbox>
+                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isEmpl">职员</el-checkbox>
+                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isStock">库存</el-checkbox>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="单位:" prop="unitNo">
+                        <search-query :datalist="unitNoData"
+                                      :selectValue="form.unitNo"
+                                      :filterable="true"
+                                      :clearable="true"
+                                      :buttonIf="false"
+                                      :disabled="form.isItem == 1"
+                                      :forParameter="{key:'id',label:'cnName',value:'cnName'}"
+                                      @corpChange="corpChange($event,'unitNo')"
+                                      @corpFocus="getBunitsPagefun($event,'unitNo')" >
+                        </search-query>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="单价:" prop="price">
+                        <el-input style="width: 100%;" v-model="form.price"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入单价" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="预算金额(原币)" prop="amountBudget" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountBudget"
+                                  size="small" autocomplete="off"  :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入预算金额(原币)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="预算金额(CNY)" prop="amountBudgetLoc" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountBudgetLoc"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入预算金额(CNY)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初本币借方金额(CNY)" prop="amountOpenDr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountOpenDr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初本币借方金额(CNY)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初本币贷方金额(CNY)" prop="amountOpenCr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountOpenCr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初本币贷方金额(CNY)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初本币余额(CNY)" prop="amountOpenBlc" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountOpenBlc"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初本币余额(CNY)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期本币借方金额(CNY):" prop="amountDr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountDr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期本币借方金额(CNY)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期本币贷方金额(CNY):" prop="amountCr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountCr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期本币贷方金额(CNY)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期本币余额(CNY):" prop="amountBlc" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountBlc"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期本币余额(CNY)" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初外币借方金额:" prop="amountOpenDrUsd" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountOpenDrUsd"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初外币借方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初外币贷方金额:" prop="amountOpenCrUsd" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountOpenCrUsd"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初外币贷方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初外币期初余额:" prop="amountOpenUsdBlc" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountOpenUsdBlc"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初外币期初余额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期外币借方金额:" prop="amountDrUsd" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountDrUsd"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期外币借方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期外币贷方金额:" prop="amountCrUsd" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountCrUsd"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期外币贷方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期外币期初余额:" prop="amountUsdBlc" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.amountUsdBlc"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期外币期初余额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初数量借方金额:" prop="quantityOpenDr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.quantityOpenDr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初数量借方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初数量贷方金额:" prop="quantityOpenCr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.quantityOpenCr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初数量贷方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="期初数量期初余额:" prop="quantityOpenUsdBlc" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.quantityOpenUsdBlc"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入期初数量期初余额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期数量借方金额:" prop="quantityDr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.quantityDr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期数量借方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期数量贷方金额:" prop="quantityCr" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.quantityCr"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期数量贷方金额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+                <el-col :span="6">
+                    <el-form-item label="本期数量期初余额:" prop="quantityUsdBlc" label-width="150px">
+                        <el-input style="width: 100%;" v-model="form.quantityUsdBlc"
+                                  size="small" autocomplete="off" :disabled="form.isItem == 1"
+                                  clearable placeholder="请输入本期数量期初余额" >
+                        </el-input>
+                    </el-form-item>
+                </el-col>
+            </el-row>
+        </el-form>
+    </div>
+</template>
+
+<script>
+import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+import {getRateList} from "@/api/iosBasicData/rateManagement";
+import {getBunitsPage} from "@/api/iosBasicData/bunits";
+import {baccitemstypeList} from "@/api/iosBasicData/baccitemstype";
+
+export default {
+    components: {SearchQuery},
+    props:{
+        form:{
+            type:Object,
+            default:{}
+        }
+    },
+    data(){
+        return {
+            // 方向数据
+            dcData:[
+                {
+                    label:'借方',
+                    value:'D',
+                },
+                {
+                    label:'贷方',
+                    value:'C',
+                }
+            ],
+            curData:[], // 币别数据
+            unitNoData:[], // 单位
+            itemClassifyData:[], // 核算项目数据
+
+        }
+    },
+    methods:{
+        // 下拉回调
+        corpChange(value,name){
+            if (name == 'itemClassify') {
+                for (let item of this.itemClassifyData) {
+                    if (item.cnName == value) {
+                        this.$set(this.form,'itemClassifyId',item.id)
+                        this.$set(this.form,'itemClassify',item.cnName)
+                    }
+                }
+            }else if (name == 'curCode') {
+                for (let item of this.curData) {
+                    if (item.code == value) {
+                        this.$set(this.form,'curCode',item.code)
+                        this.$set(this.form,'exrate',item.exrate)
+                    }
+                }
+            }else {
+                this.$set(this.form,name,value)
+            }
+        },
+        // 获取币别数据
+        getRateListfun(cnName){
+            getRateList({current:1,size:10,cnName}).then(res=>{
+                this.curData = res.data.data.records
+            })
+        },
+        // 获取计算属性
+        getBunitsPagefun(){
+            getBunitsPage().then(res=>{
+                this.unitNoData = res.data.data
+            })
+        },
+        // 核算项目数据
+        baccitemstypeListfun(cnName){
+            baccitemstypeList(1,10,{cnName}).then(res=>{
+                this.itemClassifyData = res.data.data.records
+            })
+        },
+
+    }
+}
+</script>
+
+<style scoped>
+::v-deep.el-form-item {
+    margin-bottom: 0;
+}
+</style>

+ 621 - 0
src/views/iosBasicData/accounts/index.vue

@@ -0,0 +1,621 @@
+<template>
+  <div>
+      <basic-container v-if="isShow">
+          <avue-crud :option="option"
+                     :table-loading="loading"
+                     :data="data"
+                     :page.sync="page"
+                     :permission="permissionList"
+                     :before-open="beforeOpen"
+                     v-model="form"
+                     id="out-table"
+                     :header-cell-class-name="headerClassName"
+                     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', 323)"
+                     @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 323)"
+                     @on-load="onLoad">
+              <template slot="menuLeft">
+                  <el-button type="primary"
+                             size="small"
+                             icon="el-icon-plus"
+                             @click="addAccountsfun">新 增
+                  </el-button>
+                  <el-button type="danger"
+                             size="small"
+                             icon="el-icon-delete"
+                             plain
+                             @click="handleDelete">删 除
+                  </el-button>
+              </template>
+          </avue-crud>
+      </basic-container>
+
+      <!--辅助核算-->
+
+      <!--<el-dialog-->
+      <!--    title="账户管理"-->
+      <!--    append-to-body-->
+      <!--    :visible.sync="accountsVisible"-->
+      <!--    class="el-dialogDeep"-->
+      <!--    width="60%"-->
+      <!--    :before-close="handleClose">-->
+      <!--    <accounts-dialog></accounts-dialog>-->
+      <!--    <span slot="footer" class="dialog-footer">-->
+      <!--          <el-button @click="accountsVisible = false">取 消</el-button>-->
+      <!--          <el-button type="primary" @click="accountsVisible = false">确 定</el-button>-->
+      <!--      </span>-->
+      <!--</el-dialog>-->
+
+      <accountsDetails v-if="!isShow" @goBack="goBack"></accountsDetails>
+  </div>
+</template>
+
+<script>
+  import {accountsList, accountsDetail, accountsSubmit, accountsRemove} from "@/api/iosBasicData/accounts";
+  import {mapGetters} from "vuex";
+  import accountsDialog from "@/views/iosBasicData/accounts/assembly/accountsDialog.vue";
+  import accountsDetails from "@/views/iosBasicData/accounts/accountsDetails.vue";
+
+  export default {
+    data() {
+      return {
+        accountsVisible:false, // 添加编辑弹窗
+        isShow:true,
+        form: {},
+        query: {},
+        loading: true,
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0
+        },
+        selectionList: [],
+        option:{},
+        optionBack: {
+          height:'auto',
+          calcHeight: 30,
+          tip: false,
+          searchShow: true,
+          searchMenuSpan: 6,
+          border: true,
+          index: true,
+          viewBtn: true,
+          selection: true,
+          dialogClickModal: false,
+          column: [
+            {
+              label: "科目代码",
+              prop: "code",
+              rules: [{
+                required: true,
+                message: "请输入科目代码",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "中文名称",
+              prop: "cnName",
+              rules: [{
+                required: true,
+                message: "请输入中文名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "英文名称",
+              prop: "enName",
+              rules: [{
+                required: true,
+                message: "请输入英文名称",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "科目属性,资产、负债、权益等",
+              prop: "property",
+              rules: [{
+                required: true,
+                message: "请输入科目属性,资产、负债、权益等",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "方向",
+              prop: "dc",
+              rules: [{
+                required: true,
+                message: "请输入方向,D=借方 C=贷方",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "明细账类型",
+              prop: "sublegType",
+              rules: [{
+                required: true,
+                message: "请输入明细账类型",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否现金科目",
+              prop: "isCash",
+            },
+            {
+              label: "是否现金等价物",
+              prop: "isCashEq",
+            },
+            {
+              label: "是否银行科目",
+              prop: "isBank",
+            },
+            {
+              label: "是否出日记账",
+              prop: "isDiary",
+            },
+            {
+              label: "是否核算库存",
+              prop: "isStock",
+            },
+            {
+              label: "是否外币科目",
+              prop: "isForeign",
+            },
+            {
+              label: "币种",
+              prop: "curCode",
+            },
+            {
+              label: "汇率",
+              prop: "exrate",
+            },
+            {
+              label: "是否数量科目",
+              prop: "isQuantity",
+            },
+            {
+              label: "单位",
+              prop: "unitNo",
+            },
+            {
+              label: "单价",
+              prop: "price",
+            },
+            {
+              label: "是否预算科目",
+              prop: "isBudget",
+            },
+            {
+              label: "预算金额(原币)",
+              prop: "amountBudget",
+              rules: [{
+                required: true,
+                message: "请输入预算金额(原币)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "预算金额(CNY)",
+              prop: "amountBudgetLoc",
+              rules: [{
+                required: true,
+                message: "请输入预算金额(CNY)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "是否核算客户",
+              prop: "isCorp",
+            },
+            {
+              label: "是否核算部门",
+              prop: "isDept",
+            },
+            {
+              label: "是否核算职员",
+              prop: "isEmpl",
+            },
+            {
+              label: "是否核算项目",
+              prop: "isItem",
+            },
+            {
+              label: "核算项目类别 Id",
+              prop: "itemClassifyId",
+            },
+            {
+              label: "核算项目类别",
+              prop: "itemClassify",
+            },
+            {
+              label: "期初本币借方金额(CNY)",
+              prop: "amountOpenDr",
+              rules: [{
+                required: true,
+                message: "请输入期初本币借方金额(CNY)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初本币贷方金额(CNY)",
+              prop: "amountOpenCr",
+              rules: [{
+                required: true,
+                message: "请输入期初本币贷方金额(CNY)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初本币余额(CNY)",
+              prop: "amountOpenBlc",
+              rules: [{
+                required: true,
+                message: "请输入期初本币余额(CNY)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期本币借方金额(CNY)",
+              prop: "amountDr",
+              rules: [{
+                required: true,
+                message: "请输入本期本币借方金额(CNY)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期本币贷方金额(CNY)",
+              prop: "amountCr",
+              rules: [{
+                required: true,
+                message: "请输入本期本币贷方金额(CNY)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期本币余额(CNY)",
+              prop: "amountBlc",
+              rules: [{
+                required: true,
+                message: "请输入本期本币余额(CNY)",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初外币借方金额",
+              prop: "amountOpenDrUsd",
+              rules: [{
+                required: true,
+                message: "请输入期初外币借方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初外币贷方金额",
+              prop: "amountOpenCrUsd",
+              rules: [{
+                required: true,
+                message: "请输入期初外币贷方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初外币期初余额",
+              prop: "amountOpenUsdBlc",
+              rules: [{
+                required: true,
+                message: "请输入期初外币期初余额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期外币借方金额",
+              prop: "amountDrUsd",
+              rules: [{
+                required: true,
+                message: "请输入本期外币借方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期外币贷方金额",
+              prop: "amountCrUsd",
+              rules: [{
+                required: true,
+                message: "请输入本期外币贷方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期外币期初余额",
+              prop: "amountUsdBlc",
+              rules: [{
+                required: true,
+                message: "请输入本期外币期初余额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初数量借方金额",
+              prop: "quantityOpenDr",
+              rules: [{
+                required: true,
+                message: "请输入期初数量借方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初数量贷方金额",
+              prop: "quantityOpenCr",
+              rules: [{
+                required: true,
+                message: "请输入期初数量贷方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "期初数量期初余额",
+              prop: "quantityOpenUsdBlc",
+              rules: [{
+                required: true,
+                message: "请输入期初数量期初余额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期数量借方金额",
+              prop: "quantityDr",
+              rules: [{
+                required: true,
+                message: "请输入本期数量借方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期数量贷方金额",
+              prop: "quantityCr",
+              rules: [{
+                required: true,
+                message: "请输入本期数量贷方金额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "本期数量期初余额",
+              prop: "quantityUsdBlc",
+              rules: [{
+                required: true,
+                message: "请输入本期数量期初余额",
+                trigger: "blur"
+              }]
+            },
+            {
+              label: "备注",
+              prop: "remarks",
+              rules: [{
+                required: true,
+                message: "请输入备注",
+                trigger: "blur"
+              }]
+            },
+          ]
+        },
+        data: []
+      };
+    },
+    components:{accountsDialog,accountsDetails},
+    computed: {
+      ...mapGetters(["permission"]),
+      permissionList() {
+        return {
+          addBtn: this.vaildData(this.permission.accounts_add, false),
+          viewBtn: this.vaildData(this.permission.accounts_view, false),
+          delBtn: this.vaildData(this.permission.accounts_delete, false),
+          editBtn: this.vaildData(this.permission.accounts_edit, false)
+        };
+      },
+      ids() {
+        let ids = [];
+        this.selectionList.forEach(ele => {
+          ids.push(ele.id);
+        });
+        return ids.join(",");
+      }
+    },
+    async created() {
+        this.option = await this.getColumnData(this.getColumnName(323), this.optionBack);
+    },
+    methods: {
+      addAccountsfun(){
+          // this.accountsVisible = true
+          this.isShow = false
+      },
+      // 弹窗点击差号
+      handleClose(done) {
+          this.$confirm('确认关闭?')
+              .then(_ => {
+                  done();
+              })
+              .catch(_ => {});
+      },
+      rowSave(row, done, loading) {
+        accountsSubmit(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          window.console.log(error);
+        });
+      },
+      rowUpdate(row, index, done, loading) {
+        accountsSubmit(row).then(() => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "操作成功!"
+          });
+          done();
+        }, error => {
+          loading();
+          console.log(error);
+        });
+      },
+      rowDel(row) {
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return accountsRemove(row.id);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+          });
+      },
+      handleDelete() {
+        if (this.selectionList.length === 0) {
+          this.$message.warning("请选择至少一条数据");
+          return;
+        }
+        this.$confirm("确定将选择数据删除?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        })
+          .then(() => {
+            return accountsRemove(this.ids);
+          })
+          .then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
+            this.$refs.crud.toggleSelection();
+          });
+      },
+      beforeOpen(done, type) {
+        if (["edit", "view"].includes(type)) {
+          accountsDetail(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;
+        accountsList(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();
+        });
+      },
+      // 详情的返回列表
+      goBack() {
+          // 初始化数据
+          if (JSON.stringify(this.$route.query) != "{}") {
+              this.$router.$avueRouter.closeTag();
+              this.$router.push({
+                  path: "/iosBasicData/accounts/index"
+              });
+          }
+          this.isShow = true;
+          this.onLoad(this.page, this.search);
+      },
+      //自定义列保存
+      async saveColumnTwo(ref, option, optionBack, code) {
+          /**
+           * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+           * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+           * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+           */
+          const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+          if (inSave) {
+              this.$message.success("保存成功");
+              //关闭窗口
+              this.$refs[ref].$refs.dialogColumn.columnBox = false;
+          }
+      },
+      //自定义列重置
+      async resetColumnTwo(ref, option, optionBack, code) {
+          this[option] = this[optionBack];
+          const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+          if (inSave) {
+              this.$message.success("重置成功");
+              this.$refs[ref].$refs.dialogColumn.columnBox = false;
+          }
+      },
+      // 更改表格颜色
+      headerClassName(tab){
+          //颜色间隔
+          let back = ""
+          if (tab.columnIndex >= 0 && tab.column.level === 1) {
+              if (tab.columnIndex % 2 === 0) {
+                  back = "back-one"
+              } else if (tab.columnIndex % 2 === 1) {
+                  back = "back-two"
+              }
+          }
+          return back;
+      },
+
+    }
+  };
+</script>
+
+<style scoped>
+::v-deep#out-table .back-one {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+::v-deep#out-table .back-two {
+    background: #ecf5ff !important;
+    text-align: center;
+}
+</style>

+ 36 - 15
src/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue

@@ -34,15 +34,20 @@
                 prop="accountCode"
                 label="科目代码" width="200px">
                 <template slot-scope="{ row }">
-                    <search-query :datalist="accountData"
-                                  :selectValue="row.accountCode"
-                                  :filterable="true"
-                                  :clearable="true"
-                                  :remote="true"
-                                  :buttonIf="false"
-                                  :forParameter="{key:'id',label:'shortName',value:'id'}"
-                                  @corpChange="corpChange($event,'shortName',row)">
-                    </search-query>
+                    <div style="display: flex;align-items: center;justify-content: space-between">
+                        <search-query style="width: 80%" :datalist="accountData"
+                                      :selectValue="row.accountCode"
+                                      :filterable="true"
+                                      :clearable="true"
+                                      :remote="true"
+                                      :buttonIf="false"
+                                      :forParameter="{key:'id',label:'shortName',value:'id'}"
+                                      @corpChange="corpChange($event,'shortName',row)">
+                        </search-query>
+                        <el-tooltip class="item" effect="dark" content="修改" placement="top">
+                            <el-button size="mini" type="primary" icon="el-icon-edit" circle @click="auxiliaryAccountingfun(row)"></el-button>
+                        </el-tooltip>
+                    </div>
                     <span>{{row.accountCnName}}</span>
                 </template>
             </el-table-column>
@@ -70,7 +75,7 @@
             </el-table-column>
             <el-table-column
                 prop="curCode"
-                label="币种" width="100px">
+                label="币种" width="80px">
             </el-table-column>
             <el-table-column
                 prop="exrate"
@@ -115,9 +120,13 @@
                 </template>
             </el-table-column>
             <el-table-column label="操作" width="100px">
-                <template slot-scope="{ row }">
-                    <el-button size="mini" type="primary" icon="el-icon-plus" circle></el-button>
-                    <el-button size="mini" type="danger" icon="el-icon-delete" circle></el-button>
+                <template slot-scope="scope">
+                    <el-tooltip class="item" effect="dark" content="添加" placement="top">
+                        <el-button size="mini" type="primary" icon="el-icon-plus" circle @click="addRowsfun(scope.row,scope.$index)"></el-button>
+                    </el-tooltip>
+                    <el-tooltip class="item" effect="dark" content="删除" placement="top">
+                        <el-button size="mini" type="danger" icon="el-icon-delete" circle></el-button>
+                    </el-tooltip>
                 </template>
             </el-table-column>
         </el-table>
@@ -132,18 +141,30 @@
         data(){
             return {
                 accountData:[], // 科目数据
-                handleSelectionData:[],
             }
         },
         props:{
             tableData:{
-                type:Array
+                type:Array,
+                default: []
+            },
+            handleSelectionData:{
+                type:Array,
+                default:[]
             }
         },
         async created() {
             this.option = await this.getColumnData(this.getColumnName(321.1), this.optionBack);
         },
         methods:{
+            // 行添加
+            addRowsfun(row,index){
+                this.$emit("addRowsfun",row,index)
+            },
+            // 辅助核算
+            auxiliaryAccountingfun(row){
+                this.$emit("auxiliaryAccountingfun",row)
+            },
             // 下拉回调
             corpChange(value){
 

+ 206 - 146
src/views/iosBasicData/finvouchers/finvouchersitems.vue

@@ -82,9 +82,12 @@
 
             <el-card style="margin-top: 10px">
                 <div style="margin-bottom: 10px">
-                    <el-button  size="small" type="success" style="margin-right: 8px"
+                    <el-button  size="small" type="primary" style="margin-right: 8px"
                                 :loading="saveLoading" @click="addEntryfun" >添加分录
                     </el-button>
+                    <el-button  size="small" type="danger" style="margin-right: 8px"
+                                :loading="saveLoading" @click="deleteEntryfun" >删除分录
+                    </el-button>
                     <el-button  size="small" type="success" style="margin-right: 8px"
                                 :loading="saveLoading" >项目属性
                     </el-button>
@@ -98,183 +101,185 @@
                                 :loading="saveLoading" >科目余额查询
                     </el-button>
                 </div>
-                <fromtable-details :tableData="form.finVouchersItemsList"></fromtable-details>
+                <fromtable-details :tableData="form.finVouchersItemsList"
+                                   :handleSelectionData="handleSelectionData"
+                                   @handleSelectionChange="handleSelectionChange"
+                                   @addRowsfun="addRowsfun"
+                                   @auxiliaryAccountingfun="auxiliaryAccountingfun">
+                </fromtable-details>
             </el-card>
+        </div>
 
-            <el-row style="margin-top: 10px">
-                <el-col :span="8">
-                    <el-card class="cardRight">
-                        <el-checkbox class="borderCheckbox" style="width: 100%" v-model="checked">数量项目</el-checkbox>
-                        <el-form :model="form" ref="form" label-width="70px" class="demo-ruleForm">
-                            <el-col :span="12">
-                                <el-form-item label="单位:" prop="voucherType">
-                                    <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="12">
-                                <el-form-item label="规格:" prop="voucherType">
-                                    <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="12">
-                                <el-form-item label="借方数量:" prop="voucherType">
-                                    <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="12">
-                                <el-form-item label="借方单价:" prop="voucherType">
-                                    <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="12">
-                                <el-form-item label="贷方数量:" prop="voucherType">
-                                    <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="12">
-                                <el-form-item label="贷方单价:" prop="voucherType">
-                                    <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-form>
-                    </el-card>
-                </el-col>
-                <el-col :span="8">
-                    <el-card class="cardRight">
-                        <el-checkbox class="borderCheckbox" style="width: 100%" v-model="checked">外币项目</el-checkbox>
-                        <el-form :model="form" ref="form" label-width="70px" class="demo-ruleForm">
-                            <el-form-item label="外币名称:" prop="voucherType">
+
+        <!--辅助核算-->
+        <el-dialog
+            title="辅助核算"
+            append-to-body
+            :visible.sync="auxiliaryVisible"
+            class="el-dialogDeep"
+            width="70%"
+            :before-close="handleClose">
+            <div>科目名称:1231233242342</div>
+            <div style="margin-top: 20px">
+                <el-form :model="form" ref="form" label-width="70px" class="demo-ruleForm">
+                    <div>外币核算:</div>
+                    <el-row>
+                        <el-col :span="4">
+                            <el-form-item label="币种:" prop="voucherType">
                                 <el-input style="width: 100%;" v-model="form.voucherNo"
                                           size="small" autocomplete="off"
-                                          :disabled="true"
-                                          clearable placeholder="请输入外币名称" >
+                                          clearable placeholder="请输入币种" >
                                 </el-input>
                             </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
                             <el-form-item label="汇率:" prop="voucherType">
                                 <el-input style="width: 100%;" v-model="form.voucherNo"
                                           size="small" autocomplete="off"
-                                          :disabled="true"
                                           clearable placeholder="请输入汇率" >
                                 </el-input>
                             </el-form-item>
-                            <el-form-item label="原币借方:" prop="voucherType">
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="借方金额:" prop="voucherType">
                                 <el-input style="width: 100%;" v-model="form.voucherNo"
                                           size="small" autocomplete="off"
-                                          :disabled="true"
-                                          clearable placeholder="请输入原币借方" >
+                                          clearable placeholder="请输入借方金额" >
                                 </el-input>
                             </el-form-item>
-                            <el-form-item label="原币货方:" prop="voucherType">
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="贷方金额:" prop="voucherType">
                                 <el-input style="width: 100%;" v-model="form.voucherNo"
                                           size="small" autocomplete="off"
-                                          :disabled="true"
-                                          clearable placeholder="请输入原币货方" >
+                                          clearable placeholder="请输入贷方金额" >
                                 </el-input>
                             </el-form-item>
-                        </el-form>
-                    </el-card>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="本币借方:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入本币借方" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="本币贷方:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入本币贷方" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
 
-                </el-col>
-                <el-col :span="8" class="cardRight" style="margin-right: 0">
-                    <el-card>
-                        <el-checkbox class="borderCheckbox" style="width: 100%" v-model="checked">核算项目</el-checkbox>
-                        <el-form :model="form" ref="form" label-width="70px" class="demo-ruleForm">
-                            <el-col :span="7">
-                                <el-form-item label="" prop="voucherType" label-width="0px">
-                                    <el-checkbox v-model="checked">选择类型</el-checkbox>
-                                </el-form-item>
-                            </el-col>
-                            <el-col :span="17">
-                                <el-form-item>
-                                    <span slot="label">
-                                        <el-checkbox v-model="checked">客户:</el-checkbox>
-                                    </span>
-                                    <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="24">
+                    <div>数量核算:</div>
+                    <el-row>
+                        <el-col :span="4">
+                            <el-form-item label="单位:" prop="voucherType">
                                 <el-input style="width: 100%;" v-model="form.voucherNo"
                                           size="small" autocomplete="off"
-                                          :disabled="true"
-                                          clearable placeholder="请输入客户" >
+                                          clearable placeholder="请输入单位" >
                                 </el-input>
-                            </el-col>
-                            <el-col :span="12">
-                                <el-form-item>
-                                        <span slot="label">
-                                            <el-checkbox v-model="checked">部门:</el-checkbox>
-                                        </span>
-                                    <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="12">
-                                <el-form-item>
-                                        <span slot="label">
-                                            <el-checkbox v-model="checked">职员:</el-checkbox>
-                                        </span>
-                                    <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-form-item>
-                                        <span slot="label">
-                                            <el-checkbox v-model="checked">项目:</el-checkbox>
-                                        </span>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="规格:" prop="voucherType">
                                 <el-input style="width: 100%;" v-model="form.voucherNo"
                                           size="small" autocomplete="off"
-                                          :disabled="true"
-                                          clearable placeholder="请输入客户" >
+                                          clearable placeholder="请输入规格" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="借方数量:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入借方数量" >
                                 </el-input>
                             </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="借方单价:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入借方单价" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="贷方数量:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入贷方数量" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-form-item label="贷方单价:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入贷方单价" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
+
+                    <el-row :gutter="40">
+                        <el-col :span="12">
+                            <div>客户核算:</div>
+                            <el-form-item label="本币贷方:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入客户名称" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                            <div>部门核算:</div>
+                            <el-form-item label="本币贷方:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入部门名称" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                            <div>职员核算:</div>
+                            <el-form-item label="本币贷方:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入职员名称" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                        <el-col :span="12">
+                            <div>项目核算:</div>
+                            <el-form-item label="本币贷方:" prop="voucherType">
+                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                          size="small" autocomplete="off"
+                                          clearable placeholder="请输入项目名称" >
+                                </el-input>
+                            </el-form-item>
+                        </el-col>
+                    </el-row>
 
-                        </el-form>
-                    </el-card>
+                </el-form>
+            </div>
+            <span slot="footer" class="dialog-footer">
+                <el-button @click="auxiliaryVisible = false">取 消</el-button>
+                <el-button type="primary" @click="auxiliaryVisible = false">确 定</el-button>
+            </span>
+        </el-dialog>
 
-                </el-col>
-            </el-row>
-        </div>
     </div>
 </template>
 
 <script>
     import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
     import {getWorkDicts} from "@/api/system/dictbiz";
-    import {finvouchersSubmit} from "@/api/iosBasicData/finvouchers";
+    import {finvouchersitemsRemove, finvouchersSubmit} from "@/api/iosBasicData/finvouchers";
     import {getCurrentDate, getYearDate} from "@/util/date";
     import fromtableDetails from "@/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue";
 
@@ -290,6 +295,8 @@
                     finVouchersItemsList:[],
                 },
                 voucherTypeData:[], // 凭证字数据
+                auxiliaryVisible:false, // 辅助核算弹窗
+                handleSelectionData:[], // 分录多选的数据
             }
         },
         created() {
@@ -298,22 +305,66 @@
         methods:{
             // 添加分录
             addEntryfun(){
-                this.form.finVouchersItemsList.push({
-
+                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
+                });
+            },
+            // 删除分录
+            deleteEntryfun(){
+                console.log(this.handleSelectionData,323)
+                let arr = this.handleSelectionData.map(item=>{
+                    return item.id
                 })
+                console.log(arr.join(','))
+                // for (let item of this.handleSelectionData) {
+                //     if (item.id) {
+                //
+                //     }
+                // }
             },
-            // 保存
+            // 保存
             finvouchersSubmitfun(){
                 this.form.businessTypeCode = 'PZDH'
                 finvouchersSubmit().then(res=>{
 
                 })
             },
+            // 分录删除接口
+            finvouchersitemsRemovefun(){
+                finvouchersitemsRemove().then(res=>{
+
+                })
+            },
+            // 科目编辑打开辅助核算弹窗
+            auxiliaryAccountingfun(row){
+                this.auxiliaryVisible = true
+            },
             // 下拉回调
             corpChange(value,name){
                 this.$set(this.form,'voucherType',value)
                 this.$set(this.form,'billNoFormat',value)
             },
+            // 表格多选数据
+            handleSelectionChange(list){
+                this.handleSelectionData = list
+            },
+            // 弹窗点击差号
+            handleClose(done) {
+                this.$confirm('确认关闭?')
+                    .then(_ => {
+                        done();
+                    })
+                    .catch(_ => {});
+            },
             // 获取字典数据
             getWorkDictsfun(){
                 // 凭证字数据
@@ -329,7 +380,7 @@
     }
 </script>
 
-<style scoped>
+<style scoped lang="scss">
 ::v-deep.el-form-item {
     margin-bottom: 0;
 }
@@ -357,4 +408,13 @@
     color:#4a9de6;
     margin-bottom: 5px;
 }
+
+.el-dialogDeep {
+    ::v-deep .el-dialog {
+        .el-dialog__body {
+            padding-bottom: 0 !important;
+            padding-top: 0 !important;
+        }
+    }
+}
 </style>