|
@@ -11,16 +11,18 @@
|
|
|
size="small"
|
|
|
@click="editHandle"
|
|
|
v-if="editDisable"
|
|
|
+ :loading="buttonLoading"
|
|
|
>编 辑</el-button>
|
|
|
<el-button type="primary"
|
|
|
size="small"
|
|
|
:disabled="!form.id || editDisable"
|
|
|
@click="postMessage"
|
|
|
+ :loading="buttonLoading"
|
|
|
>发送消息</el-button>
|
|
|
<el-button type="warning"
|
|
|
size="small"
|
|
|
class="el-button--small-yh"
|
|
|
- :buttonLoading="buttonLoading"
|
|
|
+ :loading="buttonLoading"
|
|
|
:disabled="!form.id || editDisable"
|
|
|
@click.stop="confirmSettlement"
|
|
|
>{{financeDisabled?"收费":"撤销收费"}}
|
|
@@ -28,7 +30,7 @@
|
|
|
<el-button class="el-button--small-yh"
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
- :buttonLoading="buttonLoading"
|
|
|
+ :loading="buttonLoading"
|
|
|
:disabled="!financeDisabled || editDisable"
|
|
|
@click.stop="saveSettlement"
|
|
|
>保存数据
|
|
@@ -609,7 +611,7 @@
|
|
|
if (!this.form.corpId) return this.$message.error('往来单位不能为空')
|
|
|
this.$refs["form"].validate((valid,done) => {
|
|
|
done();
|
|
|
- if(valid && this.verificationData()){
|
|
|
+ if(valid && this.verificationData('收费')){
|
|
|
this.$confirm("是否确认" + (this.financeDisabled? '收费': '撤销收费'), "提示", {
|
|
|
confirmButtonText: "确认",
|
|
|
cancelButtonText: "取消",
|
|
@@ -669,7 +671,7 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- saveSettlement(){
|
|
|
+ saveSettlement(type){
|
|
|
this.$refs["form"].validate((valid,done) => {
|
|
|
done();
|
|
|
if(valid){
|
|
@@ -695,13 +697,13 @@
|
|
|
this.$message.success("操作成功!")
|
|
|
// this.detailData.disabled = true
|
|
|
// this.editDisable = true
|
|
|
- this.afterEcho(res.data.data)
|
|
|
+ this.afterEcho(res.data.data, type)
|
|
|
}).finally(()=>{
|
|
|
this.buttonLoading = false
|
|
|
})
|
|
|
}})
|
|
|
},
|
|
|
- async afterEcho(data){
|
|
|
+ async afterEcho(data, type){
|
|
|
this.form = data;
|
|
|
this.financeDisabled = this.form.financeStatus === "待结算"?true:false;
|
|
|
// 溢付款余额获取
|
|
@@ -741,8 +743,11 @@
|
|
|
this.dataList = data.itemsList
|
|
|
this.oldDataList = this.deepClone(data.itemsList)
|
|
|
}
|
|
|
+ if (type == '收费') {
|
|
|
+ this.confirmSettlement()
|
|
|
+ }
|
|
|
},
|
|
|
- verificationData(){
|
|
|
+ verificationData(type){
|
|
|
if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
|
|
|
){
|
|
|
this.$confirm("数据发生变化,请先提交保存!", "提示", {
|
|
@@ -750,7 +755,7 @@
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
- this.saveSettlement()
|
|
|
+ this.saveSettlement(type)
|
|
|
}).catch(()=>{
|
|
|
return false
|
|
|
})
|