新增功能 -- 合同申请之后弹窗提醒用户跳转页面输入信息
This commit is contained in:
parent
57cfbe00d7
commit
bb54f833d3
@ -139,3 +139,108 @@ page {
|
||||
padding: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
/* 自定义弹窗样式 */
|
||||
.custom-modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.custom-modal {
|
||||
width: 100%;
|
||||
max-width: 650rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding: 30rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
margin: 0;
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 40rpx;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
padding: 40rpx 30rpx;
|
||||
}
|
||||
|
||||
.modal-content p {
|
||||
margin: 0 0 30rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.link-container {
|
||||
background-color: #f5f5f5;
|
||||
padding: 20rpx;
|
||||
border-radius: 8rpx;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.link-text {
|
||||
color: #007aff;
|
||||
font-size: 26rpx;
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 0 30rpx 30rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
background-color: #007aff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
line-height: 80rpx;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
cursor: pointer;
|
||||
min-width: 200rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
|
||||
.confirm-btn2 {
|
||||
border: none;
|
||||
line-height: 80rpx;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
cursor: pointer;
|
||||
min-width: 200rpx;
|
||||
height: 80rpx;
|
||||
}
|
||||
@ -108,6 +108,22 @@
|
||||
<button type="button" class="submit-btn" @click="submitApplication">提交申请</button>
|
||||
</view>
|
||||
</form>
|
||||
|
||||
<!-- 自定义弹窗 -->
|
||||
<view v-if="showCustomModal" class="custom-modal-overlay" @click="closeModal">
|
||||
<view class="custom-modal" @click.stop>
|
||||
<view class="modal-content">
|
||||
<p>查询结果前请先确认是否在以下页面中填写信息</p>
|
||||
<view class="link-container">
|
||||
<text class="link-text" @click="openApplyUrl">{{ applyUrl || '暂无链接' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="modal-footer">
|
||||
<button type="button" class="confirm-btn2" @click="closeModal">取消</button>
|
||||
<button type="button" class="confirm-btn" @click="confirmQuery">确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -149,7 +165,10 @@ export default {
|
||||
acctTypeOptions: [
|
||||
{ label: '对公', value: '57' },
|
||||
{ label: '对私', value: '58' }
|
||||
]
|
||||
],
|
||||
// 自定义弹窗状态
|
||||
showCustomModal: false,
|
||||
applyUrl: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
@ -243,6 +262,30 @@ export default {
|
||||
},
|
||||
// 合同查询
|
||||
ecQuery() {
|
||||
// 显示自定义弹窗
|
||||
this.applyUrl = uni.getStorageSync('applyUrl');
|
||||
this.showCustomModal = true;
|
||||
},
|
||||
|
||||
// 关闭自定义弹窗
|
||||
closeModal() {
|
||||
this.showCustomModal = false;
|
||||
},
|
||||
|
||||
// 打开申请链接
|
||||
openApplyUrl() {
|
||||
if (this.applyUrl) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/webview/webview?url=${encodeURIComponent(this.applyUrl)}`
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
// 确认查询
|
||||
confirmQuery() {
|
||||
this.showCustomModal = false;
|
||||
|
||||
// 继续查询流程
|
||||
const storeValue = uni.getStorageSync('storeValue');
|
||||
if (!storeValue || !storeValue.ec_apply_id) {
|
||||
uni.showToast({
|
||||
@ -268,6 +311,7 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取合同类别显示文本
|
||||
getEcTypeLabel(code) {
|
||||
// 兼容直接传入value或者包含value属性的对象
|
||||
@ -282,24 +326,16 @@ export default {
|
||||
},
|
||||
// 调试点击事件
|
||||
handleEcTypeClick() {
|
||||
console.log('点击了合同类别,当前状态:', this.showEcTypePicker);
|
||||
this.showEcTypePicker = true;
|
||||
console.log('设置后状态:', this.showEcTypePicker);
|
||||
},
|
||||
handleCertTypeClick() {
|
||||
console.log('点击了证件类型,当前状态:', this.showCertTypePicker);
|
||||
this.showCertTypePicker = true;
|
||||
console.log('设置后状态:', this.showCertTypePicker);
|
||||
},
|
||||
handleAcctTypeClick() {
|
||||
console.log('点击了结算卡性质,当前状态:', this.showAcctTypePicker);
|
||||
this.showAcctTypePicker = true;
|
||||
console.log('设置后状态:', this.showAcctTypePicker);
|
||||
},
|
||||
// 合同类别选择确认
|
||||
onEcTypeConfirm(e) {
|
||||
console.log('合同类别确认事件:', e);
|
||||
// uview-ui的u-picker组件返回的数据格式
|
||||
const selectedValue = e.value[0];
|
||||
// 查找对应的选项对象
|
||||
const selectedOption = this.ecTypeOptions.find(item => item.value === selectedValue);
|
||||
@ -308,7 +344,6 @@ export default {
|
||||
},
|
||||
// 证件类型选择确认
|
||||
onCertTypeConfirm(e) {
|
||||
console.log('证件类型确认事件:', e);
|
||||
const selectedValue = e.value[0];
|
||||
const selectedOption = this.certTypeOptions.find(item => item.value === selectedValue.value);
|
||||
this.formData.cert_type = selectedOption ? selectedOption.value : selectedValue;
|
||||
@ -316,7 +351,6 @@ export default {
|
||||
},
|
||||
// 结算卡性质选择确认
|
||||
onAcctTypeConfirm(e) {
|
||||
console.log('结算卡性质确认事件:', e);
|
||||
const selectedValue = e.value[0];
|
||||
const selectedOption = this.acctTypeOptions.find(item => item.value === selectedValue.value);
|
||||
this.formData.acct_type_code = selectedOption ? selectedOption.value : selectedValue;
|
||||
@ -341,15 +375,13 @@ export default {
|
||||
if (!this.validateForm()) {
|
||||
return;
|
||||
}
|
||||
// 整合参数并输出到控制台
|
||||
console.log('提交的合同申请参数:', this.formData);
|
||||
request(apiArr.ecApply, "POST", this.formData).then(res => {
|
||||
uni.showToast({
|
||||
title: '提交成功',
|
||||
icon: 'success'
|
||||
});
|
||||
// 保存合同申请ID
|
||||
uni.setStorageSync('storeValue', { ec_apply_id: res.resp_data.ec_apply_id });
|
||||
uni.setStorageSync('applyUrl', res.resp_data.result_url);
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user