소스 검색

货代bug 2024-1-27

caojunjie 1 년 전
부모
커밋
2ae1d7c993

+ 65 - 42
src/views/iosBasicData/ComputationCenter/settlementDetails.vue

@@ -17,13 +17,13 @@
                             :loading="saveLoading" @click="finstlbillsRevokeSettlementfun">撤销结算
                 </el-button>
                 <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-else
-                            :loading="saveLoading" @click="finstlbillsConfirmSettlementfun">确认结算
+                            :loading="saveLoading" @click="editCustomer('结算')">确认结算
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px" :disabled="form.isCleared == 1" v-if="editSave"
                             :loading="saveLoading" @click="editHandle">编 辑
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px" :disabled="form.isCleared == 1" v-else
-                            :loading="saveLoading" @click="editCustomer">保 存
+                            :loading="saveLoading" @click="editCustomer()">保 存
                 </el-button>
             </div>
         </div>
@@ -653,7 +653,7 @@ export default {
             this.editSave = false
         },
         // 保存
-        editCustomer(){
+        editCustomer(type){
             this.$refs.form.validate((valid) => {
                 if (!valid) return
                 if (!this.form.id) {
@@ -684,25 +684,52 @@ export default {
                 this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
 
                 this.form.settlementType = this.settlementType
-                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                    if (item.currentStlCurCode == 'CNY') {
-                        item.currentStlAmount = item.currentStlAmountRMB
-                    }else {
-                        item.currentStlAmount = item.currentStlAmountUSD
-                    }
-                    if (!this.form.id) {
-                        delete item.businessType
-                        delete item.billDate
-                        delete item.accountDc
-                    }
-                    return item
-                })
-                finstlbillsSubmit(this.form).then(res=>{
-                    this.saveLoading = false
-                    this.$message.success('操作成功');
-                    this.saveLoading = false // 关闭按钮动画
-                    this.finstlbillsDetailfun(res.data.data.id)
-                })
+                if (this.form.id) {
+                    this.form.finStlBillsItemsList = this.form.finStlBillsItemsList.map((item,index)=>{
+                        if (item.currentStlCurCode == 'CNY') {
+                            item.currentStlAmount = item.currentStlAmountRMB
+                        }else {
+                            item.currentStlAmount = item.currentStlAmountUSD
+                        }
+                        return item
+                    })
+                }else {
+                    this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
+                        if (item.currentStlCurCode == 'CNY') {
+                            item.currentStlAmount = item.currentStlAmountRMB
+                        }else {
+                            item.currentStlAmount = item.currentStlAmountUSD
+                        }
+                        if (!this.form.id) {
+                            delete item.businessType
+                            delete item.billDate
+                            delete item.accountDc
+                        }
+                        return item
+                    })
+                }
+                // 判断是结算还是保存
+                if (type == '结算') {
+                    this.$confirm("确定进行结算操作?", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    }).then(()=>{
+                        finstlbillsSubmit(this.form).then(res=>{
+                            this.form = res.data.data
+                            this.finstlbillsConfirmSettlementfun()
+                        })
+                    }).catch(()=>{
+                        this.saveLoading = false // 关闭按钮动画
+                    })
+
+                }else {
+                    finstlbillsSubmit(this.form).then(res=>{
+                        this.$message.success('操作成功');
+                        this.saveLoading = false // 关闭按钮动画
+                        this.finstlbillsDetailfun(res.data.data.id)
+                    })
+                }
             })
         },
         // 详情接口
