From 3621219f2a4d11ee6165fc7829bead8f9d18464a Mon Sep 17 00:00:00 2001 From: Lx <935448346@qq.com> Date: Thu, 25 Sep 2025 18:03:29 +0800 Subject: [PATCH] 0925 --- pages/process/dispatchAgentDriverExecute.vue | 100 ++++++++++++++++++- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/pages/process/dispatchAgentDriverExecute.vue b/pages/process/dispatchAgentDriverExecute.vue index f46dc2c..1c24278 100644 --- a/pages/process/dispatchAgentDriverExecute.vue +++ b/pages/process/dispatchAgentDriverExecute.vue @@ -1383,7 +1383,9 @@ console.log('123', this.detailsData && this.currentStepIndex >= 7 && (!this.detailsData.orderStatus || this.detailsData.orderStatus == 2)) return this.detailsData && this.currentStepIndex >= 7 && - (!this.detailsData.orderStatus || this.detailsData.orderStatus == 2); + (!this.detailsData.orderStatus || + this.detailsData.orderStatus == 2 || + this.detailsData.orderStatus == 4); } }, methods: { @@ -2990,7 +2992,97 @@ }, // 确认挂账按钮 - confirmCreditPayment() { + async confirmCreditPayment() { + if (!this.setMoney) { + uni.showToast({ + title: '请输入挂账金额', + icon: 'none' + }); + return; + } + + let autoRemarkTemp = '其中: 拖车费用 ' + this.towingFee + '元, 吊车费用 ' + this.craneFee + '元, 其他费用 ' + this + .otherFee + '元' + if (this.otherFeeRemark != '') { + autoRemarkTemp = autoRemarkTemp + ', 其他费用备注: ' + this.otherFeeRemark + ', ' + } else { + autoRemarkTemp = autoRemarkTemp + ', ' + } + + const oneData = { + autoRemark: autoRemarkTemp + '付款方式: 挂账, ' + '收款负责人: ' + this.selectedDispatcherName, + /* remark: this.creditRemark, + payType: 'qd', + orderSigningPersonId: this.selectedDispatcherId, + orderSigningPersonName: this.selectedDispatcherName, + orderStatus: '4', */ + } + this.getjine(oneData) + + let data = { + rescueInfoId: this.id, + title: '司机确认收款完成', + images: this.paymentImages.join(','), + remark: this.creditRemark, + }; + + try { + const res = await request({ + url: '/app/driver/uploadDetailByDriver', + method: 'post', + data: data + }); + + if (res.code == 200) { + this.ulImages = []; + this.remark = ''; + this.fileList1 = []; + this.selectedOption = ''; + uni.showToast({ + title: '提交成功', + icon: 'success', + duration: 2000 + }); + let orderData = { + id: this.detailsData.orderId, + isOnline: '0', + payRemark: this.creditRemark, + payImages: this.paymentImages.join(','), + payType: 'qd', + orderStatus: '4', + orderSigningPersonId: this.selectedDispatcherId, + orderSigningPersonName: this.selectedDispatcherName, + } + this.updateOrderInfo(orderData); + this.detailsData.feeType = '2' + this.confirmadd() + + // 确保在成功后再关闭弹框 + this.showCreditPopup = false; + this.resetPaymentUpload(); + this.cleanFee(); + // 刷新数据 + this.getrescueDetail(this.id); + + } else { + uni.showToast({ + title: '提交失败: ' + (res.msg || '未知错误'), + icon: 'none' + }); + } + } catch (error) { + console.error('提交失败:', error); + uni.showToast({ + title: '提交失败', + icon: 'none' + }); + + // 即使失败也要关闭弹框 + this.showCreditPopup = false; + this.resetPaymentUpload(); + } + }, + /* confirmCreditPayment() { if (!this.setMoney) { uni.showToast({ title: '请输入挂账金额', @@ -3021,7 +3113,7 @@ this.showFeePopup = false; this.resetPaymentUpload(); this.cleanFee(); - }, + }, */ // 支付凭证上传 async paymentAfterRead(event) { @@ -5157,4 +5249,4 @@ .no-data { color: #999; } - + \ No newline at end of file