Commit 33f90100 by 李伟康

fix(financeManage): 修复二手车资金预警及支付管理中的加载状态与表单重置问题

- 在 usageLimitDialog 组件中,修复 visible 变更时未重置 oldVal 的问题
- 格式化 handleBlur 方法中的解构赋值语句
- 在 detailDialog 组件中,确保弹窗显示时正确重置 pushLoading 状态
- 优化 batchRepush 请求后的 loading 状态控制,避免状态滞留
- 补充异常处理,确保请求失败时 pushPayBillLoading 能够正确关闭
1 parent 4eea093e
...@@ -94,6 +94,7 @@ export default { ...@@ -94,6 +94,7 @@ export default {
visible: { visible: {
handler (val) { handler (val) {
if (val) { if (val) {
this.oldVal = ''
this.infoForm = this.$options.data.call(this).infoForm this.infoForm = this.$options.data.call(this).infoForm
this.$refs?.editRef?.resetFields() this.$refs?.editRef?.resetFields()
} }
...@@ -158,7 +159,7 @@ export default { ...@@ -158,7 +159,7 @@ export default {
}, },
methods: { methods: {
handleBlur (event) { handleBlur (event) {
let {usageLimit} = this.infoForm let { usageLimit } = this.infoForm
this.infoForm.usageLimit = usageLimit <= 0 ? '' : usageLimit this.infoForm.usageLimit = usageLimit <= 0 ? '' : usageLimit
}, },
handleUsageLimitNum (event) { handleUsageLimitNum (event) {
......
...@@ -124,6 +124,7 @@ export default { ...@@ -124,6 +124,7 @@ export default {
visible: { visible: {
handler (val) { handler (val) {
if (val) { if (val) {
this.pushLoading = false
this.loading = true this.loading = true
this.getDetail() this.getDetail()
} }
...@@ -280,6 +281,7 @@ export default { ...@@ -280,6 +281,7 @@ export default {
}).then(() => { }).then(() => {
const ids = [this.paramsObj.id] const ids = [this.paramsObj.id]
batchRepush({ idList: ids }).then(res => { batchRepush({ idList: ids }).then(res => {
this.pushLoading = false
this.notice.okTips() this.notice.okTips()
this.getDetail() this.getDetail()
this.refreshFlag = true this.refreshFlag = true
......
...@@ -544,14 +544,15 @@ export default { ...@@ -544,14 +544,15 @@ export default {
type: 'warning', type: 'warning',
closeOnClickModal: false closeOnClickModal: false
}).then(() => { }).then(() => {
this.pushPayBillLoading = false
batchRepush({ idList: ids }).then(res => { batchRepush({ idList: ids }).then(res => {
this.pushPayBillLoading = false
this.notice.okTips() this.notice.okTips()
this.$refs.usedCarPaymentManageTable.refreshTable() this.$refs.usedCarPaymentManageTable.refreshTable()
}).catch(err => {
this.pushPayBillLoading = false
}) })
}).catch(err => { }).catch(err => {
this.pushPayBillLoading = false this.pushPayBillLoading = false
console.log(err)
}) })
}, },
handleReceipt (row) { handleReceipt (row) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!