Преглед изворни кода

画结算中心 调整财务管理mblno hblno快捷方式查询
调整跳转路径和vuex配置

Qukatie пре 4 месеци
родитељ
комит
77d9f10d1d

+ 48 - 0
src/api/iosBasicData/finstlbills.js

@@ -252,4 +252,52 @@ export const srevokeSettlementApproveV1 = (data) => {
     method: 'post',
     data: data
   })
+}
+// 提交申请
+export const confirmSettlementV1 = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/confirmSettlementV1',
+    method: 'post',
+    data: data
+  })
+}
+//撤销申请
+export const revokeSettlementV1 = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/revokeSettlementV1',
+    method: 'post',
+    data: data
+  })
+}
+// 待付
+export const generateFinStlBillsV1C = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/generateFinStlBillsV1',
+    method: 'get',
+    params: data
+  })
+}
+// 待付
+export const revokeGenerateFinStlBillsV1C = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/revokeGenerateFinStlBillsV1',
+    method: 'get',
+    params: data
+  })
+}
+// 代收
+export const generateFinStlBillsV1D = (data) => {
+  return request({
+    url: '/api/blade-los/fininvoices/generateFinStlBillsV1',
+    method: 'get',
+    params: data
+  })
+}
+// 代收
+export const revokeGenerateFinStlBillsV1D = (data) => {
+  return request({
+    url: '/api/blade-los/fininvoices/revokeGenerateFinStlBillsV1',
+    method: 'get',
+    params: data
+  })
 }

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

