Browse Source

2025.12.22

wfg 3 months ago
parent
commit
83c23e2236

+ 14 - 0
src/api/approval/processConfig.js

@@ -100,5 +100,19 @@ export function selectSalesNames(params) {
         params
     })
 }
+// 查询人力资源
+export function selectEmpls(current, size, params) {
+  return request({
+    url: '/api/blade-los/bstaffinformation/list',
+    method: 'get',
+    params:{
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+
 
 

+ 6 - 2
src/util/contrastData.js

@@ -13,10 +13,14 @@ export function contrastObj(newval, oldval) {
 
 //比较数组的值(有序)
 export function contrastList(newlist, oldlist) {
+  // undefined, null, [] 认为是一个
   if (!Array.isArray(newlist) || !Array.isArray(oldlist)) {
-    return true
+    var a1 = Array.isArray(newlist) ? newlist : [];
+    var a2 = Array.isArray(oldlist) ? oldlist : [];
+
+    return a1.length !== a2.length;
   }
-  if (newlist.length != oldlist.length) {
+  if (newlist.length !== oldlist.length) {
     return true
   }
   let reg = /^[A-Za-z]+$/;

+ 5 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/DocumentCenter.vue

@@ -930,6 +930,11 @@ export default {
       } else {
         if (type) {
           this.dialogPreviewfun(obj);
+        }else{
+          this.editData = {};
+          this.documentForm = {};
+          this.documenturl = {};
+          this.documentVisible = false;
         }
       }
     },

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

@@ -1898,6 +1898,13 @@ export default {
                 });
             }
             */
+      if(!val){
+        this.$set(this.assemblyForm, 'etd', '');
+      }else{
+        if(!this.assemblyForm.issueDate){
+          this.assemblyForm.issueDate = val
+        }
+      }
     },
     // 易燃易爆品闪点类型为数字
     dgFlashPointInput(val) {

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

@@ -235,8 +235,9 @@
                             <span style="color: #1e9fff">签单日期</span>
                         </span>
                         <el-date-picker v-model="assemblyForm.issueDate" type="date" style="width: 100%;"
-                            value-format="yyyy-MM-dd HH:mm" size="small" :disabled="detailData.seeDisabled"
-                            placeholder="请选择签单日期">
+                            value-format="yyyy-MM-dd" size="small" :disabled="detailData.seeDisabled"
+                            placeholder="请选择签单日期" @change="handlePick"
+                        >
                         </el-date-picker>
                     </el-form-item>
                 </el-col>
@@ -590,6 +591,11 @@ export default {
             }
             else { }
         },
+      handlePick(val) {
+        if(!val){
+          this.$set(this.assemblyForm, 'issueDate', '');
+        }
+      },
         // 选择框的回调
         corpChange(value, name) {
             let inttraArr = ['inttraDoorTo', 'inttraToDoor']

+ 4 - 4
src/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsFrame/BillofLadingDetails.vue

@@ -103,8 +103,8 @@
             </el-col>
             <el-col :span="10">
                 <div style="border: 1px solid #000;">
-                    <el-form-item label=" " prop="">
-                        <el-input type="textarea" :rows="5" style="width: 100%;" disabled size="small"
+                    <el-form-item label="BLNO." prop="mblno">
+                        <el-input style="width: 100%;" v-model="documentForm.mblno" size="small"
                             autocomplete="off" clearable>
                         </el-input>
                     </el-form-item>
@@ -117,8 +117,8 @@
                     </el-form-item>
                 </div>
                 <div style="border: 1px solid #000;">
-                    <el-form-item label=" " prop="">
-                        <el-input type="textarea" :rows="5" style="width: 100%;" disabled size="small"
+                    <el-form-item label="Shipping Remark" prop="siRemarks">
+                        <el-input type="textarea" :rows="5" style="width: 100%;"  v-model="documentForm.siRemarks" size="small"
                             autocomplete="off" clearable>
                         </el-input>
                     </el-form-item>

+ 49 - 37
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -29,7 +29,12 @@
           >一键校验收发通
         </el-button>
         <el-dropdown style="line-height: 0" v-if="importTemplate == 1">
-          <el-button size="small" type="warning" style="margin-right: 8px" :disabled="detailData.seeDisabled || form.status > 0 || showLock || !form.id">
+          <el-button
+            size="small"
+            type="warning"
+            style="margin-right: 8px"
+            :disabled="detailData.seeDisabled || form.status > 0 || showLock || !form.id"
+          >
             导入模板<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
@@ -568,7 +573,7 @@ import editypes from "@/views/iosBasicData/editypes/index.vue";
 import { editypesList } from "@/api/iosBasicData/editypes";
 import { verifyEnglish, checkFullWidthSymbols } from "@/util/date";
 import { contrastObj, contrastList } from "@/util/contrastData";
-import { selectListLos } from "@/api/approval/processConfig";
+import { selectListLos, selectSalesNames } from "@/api/approval/processConfig";
 import { isProcurement } from "@/api/basicData/configuration";
 import { similarValues } from "@/util/verifyData";
 import _ from "lodash";
@@ -1170,7 +1175,7 @@ export default {
   },
   methods: {
     lastPage() {
-      this.editCustomer()
+      this.editCustomer();
 
       if (this.pageIds.length) {
         const index = this.pageIds.indexOf(this.form.id);
@@ -1191,7 +1196,7 @@ export default {
       }
     },
     nextPage() {
-      this.editCustomer()
+      this.editCustomer();
 
       if (this.pageIds.length) {
         const index = this.pageIds.indexOf(this.form.id);
@@ -1283,8 +1288,8 @@ export default {
       let changed = {
         changed: false,
         main: false,
-        containersList: false,
-      }
+        containersList: false
+      };
       changed.changed =
         !this.form.id ||
         contrastObj(this.form, this.oldForm) ||
@@ -1297,18 +1302,19 @@ export default {
         contrastList(this.form.filesList, this.oldForm.filesList) ||
         contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList);
 
-      changed.c1 = !this.form.id
-      changed.c2 = contrastObj(this.form, this.oldForm)
-      changed.c3 = contrastObj(this.form.hmmEdi, this.oldForm.hmmEdi)
-      changed.c4 = contrastObj(this.form.preContainersList, this.oldForm.preContainersList)
-      changed.c5 = contrastList(this.form.containersList, this.oldForm.containersList)
-      changed.c6 = contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC)
-      changed.c7 = contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD)
-      changed.c8 = contrastList(this.form.filesList, this.oldForm.filesList)
-      changed.c9 = contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
-
-      if(changed.changed){
-        if(!this.form.id ||
+      changed.c1 = !this.form.id;
+      changed.c2 = contrastObj(this.form, this.oldForm);
+      changed.c3 = contrastObj(this.form.hmmEdi, this.oldForm.hmmEdi);
+      changed.c4 = contrastObj(this.form.preContainersList, this.oldForm.preContainersList);
+      changed.c5 = contrastList(this.form.containersList, this.oldForm.containersList);
+      changed.c6 = contrastList(this.form.feeCenterListC, this.oldForm.feeCenterListC);
+      changed.c7 = contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD);
+      changed.c8 = contrastList(this.form.filesList, this.oldForm.filesList);
+      changed.c9 = contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList);
+
+      if (changed.changed) {
+        if (
+          !this.form.id ||
           contrastObj(this.form, this.oldForm) ||
           contrastObj(this.form.hmmEdi, this.oldForm.hmmEdi) ||
           contrastObj(this.form.detail, this.oldForm.detail) ||
@@ -1317,12 +1323,12 @@ export default {
           contrastList(this.form.feeCenterListD, this.oldForm.feeCenterListD) ||
           contrastList(this.form.filesList, this.oldForm.filesList) ||
           contrastList(this.form.waitingBoxList, this.oldForm.waitingBoxList)
-        ){
-          changed.main=true;
+        ) {
+          changed.main = true;
         }
 
-        if(contrastList(this.form.containersList, this.oldForm.containersList)){
-          changed.containersList=true;
+        if (contrastList(this.form.containersList, this.oldForm.containersList)) {
+          changed.containersList = true;
         }
       }
 
@@ -2112,8 +2118,15 @@ export default {
           this.columnforfun("srcCnName").dicData = res.data.data.records;
         });
       } else {
-        selectListLos("业务员", account).then(res => {
-          this.columnforfun("srcCnName").dicData = res.data.data;
+        // selectListLos("业务员", account).then(res => {
+        //   this.columnforfun("srcCnName").dicData = res.data.data;
+        // });
+        selectSalesNames({positionType: "业务员", status: 0, whetherEmployedOrNot: "1"}).then(res => {
+          console.log(res.data.data.records);
+          res.data.data.records.forEach(record => {
+            record.name = record.cname;
+          })
+          this.columnforfun("srcCnName").dicData = res.data.data.records;
         });
       }
     },
@@ -2877,10 +2890,10 @@ export default {
     },
     // 大保存按钮
     async editCustomer(status, callback) {
-      let changed = this.mainDataChanged()
-      if(!changed.changed){
-        if(typeof callback == "function"){
-          callback()
+      let changed = this.mainDataChanged();
+      if (!changed.changed) {
+        if (typeof callback == "function") {
+          callback();
         }
 
         if (status == "goBack") {
@@ -2899,24 +2912,22 @@ export default {
           this.$emit(status);
         }
 
-        if(status == "user-save") {
+        if (status == "user-save") {
           this.$message.success("未更改,无需保存!");
         }
 
-        return
+        return;
         // 未更改,无需保存
       }
 
-      console.log(changed);
-
       await this.$refs.form.validate(async valid => {
         // 没有校验项
-        valid = true
+        valid = true;
         if (valid) {
-          if(!changed.main && changed.containersList){
+          if (!changed.main && changed.containersList) {
             await containersSubmitList(this.form.containersList);
             this.billsDetailfun(this.form.id);
-            return
+            return;
           }
 
           if (this.business == 1) {
@@ -3509,7 +3520,8 @@ export default {
           this.pageLoading = false;
 
           // 保存箱号
-          if(contrastList(this.form.containersList, this.oldForm.containersList)){
+          console.log(this.form.containersList, this.oldForm.containersList);
+          if (contrastList(this.form.containersList, this.oldForm.containersList)) {
             await containersSubmitList(this.form.containersList);
           }
 
@@ -3906,7 +3918,7 @@ export default {
       }
 
       if (typeof callback === "function") {
-        console.log("do callback", callback)
+        console.log("do callback", callback);
         callback();
       }
     },

+ 1 - 1
src/views/iosBasicData/accounts/index.vue

@@ -716,7 +716,7 @@ import {
 
           // 前端去掉凭证明细中已使用的判断
           data.records.forEach(item => {
-            // item.count = "0"
+            item.count = "0"
           })
 
           this.data = data.records;

+ 526 - 401
src/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue

@@ -1,416 +1,541 @@
 <template>
-    <div>
-        <el-table
-            ref="tableRef"
-            :cell-style="{padding:'0px',fontSize:'12px'}"
-            :header-cell-style="tableHeaderCellStyle"
-            :data="tableData"
-            :border="true"
-            show-summary
-            :summary-method="summaryMethod"
-            style="width: 100%"
-            @selection-change="handleSelectionChange"
-            @row-click="rowClick"
-            :row-style="rowStyle"
-            :row-class-name="rowClassName" 
+  <div>
+    <el-table
+      ref="tableRef"
+      :cell-style="{ padding: '0px', fontSize: '12px' }"
+      :header-cell-style="tableHeaderCellStyle"
+      :data="tableData"
+      :border="true"
+      show-summary
+      :summary-method="summaryMethod"
+      style="width: 100%"
+      @selection-change="handleSelectionChange"
+      @row-click="rowClick"
+      :row-style="rowStyle"
+      :row-class-name="rowClassName"
+    >
+      <el-table-column fixed="left" type="selection" width="55"> </el-table-column>
+      <el-table-column type="index" width="55"> </el-table-column>
+      <el-table-column prop="descr" label="摘要" width="200px" style="padding: 0">
+        <template slot-scope="{ row }">
+          <el-input
+            style="width: 100%;"
+            type="textarea"
+            v-model="row.descr"
+            size="small"
+            autocomplete="off"
+            clearable
+            placeholder="请输入摘要"
+            :disabled="disabled"
+          >
+          </el-input>
+        </template>
+      </el-table-column>
+      <el-table-column prop="accountCode" label="科目代码" width="400px">
+        <template slot-scope="{ row }">
+          <div style="display: flex;align-items: center;justify-content: space-between">
+            <search-query
+              style="width: 100%"
+              :datalist="accountData"
+              :selectValue="row.accountCode"
+              :filterable="true"
+              :clearable="true"
+              :remote="true"
+              :buttonIf="false"
+              :desc="true"
+              :forParameter="{ key: 'code', label: 'code', value: 'code', desc: 'fullName' }"
+              :disabled="disabled"
+              @corpFocus="accountsListfun"
+              @remoteMethod="accountsListfun"
+              @corpChange="corpChange($event, 'accountId', row)"
             >
-            <el-table-column
-                fixed="left"
-                type="selection"
-                width="55">
-            </el-table-column>
-            <el-table-column
-                type="index"
-                width="55">
-            </el-table-column>
-            <el-table-column
-                prop="descr"
-                label="摘要" width="200px">
-                <template slot-scope="{ row }">
-                    <el-input style="width: 100%;" type="textarea" v-model="row.descr"
-                              size="small" autocomplete="off"
-                              clearable placeholder="请输入摘要" :disabled="disabled">
-                    </el-input>
-                </template>
-            </el-table-column>
-            <el-table-column
-                prop="accountCode"
-                label="科目代码" width="400px" >
-                <template slot-scope="{ row }">
-                    <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"
-                                      :desc="true"
-                                      :forParameter="{key:'code',label:'code',value:'code',desc:'cnName'}"
-                                      :disabled="disabled"
-                                      @corpFocus="accountsListfun"
-                                      @remoteMethod="accountsListfun"
-                                      @corpChange="corpChange($event,'accountId',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)" :disabled="disabled"></el-button>
-                        </el-tooltip>
-                    </div>
-                    <span>{{(row.accountCode?row.accountCode:'')+' '+(row.accountCnName?row.accountCnName:'')+(row.emplName?'_【职员】'+row.emplName:'')+(row.createDeptName?'_【部门】'+row.createDeptName:'')+(row.corpCnName?'_【客户】'+row.corpCnName:'')}}</span>
-                </template>
-            </el-table-column>
+            </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)" :disabled="disabled"></el-button>
+            </el-tooltip>
+          </div>
+          <div style="display: flex;">
+<!--            _【职员】  _【部门】  _【客户】-->
+            <span>{{
+                (row.accountFullName ? row.accountFullName : "") +
+                (row.isEmpl === 1 && row.emplName ? "/" + row.emplName : "") +
+                (row.isDept === 1 && row.deptName ? "/" + row.deptName : "") +
+                (row.isCorp === 1 && row.corpShortName ? "/" + row.corpShortName : "")
+              }}</span>
+          </div>
+        </template>
+      </el-table-column>
 
-            <el-table-column label="本币金额">
-                <el-table-column
-                    prop="amountDr"
-                    label="借方" width="120px" >
-                    <template slot-scope="{ row }">
-                        <el-input-number style="width: 100%;" v-model="row.amountDr"
-                                  size="small" autocomplete="off" :disabled="!row.accountId||disabled"
-                                   placeholder="请输入借方" @blur="amountBlur(row,'D')" :controls="false">
-                        </el-input-number>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                    prop="amountCr"
-                    label="货方" width="120px" >
-                    <template slot-scope="{ row }">
-                        <el-input-number style="width: 100%;" v-model="row.amountCr"
-                                  size="small" autocomplete="off" :disabled="!row.accountId||disabled"
-                                   placeholder="请输入货方" @blur="amountBlur(row,'C')" :controls="false">
-                        </el-input-number>
-                    </template>
-                </el-table-column>
-            </el-table-column>
-            <el-table-column label="外币金额" >
-                <el-table-column
-                    prop="curCode"
-                    label="币种" width="80px">
-                </el-table-column>
-                <el-table-column
-                    prop="exrate"
-                    label="汇率" width="100px">
-                    <template slot-scope="{ row }">
-                        <el-input-number v-if="row.curCode == 'USD'" style="width: 100%;"
-                                  v-model="row.exrate"
-                                  size="small" autocomplete="off"
-                                  clearable placeholder="请输入借方" @blur="amountBlur(row,'exrate')" :disabled="disabled">
-                        </el-input-number>
-                        <span v-else >{{row.exrate}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                    prop="amountDrUsd"
-                    label="借方" width="120px">
-                    <template slot-scope="{ row }">
-                        <el-input-number style="width: 100%;" v-model="row.amountDrUsd"
-                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY' || !row.accountId||disabled"
-                                  clearable placeholder="请输入借方" @blur="amountUSDBlur(row,'Dusd')" :controls="false">
-                        </el-input-number>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                    prop="amountCrUsd"
-                    label="货方" width="120px">
-                    <template slot-scope="{ row }">
-                        <el-input-number style="width: 100%;" v-model="row.amountCrUsd"
-                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY' || !row.accountId||disabled"
-                                  clearable placeholder="请输入货方" @blur="amountUSDBlur(row,'Cusd')" :controls="false">
-                        </el-input-number>
-                    </template>
-                </el-table-column>
-            </el-table-column>
-            <el-table-column
-                prop="remarks"
-                label="备注"
-                width="200px">
-                <template slot-scope="{ row }">
-                    <el-input style="width: 100%;" type="textarea" v-model="row.remarks"
-                              size="small" autocomplete="off"
-                              clearable placeholder="请输入备注" :disabled="disabled">
-                    </el-input>
-                </template>
-            </el-table-column>
-            <el-table-column label="操作" fixed="right" width="100px">
-                <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)" :disabled="disabled"></el-button>
-                    </el-tooltip>
-                    <el-tooltip class="item" effect="dark" content="删除" placement="top">
-                        <el-button size="mini" type="danger" icon="el-icon-delete" circle @click="deletefun(scope.row,scope.$index)" :disabled="disabled"></el-button>
-                    </el-tooltip>
-                </template>
-            </el-table-column>
-        </el-table>
-    </div>
+      <el-table-column prop="dc" label="方向" width="60px" style="padding: 0">
+        <template slot-scope="{ row }">
+          <el-input
+            style="width: 100%;text-align: center;"
+            v-text="row.dc=='D' ? '借' : '贷'"
+            size="small"
+            autocomplete="off"
+            clearable
+            :disabled="true"
+          >
+          </el-input>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="本币金额">
+        <el-table-column prop="amountDr" label="借方" width="120px">
+          <template slot-scope="{ row }">
+            <el-input-number
+              style="width: 100%;"
+              v-model="row.amountDr"
+              size="small"
+              autocomplete="off"
+              :disabled="!row.accountId || disabled"
+              placeholder="请输入借方"
+              :precision="2"
+              @blur="amountBlur(row, 'D')"
+              :controls="false"
+            >
+            </el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column prop="amountCr" label="货方" width="120px">
+          <template slot-scope="{ row }">
+            <el-input-number
+              style="width: 100%;"
+              v-model="row.amountCr"
+              size="small"
+              autocomplete="off"
+              :disabled="!row.accountId || disabled"
+              placeholder="请输入货方"
+              :precision="2"
+              @blur="amountBlur(row, 'C')"
+              :controls="false"
+            >
+            </el-input-number>
+          </template>
+        </el-table-column>
+      </el-table-column>
+      <el-table-column label="外币金额">
+        <el-table-column prop="curCode" label="币种" width="80px" align="center"> </el-table-column>
+        <el-table-column prop="exrate" label="汇率" width="100px">
+          <template slot-scope="{ row }">
+            <el-input-number
+              v-if="row.curCode == 'USD'"
+              style="width: 100%;"
+              v-model="row.exrate"
+              size="small"
+              autocomplete="off"
+              clearable
+              placeholder="请输入借方"
+              :precision="4"
+              @blur="amountBlur(row, 'exrate')"
+              :disabled="disabled"
+              :controls="false"
+            >
+            </el-input-number>
+<!--            {{ row.exrate }}-->
+            <span v-else></span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="amountDrUsd" label="借方" width="120px">
+          <template slot-scope="{ row }">
+            <el-input-number
+              style="width: 100%; text-align: right;"
+              v-model="row.amountDrUsd"
+              size="small"
+              autocomplete="off"
+              :disabled="row.curCode == 'CNY' || !row.accountId || disabled"
+              clearable
+              placeholder="请输入借方"
+              :precision="2"
+              @blur="amountUSDBlur(row, 'Dusd')"
+              :controls="false"
+            >
+            </el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column prop="amountCrUsd" label="货方" width="120px">
+          <template slot-scope="{ row }">
+            <el-input-number
+              style="width: 100%;"
+              v-model="row.amountCrUsd"
+              size="small"
+              autocomplete="off"
+              :disabled="row.curCode == 'CNY' || !row.accountId || disabled"
+              clearable
+              placeholder="请输入货方"
+              :precision="2"
+              @blur="amountUSDBlur(row, 'Cusd')"
+              :controls="false"
+            >
+            </el-input-number>
+          </template>
+        </el-table-column>
+      </el-table-column>
+      <el-table-column prop="remarks" label="备注" width="200px">
+        <template slot-scope="{ row }">
+          <el-input
+            style="width: 100%;"
+            type="textarea"
+            v-model="row.remarks"
+            size="small"
+            autocomplete="off"
+            clearable
+            placeholder="请输入备注"
+            :disabled="disabled"
+          >
+          </el-input>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" fixed="right" width="100px">
+        <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)"
+              :disabled="disabled"
+            ></el-button>
+          </el-tooltip>
+          <el-tooltip class="item" effect="dark" content="删除" placement="top">
+            <el-button
+              size="mini"
+              type="danger"
+              icon="el-icon-delete"
+              circle
+              @click="deletefun(scope.row, scope.$index)"
+              :disabled="disabled"
+            ></el-button>
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
 </template>
 
 <script>
-    import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
-    import {accountsList} from "@/api/iosBasicData/accounts";
+import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
+import { accountsList } from "@/api/iosBasicData/accounts";
+
+export default {
+  components: { SearchQuery },
+  data() {
+    return {
+      accountData: [] // 科目数据
+    };
+  },
+  props: {
+    tableData: {
+      type: Array,
+      default: []
+    },
+    handleSelectionData: {
+      type: Array,
+      default: []
+    },
+    disabled: {
+      type: Blob,
+      default: false
+    }
+  },
+  async created() {
+    this.accountsListfun();
+    // this.option = await this.getColumnData(this.getColumnName(321.1), this.optionBack);
+  },
+  methods: {
+    // 自定义合计
+    summaryMethod(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "总价";
+          return;
+        }
+        const values = data.map(item => Number(item[column.property]));
+        // 显示列的统计 金额
+        let arr = ["amountDr", "amountCr", "amountDrUsd", "amountCrUsd"];
+        // 判断是否有这个数据
+        if (arr.indexOf(column.property) != -1) {
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0);
+            sums[index] = sums[index].toFixed(2); // 把合计的参数保留两位小数
+            sums[index] += " 元";
+          } else {
+            sums[index] = " ";
+          }
+        }
+      });
+      return sums;
+    },
+    // 借方/贷方 本币的计算
+    amountBlur(row, name) {
+      if (name == "D") {
+        this.$set(row, "amountCr", 0);
+      }
+      if (name == "C") {
+        this.$set(row, "amountDr", 0);
+      }
+      // if (name == 'Dusd') {
+      //     this.$set(row,'amountCrUsd',0)
+      // }
+      // if (name == 'Cusd') {
+      //     this.$set(row,'amountDrUsd',0)
+      // }
+      if (row.curCode == "USD") {
+        this.$set(row, "exrate", row.exrate ? Number(row.exrate) : 0);
+        this.$set(row, "amountCr", row.amountCr ? Number(row.amountCr) : 0);
+        this.$set(row, "amountDr", row.amountDr ? Number(row.amountDr) : 0);
+
+        this.$set(row, "amountCrUsd", (row.amountCr / row.exrate).toFixed(2));
+        this.$set(row, "amountDrUsd", (row.amountDr / row.exrate).toFixed(2));
+      }
+    },
+    // 外币的计算
+    amountUSDBlur(row, name) {
+      if (name == "Dusd") {
+        this.$set(row, "amountCrUsd", 0);
+      }
+      if (name == "Cusd") {
+        this.$set(row, "amountDrUsd", 0);
+      }
+      this.$set(row, "exrate", row.exrate ? Number(row.exrate) : 0);
+      this.$set(row, "amountCr", row.amountCrUsd ? Number(row.amountCrUsd) : 0);
+      this.$set(row, "amountDr", row.amountDrUsd ? Number(row.amountDrUsd) : 0);
+
+      this.$set(row, "amountCr", (row.amountCrUsd * row.exrate).toFixed(2));
+      this.$set(row, "amountDr", (row.amountDrUsd * row.exrate).toFixed(2));
+    },
+    // 获取科目类型数据
+    accountsListfun(code) {
+      accountsList(1, 10, { code, isDetail: 1 }).then(res => {
+        console.log(res.data.data.records);
+        this.accountData = res.data.data.records;
+      });
+    },
+    // 行删除
+    deletefun(row, index) {
+      this.$emit("deletefun", row, index);
+    },
+    // 行添加
+    addRowsfun(row, index) {
+      this.$emit("addRowsfun", row, index);
+    },
+    // 辅助核算
+    auxiliaryAccountingfun(row) {
+      if (!row.accountId) {
+        return this.$message.warning("请先选择科目代码");
+      }
+      this.$emit("auxiliaryAccountingfun", row);
+    },
+    // 下拉回调
+    corpChange(value, name, row) {
+      let found = false;
+      if (name === "accountId") {
+        for (let item of this.accountData) {
+          console.log(item);
+          if (item.code == value) {
+            found = true;
+            console.log(item, item.id);
+            this.$set(row, "accountId", item.id);
+            this.$set(row, "accountCode", item.code);
+            this.$set(row, "accountCnName", item.cnName);
+            this.$set(row, "accountEnName", item.enName);
+            this.$set(row, "accountFullName", item.fullName);
+            this.$set(row, "accountLevel", item.level);
+            this.$set(row, "accountProperty", item.property);
+            this.$set(row, "dc", item.dc);
+
+            // 币种
+            this.$set(row, "curCode", item.curCode);
+            // 汇率
+            this.$set(row, "exrate", item.exrate);
+            // 其他
+            this.$set(row, "isForeign", item.isForeign);
+            this.$set(row, "isQuantity", item.isQuantity);
+            this.$set(row, "isCorp", item.isCorp);
+            this.$set(row, "isDept", item.isDept);
+            this.$set(row, "isEmpl", item.isEmpl);
+            this.$set(row, "isItem", item.isItem);
+            this.$set(row, "itemClassifyId", item.itemClassifyId);
+            this.$set(row, "itemClassify", item.itemClassify);
+            // 打开弹窗
+            this.$emit("auxiliaryAccountingfun", row);
+          }
+        }
+        if (!found) {
+          console.log("not found");
+          this.$set(row, "accountId", 0);
+          this.$set(row, "accountCode", "");
+          this.$set(row, "accountCnName", "");
+          this.$set(row, "accountEnName", "");
+          this.$set(row, "accountFullName", "");
+          this.$set(row, "accountLevel", 0);
+          this.$set(row, "accountProperty", 0);
+          this.$set(row, "dc", "");
 
-    export default {
-        components: {SearchQuery},
-        data(){
-            return {
-                accountData:[], // 科目数据
-            }
-        },
-        props:{
-            tableData:{
-                type:Array,
-                default: []
-            },
-            handleSelectionData:{
-                type:Array,
-                default:[]
-            },
-            disabled:{
-                type:Blob,
-                default:false
-            },
-        },
-        async created() {
-            this.accountsListfun()
-            // this.option = await this.getColumnData(this.getColumnName(321.1), this.optionBack);
-        },
-        methods:{
-            // 自定义合计
-            summaryMethod(param){
-                const { columns, data } = param;
-                const sums = [];
-                columns.forEach((column, index) => {
-                    if (index === 0) {
-                        sums[index] = '总价';
-                        return;
-                    }
-                    const values = data.map(item => Number(item[column.property]));
-                    // 显示列的统计 金额
-                    let arr = ['amountDr','amountCr','amountDrUsd','amountCrUsd']
-                    // 判断是否有这个数据
-                    if (arr.indexOf(column.property) != -1) {
-                        if (!values.every(value => isNaN(value))) {
-                            sums[index] = values.reduce((prev, curr) => {
-                                const value = Number(curr);
-                                if (!isNaN(value)) {
-                                    return prev + curr;
-                                } else {
-                                    return prev;
-                                }
-                            }, 0);
-                            sums[index] = sums[index].toFixed(2) // 把合计的参数保留两位小数
-                            sums[index] += ' 元';
-                        } else {
-                            sums[index] = ' ';
-                        }
-                    }
-                });
-                return sums;
-            },
-            // 借方/贷方 本币的计算
-            amountBlur(row,name){
-                if (name == 'D') {
-                    this.$set(row,'amountCr',0)
-                }
-                if (name == 'C') {
-                    this.$set(row,'amountDr',0)
-                }
-                // if (name == 'Dusd') {
-                //     this.$set(row,'amountCrUsd',0)
-                // }
-                // if (name == 'Cusd') {
-                //     this.$set(row,'amountDrUsd',0)
-                // }
-                if (row.curCode == 'USD') {
-                    this.$set(row,'exrate',row.exrate?Number(row.exrate):0)
-                    this.$set(row,'amountCr',row.amountCr?Number(row.amountCr):0)
-                    this.$set(row,'amountDr',row.amountDr?Number(row.amountDr):0)
+          // 币种
+          this.$set(row, "curCode", "");
+          // 汇率
 
-                    this.$set(row,'amountCrUsd',(row.amountCr / row.exrate).toFixed(2))
-                    this.$set(row,'amountDrUsd',(row.amountDr / row.exrate).toFixed(2))
-                }
-            },
-            // 外币的计算
-            amountUSDBlur(row,name){
-                if (name == 'Dusd') {
-                    this.$set(row,'amountCrUsd',0)
-                }
-                if (name == 'Cusd') {
-                    this.$set(row,'amountDrUsd',0)
-                }
-                this.$set(row,'exrate',row.exrate?Number(row.exrate):0)
-                this.$set(row,'amountCr',row.amountCrUsd?Number(row.amountCrUsd):0)
-                this.$set(row,'amountDr',row.amountDrUsd?Number(row.amountDrUsd):0)
+          // 其他
+          this.$set(row, "isForeign", 0);
+          this.$set(row, "isQuantity", 0);
+          this.$set(row, "isCorp", 0);
+          this.$set(row, "isDept", 0);
+          this.$set(row, "isEmpl", 0);
+          this.$set(row, "isItem", 0);
+          this.$set(row, "itemClassifyId", 0);
+          this.$set(row, "itemClassify", "");
 
-                this.$set(row,'amountCr',(row.amountCrUsd * row.exrate).toFixed(2))
-                this.$set(row,'amountDr',(row.amountDrUsd * row.exrate).toFixed(2))
-            },
-            // 获取科目类型数据
-            accountsListfun(code){
-                accountsList(1,10,{code,isDetail:1}).then(res=>{
-                    console.log(res.data.data.records)
-                    this.accountData = res.data.data.records
-                })
-            },
-            // 行删除
-            deletefun(row,index){
-                this.$emit('deletefun',row,index)
-            },
-            // 行添加
-            addRowsfun(row,index){
-                this.$emit("addRowsfun",row,index)
-            },
-            // 辅助核算
-            auxiliaryAccountingfun(row){
-                if (!row.accountId) {
-                    return this.$message.warning('请先选择科目代码')
-                }
-                this.$emit("auxiliaryAccountingfun",row)
-            },
-            // 下拉回调
-            corpChange(value,name,row){
-                for(let item of this.accountData) {
-                    console.log(item)
-                    if (item.code == value) {
-                        console.log(item,item.id)
-                        this.$set(row,'accountId',item.id)
-                        this.$set(row,'accountCode',item.code)
-                        this.$set(row,'accountCnName',item.cnName)
-                        this.$set(row,'accountEnName',item.enName)
-                        // 币种
-                        this.$set(row,'curCode',item.curCode)
-                        // 汇率
-                        this.$set(row,'exrate',item.exrate)
-                        // 打开弹窗
-                        this.$emit("auxiliaryAccountingfun",row)
-                    }
-                }
-            },
-            // 表头样式
-            tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
-                return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff;text-align:center"
-            },
-            // 列表多选
-            // 多选选择的数据
-            handleSelectionChange(arr){
-                this.$emit('handleSelectionChange',arr)
-            },
-            // 监听点击表格事件
-            rowClick(row, column, event) {
-                let refsElTable = this.$refs.tableRef; // 获取表格对象
-                if (this.CtrlDown) {
-                    refsElTable.toggleRowSelection(row); // ctrl多选 如果点击两次同样会取消选中
-                    return;
-                }
-                if ( this.shiftOrAltDown && this.handleSelectionData.length > 0) {
-                    // 通过rowIndex判断已选择的行中最上面和最下面的是哪行,再对比按住shift/alt点击的当前行得到新的最上面和最下面的行,把这两行中间的行进行循环选中。
-                    let topAndBottom = this.getTopAndBottom(  row, this.bottomSelectionRow, this.topSelectionRow );
-                    refsElTable.clearSelection(); //先清空 不然会导致在这两行中间之外的行状态不变
-                    for (let index = topAndBottom.top; index <= topAndBottom.bottom; index++) { //选中两行之间的所有行
-                        refsElTable.toggleRowSelection(this.tableData[index], true);
-                    }
-                } else {
-                    let findRow = this.handleSelectionData.find(c => c.rowIndex == row.rowIndex); //找出当前选中行
-                    //如果只有一行且点击的也是这一行则取消选择 否则清空再选中当前点击行
-                    if (findRow&& this.handleSelectionData.length === 1 ) {
-                        refsElTable.toggleRowSelection(row, false);
-                        return;
-                    }
-                    // refsElTable.clearSelection(); // 清空之前选择的数据(如果放开,选择之前会变成单选)
-                    refsElTable.toggleRowSelection(row); // 调用选中行方法
-                }
-            },
-            // 行的 style 的回调方法
-            rowStyle({row,rowIndex}) {
-                // 直接在一个对象上定义一个新属性,或者修改一个对象的现有属性,并返回此对象
-                // object: 要添加或者修改属性的目标对象;prop: 要定义或修改属性的名称;descript: 是一个对象,里面是我们上述的对象属性的特性;
-                Object.defineProperty(row, 'rowIndex', { //给每一行添加不可枚举属性rowIndex来标识当前行
-                    value: rowIndex, // 设置age的值,不设置的话默认为undefined
-                    writable: true, // 表示属性的值true可以修改,false不可以被修改
-                    enumerable: false, // 设置为false表示不能通过 for-in 循环返回
-                    // configurable: false, // configurable 设置为 false,意味着这个属性不能从对象上删除
-                })
-            },
-            keyDown(event) {
-                let key = event.keyCode;
-                if (key == 17) this.CtrlDown = true;
-                if (key == 16 || key == 18) this.shiftOrAltDown = true;
-            },
-            keyUp(event) {
-                let key = event.keyCode;
-                if (key == 17) this.CtrlDown = false;
-                if (key == 16 || key == 18) this.shiftOrAltDown = false;
-            },
-            // 文章说明 https://www.jianshu.com/p/48f2c522d2a2
-            getTopAndBottom(row, bottom, top){
-                let n = row.rowIndex,
-                    mx = bottom.rowIndex,
-                    mi = top.rowIndex;
-                if (n > mx) {
-                    return {
-                        top: mi,
-                        bottom: n
-                    };
-                } else if (n < mx && n > mi) {
-                    return {
-                        top: mi,
-                        bottom: n
-                    };
-                } else if (n < mi) {
-                    return {
-                        top: n,
-                        bottom: mx
-                    };
-                } else if (n == mi || n == mx) {
-                    return {
-                        top: mi,
-                        bottom: mx
-                    };
-                }
-            },
-            // 给选中行加上current-row这个class类,所以要使用row-class-name这个属性(其实给每一行添加rowIndex也可以用这个属性),
-            // 判断方式也是通过判断rowIndex对比
-            rowClassName({ row,  rowIndex }) {
-                let rowName = "",
-                    findRow = this.handleSelectionData.find(c => c.rowIndex === row.rowIndex);
-                if (findRow) {
-                    rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
-                }
-                return rowName; //也可以再加上其他类名 如果有需求的话
-            },
-        },
-        mounted() {
-            // 按住ctrl实现多选 设置监听keydown事件,以及keyup事件,
-            addEventListener("keydown", this.keyDown, false);
-            addEventListener("keyup", this.keyUp, false);
-        },
-        beforeDestroy() { //解绑
-            removeEventListener("keydown", this.keyDown);
-            removeEventListener("keyup", this.keyUp);
-        },
-        computed: { //实时得到最上行和最下行
-            bottomSelectionRow() {
-                if (this.handleSelectionData.length == 0) return null;
-                return this.handleSelectionData.reduce((start, end) => {
-                    return start.rowIndex > end.rowIndex ? start : end;
-                });
-            },
-            topSelectionRow() {
-                if (this.handleSelectionData.length == 0) return null;
-                return this.handleSelectionData.reduce((start, end) => {
-                    return start.rowIndex < end.rowIndex ? start : end;
-                });
-            }
-        },
+          this.$set(row, "exrate", 0);
+        }
+      }
+
+      console.log(row);
+    },
+    // 表头样式
+    tableHeaderCellStyle({ row, column, rowIndex, columnIndex }) {
+      return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff;text-align:center";
+    },
+    // 列表多选
+    // 多选选择的数据
+    handleSelectionChange(arr) {
+      this.$emit("handleSelectionChange", arr);
+    },
+    // 监听点击表格事件
+    rowClick(row, column, event) {
+      let refsElTable = this.$refs.tableRef; // 获取表格对象
+      if (this.CtrlDown) {
+        refsElTable.toggleRowSelection(row); // ctrl多选 如果点击两次同样会取消选中
+        return;
+      }
+      if (this.shiftOrAltDown && this.handleSelectionData.length > 0) {
+        // 通过rowIndex判断已选择的行中最上面和最下面的是哪行,再对比按住shift/alt点击的当前行得到新的最上面和最下面的行,把这两行中间的行进行循环选中。
+        let topAndBottom = this.getTopAndBottom(row, this.bottomSelectionRow, this.topSelectionRow);
+        refsElTable.clearSelection(); //先清空 不然会导致在这两行中间之外的行状态不变
+        for (let index = topAndBottom.top; index <= topAndBottom.bottom; index++) {
+          //选中两行之间的所有行
+          refsElTable.toggleRowSelection(this.tableData[index], true);
+        }
+      } else {
+        let findRow = this.handleSelectionData.find(c => c.rowIndex == row.rowIndex); //找出当前选中行
+        //如果只有一行且点击的也是这一行则取消选择 否则清空再选中当前点击行
+        if (findRow && this.handleSelectionData.length === 1) {
+          refsElTable.toggleRowSelection(row, false);
+          return;
+        }
+        // refsElTable.clearSelection(); // 清空之前选择的数据(如果放开,选择之前会变成单选)
+        refsElTable.toggleRowSelection(row); // 调用选中行方法
+      }
+    },
+    // 行的 style 的回调方法
+    rowStyle({ row, rowIndex }) {
+      // 直接在一个对象上定义一个新属性,或者修改一个对象的现有属性,并返回此对象
+      // object: 要添加或者修改属性的目标对象;prop: 要定义或修改属性的名称;descript: 是一个对象,里面是我们上述的对象属性的特性;
+      Object.defineProperty(row, "rowIndex", {
+        //给每一行添加不可枚举属性rowIndex来标识当前行
+        value: rowIndex, // 设置age的值,不设置的话默认为undefined
+        writable: true, // 表示属性的值true可以修改,false不可以被修改
+        enumerable: false // 设置为false表示不能通过 for-in 循环返回
+        // configurable: false, // configurable 设置为 false,意味着这个属性不能从对象上删除
+      });
+    },
+    keyDown(event) {
+      let key = event.keyCode;
+      if (key == 17) this.CtrlDown = true;
+      if (key == 16 || key == 18) this.shiftOrAltDown = true;
+    },
+    keyUp(event) {
+      let key = event.keyCode;
+      if (key == 17) this.CtrlDown = false;
+      if (key == 16 || key == 18) this.shiftOrAltDown = false;
+    },
+    // 文章说明 https://www.jianshu.com/p/48f2c522d2a2
+    getTopAndBottom(row, bottom, top) {
+      let n = row.rowIndex,
+        mx = bottom.rowIndex,
+        mi = top.rowIndex;
+      if (n > mx) {
+        return {
+          top: mi,
+          bottom: n
+        };
+      } else if (n < mx && n > mi) {
+        return {
+          top: mi,
+          bottom: n
+        };
+      } else if (n < mi) {
+        return {
+          top: n,
+          bottom: mx
+        };
+      } else if (n == mi || n == mx) {
+        return {
+          top: mi,
+          bottom: mx
+        };
+      }
+    },
+    // 给选中行加上current-row这个class类,所以要使用row-class-name这个属性(其实给每一行添加rowIndex也可以用这个属性),
+    // 判断方式也是通过判断rowIndex对比
+    rowClassName({ row, rowIndex }) {
+      let rowName = "",
+        findRow = this.handleSelectionData.find(c => c.rowIndex === row.rowIndex);
+      if (findRow) {
+        rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
+      }
+      return rowName; //也可以再加上其他类名 如果有需求的话
+    }
+  },
+  mounted() {
+    // 按住ctrl实现多选 设置监听keydown事件,以及keyup事件,
+    addEventListener("keydown", this.keyDown, false);
+    addEventListener("keyup", this.keyUp, false);
+  },
+  beforeDestroy() {
+    //解绑
+    removeEventListener("keydown", this.keyDown);
+    removeEventListener("keyup", this.keyUp);
+  },
+  computed: {
+    //实时得到最上行和最下行
+    bottomSelectionRow() {
+      if (this.handleSelectionData.length == 0) return null;
+      return this.handleSelectionData.reduce((start, end) => {
+        return start.rowIndex > end.rowIndex ? start : end;
+      });
+    },
+    topSelectionRow() {
+      if (this.handleSelectionData.length == 0) return null;
+      return this.handleSelectionData.reduce((start, end) => {
+        return start.rowIndex < end.rowIndex ? start : end;
+      });
     }
+  }
+};
 </script>
 
 <style scoped>
-/deep/ input::-webkit-outer-spin-button,
-/deep/ input::-webkit-inner-spin-button {
-    -webkit-appearance: none !important;
+::v-deep input::-webkit-outer-spin-button,
+::v-deep input::-webkit-inner-spin-button {
+  -webkit-appearance: none !important;
+}
+::v-deep input[type="number"] {
+  -moz-appearance: textfield !important;
 }
-/deep/ input[type="number"] {
-    -moz-appearance: textfield !important;
+::v-deep .el-table td {
+  padding: 0;
 }
-</style>
+::v-deep .el-input-number .el-input__inner {
+  text-align: right;
+}</style>

+ 774 - 583
src/views/iosBasicData/finvouchers/finvouchersitems.vue

@@ -1,99 +1,155 @@
 <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 type="primary" size="small" @click="addEdit()">新建财务凭证
-                </el-button>
-                <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>
-            </div>
-        </div>
-        <div style="margin: 55px 5px 0px 5px;'">
-            <el-card class="box-card">
-                <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
-                    <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>
-                            </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>
-                            </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" :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>
-                            </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>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="6">
-                            <el-form-item label="业务编号" prop="srcBlllNo">
-                                <el-input style="width: 100%;" v-model="form.srcBlllNo" size="small" autocomplete="off"
-                                    :disabled="true" clearable placeholder="请输入编号">
-                                </el-input>
-                            </el-form-item>
-                        </el-col>
-                        <!--<el-col :span="6">-->
-                        <!--    <el-form-item label="附件" prop="billNo">-->
-                        <!--        <el-input type="" style="width: 100%;" v-model="form.billNo"-->
-                        <!--                  size="small" autocomplete="off"-->
-                        <!--                  clearable placeholder="请输入附件" >-->
-                        <!--        </el-input>-->
-                        <!--    </el-form-item>-->
-                        <!--</el-col>-->
-                    </el-row>
-                </el-form>
-            </el-card>
+  <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 type="primary" size="small" @click="addEdit()">新建财务凭证 </el-button>
+        <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>
+      </div>
+    </div>
+    <div style="margin: 55px 5px 0px 5px;'">
+      <el-card class="box-card">
+        <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
+          <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>
+              </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>
+              </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"
+                  :disabled="form.voucherStatus == 1"
+                  placeholder="选择凭证日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="凭证来源" prop="voucherSource">
+                <!--                              form.voucherStatus == 1-->
+                <search-query
+                  :datalist="voucherSourceData"
+                  :selectValue="form.voucherSource"
+                  :clearable="true"
+                  :buttonIf="false"
+                  :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
+                  placeholder="请选择凭证凭证来源"
+                  :disabled="true"
+                  @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>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="来源业务编号" prop="srcBlllNo">
+                <el-input
+                  style="width: 100%;"
+                  v-model="form.srcBlllNo"
+                  size="small"
+                  autocomplete="off"
+                  :disabled="true"
+                  clearable
+                  placeholder="来源业务编号"
+                >
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <!--<el-col :span="6">-->
+            <!--    <el-form-item label="附件" prop="billNo">-->
+            <!--        <el-input type="" style="width: 100%;" v-model="form.billNo"-->
+            <!--                  size="small" autocomplete="off"-->
+            <!--                  clearable placeholder="请输入附件" >-->
+            <!--        </el-input>-->
+            <!--    </el-form-item>-->
+            <!--</el-col>-->
+          </el-row>
+        </el-form>
+      </el-card>
 
-            <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>
-                    <el-button size="small" type="danger" style="margin-right: 8px" :loading="saveLoading"
-                        @click="deleteEntryfun" :disabled="form.voucherStatus == 1">删除分录
-                    </el-button>
+      <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>
+          <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>
                     <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
-                        :disabled="form.voucherStatus == 1">凭证断号观察器
+                        :disabled="form.voucherStatus == 1">凭证断号查询
                     </el-button>
                     <el-button size="small" type="success" style="margin-right: 8px" :loading="saveLoading"
                         :disabled="form.voucherStatus == 1">断号优化
@@ -101,196 +157,224 @@
                     <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>
-            </el-card>
+                    -->
         </div>
-
-
-        <!--辅助核算-->
-        <el-dialog title=" " append-to-body :visible.sync="auxiliaryVisible" class="el-dialogDeep" width="40%"
-            :before-close="handleClose">
-            <div>科目名称:{{ subjectRow.accountCnName }}</div>
-            <div style="margin-top: 10px">
-                <el-form :model="subjectRow" ref="subjectRow" label-width="70px" class="demo-ruleForm">
-                    <!--#region-->
-                    <!--<div>外币核算:</div>-->
-                    <!--<el-row>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="币种:" prop="curCode">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.curCode"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入币种" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="汇率:" prop="exrate">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.exrate"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入汇率" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="借方金额:" prop="amountDrUsd">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.amountDrUsd"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入借方金额" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="贷方金额:" prop="amountCrUsd">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.amountCrUsd"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入贷方金额" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="本币借方:" prop="amountDr">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.amountDr"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入本币借方" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="本币贷方:" prop="amountCr">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.amountCr"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入本币贷方" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--</el-row>-->
-                    <!--#endregion-->
-                    <!--#region-->
-                    <!--<div>数量核算:</div>-->
-                    <!--<el-row>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="单位:" prop="unitNo">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.unitNo"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入单位" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="规格:" prop="voucherNo">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.voucherNo"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入规格" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="借方数量:" prop="quantityDr">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.quantityDr"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入借方数量" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="借方单价:" prop="voucherNo">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.voucherNo"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入借方单价" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="贷方数量:" prop="quantityCr">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.quantityCr"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入贷方数量" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--    <el-col :span="4">-->
-                    <!--        <el-form-item label="贷方单价:" prop="voucherNo">-->
-                    <!--            <el-input style="width: 100%;" v-model="subjectRow.voucherNo"-->
-                    <!--                      size="small" autocomplete="off"-->
-                    <!--                      clearable placeholder="请输入贷方单价" >-->
-                    <!--            </el-input>-->
-                    <!--        </el-form-item>-->
-                    <!--    </el-col>-->
-                    <!--</el-row>-->
-                    <!--#endregion-->
-                    <el-row :gutter="40">
-                        <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>
-                            </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>
-                            </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>
-                            </el-form-item>
-                        </el-col>
-                        <!--<el-col :span="12" v-if="subjectAccount.isItem">-->
-                        <!--    <div>项目核算:</div>-->
-                        <!--    <el-form-item label="项目名称:" prop="itemName">-->
-                        <!--        <el-input style="width: 100%;" v-model="subjectRow.itemName"-->
-                        <!--                  size="small" autocomplete="off"-->
-                        <!--                  clearable placeholder="请输入项目名称" >-->
-                        <!--        </el-input>-->
-                        <!--        <search-query :datalist="itemData"-->
-                        <!--                      :selectValue="subjectRow.itemName"-->
-                        <!--                      :clearable="true"-->
-                        <!--                      :buttonIf="false"-->
-                        <!--                      :filterable="true"-->
-                        <!--                      :remote="true"-->
-                        <!--                      placeholder="请选择项目名称"-->
-                        <!--                      :forParameter="{ key:'id', label:'cnName', value:'cnName'}"-->
-                        <!--                      @corpFocus="baccitemstypeListfun"-->
-                        <!--                      @corpChange="corpChange($event,'itemName')"-->
-                        <!--                      @remoteMethod="baccitemstypeListfun" >-->
-                        <!--        </search-query>-->
-                        <!--    </el-form-item>-->
-                        <!--</el-col>-->
-                    </el-row>
-
-                </el-form>
-            </div>
-            <span slot="footer" class="dialog-footer">
-                <el-button @click="auxiliaryVisible = false">取 消</el-button>
-                <el-button type="primary" @click="auxiliaryDeterminefun">确 定</el-button>
-            </span>
-        </el-dialog>
-
+        <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%" :before-close="handleClose">
+      <div>科目名称: {{ subjectRow.accountFullName }}</div>
+      <div style="margin-top: 10px">
+        <el-form :model="subjectRow" ref="subjectRow" label-width="70px" class="demo-ruleForm">
+          <!--#region-->
+          <!--<div>外币核算:</div>-->
+          <!--<el-row>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="币种:" prop="curCode">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.curCode"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入币种" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="汇率:" prop="exrate">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.exrate"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入汇率" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="借方金额:" prop="amountDrUsd">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.amountDrUsd"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入借方金额" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="贷方金额:" prop="amountCrUsd">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.amountCrUsd"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入贷方金额" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="本币借方:" prop="amountDr">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.amountDr"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入本币借方" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="本币贷方:" prop="amountCr">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.amountCr"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入本币贷方" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--</el-row>-->
+          <!--#endregion-->
+          <!--#region-->
+          <!--<div>数量核算:</div>-->
+          <!--<el-row>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="单位:" prop="unitNo">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.unitNo"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入单位" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="规格:" prop="voucherNo">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.voucherNo"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入规格" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="借方数量:" prop="quantityDr">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.quantityDr"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入借方数量" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="借方单价:" prop="voucherNo">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.voucherNo"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入借方单价" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="贷方数量:" prop="quantityCr">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.quantityCr"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入贷方数量" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--    <el-col :span="4">-->
+          <!--        <el-form-item label="贷方单价:" prop="voucherNo">-->
+          <!--            <el-input style="width: 100%;" v-model="subjectRow.voucherNo"-->
+          <!--                      size="small" autocomplete="off"-->
+          <!--                      clearable placeholder="请输入贷方单价" >-->
+          <!--            </el-input>-->
+          <!--        </el-form-item>-->
+          <!--    </el-col>-->
+          <!--</el-row>-->
+          <!--#endregion-->
+          <el-row :gutter="40">
+            <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>
+              </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>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" v-if="subjectAccount.isEmpl || subjectAccount.isCorp">
+              <!--<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>
+              </el-form-item>
+            </el-col>
+            <!--<el-col :span="12" v-if="subjectAccount.isItem">-->
+            <!--    <div>项目核算:</div>-->
+            <!--    <el-form-item label="项目名称:" prop="itemName">-->
+            <!--        <el-input style="width: 100%;" v-model="subjectRow.itemName"-->
+            <!--                  size="small" autocomplete="off"-->
+            <!--                  clearable placeholder="请输入项目名称" >-->
+            <!--        </el-input>-->
+            <!--        <search-query :datalist="itemData"-->
+            <!--                      :selectValue="subjectRow.itemName"-->
+            <!--                      :clearable="true"-->
+            <!--                      :buttonIf="false"-->
+            <!--                      :filterable="true"-->
+            <!--                      :remote="true"-->
+            <!--                      placeholder="请选择项目名称"-->
+            <!--                      :forParameter="{ key:'id', label:'cnName', value:'cnName'}"-->
+            <!--                      @corpFocus="baccitemstypeListfun"-->
+            <!--                      @corpChange="corpChange($event,'itemName')"-->
+            <!--                      @remoteMethod="baccitemstypeListfun" >-->
+            <!--        </search-query>-->
+            <!--    </el-form-item>-->
+            <!--</el-col>-->
+          </el-row>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="auxiliaryVisible = false">取 消</el-button>
+        <el-button type="primary" @click="auxiliaryDeterminefun">确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
@@ -303,340 +387,447 @@ 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 { getList as userGetList } from "@/api/system/user";
 import { baccitemstypeList } from "@/api/iosBasicData/baccitemstype";
 import bcorps from "@/views/iosBasicData/bcorps/index.vue";
+import { selectEmpls } from "@/api/approval/processConfig";
 
 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: [], // 项目核算 下拉数据
+  components: { bcorps, TreeSelect, SearchQuery, fromtableDetails },
+  data() {
+    return {
+      pageLoading: false, // 整个的动画
+      saveLoading: false, // 按钮动画
+      // 获取的数据
+      form: {
+        voucherSource: "MANUAL",
+        voucherSourceName: "手工凭证",
+        voucherType: "VOUNO-TRANS", // 凭证类型
+        voucherTypeName: "转账",
+        voucherDate: getCurrentDate(),
+        finVouchersItemsList: []
+      },
+      voucherTypeData: [], // 凭证字数据
+      voucherSourceData: [], // 业务类型
+      auxiliaryVisible: false, // 辅助核算弹窗
+      handleSelectionData: [], // 分录多选的数据
+      subjectRow: {}, // 科目弹窗的显示数据
+      subjectAccount: {}, // 当前选择科目的数据
+      corpCnNameData: [], // 客户核算 下拉数据
+      deptData: [], // 部门核算 下拉数据
+      emplData: [], // 职员核算 下拉数据
+      itemData: [] // 项目核算 下拉数据
+    };
+  },
+  created() {
+    this.getWorkDictsfun();
+  },
+  methods: {
+    addEdit() {
+      if (this.form.voucherStatus == 1) {
+        this.$emit("toAddEdit");
+      } else {
+        this.finvouchersSubmitfun("toAddEdit");
+      }
+    },
+    // 下拉弹窗打开操作
+    bottonSearchfun(name) {
+      this.$nextTick(() => {
+        if (this.$refs.bcorps.selectionList.length == 0) return;
+        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;
     },
-    created() {
-        this.getWorkDictsfun()
+    // 下拉多选弹窗数据多选回调
+    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("其他的组件");
+      }
     },
-    methods: {
-        addEdit() {
-            if (this.form.voucherStatus == 1) {
-                this.$emit('toAddEdit')
-            } else {
-                this.finvouchersSubmitfun('toAddEdit')
-            }
-        },
-        // 下拉弹窗打开操作
-        bottonSearchfun(name) {
-            this.$nextTick(() => {
-                if (this.$refs.bcorps.selectionList.length == 0) return
-                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('其他的组件')
-            }
-        },
-        // 详情接口
-        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(type) {
-            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)
-                // }
-            }
-            if (amountDrSum != amountCrSum) {
-                return this.$message.warning('凭证借贷金额不平衡')
+    // 详情接口
+    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);
+      } else 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 => {
+        if (!item.hasOwnProperty("id")) {
+          for (let index in arr) {
+            if (JSON.stringify(item) == JSON.stringify(arr[index])) {
+              arr.splice(Number(index), 1);
             }
-            console.log(this.form, 379)
+          }
+        }
+      });
+      // 有id 的处理
+      if (itemsWithId.length != 0) {
+        this.finvouchersitemsRemovefun(arrIds.join(","));
+      }
+    },
+    forceNumber(n) {
+      try {
+        let N = parseFloat(n);
+        if (isNaN(N)) {
+          N = 0.0;
+        } else {
+          let S = N.toFixed(2);
+          N = Number(S);
+        }
 
-            this.pageLoading = true
-            finvouchersSubmit(this.form).then(res => {
-                this.$message.success('操作成功')
-                if (type == 'toAddEdit') {
-                    this.$emit('toAddEdit')
-                }
-                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
-                }
-            })
-        },
-        // 辅助核算弹窗确认按钮
-        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 == '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 == '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 == '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) {
-            done();
-        },
-        // 获取字典数据
-        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')
-        },
+        return N;
+      } catch (e) {
+        return 0.0;
+      }
+    },
+    // 大保存
+    finvouchersSubmitfun(type) {
+      this.form.businessTypeCode = "PZDH";
+      this.form.billNoFormat = "BILL-NO";
+      if (this.form.finVouchersItemsList.length < 2) {
+        return this.$message.warning("请填写至少凭证两笔分录后再保存!");
+      }
+      // 判断借方金额合计 是否等于 贷方金额合计
+      let msgs = [];
+      let amountDrSum = 0;
+      let amountCrSum = 0;
+      let index = 0;
+      for (let item of this.form.finVouchersItemsList) {
+        index++;
+        let amtDr = this.forceNumber(item.amountDr);
+        let amtCr = this.forceNumber(item.amountCr);
+        amountDrSum += amtDr;
+        amountCrSum += amtDr;
+        let descr = item.descr ? item.descr.trim() : "";
+        if (!descr) {
+          msgs.push(`第 ${index} 行分录请填写摘要!`);
+        } else {
+          item.descr = descr;
+        }
+        if (!item.accountId) {
+          msgs.push(`第 ${index} 行分录缺少科目代码!`);
+        } else {
+          if (item.isCorp === 1 && !item.corpId) {
+            msgs.push(`第 ${index} 行分录科目 ${item.accountCode} ${item.accountFullName} 核算客户,请选择客户名称!`);
+          }
+          if (item.isDept === 1 && !item.deptId) {
+            msgs.push(`第 ${index} 行分录科目 ${item.accountCode} ${item.accountFullName} 核算部门,请选择部门名称!`);
+          }
+          if (item.isEmpl === 1 && !item.emplId) {
+            msgs.push(`第 ${index} 行分录科目 ${item.accountCode} ${item.accountFullName} 核算职员,请选择职员名称!`);
+          }
+          if (item.isItem === 1 && !item.itemId) {
+            msgs.push(`第 ${index} 行分录科目 ${item.accountCode} ${item.accountFullName} 核算项目,请选择项目名称!`);
+          }
+          if (amtDr.toFixed(2) === "0.00" && amtCr.toFixed(2) === "0.00") {
+            msgs.push(`第 ${index} 行分录科目 ${item.accountCode} ${item.accountFullName} 请填写金额!`);
+          }
+        }
+      }
+      if (amountDrSum !== amountCrSum) {
+        msgs.push(`凭证借贷金额不平衡!`);
+      }
+
+      if (msgs.length > 0) {
+        return this.$message({
+          dangerouslyUseHTMLString: true,
+          message: msgs.join("<br /><br />"),
+          type: "warning"
+        });
+      }
+
+      this.pageLoading = true;
+      finvouchersSubmit(this.form)
+        .then(res => {
+          this.$message.success("操作成功");
+          if (type == "toAddEdit") {
+            this.$emit("toAddEdit");
+          }
+          this.finvouchersDetailfun(res.data.data.id);
+        })
+        .finally(() => {
+          this.pageLoading = false;
+        });
+    },
+    // 分录删除接口
+    finvouchersitemsRemovefun(id) {
+      finvouchersitemsRemove(id).then(res => {
+        this.$message.success("操作成功");
+        // this.finvouchersDetailfun();
+        let ids = id.split(",");
+        ids.forEach(id => {
+          let i = this.form.finVouchersItemsList.findIndex(item => item.id === id);
+          if (i >= 0) {
+            this.form.finVouchersItemsList.splice(i, 1);
+          }
+        });
+      });
+    },
+    // 科目编辑打开辅助核算弹窗
+    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) {
+      let found = false;
+      // 客户名称
+      if (name == "corpCnName") {
+        for (let item of this.corpCnNameData) {
+          if (item.cnName == value) {
+            found = true;
+            this.$set(this.subjectRow, "corpEnName", item.enName);
+            this.$set(this.subjectRow, "corpCnName", item.cnName);
+            this.$set(this.subjectRow, "corpShortName", item.shortName);
+            this.$set(this.subjectRow, "corpId", item.id);
+          }
+        }
+        if (!found) {
+          this.$set(this.subjectRow, "corpEnName", "");
+          this.$set(this.subjectRow, "corpCnName", "");
+          this.$set(this.subjectRow, "corpShortName", "");
+          this.$set(this.subjectRow, "corpId", 0);
+        }
+      }
+      // 核算
+      else if (name == "deptName") {
+        for (let item of this.deptData) {
+          if (item.title == value) {
+            found = true;
+            this.$set(this.subjectRow, "deptName", item.title);
+            this.$set(this.subjectRow, "deptId", item.id);
+          }
+        }
+        if (!found) {
+          this.$set(this.subjectRow, "deptName", "");
+          this.$set(this.subjectRow, "deptId", 0);
+        }
+      }
+      // 职员
+      else if (name == "emplName") {
+        for (let item of this.emplData) {
+          if (item.name == value) {
+            found = true;
+            this.$set(this.subjectRow, "emplName", item.name);
+            this.$set(this.subjectRow, "emplId", item.id);
+          }
+        }
+        if (!found) {
+          this.$set(this.subjectRow, "emplName", "");
+          this.$set(this.subjectRow, "emplId", 0);
+        }
+      }
+      // 项目核算
+      else if (name == "itemName") {
+        for (let item of this.itemData) {
+          if (item.cnName == value) {
+            found = true;
+            this.$set(this.subjectRow, "itemName", item.cnName);
+            this.$set(this.subjectRow, "itemId", item.id);
+          }
+        }
+        if (!found) {
+          this.$set(this.subjectRow, "itemName", "");
+          this.$set(this.subjectRow, "itemId", 0);
+        }
+      } else if (name == "voucherType") {
+        this.$set(this.form, name, value);
+        for (let item of this.voucherTypeData) {
+          if (item.dictKey == value) {
+            found = true;
+            this.$set(this.form, "voucherTypeName", item.dictValue);
+          }
+        }
+        if (!found) {
+          this.$set(this.subjectRow, "voucherTypeName", "");
+        }
+      } else if (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
+      // })
+      selectEmpls(1, 10, { cname: account, whetherEmployedOrNot: 1 }).then(res => {
+        if (Array.isArray(res.data.data.records)) {
+          res.data.data.records.forEach(item => {
+            item.name = item.cname;
+          });
+        }
+        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) {
+      done();
+    },
+    // 获取字典数据
+    getWorkDictsfun() {
+      // 凭证字数据
+      getWorkDicts("voucher_word_los").then(res => {
+        this.voucherTypeData = res.data.data;
+        let vt = this.voucherTypeData.find(j => j.dictValue == this.form.voucherType);
+        if (vt) {
+          this.$set(this.form, "voucherTypeName", vt.dictValue);
+        } else if (this.voucherTypeData.length > 0) {
+          vt = this.voucherTypeData[0];
+          this.$set(this.form, "voucherType", vt.dictKey);
+          this.$set(this.form, "voucherTypeName", vt.dictValue);
+        }
+        console.log(this.form);
+      });
+      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;
+  margin-bottom: 0;
 }
 
 .borderBox {
-    border: 1px solid #b6b6b6;
-    padding: 5px;
-    box-sizing: border-box;
-    border-radius: 2px;
-    position: relative;
-    margin-right: 10px;
+  border: 1px solid #b6b6b6;
+  padding: 5px;
+  box-sizing: border-box;
+  border-radius: 2px;
+  position: relative;
+  margin-right: 10px;
 }
 
 .positionCheckbox {
-    position: absolute;
-    top: -10px;
-    left: 10px;
-    background: #fff;
+  position: absolute;
+  top: -10px;
+  left: 10px;
+  background: #fff;
 }
 
 .cardRight {
-    margin-right: 10px;
-    height: 220px;
+  margin-right: 10px;
+  height: 220px;
 }
 
 .borderCheckbox {
-    border-bottom: 1px solid #4a9de6;
-    padding-bottom: 5px;
-    color: #4a9de6;
-    margin-bottom: 5px;
+  border-bottom: 1px solid #4a9de6;
+  padding-bottom: 5px;
+  color: #4a9de6;
+  margin-bottom: 5px;
 }
 
 .el-dialogDeep {
-    ::v-deep .el-dialog {
-        .el-dialog__body {
-            padding-bottom: 0 !important;
-            padding-top: 0 !important;
-        }
+  ::v-deep .el-dialog {
+    .el-dialog__body {
+      padding-bottom: 0 !important;
+      padding-top: 0 !important;
     }
+  }
 }
 </style>

+ 45 - 44
src/views/iosBasicData/finvouchers/index.vue

@@ -81,39 +81,30 @@ export default {
         searchIndex: 3,
         column: [
           {
-            label: "单编号",
+            label: "单编号",
             prop: "billNo",
             search: true,
             overHidden: true,
+            width: 120,
           },
           {
-            label: "凭证来源",
-            prop: "voucherSource",
-            search: true,
-            type: 'select',
-            dicData: [],
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_source_los",
-            props: {
-              label: "dictValue",
-              value: "dictKey"
-            },
-            overHidden: true,
-          },
-          {
-            label: "凭证类型",
-            prop: "voucherType",
+            label: "类型",
+            prop: "voucherTypeName",
             overHidden: true,
+            width: 60,
           },
           {
             label: "凭证号",
             prop: "voucherNo",
             search: true,
             overHidden: true,
+            width: 80,
           },
           {
             label: "凭证日期",
             prop: "voucherDate",
             overHidden: true,
+            width: 100,
           },
           {
             label: "凭证开始日期",
@@ -125,6 +116,7 @@ export default {
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
+            width: 100,
           },
           {
             label: "凭证结束日期",
@@ -136,65 +128,52 @@ export default {
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
+            width: 100,
           },
           {
-            label: "财务年",
+            label: "年",
             prop: "accountYear",
             overHidden: true,
+            width: 40,
           },
           {
-            label: "财务月",
+            label: "月",
             prop: "accountMonth",
             overHidden: true,
+            width: 40,
           },
           {
-            label: "财务日",
-            prop: "accountDay",
-            overHidden: true,
-          },
-          {
-            label: "分录摘要",
+            label: "摘要",
             prop: "descr",
             overHidden: true,
+            width: 200,
           },
           {
             label: "借方金额(CNY)",
             prop: "amountDr",
-            width: '140',
             overHidden: true,
+            width: 120,
           },
           {
             label: "贷方金额(CNY)",
             prop: "amountCr",
-            width: '140',
             overHidden: true,
+            width: 120,
           },
           {
             label: "借方金额(USD)",
             prop: "amountDrUsd",
-            width: '140',
             overHidden: true,
+            width: 120,
           },
           {
             label: "贷方金额(USD)",
             prop: "amountCrUsd",
-            width: '140',
             overHidden: true,
+            width: 120,
           },
           {
-            label: "合计本位币借方金额(CNY)",
-            prop: "amountDrLoc",
-            width: '170',
-            overHidden: true,
-          },
-          {
-            label: "合计本位币贷方金额(CNY)",
-            prop: "amountCrLoc",
-            width: '170',
-            overHidden: true,
-          },
-          {
-            label: "外币凭证",
+            label: "外币",
             prop: "isForeign",
             search: true,
             type: 'select',
@@ -205,9 +184,10 @@ export default {
               value: "dictKey"
             },
             overHidden: true,
+            width: 60,
           },
           {
-            label: "数量凭证",
+            label: "数量",
             prop: "isQuantity",
             search: true,
             type: 'select',
@@ -218,29 +198,48 @@ export default {
               value: "dictKey"
             },
             overHidden: true,
+            width: 60,
+          },
+          {
+            label: "凭证来源",
+            prop: "voucherSource",
+            search: true,
+            type: 'select',
+            dicData: [],
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=voucher_source_los",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            overHidden: true,
+            width: 100,
           },
           {
             label: "复核人",
             prop: "checkUserName",
             overHidden: true,
+            width: 80,
           },
           {
             label: "复核时间",
             prop: "checkTime",
             overHidden: true,
+            width: 100,
           },
           {
             label: "记账人",
             prop: "postUserName",
             overHidden: true,
+            width: 80,
           },
           {
             label: "记账时间",
             prop: "postTime",
             overHidden: true,
+            width: 100,
           },
           {
-            label: "凭证状态",
+            label: "状态",
             prop: "voucherStatus",
             search: true,
             type: 'select',
@@ -251,11 +250,13 @@ export default {
               value: "dictKey"
             },
             overHidden: true,
+            width: 60,
           },
           {
             label: "备注",
             prop: "remarks",
             overHidden: true,
+            width: 180,
           },
         ]
       },
@@ -582,7 +583,7 @@ export default {
   text-overflow: ellipsis;
 }
 
-/deep/ .el-col-md-8 {
+::v-deep .el-col-md-8 {
   width: 24.33333%;
 }
 </style>