|
@@ -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
|
|
|
})
|
|
|
},
|
|
|
// 结算撤销
|