Browse Source

货代科目和凭证 2023-12-9

caojunjie 1 year ago
parent
commit
a41d20d886

+ 5 - 0
src/components/iosbasic-data/TreeSelect.vue

@@ -10,6 +10,7 @@
         :filter-method="filterMethod"
         style="width: 100%;"
         @clear="clear"
+        @focus="focus"
         @visible-change="visibleChange"
     >
         <el-option
@@ -197,6 +198,10 @@ export default {
         clear() {
             this.$emit('input', '')
         },
+        // 聚焦
+        focus(){
+            this.$emit('focus')
+        },
         // 自定义搜索方法
         filterMethod(val) {
             this.filterFlag = true

+ 67 - 3
src/views/iosBasicData/ComputationCenter/settlementDetails.vue

@@ -219,14 +219,25 @@
 
             <el-card style="margin-top: 10px">
                 <div style="margin-bottom: 10px">
-                    <el-button  size="small" type="info" style="margin-right: 8px" :disabled="editSave"
+                    <el-button  size="small" type="info" :disabled="editSave"
                                 :loading="saveLoading" @click="SelectedRows">确认选定行
                     </el-button>
-                    <el-button  size="small" type="danger" style="margin-right: 8px" :disabled="editSave"
+                    <el-button  size="small" type="danger" style="margin-left: 10px" :disabled="editSave"
                                 :loading="saveLoading" @click="batchDeletefun" >批量删除
                     </el-button>
+                    <el-input style="width: 10%;margin-left: 10px;" v-model="invoiceAmountCNY"
+                              size="small" autocomplete="off" type="numbers"
+                              clearable placeholder="开票金额" >
+                        <span style="line-height: 32px;" slot="suffix" >CNY</span>
+                    </el-input>
+                    <el-input style="width: 10%;margin-left: 5px;" v-model="invoiceAmountUSD"
+                              size="small" autocomplete="off" type="numbers"
+                              clearable placeholder="开票金额" >
+                        <span style="line-height: 32px;" slot="suffix" >USD</span>
+                    </el-input>
+                    <el-button style="margin-left: 10px" :disabled="editSave" size="small" type="primary" @click="invoiceMatchingfun()" >开票匹配</el-button>
                 </div>
-                <finstlbillsitems :tableData="tableData"
+                <finstlbillsitems ref="finstlbillsitems" :tableData="tableData"
                                   :editSave="editSave"
                                   :settlementdistar="settlementdistar"
                                   :handleSelectionData="handleSelectionData"
@@ -336,6 +347,8 @@ export default {
     },
     data(){
         return {
+            invoiceAmountCNY:0, // 费用明细开票金额输入框CNY
+            invoiceAmountUSD:0, // 费用明细开票金额输入框USD
             settlementdistar:false, // 结算挑进来的
             DesignreportDialog:false, // 设计报表弹窗
             selectPrintingDialog:false, // 预览报表
@@ -434,6 +447,57 @@ export default {
                 }
             })
         },
+        // 费用明细开票匹配
+        invoiceMatchingfun(){
+            if (this.invoiceAmountCNY != 0 || this.invoiceAmountUSD != 0) {
+                let dataCNY = JSON.parse(JSON.stringify(this.invoiceAmountCNY))
+                let dataUSD = JSON.parse(JSON.stringify(this.invoiceAmountUSD))
+                for (let item of this.tableData) {
+                    this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,false)
+                    if (this.invoiceAmountCNY != 0) {
+                        if (dataCNY < 0) {
+                            dataCNY = 0
+                        }
+                        if (dataCNY > 1500) {
+                            if (item.currentStlCurCode == 'CNY') {
+                                this.$set(item,'currentStlAmountRMB',1500)
+                                this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                dataCNY -= 1500
+                            }
+                        }else {
+                            if (item.currentStlCurCode == 'CNY') {
+                                if (dataCNY != 0) {
+                                    this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                }
+                                this.$set(item,'currentStlAmountRMB',dataCNY)
+                                dataCNY -= 1500
+                            }
+                        }
+                    }
+                    if (this.invoiceAmountUSD != 0) {
+                        if (dataUSD < 0) {
+                            dataUSD = 0
+                        }
+                        if (dataUSD > 1500) {
+                            if (item.currentStlCurCode == 'USD') {
+                                this.$set(item,'currentStlAmountUSD',1500)
+                                this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                dataUSD -= 1500
+                            }
+                        }else {
+                            if (item.currentStlCurCode == 'USD') {
+                                this.$set(item,'currentStlAmountUSD',dataUSD)
+                                if (dataUSD != 0) {
+                                    this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                }
+                                dataUSD -= 1500
+                            }
+                        }
+                    }
+                }
+            }
+
+        },
         // 批量删除
         batchDeletefun(){
             if (this.handleSelectionData.length == 0) {

+ 68 - 3
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -272,14 +272,26 @@
 
             <el-card style="margin-top: 10px">
                 <div style="margin-bottom: 10px">
-                    <el-button  size="small" type="info" style="margin-right: 8px" :disabled="editSave"
+                    <el-button  size="small" type="info" :disabled="editSave"
                                 :loading="saveLoading" @click="SelectedRows">确认选定行
                     </el-button>
-                    <el-button  size="small" type="danger" style="margin-right: 8px" :disabled="editSave"
+                    <el-button  size="small" type="danger" style="margin-left: 10px" :disabled="editSave"
                                 :loading="saveLoading" @click="batchDeletefun" >批量删除
                     </el-button>
+                    <el-input style="width: 10%;margin-left: 10px;" v-model="invoiceAmountCNY"
+                              size="small" autocomplete="off" type="numbers"
+                              clearable placeholder="开票金额" >
+                        <span style="line-height: 32px;" slot="suffix" >CNY</span>
+                    </el-input>
+                    <el-input style="width: 10%;margin-left: 5px;" v-model="invoiceAmountUSD"
+                              size="small" autocomplete="off" type="numbers"
+                              clearable placeholder="开票金额" >
+                        <span style="line-height: 32px;" slot="suffix" >USD</span>
+                    </el-input>
+                    <el-button style="margin-left: 10px" :disabled="editSave" size="small" type="primary" @click="invoiceMatchingfun()" >开票匹配</el-button>
                 </div>
-                <finstlbillsitems :tableData="tableData"
+                <finstlbillsitems ref="finstlbillsitems"
+                                  :tableData="tableData"
                                   :editSave="editSave"
                                   :handleSelectionData="handleSelectionData"
                                   @handleSelectionChange="handleSelectionChange"
@@ -390,6 +402,8 @@
         },
         data(){
             return {
+                invoiceAmountCNY:0, // 费用明细开票金额输入框CNY
+                invoiceAmountUSD:0, // 费用明细开票金额输入框USD
                 DesignreportDialog:false, // 设计报表弹窗
                 selectPrintingDialog:false, // 预览报表
                 // 收/付数据
@@ -509,6 +523,57 @@
                     }
                 })
             },