@@ -1008,28 +1035,24 @@ export default {
         },
         // 结算确认
         finstlbillsConfirmSettlementfun(){
-            this.$confirm("确定进行结算操作?", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(()=>{
-                this.pageLoading = true
-                this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
-                this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null // 财务开始日期
-                this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null // 财务开始日期
-                this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
-                this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
+            this.pageLoading = true
+            this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
+            this.form.businessDateStart = this.form.businessDateStart?this.form.businessDateStart.slice(0,10) + ' 00:00:00':null // 财务开始日期
+            this.form.businessDateEnd = this.form.businessDateEnd?this.form.businessDateEnd.slice(0,10) + ' 00:00:00':null // 财务开始日期
+            this.form.billDate = this.form.billDate?this.form.billDate.slice(0,10) + ' 00:00:00':null
+            this.form.auditDateTo = this.form.auditDateTo?this.form.auditDateTo.slice(0,10) + ' 00:00:00':null
 
-                this.form.url = '/iosBasicData/ComputationCenter/index',
+            this.form.url = '/iosBasicData/ComputationCenter/index',
                 this.form.pageStatus = "this.$store.getters.SettlementCenterF"
-                this.form.pageLabel = "结算中心(F)"
-                finstlbillsConfirmSettlement(this.form).then(res=>{
-                    this.pageLoading = false
-                    this.$message.success('操作成功');
-                    this.finstlbillsDetailfun(res.data.data.id)
-                }).catch(err=>{
-                    this.pageLoading = false
-                })
+            this.form.pageLabel = "结算中心(F)"
+            finstlbillsConfirmSettlement(this.form).then(res=>{
+                this.pageLoading = false
+                this.saveLoading = false
+                this.$message.success('操作成功');
+                this.finstlbillsDetailfun(res.data.data.id)
+            }).catch(err=>{
+                this.pageLoading = false
+                this.saveLoading = false
             })
         },
         // 结算撤销

+ 27 - 13
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -766,19 +766,30 @@
                     this.form.businessTypeCode = 'FFSQ'
                     this.form.businessType = 'FFSQ' // 结算单
                     this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):'' // 业务类型
-                    this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                        if (item.currentStlCurCode == 'CNY') {
-                            item.currentStlAmount = item.currentStlAmountRMB
-                        }else {
-                            item.currentStlAmount = item.currentStlAmountUSD
-                        }
-                        if (!this.form.id) {
-                            delete item.businessType
-                            delete item.billDate
-                            delete item.accountDc
-                        }
-                        return item
-                    })
+                    if (this.form.id) {
+                        this.form.finStlBillsItemsList = this.form.finStlBillsItemsList.map((item,index)=>{
+                            if (item.currentStlCurCode == 'CNY') {
+                                item.currentStlAmount = item.currentStlAmountRMB
+                            }else {
+                                item.currentStlAmount = item.currentStlAmountUSD
+                            }
+                            return item
+                        })
+                    }else {
+                        this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
+                            if (item.currentStlCurCode == 'CNY') {
+                                item.currentStlAmount = item.currentStlAmountRMB
+                            }else {
+                                item.currentStlAmount = item.currentStlAmountUSD
+                            }
+                            if (!this.form.id) {
+                                delete item.businessType
+                                delete item.billDate
+                                delete item.accountDc
+                            }
+                            return item
+                        })
+                    }
                     // 判断是直接保存还是提交申请
                     if (type == '申请') {
                         this.$confirm("确定进行申请操作?", {
@@ -1037,13 +1048,16 @@
                 this.form.url = '/iosBasicData/PaymentApplication/index',
                     this.form.pageStatus = "this.$store.getters.paidapplication"
                 this.form.pageLabel = "付费申请(F)"
+                console.log(this.form,1056)
                 settlementApprove(this.form).then(res=>{
                     this.pageLoading = false
+                    this.saveLoading = false
                     this.$message.success('操作成功');
                     this.editSave = true
                     this.finstlbillsDetailfun(res.data.data.id)
                 }).catch(err=>{
                     this.pageLoading = false
+                    this.saveLoading = false
                 })
             },
             // 结算撤销

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

@@ -1531,7 +1531,6 @@
                 // 判断必填项
                 let sum = '请输入'
                 for (let item of selectionArr) {
-                    console.log(item,1339)
                     if (!item.id) {
                         this.$message.warning(`序号${item.$index + 1}请先保存再进行生成账单`)
                         return
@@ -1565,16 +1564,12 @@
                     let billList = []
                     if (dc == 'D') {
                         for(let item of this.selectionDList) {
-                            if (item.accStatus == 0){
-                                billList.push(item)
-                            }
+                            billList.push(item)
                         }
                         this.finaccbillsGenerateBillfun(billList)
                     }else {
                         for(let item of this.selectionCList) {
-                            if (item.accStatus == 0){
-                                billList.push(item)
-                            }
+                            billList.push(item)
                         }
                         this.finaccbillsGenerateBillfun(billList)
                     }
@@ -1590,16 +1585,12 @@
                     let billList = []
                     if (dc == 'D') {
                         for(let item of this.selectionDList) {
-                            if (item.accStatus == 1){
-                                billList.push(item)
-                            }
+                            billList.push(item)
                         }
                         this.finaccbillsRevokeBillfun(billList)
                     }else {
                         for(let item of this.selectionCList) {
-                            if (item.accStatus == 1){
-                                billList.push(item)
-                            }
+                            billList.push(item)
                         }
                         this.finaccbillsRevokeBillfun(billList)
                     }

+ 48 - 26
src/views/iosBasicData/fininvoices/fininvoicesDetails.vue

@@ -11,13 +11,13 @@
                             :loading="saveLoading" @click="fininvoicesRevokeFinInvoicesfun">撤销开票
                 </el-button>
                 <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-else
-                            :loading="saveLoading" @click="fininvoicesConfirmFinInvoicesfun">确认开票
+                            :loading="saveLoading" @click="editCustomer('开票')">确认开票
                 </el-button>
                 <el-button  size="small" type="primary" :disabled="statusType" style="margin-right: 8px" v-if="editSave"
                             :loading="saveLoading" @click="editHandle">编 辑
                 </el-button>
                 <el-button  size="small" type="primary" :disabled="statusType" style="margin-right: 8px" v-else
-                            :loading="saveLoading" @click="editCustomer">保 存
+                            :loading="saveLoading" @click="editCustomer()">保 存
                 </el-button>
             </div>
         </div>
@@ -998,7 +998,7 @@ export default {
             this.editSave = false
         },
         // 保存按钮事件
-        editCustomer(){
+        editCustomer(type){
             this.$refs.form.validate((valid) => {
                 if (!valid) return
                 if (!this.form.id) {
@@ -1023,17 +1023,43 @@ export default {
                 if (this.form.accountDateTo) {
                     this.form.accountDateTo = this.form.accountDateTo.slice(0,10) + ' 00:00:00'
                 }
-                this.form.finInvoicesItemsList = this.handleSelectionData.map(item=>{
-                    if (item.currentCurCode == 'CNY') {
-                        item.currentAmount = item.currentAmountCNY
-                    }else {
-                        item.currentAmount = item.currentAmountUSD
-                    }
-                    return item
-                })
+                if (this.form.id) {
+                    this.form.finInvoicesItemsList = this.form.finInvoicesItemsList.map(item=>{
+                        if (item.currentCurCode == 'CNY') {
+                            item.currentAmount = item.currentAmountCNY
+                        }else {
+                            item.currentAmount = item.currentAmountUSD
+                        }
+                        return item
+                    })
+                }else {
+                    this.form.finInvoicesItemsList = this.handleSelectionData.map(item=>{
+                        if (item.currentCurCode == 'CNY') {
+                            item.currentAmount = item.currentAmountCNY
+                        }else {
+                            item.currentAmount = item.currentAmountUSD
+                        }
+                        return item
+                    })
+                }
                 this.form.finInvoiceItemDetailList = this.InvoicingList
                 this.saveLoading = true
-                this.fininvoicesSubmitfun(this.form)
+                if (type == '开票') {
+                    this.$confirm("确定进行确认开票操作?", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    }).then(()=>{
+                        fininvoicesSubmit(this.form).then(res=>{
+                            this.form = res.data.data
+                            this.fininvoicesConfirmFinInvoicesfun()
+                        })
+                    }).catch(()=>{
+                        this.saveLoading = false
+                    })
+                }else {
+                    this.fininvoicesSubmitfun(this.form)
+                }
             })
         },
         // 检索
@@ -1210,20 +1236,16 @@ export default {
         },
         // 确认申请
         fininvoicesConfirmFinInvoicesfun(){
-            this.$confirm("确定进行确认开票操作?", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(res=>{
-                this.pageLoading = true
-                this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):''
-                fininvoicesConfirmFinInvoices(this.form).then(res=>{
-                    this.pageLoading = false
-                    this.$message.success('操作成功');
-                    this.fininvoicesDetailfun(res.data.data.id)
-                }).catch(err=>{
-                    this.pageLoading = false
-                })
+            this.pageLoading = true
+            this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):''
+            fininvoicesConfirmFinInvoices(this.form).then(res=>{
+                this.pageLoading = false
+                this.saveLoading = false
+                this.$message.success('操作成功');
+                this.fininvoicesDetailfun(res.data.data.id)
+            }).catch(err=>{
+                this.pageLoading = false
+                this.saveLoading = false
             })
         },
         // 撤销申请

+ 49 - 27
src/views/iosBasicData/fininvoicesApplyfor/fininvoicesDetails.vue

@@ -17,13 +17,13 @@
                             :loading="saveLoading" @click="revokeFinInvoicesApprovefun">撤销
                 </el-button>
                 <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-else
-                            :loading="saveLoading" @click="finInvoicesApprovefun">提交
+                            :loading="saveLoading" @click="editCustomer('提交')">提交
                 </el-button>
                 <el-button  size="small" type="primary" :disabled="statusType" style="margin-right: 8px" v-if="editSave"
                             :loading="saveLoading" @click="editHandle">编 辑
                 </el-button>
                 <el-button  size="small" type="primary" :disabled="statusType" style="margin-right: 8px" v-else
-                            :loading="saveLoading" @click="editCustomer">保 存
+                            :loading="saveLoading" @click="editCustomer()">保 存
                 </el-button>
             </div>
         </div>
@@ -1057,7 +1057,7 @@ export default {
                 this.editSave = false
             },
             // 保存按钮事件
-            editCustomer(){
+            editCustomer(type){
                 this.$refs.form.validate((valid) => {
                     if (!valid) return
                     if (!this.form.id) {
@@ -1082,17 +1082,43 @@ export default {
                     if (this.form.accountDateTo) {
                         this.form.accountDateTo = this.form.accountDateTo.slice(0,10) + ' 00:00:00'
                     }
-                    this.form.finInvoicesItemsList = this.handleSelectionData.map(item=>{
-                        if (item.currentCurCode == 'CNY') {
-                            item.currentAmount = item.currentAmountCNY
-                        }else {
-                            item.currentAmount = item.currentAmountUSD
-                        }
-                        return item
-                    })
+                    if (this.form.id) {
+                        this.form.finInvoicesItemsList = this.form.finInvoicesItemsList.map(item=>{
+                            if (item.currentCurCode == 'CNY') {
+                                item.currentAmount = item.currentAmountCNY
+                            }else {
+                                item.currentAmount = item.currentAmountUSD
+                            }
+                            return item
+                        })
+                    }else {
+                        this.form.finInvoicesItemsList = this.handleSelectionData.map(item=>{
+                            if (item.currentCurCode == 'CNY') {
+                                item.currentAmount = item.currentAmountCNY
+                            }else {
+                                item.currentAmount = item.currentAmountUSD
+                            }
+                            return item
+                        })
+                    }
                     this.form.finInvoiceItemDetailList = this.InvoicingList
                     this.saveLoading = true
-                    this.fininvoicesSubmitfun(this.form)
+                    if (type == '提交') {
+                        this.$confirm("确定进行发票申请操作?", {
+                            confirmButtonText: "确定",
+                            cancelButtonText: "取消",
+                            type: "warning"
+                        }).then(()=>{
+                            fininvoicesSubmit(this.form).then(res=>{
+                                this.form = res.data.data
+                                this.finInvoicesApprovefun()
+                            })
+                        }).catch(()=>{
+                            this.saveLoading = false
+                        })
+                    }else {
+                        this.fininvoicesSubmitfun(this.form)
+                    }
                 })
             },
             // 检索
@@ -1243,21 +1269,17 @@ export default {
             },
             // 确认申请
             finInvoicesApprovefun(){
-                this.$confirm("确定进行发票申请操作?", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning"
-                }).then(res=>{
-                    this.pageLoading = true
-                    this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):''
-                    finInvoicesApprove(this.form).then(res=>{
-                        this.pageLoading = false
-                        this.$message.success('操作成功');
-                        this.fininvoicesDetailfun(res.data.data.id)
-                        this.editSave = true // 提交之后编辑按钮显示出来
-                    }).catch(err=>{
-                        this.pageLoading = false
-                    })
+                this.pageLoading = true
+                this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):''
+                finInvoicesApprove(this.form).then(res=>{
+                    this.pageLoading = false
+                    this.saveLoading = false
+                    this.$message.success('操作成功');
+                    this.fininvoicesDetailfun(res.data.data.id)
+                    this.editSave = true // 提交之后编辑按钮显示出来
+                }).catch(err=>{
+                    this.pageLoading = false
+                    this.saveLoading = false
                 })
             },
             // 撤销申请

+ 46 - 26
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -11,13 +11,13 @@
                             :loading="saveLoading" @click="fininvoicesRevokeFinInvoicesfun">撤销开票
                 </el-button>
                 <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-else
-                            :loading="saveLoading" @click="fininvoicesConfirmFinInvoicesfun">确认开票
+                            :loading="saveLoading" @click="editCustomer('开票')">确认开票
                 </el-button>
                 <el-button  size="small" type="primary" :disabled="statusType" style="margin-right: 8px" v-if="editSave"
                             :loading="saveLoading" @click="editHandle">编 辑
                 </el-button>
                 <el-button  size="small" type="primary" :disabled="statusType" style="margin-right: 8px" v-else
-                            :loading="saveLoading" @click="editCustomer">保 存
+                            :loading="saveLoading" @click="editCustomer()">保 存
                 </el-button>
             </div>
         </div>
@@ -998,7 +998,7 @@ export default {
             this.editSave = false
         },
         // 保存按钮事件
-        editCustomer(){
+        editCustomer(type){
             this.$refs.form.validate((valid) => {
                 if (!valid) return
                 if (!this.form.id) {
@@ -1023,17 +1023,41 @@ export default {
                 if (this.form.accountDateTo) {
                     this.form.accountDateTo = this.form.accountDateTo.slice(0,10) + ' 00:00:00'
                 }
-                this.form.finInvoicesItemsList = this.handleSelectionData.map(item=>{
-                    if (item.currentCurCode == 'CNY') {
-                        item.currentAmount = item.currentAmountCNY
-                    }else {
-                        item.currentAmount = item.currentAmountUSD
-                    }
-                    return item
-                })
+                if (this.form.id) {
+                    this.form.finInvoicesItemsList = this.form.finInvoicesItemsList.map(item=>{
+                        if (item.currentCurCode == 'CNY') {
+                            item.currentAmount = item.currentAmountCNY
+                        }else {
+                            item.currentAmount = item.currentAmountUSD
+                        }
+                        return item
+                    })
+                }else {
+                    this.form.finInvoicesItemsList = this.handleSelectionData.map(item=>{
+                        if (item.currentCurCode == 'CNY') {
+                            item.currentAmount = item.currentAmountCNY
+                        }else {
+                            item.currentAmount = item.currentAmountUSD
+                        }
+                        return item
+                    })
+                }
                 this.form.finInvoiceItemDetailList = this.InvoicingList
                 this.saveLoading = true
-                this.fininvoicesSubmitfun(this.form)
+                if (type == '开票') {
+                    this.$confirm("确定进行确认开票操作?", {
+                        confirmButtonText: "确定",
+                        cancelButtonText: "取消",
+                        type: "warning"
+                    }).then(()=>{
+                        fininvoicesSubmit(this.form).then(res=>{
+                            this.form = res.data.data
+                            this.fininvoicesConfirmFinInvoicesfun()
+                        })
+                    })
+                }else {
+                    this.fininvoicesSubmitfun(this.form)
+                }
             })
         },
         // 检索
@@ -1210,20 +1234,16 @@ export default {
         },
         // 确认申请
         fininvoicesConfirmFinInvoicesfun(){
-            this.$confirm("确定进行确认开票操作?", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(res=>{
-                this.pageLoading = true
-                this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):''
-                fininvoicesConfirmFinInvoices(this.form).then(res=>{
-                    this.pageLoading = false
-                    this.$message.success('操作成功');
-                    this.fininvoicesDetailfun(res.data.data.id)
-                }).catch(err=>{
-                    this.pageLoading = false
-                })
+            this.pageLoading = true
+            this.saveLoading = false
+            this.form.businessTypes = this.form.businessTypes?this.form.businessTypes.join(','):''
+            fininvoicesConfirmFinInvoices(this.form).then(res=>{
+                this.pageLoading = false
+                this.$message.success('操作成功');
+                this.fininvoicesDetailfun(res.data.data.id)
+            }).catch(err=>{
+                this.pageLoading = false
+                this.saveLoading = false
             })
         },
         // 撤销申请