From 0e4a02944b08708a1cd7a9f78b944fc3f4f94f87 Mon Sep 17 00:00:00 2001 From: cclu <1106109051@qq.com> Date: Thu, 6 Jul 2023 19:02:49 +0800 Subject: [PATCH] update --- pages/projectWarning/detail.vue | 74 ++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 30 deletions(-) diff --git a/pages/projectWarning/detail.vue b/pages/projectWarning/detail.vue index 2ed3e16..ea3c00f 100644 --- a/pages/projectWarning/detail.vue +++ b/pages/projectWarning/detail.vue @@ -180,49 +180,63 @@ export default { }, // 暂不切换比例 handleNoChange(){ - uni.showLoading({ - title:'正在加载' - }) - this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{ - BusinessId: this.PROJECTWARNING_ID, // 预警记录内码 - StaffId:this.useDate.UserId,// 操作人内码 - StaffName:this.useDate.UserName,// 操作人名称 - SwitchRate:this.dataDetail.ROYALTY_RATE * 100,// 切换比例 - ApproveState:'9999',// 审批状态 - }).then(res=>{ - uni.hideLoading() - uni.showToast({ + uni.showModal({ + title: '是否同意暂不切换分润比例?', + success: function (res) { + if (res.confirm) { + uni.showLoading({ + title:'正在加载' + }) + this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{ + BusinessId: this.PROJECTWARNING_ID, // 预警记录内码 + StaffId:this.useDate.UserId,// 操作人内码 + StaffName:this.useDate.UserName,// 操作人名称 + SwitchRate:this.dataDetail.ROYALTY_RATE * 100,// 切换比例 + ApproveState:'9999',// 审批状态 + }).then(res=>{ + uni.hideLoading() + uni.showToast({ title: res.Result_Desc, icon: 'none' + }) + this.handleGetDetail() + uni.navigateBack({ + delta: 1 + }) }) - this.handleGetDetail() - uni.navigateBack({ - delta: 1 - }) - }) + } + } + }); }, // 切换比例 handleChange(){ - uni.showLoading({ - title:'正在加载' - }) + uni.showModal({ + title: '是否同意切换分润比例?', + success: function (res) { + if (res.confirm) { + uni.showLoading({ + title:'正在加载' + }) this.$request.$webGet('EShangApiMain/BusinessProject/ApproveProinst',{ - BusinessId: this.PROJECTWARNING_ID, // 预警记录内码 - StaffId:this.useDate.UserId,// 操作人内码 - StaffName:this.useDate.UserName,// 操作人名称 - SwitchRate:this.dataDetail.ROYALTY_CRATE,// 切换比例 - ApproveState:this.dataDetail.PROJECTWARNING_STATE===1000?'2000':'9000',// 审批状态 + BusinessId: this.PROJECTWARNING_ID, // 预警记录内码 + StaffId:this.useDate.UserId,// 操作人内码 + StaffName:this.useDate.UserName,// 操作人名称 + SwitchRate:this.dataDetail.ROYALTY_CRATE,// 切换比例 + ApproveState:this.dataDetail.PROJECTWARNING_STATE===1000?'2000':'9000',// 审批状态 }).then(res=>{ uni.hideLoading() if (this.dataDetail.PROJECTWARNING_STATE===1000){ this.handleBack() } - uni.showToast({ - title: res.Result_Desc, - icon: 'none' - }) - this.handleGetDetail() + uni.showToast({ + title: res.Result_Desc, + icon: 'none' + }) + this.handleGetDetail() }) + } + } + }); }, handleBack(){ if (this.type){