+            // 费用明细开票匹配
+            invoiceMatchingfun(){
+                if (this.invoiceAmountCNY != 0 || this.invoiceAmountUSD != 0) {
+                    let dataCNY = JSON.parse(JSON.stringify(this.invoiceAmountCNY))
+                    let dataUSD = JSON.parse(JSON.stringify(this.invoiceAmountUSD))
+                    for (let item of this.tableData) {
+                        this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,false)
+                        if (this.invoiceAmountCNY != 0) {
+                            if (dataCNY < 0) {
+                                dataCNY = 0
+                            }
+                            if (dataCNY > 1500) {
+                                if (item.currentStlCurCode == 'CNY') {
+                                    this.$set(item,'currentStlAmountRMB',1500)
+                                    this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    dataCNY -= 1500
+                                }
+                            }else {
+                                if (item.currentStlCurCode == 'CNY') {
+                                    if (dataCNY != 0) {
+                                        this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    }
+                                    this.$set(item,'currentStlAmountRMB',dataCNY)
+                                    dataCNY -= 1500
+                                }
+                            }
+                        }
+                        if (this.invoiceAmountUSD != 0) {
+                            if (dataUSD < 0) {
+                                dataUSD = 0
+                            }
+                            if (dataUSD > 1500) {
+                                if (item.currentStlCurCode == 'USD') {
+                                    this.$set(item,'currentStlAmountUSD',1500)
+                                    this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    dataUSD -= 1500
+                                }
+                            }else {
+                                if (item.currentStlCurCode == 'USD') {
+                                    this.$set(item,'currentStlAmountUSD',dataUSD)
+                                    if (dataUSD != 0) {
+                                        this.$refs.finstlbillsitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    }
+                                    dataUSD -= 1500
+                                }
+                            }
+                        }
+                    }
+                }
+
+            },
             // 批量删除
             batchDeletefun(){
                 if (this.handleSelectionData.length == 0) {

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

@@ -493,8 +493,8 @@
                                 <span slot="label">
                                     <span style="color: #1e9fff">件数</span>
                                 </span>
-                                    <el-input type="age" style="width: 100%;" v-model="assemblyForm.quantity"
-                                              size="small" autocomplete="off"
+                                    <el-input type="number" style="width: 100%;" v-model="assemblyForm.quantity"
+                                              size="small" autocomplete="off" min="1"
                                               :disabled="detailData.seeDisabled" @input="quantityInput"
                                               clearable placeholder="件数" ></el-input>
                                 </el-form-item>
@@ -525,7 +525,7 @@
                                 <span slot="label">
                                     <span style="color: #1e9fff">毛重(KGS)</span>
                                 </span>
-                                    <el-input type="age" style="width: 100%;" v-model="assemblyForm.grossWeight"
+                                    <el-input type="number" step="0.01" style="width: 100%;" v-model="assemblyForm.grossWeight"
                                               size="small" autocomplete="off"
                                               :disabled="detailData.seeDisabled"
                                               clearable placeholder="请选择毛重" ></el-input>
@@ -536,7 +536,7 @@
                                 <span slot="label">
                                     <span style="color: #1e9fff">尺码(CBM)</span>
                                 </span>
-                                    <el-input type="age" style="width: 100%;" v-model="assemblyForm.measurement"
+                                    <el-input type="number" step="0.01" style="width: 100%;" v-model="assemblyForm.measurement"
                                               size="small" autocomplete="off"
                                               :disabled="detailData.seeDisabled"
                                               clearable placeholder="请选择尺码/体积" ></el-input>

+ 14 - 3
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation/precontainers.vue

@@ -83,6 +83,7 @@ import {
   import {bcntrtypesList} from "@/api/iosBasicData/bcntrtypes";
   import {containersEqualDistribution} from "@/api/iosBasicData/containers";
   import {requiredMessage} from "@/util/messageReminder";
+import {number} from "echarts";
 
   export default {
       components: {SearchQuery},
@@ -141,6 +142,7 @@ import {
             {
               label: "箱量",
               prop: "quantity",
+              type:"number",
               width:'120',
               cell:true,
               rules: [{
@@ -153,6 +155,7 @@ import {
               label: "毛重(KGS)",
               prop: "grossWeight",
               width:'120',
+              type:"number",
               cell:true,
               rules: [{
                   required: true,
@@ -164,12 +167,14 @@ import {
               label: "净重(KGS)",
               prop: "netWeight",
               width:'120',
+              type:"number",
               cell:true,
             },
             {
               label: "体积(CBM)",
               prop: "measurement",
               width:'120',
+              type:"number",
               cell:true,
               rules: [{
                  required: true,
@@ -180,7 +185,9 @@ import {
             {
               label: "温度",
               prop: "temperature",
-                cell:true,
+              cell:true,
+              type:"number",
+              width: "120"
             },
             {
               label: "温度单位",
@@ -198,12 +205,16 @@ import {
             {
               label: "通风度",
               prop: "ventilation",
-                cell:true,
+              cell:true,
+              type:"number",
+              width: "120"
             },
             {
               label: "湿度",
               prop: "humidity",
-                cell:true,
+              cell:true,
+              type:"number",
+              width: "120"
             },
             {
               label: "是否货主自有箱",

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

@@ -1812,6 +1812,7 @@
                         type: "warning",
                         message: "数量不能输入负数!"
                     });
+                    this.$set(row,'quantity',1)
                     return
                 }
                 this.$set(row,'amount',Number(row.price?row.price:0) * Number(row.quantity))

+ 15 - 0
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -1290,6 +1290,21 @@ import {editypesList} from "@/api/iosBasicData/editypes";
                     row.podCnName = this.form.podCnName // 卸货港中文名称
                     row.podEnName = this.form.podEnName // 卸货港英文名称
                     row.corpArgreementNo = this.form.corpArgreementNo // 客户约号
+                    // 数量 * 单价 = 净额
+                    // 总税率 = 税率 + 附件税率
+                    // 税额 = 净额 * 总税率
+                    // 含税
+                    if (row.curCode == 'CNY') {
+                        row.amount = row.rmbAmount?row.rmbAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
+                    }else {
+                        row.amount = row.usdAmount?row.usdAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
+                    }
+                    // 净额
+                    if (row.curCode == 'CNY') {
+                        row.amountNet = row.rmbAmountNet?row.rmbAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
+                    }else {
+                        row.amountNet = row.usdAmountNet?row.usdAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
+                    }
                 })
                 // 费用 付 赋值数据
                 this.form.feeCenterListC.map((row,index)=>{

+ 186 - 101
src/views/iosBasicData/accounts/assembly/accitemsopenblc.vue

@@ -31,7 +31,7 @@
                               :clearable="true"
                               :remote="true"
                               :buttonIf="false"
-                              placeholder="请选择核算单位名称"
+                              placeholder="请选择客户名称"
                               :forParameter="{key:'id',label:'cnName',value:'cnName'}"
                               @remoteMethod="corpBcorpsListfun"
                               @corpChange="corpChange($event,'corpCnName',row)"
@@ -39,6 +39,36 @@
                 </search-query>
                 <span v-else>{{row.corpCnName}}</span>
             </template>
+            <template slot="deptName" slot-scope="{row}">
+                <tree-select v-if="row.edit"
+                             v-model="row.deptName" filterable
+                             :data="deptData"
+                             :props="{label:'title',children:'children'}"
+                             nodeKey="title"
+                             size="small"
+                             :multiple="false"
+                             placeholder="请选择部门名称"
+                             @input="corpChange($event,'deptName',row)"
+                             @focus="deptDeptLazyTreefun" >
+                </tree-select>
+                <span v-else>{{row.deptName}}</span>
+            </template>
+            <template slot="emplName" slot-scope="{row}">
+                <search-query v-if="row.edit"
+                              :datalist="emplData"
+                              :selectValue="row.emplName"
+                              :filterable="true"
+                              :clearable="true"
+                              :remote="true"
+                              :buttonIf="false"
+                              placeholder="请选择职工名称"
+                              :forParameter="{key:'id',label:'name',value:'name'}"
+                              @remoteMethod="userPagelistfun"
+                              @corpChange="corpChange($event,'emplName',row)"
+                              @corpFocus="userPagelistfun">
+                </search-query>
+                <span v-else>{{row.emplName}}</span>
+            </template>
             <template slot="itemName" slot-scope="{row}">
                 <search-query v-if="row.edit"
                               :datalist="itemData"
@@ -57,36 +87,36 @@
             </template>
             <template slot="price" slot-scope="{row}">
                 <el-input v-if="row.edit" style="width: 100%;" v-model="row.price"
-                          size="small" autocomplete="off" @input="openingInput(row)"
+                          size="small" autocomplete="off" @blur="priceInputfun(row)"
                           clearable placeholder="请输入单价" >
                 </el-input>
                 <span v-else>{{row.price}}</span>
             </template>
             <template slot="quantityOpenDr" slot-scope="{row}">
                 <el-input v-if="row.edit" style="width: 100%;" v-model="row.quantityOpenDr"
-                          size="small" autocomplete="off" @input="openingInput(row)"
+                          size="small" autocomplete="off" @blur="openingInput(row)"
                           clearable placeholder="请输入期初借方数量" >
                 </el-input>
                 <span v-else>{{row.quantityOpenDr}}</span>
             </template>
             <template slot="quantityOpenCr" slot-scope="{row}">
                 <el-input v-if="row.edit" style="width: 100%;" v-model="row.quantityOpenCr"
-                          size="small" autocomplete="off" @input="openingInput(row)"
-                          clearable placeholder="请输入期初方数量" >
+                          size="small" autocomplete="off" @blur="openingInput(row)"
+                          clearable placeholder="请输入期初方数量" >
                 </el-input>
                 <span v-else>{{row.quantityOpenCr}}</span>
             </template>
             <template slot="quantityDr" slot-scope="{row}">
                 <el-input v-if="row.edit" style="width: 100%;" v-model="row.quantityDr"
-                          size="small" autocomplete="off" @input="currentPeriodInput(row)"
+                          size="small" autocomplete="off" @blur="currentPeriodInput(row)"
                           clearable placeholder="请输入本期借方数量" >
                 </el-input>
                 <span v-else>{{row.quantityDr}}</span>
             </template>
             <template slot="quantityCr" slot-scope="{row}">
                 <el-input v-if="row.edit" style="width: 100%;" v-model="row.quantityCr"
-                          size="small" autocomplete="off" @input="currentPeriodInput(row)"
-                          clearable placeholder="请输入本期方数量" >
+                          size="small" autocomplete="off" @blur="currentPeriodInput(row)"
+                          clearable placeholder="请输入本期方数量" >
                 </el-input>
                 <span v-else>{{row.quantityCr}}</span>
             </template>
@@ -115,9 +145,13 @@
     import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
     import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
     import {baccitemstypeList} from "@/api/iosBasicData/baccitemstype";
+    import {getDeptTree} from "@/api/system/dept"
+    import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
+    import { getList as userPagelist } from "@/api/system/user"
+    import {accountsSubmit} from "@/api/iosBasicData/accounts";
 
     export default {
-        components: {SearchQuery},
+        components: {TreeSelect, SearchQuery},
         props:{
             form:{
                 type:Object,
@@ -127,6 +161,8 @@
         data(){
             return {
                 corpData:[], // 客户数据
+                deptData:[], // 部门名称数据
+                emplData:[], // 员工数据
                 itemData:[], // 核算项目
                 multipleChoiceList:[], // 多选数据
                 option:{},
@@ -156,15 +192,6 @@
                             prop: "deptName",
                             width:"100",
                         },
-                        // {
-                        //     label: "核算职员 Id",
-                        //     prop: "emplId",
-                        //     rules: [{
-                        //         required: true,
-                        //         message: "请输入核算职员 Id",
-                        //         trigger: "blur"
-                        //     }]
-                        // },
                         {
                             label: "核算职员",
                             prop: "emplName",
@@ -189,94 +216,106 @@
                             width: "90"
                         },
                         {
-                            label: "期初借方数量",
-                            prop: "quantityOpenDr",
-                            width: "100",
-                        },
-                        {
-                            label: "期初贷方数量",
-                            prop: "quantityOpenCr",
-                            width: "100",
-                        },
-                        {
-                            label: "期初数量期初余额",
-                            prop: "quantityOpenBlc",
-                            width: "100",
-                        },
-                        {
-                            label: "期初外币借方金额",
-                            prop: "amountOpenDrUsd",
-                            width: "120",
-                        },
-                        {
-                            label: "期初外币贷方金额",
-                            prop: "amountOpenCrUsd",
-                            width: "120",
-                        },
-                        {
-                            label: "期初外币期初余额",
-                            prop: "amountOpenUsdBlc",
-                            width: "120",
-                        },
-                        {
-                            label: "期初本币借方金额(CNY)",
-                            prop: "amountOpenDr",
-                            width: "130",
+                            label: "期初借方",
+                            children:[
+                                {
+                                    label: "数量",
+                                    prop: "quantityOpenDr",
+                                },
+                                {
+                                    label: "外币金额",
+                                    prop: "amountOpenDrUsd",
+                                },
+                                {
+                                    label: "本币金额",
+                                    prop: "amountOpenDr",
+                                },
+                            ]
                         },
                         {
-                            label: "期初本币贷方金额(CNY)",
-                            prop: "amountOpenCr",
-                            width: "130",
+                            label: "期初贷方",
+                            children:[
+                                {
+                                    label: "数量",
+                                    prop: "quantityOpenCr",
+                                },
+                                {
+                                    label: "外币金额",
+                                    prop: "amountOpenCrUsd",
+                                },
+                                {
+                                    label: "本币金额",
+                                    prop: "amountOpenCr",
+                                },
+                            ]
                         },
                         {
-                            label: "期初本币余额(CNY)",
-                            prop: "amountOpenBlc",
-                            width: "130",
+                            label: "期初余额",
+                            children:[
+                                {
+                                    label: "数量",
+                                    prop: "quantityOpenBlc",
+                                },
+                                {
+                                    label: "外币",
+                                    prop: "amountOpenUsdBlc",
+                                },
+                                {
+                                    label: "本币",
+                                    prop: "amountOpenBlc",
+                                },
+                            ]
                         },
                         {
-                            label: "本期数量借方",
-                            prop: "quantityDr",
-                            width: "100",
+                            label: "本期借方",
+                            children: [
+                                {
+                                    label: "数量",
+                                    prop: "quantityDr",
+                                },
+                                {
+                                    label: "外币金额",
+                                    prop: "amountDrUsd",
+                                },
+                                {
+                                    label: "本币金额",
+                                    prop: "amountDr",
+                                },
+                            ]
                         },
                         {
-                            label: "本期数量贷方",
-                            prop: "quantityCr",
-                            width: "100",
+                            label: "本期贷方",
+                            children: [
+                                {
+                                    label: "数量",
+                                    prop: "quantityCr",
+                                },
+                                {
+                                    label: "外币金额",
+                                    prop: "amountCrUsd",
+                                },
+                                {
+                                    label: "本币金额",
+                                    prop: "amountCr",
+                                },
+                            ]
                         },
                         {
-                            label: "本期数量余额",
-                            prop: "quantityBlc",
-                            width: "100",
-                        },
-                        {
-                            label: "本期外币借方金额",
-                            prop: "amountDrUsd",
-                            width: "120",
-                        },
-                        {
-                            label: "本期外币贷方金额",
-                            prop: "amountCrUsd",
-                            width: "120",
-                        },
-                        {
-                            label: "本期外币余额",
-                            prop: "amountUsdBlc",
-                            width: "120",
-                        },
-                        {
-                            label: "本期本币借方金额(CNY)",
-                            prop: "amountDr",
-                            width: "130",
-                        },
-                        {
-                            label: "本期本币贷方金额(CNY)",
-                            prop: "amountCr",
-                            width: "130",
-                        },
-                        {
-                            label: "本期本币余额(CNY)",
-                            prop: "amountBlc",
-                            width: "130",
+                            label: "本期余额",
+                            children: [
+                                {
+                                    label: "数量",
+                                    prop: "quantityBlc",
+                                },
+                                {
+                                    label: "外币",
+                                    prop: "amountUsdBlc",
+                                },
+                                {
+                                    label: "本币",
+                                    prop: "amountBlc",
+                                },
+                            ]
                         },
                         {
                             label: "备注",
@@ -306,6 +345,7 @@
             editFun(row){
                 this.$set(row,'edit',!row.edit)
             },
+            // 批量删除
             handleDelete(){
                 this.$confirm("确定将选择数据删除?", {
                     confirmButtonText: "确定",
@@ -330,31 +370,54 @@
                 })
 
             },
+            // 单价改变
+            priceInputfun(row){
+                this.openingInput(row)
+                this.currentPeriodInput(row)
+            },
             // 期初
             openingInput(row){
-                this.$set(row,'quantityOpenBlc',Number(row.quantityOpenCr) - Number(row.quantityOpenDr))
+                this.$set(row,'quantityOpenDr',row.quantityOpenDr?row.quantityOpenDr:0)
+                this.$set(row,'quantityOpenCr',row.quantityOpenCr?row.quantityOpenCr:0)
                 if (this.form.curCode == 'USD') {
+                    // 期初借方外币金额 = 单价 * 期初借方数量
                     this.$set(row,'amountOpenDrUsd',Number(row.price) * Number(row.quantityOpenDr))
+                    // 期初贷方外币金额 = 单价 * 期初贷方数量
                     this.$set(row,'amountOpenCrUsd',Number(row.price) * Number(row.quantityOpenCr))
+                    // 期初外币余额 = 期初贷方外币金额 - 期初借方外币金额
                     this.$set(row,'amountOpenUsdBlc',Number(row.amountOpenCrUsd) - Number(row.amountOpenDrUsd))
                 }else {
+                    // 期初借方本币金额 = 单价 * 期初借方数量
                     this.$set(row,'amountOpenDr',Number(row.price) * Number(row.quantityOpenDr))
+                    // 期初贷方本币金额 = 单价 * 期初贷方数量
                     this.$set(row,'amountOpenCr',Number(row.price) * Number(row.quantityOpenCr))
+                    // 期初本币余额 = 期初贷方本币金额 - 期初借方本币金额
                     this.$set(row,'amountOpenBlc',Number(row.amountOpenCr) - Number(row.amountOpenDr))
                 }
+                // 期初余额数量 = 期初贷方数量 - 期初借方数量
+                this.$set(row,'quantityOpenBlc',Number(row.quantityOpenCr) - Number(row.quantityOpenDr))
             },
             // 本期
             currentPeriodInput(row){
-                this.$set(row,'quantityBlc',Number(row.quantityCr) - Number(row.quantityDr))
+                this.$set(row,'quantityDr',row.quantityDr?row.quantityDr:0)
+                this.$set(row,'quantityCr',row.quantityCr?row.quantityCr:0)
                 if (this.form.curCode == 'USD') {
+                    // 本期借方外币金额 = 单价 * 本期借方数量
                     this.$set(row,'amountDrUsd',Number(row.price) * Number(row.quantityDr))
+                    // 本期贷方外币金额 = 单价 * 本期贷方数量
                     this.$set(row,'amountCrUsd',Number(row.price) * Number(row.quantityCr))
+                    // 本期外币余额 = 本期贷方外币金额 - 本期借方外币金额
                     this.$set(row,'amountUsdBlc',Number(row.amountCrUsd) - Number(row.amountDrUsd))
                 }else {
+                    // 本期借方本币金额 = 单价 * 本期借方数量
                     this.$set(row,'amountDr',Number(row.price) * Number(row.amountDrUsd))
+                    // 本期贷方本币金额 = 单价 * 本期借方数量
                     this.$set(row,'amountCr',Number(row.price) * Number(row.amountCrUsd))
+                    // 本期本币余额 = 本期贷方本币金额 - 本期借方本币金额
                     this.$set(row,'amountBlc',Number(row.amountCr) - Number(row.amountDr))
                 }
+                // 本期余额数量 = 本期贷方数量 - 本期借方数量
+                this.$set(row,'quantityBlc',Number(row.quantityCr) - Number(row.quantityDr))
             },
             // 下拉数据
             corpChange(value,name,row){
@@ -366,13 +429,23 @@
                             this.$set(row,'corpEnName',item.enName)
                         }
                     }
-                }else if (name == 'itemName') {
+                }else if (name == 'emplName') {
+                    for (let item of this.emplData) {
+                        if (item.name == value) {
+                            this.$set(row,'emplId',item.id)
+                            this.$set(row,'emplName',item.name)
+                        }
+                    }
+                } else if (name == 'itemName') {
                     for (let item of this.itemData) {
                         if (item.cnName == value) {
+                            console.log(item,417)
                             this.$set(row,'itemId',item.id)
                             this.$set(row,'itemName',item.cnName)
                         }
                     }
+                }else {
+                    this.$set(row,name,value)
                 }
             },
             // 获取核算客户数据
@@ -381,6 +454,18 @@
                     this.corpData = res.data.data.records
                 })
             },
+            // 获取部分数据
+            deptDeptLazyTreefun(){
+                getDeptTree().then(res=>{
+                    this.deptData = res.data.data
+                })
+            },
+            // 获取员工数据
+            userPagelistfun(realName){
+                userPagelist(1,10,{realName}).then(res=>{
+                    this.emplData = res.data.data.records
+                })
+            },
             // 获取核算项目数据
             baccitemstypeListfun(cnName){
                 baccitemstypeList(1,10,{cnName}).then(res=>{
@@ -430,11 +515,11 @@
 
 <style scoped>
 ::v-deep#out-table .back-one {
-    background: #ecf5ff !important;
+    //background: #ecf5ff !important;
     text-align: center;
 }
 ::v-deep#out-table .back-two {
-    background: #ecf5ff !important;
+    //background: #ecf5ff !important;
     text-align: center;
 }
 </style>

+ 5 - 212
src/views/iosBasicData/accounts/assembly/accountsDialog.vue

@@ -18,14 +18,6 @@
                         </el-input>
                     </el-form-item>
                 </el-col>
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="科目英文:" prop="enName">-->
-                <!--        <el-input style="width: 100%;" v-model="form.enName"-->
-                <!--                  size="small" autocomplete="off"-->
-                <!--                  clearable placeholder="请输入科目英文" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
                 <el-col :span="12">
                     <el-form-item label="方向:" prop="dc">
                         <search-query :datalist="dcData"
@@ -39,15 +31,6 @@
                         </search-query>
                     </el-form-item>
                 </el-col>
-                <!--<el-col :span="24">-->
-                <!--    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isCash">是否现金科目</el-checkbox>-->
-                <!--    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isCashEq">是否现金等价物</el-checkbox>-->
-                <!--    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isBank">是否银行科目</el-checkbox>-->
-                <!--    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isDiary">是否出日记账</el-checkbox>-->
-                <!--    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isForeign">是否外币科目</el-checkbox>-->
-                <!--    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isQuantity">是否数量科目</el-checkbox>-->
-                <!--    <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isBudget">是否预算科目</el-checkbox>-->
-                <!--</el-col>-->
                 <el-col :span="12">
                     <el-form-item label="科目类别:" prop="property">
                         <search-query :datalist="propertyData"
@@ -88,205 +71,15 @@
                         </search-query>
                     </el-form-item>
                 </el-col>
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="汇率:" prop="exrate">-->
-                <!--        <el-input style="width: 100%;" v-model="form.exrate"-->
-                <!--                  size="small" autocomplete="off" :disabled="true"-->
-                <!--                  clearable placeholder="请输入汇率" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
                 <el-col :span="24">
                     <el-form-item label="辅助核算:">
-                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isItem">项目</el-checkbox>
-                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isCorp">客户</el-checkbox>
-                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isDept">部门</el-checkbox>
-                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isEmpl">职员</el-checkbox>
-                        <el-checkbox size="medium" true-label="1" false-label="0" v-model="form.isStock">库存</el-checkbox>
+                        <el-checkbox size="medium" :true-label="1" :false-label="0" v-model="form.isItem">项目</el-checkbox>
+                        <el-checkbox size="medium" :true-label="1" :false-label="0" v-model="form.isCorp">客户</el-checkbox>
+                        <el-checkbox size="medium" :true-label="1" :false-label="0" v-model="form.isDept">部门</el-checkbox>
+                        <el-checkbox size="medium" :true-label="1" :false-label="0" v-model="form.isEmpl">职员</el-checkbox>
+                        <el-checkbox size="medium" :true-label="1" :false-label="0" v-model="form.isStock">库存</el-checkbox>
                     </el-form-item>
                 </el-col>
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="单位:" prop="unitNo">-->
-                <!--        <search-query :datalist="unitNoData"-->
-                <!--                      :selectValue="form.unitNo"-->
-                <!--                      :filterable="true"-->
-                <!--                      :clearable="true"-->
-                <!--                      :buttonIf="false"-->
-                <!--                      :disabled="form.isItem == 1"-->
-                <!--                      :forParameter="{key:'id',label:'cnName',value:'cnName'}"-->
-                <!--                      @corpChange="corpChange($event,'unitNo')"-->
-                <!--                      @corpFocus="getBunitsPagefun($event,'unitNo')" >-->
-                <!--        </search-query>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="单价:" prop="price">-->
-                <!--        <el-input style="width: 100%;" v-model="form.price"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入单价" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="预算金额(原币)" prop="amountBudget" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountBudget"-->
-                <!--                  size="small" autocomplete="off"  :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入预算金额(原币)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="预算金额(CNY)" prop="amountBudgetLoc" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountBudgetLoc"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入预算金额(CNY)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初借方数量:" prop="quantityOpenDr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.quantityOpenDr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初数量借方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初贷方数量:" prop="quantityOpenCr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.quantityOpenCr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初数量贷方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初数量余额:" prop="quantityOpenUsdBlc" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.quantityOpenUsdBlc"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初数量期初余额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初外币借方金额:" prop="amountOpenDrUsd" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountOpenDrUsd"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初外币借方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初外币贷方金额:" prop="amountOpenCrUsd" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountOpenCrUsd"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初外币贷方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初外币余额:" prop="amountOpenUsdBlc" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountOpenUsdBlc"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初外币期初余额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初本币借方金额(CNY)" prop="amountOpenDr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountOpenDr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初本币借方金额(CNY)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初本币贷方金额(CNY)" prop="amountOpenCr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountOpenCr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初本币贷方金额(CNY)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="期初本币余额(CNY)" prop="amountOpenBlc" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountOpenBlc"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入期初本币余额(CNY)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期数量借方金额:" prop="quantityDr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.quantityDr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期数量借方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期数量贷方金额:" prop="quantityCr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.quantityCr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期数量贷方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期数量余额:" prop="quantityUsdBlc" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.quantityUsdBlc"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期数量期初余额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期外币借方金额:" prop="amountDrUsd" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountDrUsd"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期外币借方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期外币贷方金额:" prop="amountCrUsd" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountCrUsd"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期外币贷方金额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期外币余额:" prop="amountUsdBlc" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountUsdBlc"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期外币期初余额" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期本币借方金额(CNY):" prop="amountDr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountDr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期本币借方金额(CNY)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期本币贷方金额(CNY):" prop="amountCr" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountCr"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期本币贷方金额(CNY)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
-                <!--<el-col :span="6">-->
-                <!--    <el-form-item label="本期本币余额(CNY):" prop="amountBlc" label-width="150px">-->
-                <!--        <el-input style="width: 100%;" v-model="form.amountBlc"-->
-                <!--                  size="small" autocomplete="off" :disabled="form.isItem == 1"-->
-                <!--                  clearable placeholder="请输入本期本币余额(CNY)" >-->
-                <!--        </el-input>-->
-                <!--    </el-form-item>-->
-                <!--</el-col>-->
             </el-row>
         </el-form>
     </div>

+ 36 - 23
src/views/iosBasicData/accounts/index.vue

@@ -46,6 +46,7 @@
               </template>
               <template slot="menu" slot-scope="{ row, index }">
                   <el-button size="small" icon="el-icon-edit" type="text" @click="editfun(row,index)">编辑</el-button>
+                  <el-button v-if="row.isItem == 1" size="small" type="text" @click="editOpeningfun(row,index)">核算期初</el-button>
                   <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)">删 除
                   </el-button>
               </template>
@@ -82,7 +83,7 @@
           <accitemsopenblc :form="form" ></accitemsopenblc>
           <span slot="footer" class="dialog-footer">
                 <el-button @click="sopenblcVisible = false">取 消</el-button>
-                <el-button type="primary" @click="sopenblcVisible = false">确 定</el-button>
+                <el-button type="primary" @click="openingCalculatefun">保 存</el-button>
           </span>
       </el-dialog>
 
@@ -128,7 +129,7 @@
           viewBtn: true,
           selection: true,
           dialogClickModal: false,
-          menuWidth:"140",
+          menuWidth:"200",
           column: [
             {
               label: "科目代码",
@@ -262,56 +263,56 @@
               ]
             },
             {
-              label: "期初本币借方金额(CNY)",
+              label: "期初本币借方金额",
               prop: "amountOpenDr",
               rules: [{
                 required: true,
-                message: "请输入期初本币借方金额(CNY)",
+                message: "请输入期初本币借方金额",
                 trigger: "blur"
               }]
             },
             {
-              label: "期初本币贷方金额(CNY)",
+              label: "期初本币贷方金额",
               prop: "amountOpenCr",
               rules: [{
                 required: true,
-                message: "请输入期初本币贷方金额(CNY)",
+                message: "请输入期初本币贷方金额",
                 trigger: "blur"
               }]
             },
             {
-              label: "期初本币余额(CNY)",
+              label: "期初本币余额",
               prop: "amountOpenBlc",
               rules: [{
                 required: true,
-                message: "请输入期初本币余额(CNY)",
+                message: "请输入期初本币余额",
                 trigger: "blur"
               }]
             },
             {
-              label: "本期本币借方金额(CNY)",
+              label: "本期本币借方金额",
               prop: "amountDr",
               rules: [{
                 required: true,
-                message: "请输入本期本币借方金额(CNY)",
+                message: "请输入本期本币借方金额",
                 trigger: "blur"
               }]
             },
             {
-              label: "本期本币贷方金额(CNY)",
+              label: "本期本币贷方金额",
               prop: "amountCr",
               rules: [{
                 required: true,
-                message: "请输入本期本币贷方金额(CNY)",
+                message: "请输入本期本币贷方金额",
                 trigger: "blur"
               }]
             },
             {
-              label: "本期本币余额(CNY)",
+              label: "本期本币余额",
               prop: "amountBlc",
               rules: [{
                 required: true,
-                message: "请输入本期本币余额(CNY)",
+                message: "请输入本期本币余额",
                 trigger: "blur"
               }]
             },
@@ -462,6 +463,11 @@
         this.propertyWorkDictsfun()
     },
     methods: {
+        // 辅助核算期初确认
+        openingCalculatefun(){
+            this.accountsSubmitfun()
+            this.sopenblcVisible = false
+        },
         // 核算项目数据
         propertyWorkDictsfun(cnName){
             getWorkDicts('itemClassify_los').then((res) => {
@@ -493,7 +499,6 @@
             if (!this.form.dc) {
                 sum += '方向 '
             }
-            console.log(this.form,454)
             if (sum != '请填写') {
                 this.$alert(sum, '提示', {
                     confirmButtonText: '确定',
@@ -505,11 +510,9 @@
         // 保存
         accountsSubmitfun(){
             accountsSubmit(this.form).then(res=>{
-                console.log(res.data,72)
                 this.$message.success("操作成功!")
                 this.accountsVisible = false
                 this.onLoad(this.page, this.query)
-
             })
         },
       // 弹窗点击差号
@@ -520,6 +523,7 @@
               })
               .catch(_ => {});
       },
+        // 添加
       rowSave(row, done, loading) {
         accountsSubmit(row).then(() => {
           this.onLoad(this.page);
@@ -533,6 +537,7 @@
           window.console.log(error);
         });
       },
+        // 编辑操作
       rowUpdate(row, index, done, loading) {
         accountsSubmit(row).then(() => {
           this.onLoad(this.page);
@@ -543,7 +548,6 @@
           done();
         }, error => {
           loading();
-          console.log(error);
         });
       },
         // 删除
@@ -566,12 +570,20 @@
       },
         // 编辑
         editfun(row){
-            if (row.isItem == 0) {
-                // 没有勾选项目行编辑
-            }else {
-                this.sopenblcVisible = true
-            }
+            accountsDetail(row.id).then(res => {
+                this.form = res.data.data;
+            });
+            this.accountsVisible = true
+        },
+        // 核算期初
+        editOpeningfun(row){
+            accountsDetail(row.id).then(res => {
+                this.form = res.data.data;
+            });
+            this.sopenblcVisible = true
         },
+
+        // 匹配删除
       handleDelete() {
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
@@ -594,6 +606,7 @@
             this.$refs.crud.toggleSelection();
           });
       },
+        // 打开弹窗调用详情接口
       beforeOpen(done, type) {
         if (["edit", "view"].includes(type)) {
           accountsDetail(this.form.id).then(res => {

+ 33 - 34
src/views/iosBasicData/fininvoicesApplyfor/fininvoicesDetails.vue

@@ -780,56 +780,55 @@ export default {
             },
             // 费用明细开票匹配
             invoiceMatchingfun(){
-                if (this.invoiceAmountCNY != 0) {
+                if (this.invoiceAmountCNY != 0 || this.invoiceAmountUSD != 0) {
                     let dataCNY = JSON.parse(JSON.stringify(this.invoiceAmountCNY))
+                    let dataUSD = JSON.parse(JSON.stringify(this.invoiceAmountUSD))
                     for (let item of this.tableData) {
-                        if (dataCNY < 0) {
-                            dataCNY = 0
-                        }
                         this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,false)
-                        if (dataCNY > 1500) {
-                            if (item.currentCurCode == 'CNY') {
-                                this.$set(item,'currentAmountCNY',1500)
-                                this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
-                                dataCNY -= 1500
+                        if (this.invoiceAmountCNY != 0) {
+                            if (dataCNY < 0) {
+                                dataCNY = 0
                             }
-                        }else {
-                            if (item.currentCurCode == 'CNY') {
-                                if (dataCNY != 0) {
+                            if (dataCNY > 1500) {
+                                if (item.currentCurCode == 'CNY') {
+                                    this.$set(item,'currentAmountCNY',1500)
                                     this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    dataCNY -= 1500
+                                }
+                            }else {
+                                if (item.currentCurCode == 'CNY') {
+                                    if (dataCNY != 0) {
+                                        this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    }
+                                    this.$set(item,'currentAmountCNY',dataCNY)
+                                    dataCNY -= 1500
                                 }
-                                this.$set(item,'currentAmountCNY',dataCNY)
-                                dataCNY -= 1500
                             }
                         }
-                    }
-                }
-                // this.$refs.siteCrud.toggleRowSelection(item);
-                if (this.invoiceAmountUSD != 0) {
-                    let dataUSD = JSON.parse(JSON.stringify(this.invoiceAmountUSD))
-                    for (let item of this.tableData) {
-                        if (dataUSD < 0) {
-                            dataUSD = 0
-                        }
-                        this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,false)
-                        if (dataUSD > 1500) {
-                            if (item.currentCurCode == 'USD') {
-                                this.$set(item,'currentAmountUSD',1500)
-                                this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
-                                dataUSD -= 1500
+                        if (this.invoiceAmountUSD != 0) {
+                            if (dataUSD < 0) {
+                                dataUSD = 0
                             }
-                        }else {
-                            if (item.currentCurCode == 'USD') {
-                                this.$set(item,'currentAmountUSD',dataUSD)
-                                if (dataUSD != 0) {
+                            if (dataUSD > 1500) {
+                                if (item.currentCurCode == 'USD') {
+                                    this.$set(item,'currentAmountUSD',1500)
                                     this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    dataUSD -= 1500
+                                }
+                            }else {
+                                if (item.currentCurCode == 'USD') {
+                                    this.$set(item,'currentAmountUSD',dataUSD)
+                                    if (dataUSD != 0) {
+                                        this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                    }
+                                    dataUSD -= 1500
                                 }
-                                dataUSD -= 1500
                             }
                         }
                     }
                 }
 
+
             },
             // 费用明细单个删除
             detailsdeletionfun(id,index){

+ 67 - 1
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -484,8 +484,20 @@
                                 <el-button style="margin-left: 10px" :disabled="editSave" size="small" type="primary" @click="invoicingfun" >生成开票明细</el-button>
                                 <el-button style="margin-left: 10px" :disabled="editSave" size="small" type="warning" @click="invoicingRevokefun" >撤销开票明细</el-button>
                                 <el-button size="small" :disabled="editSave" type="danger" @click="batchDeletefun" >批量删除</el-button>
+
+                                <el-input style="width: 10%;margin-left: 10px;" v-model="invoiceAmountCNY"
+                                          size="small" autocomplete="off" type="numbers"
+                                          clearable placeholder="开票金额" >
+                                    <span style="line-height: 32px;" slot="suffix" >CNY</span>
+                                </el-input>
+                                <el-input style="width: 10%;margin-left: 5px;" v-model="invoiceAmountUSD"
+                                          size="small" autocomplete="off" type="numbers"
+                                          clearable placeholder="开票金额" >
+                                    <span style="line-height: 32px;" slot="suffix" >USD</span>
+                                </el-input>
+                                <el-button style="margin-left: 10px" :disabled="statusType" size="small" type="primary" @click="invoiceMatchingfun()" >开票匹配</el-button>
                             </div>
-                            <fininvoicesitems :tableData="tableData"
+                            <fininvoicesitems ref="fininvoicesitems" :tableData="tableData"
                                               :handleSelectionData="handleSelectionData"
                                               :editSave="editSave"
                                               @handleSelectionChange="handleSelectionChange"
@@ -573,6 +585,8 @@ export default {
     components:{ SearchQuery, fininvoicesitems,fininvoiceitemdetail},
     data() {
         return {
+            invoiceAmountCNY:0, // 费用明细开票金额输入框CNY
+            invoiceAmountUSD:0, // 费用明细开票金额输入框USD
             statusType:false, // 是否确认开票
             serverData:[], // 开票项目数据
             detailTabs:'first',
@@ -758,6 +772,58 @@ export default {
                 this.fininvoicesDetailfun(this.form.id)
             })
         },
+        // 费用明细开票匹配
+        invoiceMatchingfun(){
+            if (this.invoiceAmountCNY != 0 || this.invoiceAmountUSD != 0) {
+                let dataCNY = JSON.parse(JSON.stringify(this.invoiceAmountCNY))
+                let dataUSD = JSON.parse(JSON.stringify(this.invoiceAmountUSD))
+                for (let item of this.tableData) {
+                    this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,false)
+                    if (this.invoiceAmountCNY != 0) {
+                        if (dataCNY < 0) {
+                            dataCNY = 0
+                        }
+                        if (dataCNY > 1500) {
+                            if (item.currentCurCode == 'CNY') {
+                                this.$set(item,'currentAmountCNY',1500)
+                                this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                dataCNY -= 1500
+                            }
+                        }else {
+                            if (item.currentCurCode == 'CNY') {
+                                if (dataCNY != 0) {
+                                    this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                }
+                                this.$set(item,'currentAmountCNY',dataCNY)
+                                dataCNY -= 1500
+                            }
+                        }
+                    }
+                    if (this.invoiceAmountUSD != 0) {
+                        if (dataUSD < 0) {
+                            dataUSD = 0
+                        }
+                        if (dataUSD > 1500) {
+                            if (item.currentCurCode == 'USD') {
+                                this.$set(item,'currentAmountUSD',1500)
+                                this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                dataUSD -= 1500
+                            }
+                        }else {
+                            if (item.currentCurCode == 'USD') {
+                                this.$set(item,'currentAmountUSD',dataUSD)
+                                if (dataUSD != 0) {
+                                    this.$refs.fininvoicesitems.$refs.tableRef.toggleRowSelection(item,true)
+                                }
+                                dataUSD -= 1500
+                            }
+                        }
+                    }
+                }
+            }
+
+
+        },
         // 费用明细批量删除
         batchDeletefun(){
             if (this.handleSelectionData.length == 0) {

+ 0 - 1
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -721,7 +721,6 @@
                         if (!this.form.id) {
                             delete item.id
                         }
-                        delete item.billDate
                         delete item.accountDc
                         return item
                     })

+ 32 - 28
src/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue

@@ -22,7 +22,7 @@
             </el-table-column>
             <el-table-column
                 prop="descr"
-                label="摘要">
+                label="摘要" width="200px">
                 <template slot-scope="{ row }">
                     <el-input style="width: 100%;" type="textarea" v-model="row.descr"
                               size="small" autocomplete="off"
@@ -36,14 +36,14 @@
                 <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"
+                                      :selectValue="row.accountId"
                                       :filterable="true"
                                       :clearable="true"
                                       :remote="true"
                                       :buttonIf="false"
                                       :forParameter="{key:'id',label:'code',value:'id'}"
                                       @corpFocus="accountsListfun"
-                                      @corpChange="corpChange($event,'accountCode',row)">
+                                      @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)"></el-button>
@@ -52,13 +52,13 @@
                     <span>{{row.accountCnName}}</span>
                 </template>
             </el-table-column>
-            <el-table-column label="金额">
+            <el-table-column label="本币金额">
                 <el-table-column
                     prop="amountDr"
                     label="借方" width="120px">
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountDr"
-                                  size="small" autocomplete="off"
+                                  size="small" autocomplete="off" :disabled="row.curCode == 'USD'"
                                    placeholder="请输入借方" >
                         </el-input>
                     </template>
@@ -68,33 +68,27 @@
                     label="货方" width="120px">
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountCr"
-                                  size="small" autocomplete="off"
+                                  size="small" autocomplete="off" :disabled="row.curCode == 'USD'"
                                    placeholder="请输入货方" >
                         </el-input>
                     </template>
                 </el-table-column>
             </el-table-column>
-            <el-table-column
-                prop="curCode"
-                label="币种" width="80px">
-            </el-table-column>
-            <el-table-column
-                prop="exrate"
-                label="汇率" width="120px">
-                <template slot-scope="{ row }">
-                    <el-input style="width: 100%;" type="number" v-model="row.exrate"
-                              size="small" autocomplete="off"
-                              clearable placeholder="请输入汇率" >
-                    </el-input>
-                </template>
-            </el-table-column>
-            <el-table-column label="外币金额">
+            <el-table-column label="外币金额" >
+                <el-table-column
+                    prop="curCode"
+                    label="币种" width="80px">
+                </el-table-column>
+                <el-table-column
+                    prop="exrate"
+                    label="汇率" width="80px">
+                </el-table-column>
                 <el-table-column
                     prop="amountDrUsd"
                     label="借方" width="120px">
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountDrUsd"
-                                  size="small" autocomplete="off"
+                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY'"
                                   clearable placeholder="请输入借方" >
                         </el-input>
                     </template>
@@ -104,7 +98,7 @@
                     label="货方" width="120px">
                     <template slot-scope="{ row }">
                         <el-input style="width: 100%;" type="number" v-model="row.amountCrUsd"
-                                  size="small" autocomplete="off"
+                                  size="small" autocomplete="off" :disabled="row.curCode == 'CNY'"
                                   clearable placeholder="请输入货方" >
                         </el-input>
                     </template>
@@ -112,21 +106,21 @@
             </el-table-column>
             <el-table-column
                 prop="remarks"
-                label="备注">
+                label="备注" width="200px" >
                 <template slot-scope="{ row }">
-                    <el-input style="width: 100%;" type="textarea" v-model="row.amountCrUsd"
+                    <el-input style="width: 100%;" type="textarea" v-model="row.remarks"
                               size="small" autocomplete="off"
                               clearable placeholder="请输入备注" >
                     </el-input>
                 </template>
             </el-table-column>
-            <el-table-column label="操作" width="100px">
+            <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)"></el-button>
                     </el-tooltip>
                     <el-tooltip class="item" effect="dark" content="删除" placement="top">
-                        <el-button size="mini" type="danger" icon="el-icon-delete" circle></el-button>
+                        <el-button size="mini" type="danger" icon="el-icon-delete" circle @click="deletefun(scope.row,scope.$index)" ></el-button>
                     </el-tooltip>
                 </template>
             </el-table-column>
@@ -165,6 +159,10 @@
                     this.accountData = res.data.data.records
                 })
             },
+            // 行删除
+            deletefun(row,index){
+                this.$emit('deletefun',row,index)
+            },
             // 行添加
             addRowsfun(row,index){
                 this.$emit("addRowsfun",row,index)
@@ -181,12 +179,18 @@
                         this.$set(row,'accountCode',item.code)
                         this.$set(row,'accountCnName',item.cnName)
                         this.$set(row,'accountEnName',item.enName)
+                        console.log(item,184)
+                        // 币种
+                        this.$set(row,'curCode',item.curCode)
+                        // 汇率
+                        this.$set(row,'exrate',item.exrate)
+                        // curCode
                     }
                 }
             },
             // 表头样式
             tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
-                return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff"
+                return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff;text-align:center"
             },
             // 列表多选
             // 多选选择的数据

+ 51 - 34
src/views/iosBasicData/finvouchers/finvouchersitems.vue

@@ -11,7 +11,7 @@
                             :loading="saveLoading" >凭证标错
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px"
-                            :loading="saveLoading" >保 存
+                            :loading="saveLoading" @click="finvouchersSubmitfun" >保 存
                 </el-button>
             </div>
         </div>
@@ -68,14 +68,14 @@
                                 </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-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>
@@ -105,6 +105,7 @@
                                    :handleSelectionData="handleSelectionData"
                                    @handleSelectionChange="handleSelectionChange"
                                    @addRowsfun="addRowsfun"
+                                   @deletefun="deletefun"
                                    @auxiliaryAccountingfun="auxiliaryAccountingfun">
                 </fromtable-details>
             </el-card>
@@ -119,14 +120,14 @@
             class="el-dialogDeep"
             width="70%"
             :before-close="handleClose">
-            <div>科目名称:1231233242342</div>
+            <div>科目名称:{{subjectRow.accountCnName}}</div>
             <div style="margin-top: 20px">
-                <el-form :model="form" ref="form" label-width="70px" class="demo-ruleForm">
+                <el-form :model="subjectRow" ref="subjectRow" label-width="70px" class="demo-ruleForm">
                     <div>外币核算:</div>
                     <el-row>
                         <el-col :span="4">
                             <el-form-item label="币种:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.curCode"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入币种" >
                                 </el-input>
@@ -134,7 +135,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="汇率:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.exrate"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入汇率" >
                                 </el-input>
@@ -142,7 +143,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="借方金额:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入借方金额" >
                                 </el-input>
@@ -150,7 +151,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="贷方金额:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入贷方金额" >
                                 </el-input>
@@ -158,7 +159,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="本币借方:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入本币借方" >
                                 </el-input>
@@ -166,19 +167,18 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="本币贷方:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.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>
-
                     <div>数量核算:</div>
                     <el-row>
                         <el-col :span="4">
                             <el-form-item label="单位:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.unitNO"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入单位" >
                                 </el-input>
@@ -186,7 +186,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="规格:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入规格" >
                                 </el-input>
@@ -194,7 +194,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="借方数量:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入借方数量" >
                                 </el-input>
@@ -202,7 +202,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="借方单价:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入借方单价" >
                                 </el-input>
@@ -210,7 +210,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="贷方数量:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入贷方数量" >
                                 </el-input>
@@ -218,7 +218,7 @@
                         </el-col>
                         <el-col :span="4">
                             <el-form-item label="贷方单价:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入贷方单价" >
                                 </el-input>
@@ -227,37 +227,37 @@
                     </el-row>
 
                     <el-row :gutter="40">
-                        <el-col :span="12">
+                        <el-col :span="12" v-if="subjectAccount.isCorp">
                             <div>客户核算:</div>
                             <el-form-item label="本币贷方:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.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="12">
+                        <el-col :span="12" v-if="subjectAccount.isDept">
                             <div>部门核算:</div>
                             <el-form-item label="本币贷方:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.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="12">
+                        <el-col :span="12" v-if="subjectAccount.isEmpl">
                             <div>职员核算:</div>
                             <el-form-item label="本币贷方:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.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="12">
+                        <el-col :span="12" v-if="subjectAccount.isItem">
                             <div>项目核算:</div>
                             <el-form-item label="本币贷方:" prop="voucherType">
-                                <el-input style="width: 100%;" v-model="form.voucherNo"
+                                <el-input style="width: 100%;" v-model="subjectRow.voucherNo"
                                           size="small" autocomplete="off"
                                           clearable placeholder="请输入项目名称" >
                                 </el-input>
@@ -282,6 +282,7 @@
     import {finvouchersitemsRemove, finvouchersSubmit} from "@/api/iosBasicData/finvouchers";
     import {getCurrentDate, getYearDate} from "@/util/date";
     import fromtableDetails from "@/views/iosBasicData/finvouchers/assembly/fromtableDetails.vue";
+    import {accountsDetail} from "@/api/iosBasicData/accounts";
 
     export default {
         components: {SearchQuery,fromtableDetails},
@@ -297,6 +298,8 @@
                 voucherTypeData:[], // 凭证字数据
                 auxiliaryVisible:false, // 辅助核算弹窗
                 handleSelectionData:[], // 分录多选的数据
+                subjectRow:{}, // 科目弹窗的显示数据
+                subjectAccount:{},// 当前选择科目的数据
             }
         },
         created() {
@@ -318,6 +321,10 @@
                     descr:row.descr
                 });
             },
+            // 行删除
+            deletefun(row,index){
+                this.form.finVouchersItemsList.splice(index,1)
+            },
             // 删除分录
             deleteEntryfun(){
                 console.log(this.handleSelectionData,323)
@@ -325,6 +332,7 @@
                     return item.id
                 })
                 console.log(arr.join(','))
+
                 // for (let item of this.handleSelectionData) {
                 //     if (item.id) {
                 //
@@ -334,8 +342,11 @@
             // 大保存
             finvouchersSubmitfun(){
                 this.form.businessTypeCode = 'PZDH'
-                finvouchersSubmit().then(res=>{
-
+                console.log(this.form,337)
+                // this.pageLoading = true
+                finvouchersSubmit(this.form).then(res=>{
+                    console.log(res,338)
+                    // this.pageLoading = false
                 })
             },
             // 分录删除接口
@@ -346,6 +357,12 @@
             },
             // 科目编辑打开辅助核算弹窗
             auxiliaryAccountingfun(row){
+                console.log(row,352)
+                // 获取状态
+                accountsDetail(row.accountId).then(res=>{
+                    this.subjectAccount = res.data.data
+                })
+                this.subjectRow = row
                 this.auxiliaryVisible = true
             },
             // 下拉回调

+ 62 - 9
src/views/tirePartsMall/basicData/listingManagement/index.vue

@@ -163,17 +163,44 @@
     </el-dialog>
 
 
+      <!--<el-dialog-->
+      <!--    title="商城图片  (图片文件像素推荐700X700,有且只允许有一张主图,其余均为副图)"-->
+      <!--    :visible.sync="enclosure"-->
+      <!--    append-to-body-->
+      <!--    width="70%">-->
+      <!--    <c-upload :data="orderList" display basic deleteUrl="/api/blade-sales-part/productLaunchFiles/remove"-->
+      <!--              :enumerationValue="160" />-->
+      <!--    <span slot="footer" class="dialog-footer">-->
+      <!--    <el-button @click="enclosure = false" size="small">取 消</el-button>-->
+      <!--    <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>-->
+      <!--  </span>-->
+      <!--</el-dialog>-->
+
       <el-dialog
-          title="商城图片  (图片文件像素推荐700X700,有且只允许有一张主图,其余均为副图)"
-          :visible.sync="enclosure"
+          title="附件上传"
           append-to-body
-          width="70%">
-          <c-upload :data="orderList" display basic deleteUrl="/api/blade-sales-part/productLaunchFiles/remove"
-                    :enumerationValue="160" />
-          <span slot="footer" class="dialog-footer">
-          <el-button @click="enclosure = false" size="small">取 消</el-button>
-          <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
-        </span>
+          :visible.sync="enclosure"
+          width="555px"
+          :close-on-click-modal="false"
+          v-dialog-drag
+      >
+          <el-upload
+              class="upload-demo"
+              drag
+              style="text-align: center"
+              ref="upload"
+              :action="action"
+              :headers="headers"
+              :on-success="onSuccess"
+              :show-file-list="false"
+              multiple
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+              <div class="el-upload__tip" slot="tip">
+                  如上传文件过大,请耐心等待上传成功
+              </div>
+          </el-upload>
       </el-dialog>
 
   </div>
@@ -197,6 +224,8 @@ export default {
   name: "index",
   data() {
     return {
+        action: "/api/blade-resource/oss/endpoint/put-file",
+        headers: { "Blade-Auth": "Bearer " + getToken() },
         orderList:[],
         enclosure:false,
         dataId:0,
@@ -500,6 +529,27 @@ export default {
     }
   },
   methods: {
+      // 商城图片上传
+      onSuccess(response, file, fileList){
+          let version = '2'
+          if(this.form.filesList.length == 0) {
+              version = '0'
+          }
+
+          this.form.filesList.push({
+              fileName: response.data.originalName,
+              url: response.data.link,
+              sort:this.form.filesList.length,
+              version:version
+          })
+          submit({
+              ...this.form
+          }).then(res => {
+              this.$message.success("修改成功")
+              this.enclosure = false
+              this.onLoad(this.page, this.search)
+          })
+      },
       selectFocusfun(row){
           console.log(row,503)
           console.log(this.$refs.cruds,504)
@@ -520,6 +570,9 @@ export default {
           for (let order of this.orderList) {
               order.paymentType = order.typeFiles
           }
+          getDetail({ id: row.id }).then(res => {
+              this.form = res.data.data
+          })
           this.enclosure = true
       },
       // 附件保存