@@ -2231,6 +2231,12 @@ const columnName = [{
 },{
   code: 526,
   name: '货代-财务管理-销项发票(F)费用信息'
+}, {
+  code: 527,
+  name: '货代-财务管理-结算中心(F)查询表'
+},{
+  code: 528,
+  name: '货代-财务管理-结算中心(F)费用信息'
 }
 ]
 export const getColumnName = (key) => {

+ 4 - 4
src/page/index/tags.vue

@@ -402,14 +402,14 @@ export default {
         if (tag.label == "审批详情(F)") {
           this.$store.commit("HYCKLOS_OUT_DETAIL")
         }
-        if (tag.label == "付费申请(F)") {
+        if (tag.label == "付费申请(F)"||tag.label == "付费申请(N)") {
           this.$store.commit("FFQSF_OUT_DETAIL")
           this.$store.commit("OUT_PAYAPP_DETAIL")
         }
-        if (tag.label == "对账中心(F)") {
+        if (tag.label == "对账中心(F)"||tag.label == "对账中心(N)") {
           this.$store.commit("DZZXF_OUT_DETAIL")
         }
-        if (tag.label == "结算中心(F)") {
+        if (tag.label == "结算中心(F)"||tag.label == "结算中心(N)") {
           this.$store.commit("JSZX_OUT_DETAIL")
         }
         if (tag.label == "SEAMEND") {
@@ -457,7 +457,7 @@ export default {
         if (tag.label == "SIAMEND") {
           this.$store.commit("OUT_OFI_DETAIL")
         }
-        if (tag.label == "销项发票(F)") {
+        if (tag.label == "销项发票(F)"||tag.label == "销项发票(N)") {
           this.$store.commit("OUT_FINOUT_DETAIL")
         }
         if (tag.label == "财务凭证(F)") {

+ 3 - 3
src/store/modules/ifdetail.js

@@ -732,14 +732,14 @@ const ifdetail = {
       if (tag.label == '审批详情(F)') {
         state.approvalDetails = true
       }
-      if (tag.label == '付费申请(F)') {
+      if (tag.label == '付费申请(F)'||tag.label == '付费申请(N)') {
         state.paidapplication = true
         state.payAppStatus = true;
       }
-      if (tag.label == '对账中心(F)') {
+      if (tag.label == '对账中心(F)'||tag.label == '对账中心(N)') {
         state.ReconciliationCenterF = true
       }
-      if (tag.label == '结算中心(F)') {
+      if (tag.label == '结算中心(F)'||tag.label == '结算中心(N)') {
         state.SettlementCenterF = true
       }
       if (tag.label == 'SEAMEND') {

+ 5 - 5
src/views/iosBasicData/financialManagement/PaymentApplication/detailsPage.vue

@@ -273,7 +273,7 @@ export default {
             editButton: false,
             editDisabled: false,
             pageData: [],
-            pageData2:[],
+            pageData2: [],
             tableData: [],
             finAccBillsVOList: [],
             form: {
@@ -1113,10 +1113,10 @@ export default {
                 done()
                 if (!valid) return
                 // 付费对象
-                if (!this.form.corpId) {
-                    return this.$message.error('请选择付费对象');
+                // if (!this.form.corpId) {
+                //     return this.$message.error('请选择付费对象');
 
-                }
+                // }
                 this.form.billNoFormat = 'FFSQ'
                 this.form.businessTypeCode = 'FFSQ'
                 this.form.businessType = 'FFSQ' // 结算单
@@ -1187,7 +1187,7 @@ export default {
             obj.type = '2'
             obj.branchId = this.form.branchId
             obj.branchName = this.form.branchName
-            obj.corpCnName = this.form.corpId // 付费对象
+            obj.corpCnName = this.form.corpId ? this.form.corpId : null
             obj.dc = this.search.accountDc // 收付 D=收 C=付
             obj.curCode = this.search.curCode // 币别
             obj.mblno = this.search.mblno // MB/L NO

+ 195 - 64
src/views/iosBasicData/financialManagement/computationCenter/detailsPage.vue

@@ -17,11 +17,15 @@
                 </el-button>
                 <el-button type="success" size="small" :disabled="!form.id" plain @click="newbill">新建账单
                 </el-button>
+                <el-button size="small" type="danger" plain :disabled="!form.id"
+                    v-if="form.requestNo && form.status == 0" @click="allClick('撤销生成')">撤销生成
+                </el-button>
                 <el-button size="small" type="danger" plain :disabled="!form.id || editPower"
-                    v-if="form.billStatus == 1" @click="allClick('撤销对账')">撤销对账
+                    v-if="form.status == '1' || form.status == '4' || (form.status == '3' && roleName.indexOf('admin') != -1)"
+                    @click="allClick('撤销结算')">撤销结算
                 </el-button>
-                <el-button size="small" type="success" plain :disabled="!form.id || editPower" v-else
-                    @click="allClick('确认对账')">确认对账
+                <el-button v-if="form.status == '0' || form.status == '4'" size="small" type="success" plain
+                    @click="allClick('确认结算')">确认结算
                 </el-button>
                 <el-button size="small" type="primary" v-if="editButton" @click="inEdit">编 辑
                 </el-button>
@@ -45,13 +49,19 @@
                                             @selectChange="dicChange('branchName', $event)"></dic-select>
                                     </tempalte>
                                     <tempalte slot="corpCnName">
-                                        <dic-select v-model="form.corpCnName" placeholder="对账单位" key="id" res="records"
+                                        <dic-select v-model="form.corpCnName" placeholder="结算单位" key="id" res="records"
                                             label="cnName" url="/blade-los/bcorps/selectList?status=0&current=1&size=5"
                                             :filterable="true" :remote="true" dataName="cnName"
                                             :disabled="editDisabled || !(roleName.includes('admin') || roleName.includes('总部')) || form.finStlBillsItemsList.length"
                                             @selectChange="dicChange('corpCnName', $event)">
                                         </dic-select>
                                     </tempalte>
+                                    <tempalte slot="isExchangeToCny">
+                                        <el-checkbox size="medium" true-label="1" false-label="0"
+                                            :disabled="editDisabled || !(roleName.includes('admin') || roleName.includes('总部')) || form.finStlBillsItemsList.length"
+                                            v-model="form.isExchangeToCny">
+                                        </el-checkbox>
+                                    </tempalte>
                                     <tempalte slot="remarks">
                                         <el-input type="textarea" :rows="5" placeholder="请输入 备注" v-model="form.remarks">
                                         </el-input>
@@ -65,15 +75,16 @@
                                     @selection-change="handleSelectionChange" :header-cell-style="tableHeaderCellStyle"
                                     :row-class-name="rowClassName" :cell-style="cellStyle" :page.sync="page"
                                     @size-change="sizeChange" @current-change="currentChange"
-                                    @resetColumn="resetColumn('crud', 'option', 'optionBack', 492)"
-                                    @saveColumn="saveColumn('crud', 'option', 'optionBack', 492)">
+                                    @resetColumn="resetColumn('crud', 'option', 'optionBack', 528)"
+                                    @saveColumn="saveColumn('crud', 'option', 'optionBack', 528)">
                                     <template slot="menuLeft">
-                                        <el-button size="small" type="danger" style="margin-left: 10px"
+                                        <el-button v-if="!form.requestNo" size="small" type="danger"
+                                            style="margin-left: 10px"
                                             :disabled="editDisabled || handleSelectionData.length == 0"
                                             @click="batchDeletefun">选定删除
                                         </el-button>
-                                        <el-button size="small" type="danger" style="margin-left: 10px"
-                                            :disabled="editDisabled" @click="allDelete">全部删除
+                                        <el-button v-if="!form.requestNo" size="small" type="danger"
+                                            style="margin-left: 10px" :disabled="editDisabled" @click="allDelete">全部删除
                                         </el-button>
                                         <span style="font-size:18px;font-weight:600;margin-left:10px;">
                                             <span style="color: #67C23A;margin-right: 10px;">
@@ -94,7 +105,7 @@
                             </trade-card>
                         </el-col>
                     </el-row>
-                    <el-row>
+                    <el-row v-if="!form.requestNo">
                         <el-col :span="18">
                             <trade-card title="业务费用信息">
                                 <avue-crud :option="option2" :data="pageData2" id="out-table" ref="crud2"
@@ -103,8 +114,8 @@
                                     @search-change="searchChange" @search-reset="searchReset" :page.sync="page2"
                                     @size-change="sizeChange2" @current-change="currentChange2"
                                     @row-click="handleRowClick"
-                                    @resetColumn="resetColumn('crud2', 'option2', 'optionBack2', 520)"
-                                    @saveColumn="saveColumn('crud2', 'option2', 'optionBack2', 520)">
+                                    @resetColumn="resetColumn('crud2', 'option2', 'optionBack2', 527)"
+                                    @saveColumn="saveColumn('crud2', 'option2', 'optionBack2', 527)">
                                     <template slot="menuLeft">
                                         <el-button size="small" type="success" style="margin-right: 8px"
                                             :disabled="editDisabled || selectionList.length == 0"
@@ -194,7 +205,7 @@
         <!--设计报表弹窗-->
         <el-dialog append-to-body title="设计报表" class="el-dialogDeep" :visible.sync="DesignreportDialog" width="70%"
             :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
-            <reports :id="form.id" :assemblyForm="form" businessValue="DZZX"></reports>
+            <reports :id="form.id" :assemblyForm="form" businessValue="JSZX"></reports>
         </el-dialog>
 
         <!--预览-->
@@ -220,8 +231,16 @@ import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
 import {
     finstlbillsDetail,
     listAccBillV2,
-    finstlbillsSubmit, feeItemsSynchronize, confirmReconciliationV1, revokeReconciliationV1,
-    feeItemsDelete, finstlbillslistAccBillByCorp,
+    generateFinStlBillsV1C,
+    revokeGenerateFinStlBillsV1C,
+    generateFinStlBillsV1D,
+    revokeGenerateFinStlBillsV1D,
+    finstlbillsSubmit,
+    feeItemsSynchronize,
+    confirmSettlementV1,
+    revokeSettlementV1,
+    feeItemsDelete,
+    finstlbillslistAccBillByCorp,
 } from '@/api/iosBasicData/finstlbills'
 import expand from "@/components/basic-container/expand.vue";
 import finstlbillsitems from "@/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue";
@@ -262,7 +281,8 @@ export default {
             form: {
                 branchId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
                 branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
-                billDate: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00:00', // 对账日期 默认 当天
+                billDate: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00:00', // 结算日期 默认 当天
+                isExchangeToCny: '0',
                 finStlBillsItemsList: [],
                 fileList: []
             },
@@ -289,16 +309,17 @@ export default {
                         disabled: false
                     },
                     {
-                        label: '对账单位',
+                        label: '结算单位',
                         prop: 'corpCnName',
                         disabled: false
                     },
                     {
-                        label: '对账日期',
+                        label: '结算日期',
                         prop: 'billDate',
                         type: "date",
                         format: "yyyy-MM-dd",
                         valueFormat: "yyyy-MM-dd 00:00:00",
+                        span: 16,
                         rules: [{
                             required: true,
                             message: " ",
@@ -307,6 +328,13 @@ export default {
                         disabled: false
                     },
                     {
+                        label: "转换成本币",
+                        prop: "isExchangeToCny",
+                        span: 8,
+                        labelWidth: 80,
+                        disabled: false
+                    },
+                    {
                         label: '单据编号',
                         prop: 'billNo',
                         disabled: true
@@ -368,7 +396,7 @@ export default {
                         overHidden: true
                     },
                     {
-                        label: "对账金额",
+                        label: "结算金额",
                         prop: "currentStlAmount",
                         width: 100,
                         overHidden: true
@@ -719,8 +747,8 @@ export default {
         }
     },
     async created() {
-        this.option = await this.getColumnData(this.getColumnName(492), this.optionBack);
-        this.option2 = await this.getColumnData(this.getColumnName(520), this.optionBack2);
+        this.option = await this.getColumnData(this.getColumnName(528), this.optionBack);
+        this.option2 = await this.getColumnData(this.getColumnName(527), this.optionBack2);
         this.saveLocalCurrency(JSON.parse(localStorage.getItem('sysitemData')).deptId)
         if (this.detailData && this.detailData.id) {
             this.editButton = true
@@ -735,9 +763,19 @@ export default {
     methods: {
         inEdit() {
             this.editButton = false
-            if (this.form.billStatus == 1) return
+            if (this.form.status == 1 || this.form.status == 3) return
             this.editDisabled = false
             this.optionForm.disabled = false
+            if (this.form.requestNo) {
+                this.editDisabled = true
+                this.optionForm.column.forEach(item => {
+                    if (item.prop == 'billDate') {
+                        item.disabled = false
+                    } else {
+                        item.disabled = true
+                    }
+                })
+            }
         },
         lastPage() {
             if (this.pageIds.length) {
@@ -826,7 +864,7 @@ export default {
                 this.finstlbillslistAccBillByCorpfun()
             } else {
                 if (!this.form.corpId) {
-                    return this.$message.error('请填写对账单位')
+                    return this.$message.error('请填写结算单位')
                 }
                 this.finstlbillslistAccBillV1fun()
             }
@@ -858,7 +896,7 @@ export default {
                 let obj = {
                     id: this.form.id,
                     finAccBillsVOList: itemData,
-                    type: 1
+                    type: 3
                 }
                 const loading = this.$loading({
                     lock: true,
@@ -878,7 +916,7 @@ export default {
                 let obj = {
                     id: this.form.id,
                     finAccBillsVOList: this.itemSelectionList,
-                    type: 1
+                    type: 3
                 }
                 const loading = this.$loading({
                     lock: true,
@@ -903,25 +941,25 @@ export default {
                     loading.close();
                 })
             }
-            if (name == '确认对账') {
+            if (name == '确认结算') {
                 this.$refs.form.validate((valid, done) => {
                     done()
                     if (!valid) return
-                    // 对账单位
+                    // 结算单位
                     if (!this.form.corpId) {
-                        return this.$message.error('请选择对账单位');
+                        return this.$message.error('请选择结算单位');
 
                     }
-                    this.form.billNoFormat = 'HYDZ'
-                    this.form.businessTypeCode = 'HYDZ'
-                    this.form.businessType = 'CHK' // 对账
-                    this.form.url = '/iosBasicData/financialManagement/finstlbills/index'
-                    this.form.pageStatus = "this.$store.getters.paidapplication"
-                    this.form.pageLabel = "对账中心(N)"
+                    this.form.billNoFormat = 'STL'
+                    this.form.businessTypeCode = 'STL'
+                    this.form.businessType = 'STL' // 结算
+                    this.form.url = '/iosBasicData/financialManagement/computationCenter/index'
+                    this.form.pageStatus = "this.$store.getters.SettlementCenterF"
+                    this.form.pageLabel = "结算中心(N)"
                     let obj = {
                         ...this.form
                     }
-                    this.$confirm('是否确认对账?', '提示', {
+                    this.$confirm('是否确认结算?', '提示', {
                         confirmButtonText: '确定',
                         cancelButtonText: '取消',
                         type: 'warning'
@@ -932,7 +970,7 @@ export default {
                             spinner: 'el-icon-loading',
                             background: 'rgba(255,255,255,0.7)'
                         });
-                        confirmReconciliationV1(obj).then(res => {
+                        confirmSettlementV1(obj).then(res => {
                             this.getDetail(res.data.data.id)
                         }).finally(() => {
                             loading.close();
@@ -941,22 +979,22 @@ export default {
 
                 });
             }
-            if (name == '撤销对账') {
+            if (name == '撤销结算') {
                 this.$refs.form.validate((valid, done) => {
                     done()
                     if (!valid) return
-                    // 对账单位
+                    // 结算单位
                     if (!this.form.corpId) {
-                        return this.$message.error('请选择对账单位');
+                        return this.$message.error('请选择结算单位');
 
                     }
-                    this.form.billNoFormat = 'HYDZ'
-                    this.form.businessTypeCode = 'HYDZ'
-                    this.form.businessType = 'CHK' // 对账
+                    this.form.billNoFormat = 'STL'
+                    this.form.businessTypeCode = 'STL'
+                    this.form.businessType = 'STL' // 结算
                     let obj = {
                         ...this.form
                     }
-                    this.$confirm('是否撤销对账?', '提示', {
+                    this.$confirm('是否撤销结算?', '提示', {
                         confirmButtonText: '确定',
                         cancelButtonText: '取消',
                         type: 'warning'
@@ -967,7 +1005,7 @@ export default {
                             spinner: 'el-icon-loading',
                             background: 'rgba(255,255,255,0.7)'
                         });
-                        revokeReconciliationV1(obj).then(res => {
+                        revokeSettlementV1(obj).then(res => {
                             this.getDetail(res.data.data.id)
                         }).finally(() => {
                             loading.close();
@@ -976,6 +1014,61 @@ export default {
 
                 });
             }
+            if (name == '撤销生成') {
+                let obj = {
+                    billId: this.form.id
+                }
+                if (this.form.dc == 'C') {
+                    const loading = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    revokeGenerateFinStlBillsV1C(obj).then(res => {
+                        if (this.editButton == false) {
+                            this.editDisabled = false
+                            this.optionForm.disabled = false
+                        }
+                        this.optionForm.column.forEach(item => {
+                            if (item.prop == 'billNo') {
+                                item.disabled = true
+                            } else {
+                                item.disabled = false
+                            }
+                        })
+                        this.form = res.data.data
+                        this.getDetail(this.form.id)
+                    }).finally(() => {
+                        loading.close();
+                    })
+                }
+                if (this.form.dc == 'D') {
+                    const loading = this.$loading({
+                        lock: true,
+                        text: '加载中',
+                        spinner: 'el-icon-loading',
+                        background: 'rgba(255,255,255,0.7)'
+                    });
+                    revokeGenerateFinStlBillsV1D(obj).then(res => {
+                        if (this.editButton == false) {
+                            this.editDisabled = false
+                            this.optionForm.disabled = false
+                        }
+                        this.optionForm.column.forEach(item => {
+                            if (item.prop == 'billNo') {
+                                item.disabled = true
+                            } else {
+                                item.disabled = false
+                            }
+                        })
+                        this.form = res.data.data
+                        this.getDetail(this.form.id)
+                    }).finally(() => {
+                        loading.close();
+                    })
+                }
+            }
         },
         armbChange(row) {
             if (Number(row.reconciliationCurrentAmountOriginal) > 0) {
@@ -984,7 +1077,7 @@ export default {
                         row.reconciliationCurrentAmount = Number(row.reconciliationCurrentAmountOriginal)
                     })
 
-                    return this.$message.error("本次对账金额不能超过未对账金额");
+                    return this.$message.error("本次结算金额不能超过未结算金额");
                 }
             }
             if (Number(row.reconciliationCurrentAmountOriginal) < 0) {
@@ -992,7 +1085,7 @@ export default {
                     this.$nextTick(() => {
                         row.reconciliationCurrentAmount = Number(row.reconciliationCurrentAmountOriginal)
                     })
-                    return this.$message.error("本次对账金额不能超过未对账金额");
+                    return this.$message.error("本次结算金额不能超过未结算金额");
                 }
             }
         },
@@ -1030,7 +1123,7 @@ export default {
                 billId: this.form.id,
                 reportCode: val.classifyCode,
                 groupCode: val.groupCode,
-                type: 'DZZX'
+                type: 'JSZX'
             }).then(res => {
                 this.handleReportPreview(val.url, res.data.data.data)
             })
@@ -1038,7 +1131,7 @@ export default {
         // 报表预览
         previewreportfun() {
             getreportsList(1, 10, {
-                businessType: 'DZZX',
+                businessType: 'JSZX',
                 // classifyCode:'结算中心',
                 // groupCode:'付费结算'
             }).then(res => {
@@ -1053,7 +1146,7 @@ export default {
                     }
                     this.$nextTick(() => {
                         this.$refs.reportformsList.onLoad(page, {
-                            businessType: 'DZZX',
+                            businessType: 'JSZX',
                             // classifyCode:'结算中心',
                             // groupCode:'付费结算'
                         })
@@ -1068,14 +1161,14 @@ export default {
             this.$refs.form.validate((valid, done) => {
                 done()
                 if (!valid) return
-                // 对账单位
-                if (!this.form.corpId) {
-                    return this.$message.error('请选择对账单位');
+                // 结算单位
+                // if (!this.form.corpId) {
+                //     return this.$message.error('请选择结算单位');
 
-                }
-                this.form.billNoFormat = 'HYDZ'
-                this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'CHK' // 对账
+                // }
+                this.form.billNoFormat = 'STL'
+                this.form.businessTypeCode = 'STL'
+                this.form.businessType = 'STL' // 结算
                 let obj = {
                     ...this.form
                 }
@@ -1093,6 +1186,32 @@ export default {
             });
 
         },
+        generateFinStlBills(ids, row, dc) {
+            let obj = {
+                billId: ids,
+                ...row
+            }
+            const loading = this.$loading({
+                lock: true,
+                text: '加载中',
+                spinner: 'el-icon-loading',
+                background: 'rgba(255,255,255,0.7)'
+            });
+            if (dc == 'C') {
+                generateFinStlBillsV1C(obj).then(res => {
+                    this.getDetail(res.data.data.id)
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+            if (dc == 'D') {
+                generateFinStlBillsV1D(obj).then(res => {
+                    this.getDetail(res.data.data.id)
+                }).finally(() => {
+                    loading.close();
+                })
+            }
+        },
         // 详情接口
         getDetail(id, type) {
             const loading = this.$loading({
@@ -1102,15 +1221,25 @@ export default {
                 background: 'rgba(255,255,255,0.7)'
             });
             finstlbillsDetail(id).then(res => {
-                if (res.data.data.billStatus == 1) {
+                if (res.data.data.status == 1 || res.data.data.status == 3) {
                     this.editButton = true
                     this.editDisabled = true
                     this.optionForm.disabled = true
                 }
-                if (res.data.data.billStatus == 0 && this.editButton == false) {
+                if (!(res.data.data.status == 1 || res.data.data.status == 3) && this.editButton == false) {
                     this.editDisabled = false
                     this.optionForm.disabled = false
                 }
+                if (res.data.data.requestNo) {
+                    this.editDisabled = true
+                    this.optionForm.column.forEach(item => {
+                        if (item.prop == 'billDate') {
+                            item.disabled = false
+                        } else {
+                            item.disabled = true
+                        }
+                    })
+                }
                 this.form = res.data.data
                 this.page.total = res.data.data.finStlBillsItemsList.length
                 this.saveLocalCurrency(res.data.data.branchId)
@@ -1139,10 +1268,11 @@ export default {
             // delete this.form.id
             // let obj = JSON.parse(JSON.stringify(this.form))
             let obj = {}
-            obj.type = '1'
+            obj.type = '2'
             obj.branchId = this.form.branchId
             obj.branchName = this.form.branchName
-            obj.corpCnName = this.form.corpId // 对账单位
+            obj.corpCnName = this.form.corpId ? this.form.corpId : null
+            obj.isExchangeToCny = this.form.isExchangeToCny
             obj.dc = this.search.accountDc // 收付 D=收 C=付
             obj.curCode = this.search.curCode // 币别
             obj.mblno = this.search.mblno // MB/L NO
@@ -1160,10 +1290,11 @@ export default {
         // 检索接口
         finstlbillslistAccBillV1fun() {
             let obj = {}
-            obj.type = '1'
+            obj.type = '2'
             obj.branchId = this.form.branchId
             obj.branchName = this.form.branchName
-            obj.corpCnName = this.form.corpId // 对账单位
+            obj.corpCnName = this.form.corpId // 结算单位
+            obj.isExchangeToCny = this.form.isExchangeToCny
             obj.dc = this.search.accountDc // 收付 D=收 C=付
             obj.curCode = this.search.curCode // 币别
             obj.mblno = this.search.mblno // MB/L NO
@@ -1215,7 +1346,7 @@ export default {
                     let obj = {
                         id: this.form.id,
                         ids: arrIds.join(','),
-                        type: 1,
+                        type: 3,
                     }
                     const loading = this.$loading({
                         lock: true,
@@ -1243,7 +1374,7 @@ export default {
             let obj = {
                 id: this.form.id,
                 ids: ids.join(','),
-                type: 1,
+                type: 3,
             }
             const loading = this.$loading({
                 lock: true,

+ 87 - 11
src/views/iosBasicData/financialManagement/computationCenter/index.vue

@@ -68,8 +68,8 @@
             </avue-crud>
         </basic-container>
 
-        <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit" :pageIds="pageIds"
-            :key="datekey">
+        <detailsPage ref="details" v-if="!isShow" :detailData="detailData" @goBack="goBack" @toAddEdit="toAddEdit"
+            :pageIds="pageIds" :key="datekey">
         </detailsPage>
     </div>
 </template>
@@ -82,6 +82,7 @@ import settlementDetails from "@/views/iosBasicData/ComputationCenter/settlement
 import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
 import { bbusinesstypeList } from "@/api/iosBasicData/bbusinesstype";
 import dicSelect from "@/components/dicSelect/main";
+import { dateFormat } from "@/util/date";
 import detailsPage from "./detailsPage";
 export default {
     components: { detailsPage, dicSelect },
@@ -492,7 +493,7 @@ export default {
         // 选择结算
         chooseSettlement() {
             if (this.selectionList.length === 0) {
-                this.$message.warning("请选择至少一条数据");
+                this.$message.warning("请选择要结算的数据");
                 return;
             }
             for (let item of this.selectionList) {
@@ -516,13 +517,88 @@ export default {
                     this.$refs.settlementDetailsRef.generateFinStlBillsfun(arrId.join(','), this.tabsValue)
                 })
             })
+            this.$DialogForm.show({
+                title: '生成结算单',
+                width: '30%',
+                menuPosition: 'right',
+                data: {
+                    date: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00:00',
+                },
+                option: {
+                    submitText: '确定',
+                    emptyText: '取消',
+                    column: [
+                        {
+                            label: '结算日期',
+                            prop: 'date',
+                            span: 24,
+                            type: "date",
+                            format: "yyyy-MM-dd",
+                            valueFormat: "yyyy-MM-dd 00:00:00",
+                            rules: [{
+                                required: true,
+                                message: "请选择日期",
+                                trigger: "blur",
+                            }],
+                        },
+                    ]
+                },
+                beforeClose: (done) => {
+                    done()
+                },
+                callback: (res) => {
+                    res.done()
+                    let arrId = this.selectionList.map(item => {
+                        return item.id
+                    })
+                    this.isShow = false
+                    this.$nextTick(() => {
+                        this.$refs.details.generateFinStlBills(arrId.join(","), res.data, this.tabsValue)
+                    })
+                    res.close()
+                }
+            })
         },
         // 结算
         settlementfun(row) {
-            this.isShow = false
-            // this.editSave = true
-            this.$nextTick(() => {
-                this.$refs.settlementDetailsRef.generateFinStlBillsfun(row.id, this.tabsValue)
+            this.$DialogForm.show({
+                title: '生成结算单',
+                width: '30%',
+                menuPosition: 'right',
+                data: {
+                    date: dateFormat(new Date(), "yyyy-MM-dd") + ' 00:00:00',
+                },
+                option: {
+                    submitText: '确定',
+                    emptyText: '取消',
+                    column: [
+                        {
+                            label: '结算日期',
+                            prop: 'date',
+                            span: 24,
+                            type: "date",
+                            format: "yyyy-MM-dd",
+                            valueFormat: "yyyy-MM-dd 00:00:00",
+                            rules: [{
+                                required: true,
+                                message: "请选择日期",
+                                trigger: "blur",
+                            }],
+                        },
+                    ]
+                },
+                beforeClose: (done) => {
+                    done()
+                },
+                callback: (res) => {
+                    res.done()
+                    console.log(res.data)
+                    this.isShow = false
+                    this.$nextTick(() => {
+                        this.$refs.details.generateFinStlBills(row.id, res.data, this.tabsValue)
+                    })
+                    res.close()
+                }
             })
         },
         // 添加
@@ -547,7 +623,7 @@ export default {
                     });
                 } else {
                     this.$router.push({
-                        path: `/iosBasicData/PaymentApplication/index`,
+                        path: `/iosBasicData/financialManagement/PaymentApplication/index`,
                         query: {
                             id: row.id
                         }
@@ -564,7 +640,7 @@ export default {
                     });
                 } else {
                     this.$router.push({
-                        path: `/iosBasicData/fininvoicesOutput/index`,
+                        path: `/iosBasicData/financialManagement/fininvoicesOutput/index`,
                         query: {
                             id: row.id
                         }
@@ -595,7 +671,7 @@ export default {
                     });
                 } else {
                     this.$router.push({
-                        path: `/iosBasicData/PaymentApplication/index`,
+                        path: `/iosBasicData/financialManagement/PaymentApplication/index`,
                         query: {
                             id: row.id
                         }
@@ -611,7 +687,7 @@ export default {
                     });
                 } else {
                     this.$router.push({
-                        path: `/iosBasicData/fininvoicesOutput/index`,
+                        path: `/iosBasicData/financialManagement/fininvoicesOutput/index`,
                         query: {
                             id: row.id
                         }

+ 6 - 5
src/views/iosBasicData/financialManagement/fininvoicesApplyfor/detailsPage.vue

@@ -276,7 +276,7 @@ export default {
     },
     data() {
         return {
-            pageData2:[],
+            pageData2: [],
             submitType: true,
             sumDRMB: 0,
             sumCRMB: 0,
@@ -1169,12 +1169,13 @@ export default {
                 done()
                 if (!valid) return
                 // 结算单位
-                if (!this.form.corpId) {
-                    return this.$message.error('请选择结算单位');
+                // if (!this.form.corpId) {
+                //     return this.$message.error('请选择结算单位');
 
-                }
+                // }
                 this.form.billNoFormat = 'FPSQ'
                 this.form.businessTypeCode = 'FPSQ'
+                this.form.type = '申请'
                 let obj = {
                     ...this.form
                 }
@@ -1241,7 +1242,7 @@ export default {
             obj.type = '3'
             obj.branchId = this.form.branchId
             obj.branchName = this.form.branchName
-            obj.corpCnName = this.form.corpId // 结算单位
+            obj.corpCnName = this.form.corpId ? this.form.corpId : null
             obj.isExchangeToCny = this.form.isExchangeToCny
             obj.dc = this.search.accountDc // 收付 D=收 C=付
             obj.curCode = this.search.curCode // 币别

+ 5 - 4
src/views/iosBasicData/financialManagement/fininvoicesOutput/detailsPage.vue

@@ -1212,12 +1212,13 @@ export default {
                 done()
                 if (!valid) return
                 // 结算单位
-                if (!this.form.corpId) {
-                    return this.$message.error('请选择结算单位');
+                // if (!this.form.corpId) {
+                //     return this.$message.error('请选择结算单位');
 
-                }
+                // }
                 this.form.billNoFormat = 'XXFP'
                 this.form.businessTypeCode = 'XXFP'
+                this.form.type = '销项'
                 let obj = {
                     ...this.form
                 }
@@ -1312,7 +1313,7 @@ export default {
             obj.type = '3'
             obj.branchId = this.form.branchId
             obj.branchName = this.form.branchName
-            obj.corpCnName = this.form.corpId // 结算单位
+            obj.corpCnName = this.form.corpId ? this.form.corpId : null
             obj.isExchangeToCny = this.form.isExchangeToCny
             obj.dc = this.search.accountDc // 收付 D=收 C=付
             obj.curCode = this.search.curCode // 币别

+ 4 - 4
src/views/iosBasicData/financialManagement/finstlbills/detailsPage.vue

@@ -1069,10 +1069,10 @@ export default {
                 done()
                 if (!valid) return
                 // 对账单位
-                if (!this.form.corpId) {
-                    return this.$message.error('请选择对账单位');
+                // if (!this.form.corpId) {
+                //     return this.$message.error('请选择对账单位');
 
-                }
+                // }
                 this.form.billNoFormat = 'HYDZ'
                 this.form.businessTypeCode = 'HYDZ'
                 this.form.businessType = 'CHK' // 对账
@@ -1142,7 +1142,7 @@ export default {
             obj.type = '1'
             obj.branchId = this.form.branchId
             obj.branchName = this.form.branchName
-            obj.corpCnName = this.form.corpId // 对账单位
+            obj.corpCnName = this.form.corpId?this.form.corpId:null // 对账单位
             obj.dc = this.search.accountDc // 收付 D=收 C=付
             obj.curCode = this.search.curCode // 币别
             obj.mblno = this.search.mblno // MB/L NO