Compare commits
No commits in common. "bb54f833d3b9eab99a3a8bd61f5f1be7a7fb3c40" and "b226641a5281dfbfc01e329f76a3ae61047b83f1" have entirely different histories.
bb54f833d3
...
b226641a52
@ -218,13 +218,12 @@ page {
|
|||||||
.submit-section {
|
.submit-section {
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
display: flex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn,
|
.submit-btn {
|
||||||
.submit-btn1 {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
background-color: #007aff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
@ -233,16 +232,6 @@ page {
|
|||||||
box-shadow: 0 4rpx 12rpx rgba(0, 122, 255, 0.3);
|
box-shadow: 0 4rpx 12rpx rgba(0, 122, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn {
|
|
||||||
background-color: #007aff;
|
|
||||||
margin-left: 5rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit-btn1 {
|
|
||||||
background-color: #ff4016;
|
|
||||||
margin-right: 5rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit-btn:active {
|
.submit-btn:active {
|
||||||
background-color: #0051d5;
|
background-color: #0051d5;
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
|
|||||||
@ -173,7 +173,6 @@
|
|||||||
|
|
||||||
<!-- 提交按钮 -->
|
<!-- 提交按钮 -->
|
||||||
<view class="form-section submit-section">
|
<view class="form-section submit-section">
|
||||||
<button type="button" class="submit-btn1" @click="ecQuery">结果查询</button>
|
|
||||||
<button type="submit" class="submit-btn" @click="submitForm">提交申请</button>
|
<button type="submit" class="submit-btn" @click="submitForm">提交申请</button>
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
@ -636,40 +635,6 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
ecQuery() {
|
|
||||||
const storeValue = uni.getStorageSync('storeValue');
|
|
||||||
if (!storeValue || !storeValue.contractId) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请先提交申请',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const params = {
|
|
||||||
contractId: storeValue.contractId
|
|
||||||
}
|
|
||||||
request(apiArr.queryMerchant, "POST", params).then(res => {
|
|
||||||
if (res.respData.contractStatus === 'REVIEW_ING') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '审核通过',
|
|
||||||
icon: 'success'
|
|
||||||
});
|
|
||||||
uni.setStorageSync('storeValue', { merInnerNo: res.respData.merInnerNo });
|
|
||||||
uni.setStorageSync('storeValue', { merCupNo: res.respData.merCupNo });
|
|
||||||
} else if (res.respData.contractStatus === 'WAIT_FOR_CONTACT') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '审核驳回',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
} else if (res.respData.contractStatus === 'MANUAL_AUDIT') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '审核中',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 表单提交逻辑
|
// 表单提交逻辑
|
||||||
submitForm() {
|
submitForm() {
|
||||||
// 验证表单
|
// 验证表单
|
||||||
@ -726,11 +691,22 @@ export default {
|
|||||||
// 调用addMer接口提交数据
|
// 调用addMer接口提交数据
|
||||||
request(apiArr.addMer, "POST", submitData).then(res => {
|
request(apiArr.addMer, "POST", submitData).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
|
||||||
title: '提交成功',
|
if (res && res.cmdRetCode === 'SUCCESS') {
|
||||||
icon: 'success'
|
uni.showToast({
|
||||||
});
|
title: '提交成功',
|
||||||
uni.setStorageSync('storeValue', { contractId: res.respData.contractId });
|
icon: 'success'
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack();
|
||||||
|
}, 1500);
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res?.retMsg || '提交失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
console.error('提交失败:', error);
|
console.error('提交失败:', error);
|
||||||
|
|||||||
@ -218,13 +218,12 @@ page {
|
|||||||
.submit-section {
|
.submit-section {
|
||||||
margin-top: 40rpx;
|
margin-top: 40rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
display: flex;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn,
|
.submit-btn {
|
||||||
.submit-btn1 {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
background-color: #007aff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
@ -233,16 +232,6 @@ page {
|
|||||||
box-shadow: 0 4rpx 12rpx rgba(0, 122, 255, 0.3);
|
box-shadow: 0 4rpx 12rpx rgba(0, 122, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit-btn {
|
|
||||||
background-color: #007aff;
|
|
||||||
margin-left: 5rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit-btn1 {
|
|
||||||
background-color: #ff4016;
|
|
||||||
margin-right: 5rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit-btn:active {
|
.submit-btn:active {
|
||||||
background-color: #0051d5;
|
background-color: #0051d5;
|
||||||
transform: scale(0.98);
|
transform: scale(0.98);
|
||||||
|
|||||||
@ -5,32 +5,30 @@
|
|||||||
<view class="form-section">
|
<view class="form-section">
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<label class="form-label required">商户号</label>
|
<label class="form-label required">商户号</label>
|
||||||
<input type="number" class="form-input" v-model.number="formData.mch_id" placeholder="请输入商户号"
|
<input type="number" class="form-input" v-model.number="formData.mch_id" placeholder="请输入商户号" required>
|
||||||
required>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<label class="form-label">拉卡拉内部商户号</label>
|
<label class="form-label">拉卡拉内部商户号</label>
|
||||||
<input type="text" class="form-input" v-model="formData.merInnerNo" placeholder="请输入拉卡拉内部商户号(可选)">
|
<input type="text" class="form-input" v-model="formData.merInnerNo" placeholder="请输入拉卡拉内部商户号(可选)">
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<label class="form-label">银联商户号</label>
|
<label class="form-label">银联商户号</label>
|
||||||
<input type="text" class="form-input" v-model="formData.merCupNo" placeholder="请输入银联商户号(可选)">
|
<input type="text" class="form-input" v-model="formData.merCupNo" placeholder="请输入银联商户号(可选)">
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<label class="form-label required">联系手机号</label>
|
<label class="form-label required">联系手机号</label>
|
||||||
<input type="number" class="form-input" v-model="formData.contactMobile" placeholder="请输入联系手机号"
|
<input type="number" class="form-input" v-model="formData.contactMobile" placeholder="请输入联系手机号" required>
|
||||||
required>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<label class="form-label">电子分账协议号</label>
|
<label class="form-label">电子分账协议号</label>
|
||||||
<input type="text" class="form-input" v-model="formData.eleContractNo" placeholder="请输入电子分账协议号(可选)">
|
<input type="text" class="form-input" v-model="formData.eleContractNo" placeholder="请输入电子分账协议号(可选)">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 附件上传 -->
|
<!-- 附件上传 -->
|
||||||
<view class="form-section">
|
<view class="form-section">
|
||||||
<h3 class="section-title">附件上传(可选)</h3>
|
<h3 class="section-title">附件上传(可选)</h3>
|
||||||
@ -51,21 +49,19 @@
|
|||||||
<button class="add-attachment-btn" @click="addFile">添加附件</button>
|
<button class="add-attachment-btn" @click="addFile">添加附件</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 提交按钮 -->
|
<!-- 提交按钮 -->
|
||||||
<view class="form-section submit-section">
|
<view class="form-section submit-section">
|
||||||
<button type="button" class="submit-btn1" @click="ecQuery">结果查询</button>
|
|
||||||
<button type="submit" class="submit-btn" @click="submitForm">提交申请</button>
|
<button type="submit" class="submit-btn" @click="submitForm">提交申请</button>
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<!-- 文件附件类型弹窗 -->
|
<!-- 文件附件类型弹窗 -->
|
||||||
<view class="popup" v-if="showFileAttachTypePopup >= 0">
|
<view class="popup" v-if="showFileAttachTypePopup >= 0">
|
||||||
<view class="popup-content">
|
<view class="popup-content">
|
||||||
<view class="popup-title">选择附件类型</view>
|
<view class="popup-title">选择附件类型</view>
|
||||||
<view class="popup-list">
|
<view class="popup-list">
|
||||||
<view class="popup-item" v-for="type in fileAttachTypeOptions" :key="type.value"
|
<view class="popup-item" v-for="type in fileAttachTypeOptions" :key="type.value" @click="selectFileAttachType(showFileAttachTypePopup, type)">
|
||||||
@click="selectFileAttachType(showFileAttachTypePopup, type)">
|
|
||||||
{{ type.label }}
|
{{ type.label }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -99,10 +95,10 @@ export default {
|
|||||||
}
|
}
|
||||||
] // 文件数据(可选)
|
] // 文件数据(可选)
|
||||||
},
|
},
|
||||||
|
|
||||||
// 弹窗控制
|
// 弹窗控制
|
||||||
showFileAttachTypePopup: -1,
|
showFileAttachTypePopup: -1,
|
||||||
|
|
||||||
// 文件附件类型选项(示例数据,实际应从API获取)
|
// 文件附件类型选项(示例数据,实际应从API获取)
|
||||||
fileAttachTypeOptions: [
|
fileAttachTypeOptions: [
|
||||||
{ value: 'BUSINESS_LICENSE', label: '营业执照' },
|
{ value: 'BUSINESS_LICENSE', label: '营业执照' },
|
||||||
@ -114,122 +110,122 @@ export default {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 添加附件
|
// 添加附件
|
||||||
addFile() {
|
addFile() {
|
||||||
this.formData.fileData.push({
|
this.formData.fileData.push({
|
||||||
attType: '',
|
attType: '',
|
||||||
attFileId: '',
|
attFileId: '',
|
||||||
attachName: ''
|
attachName: ''
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 选择文件附件类型
|
|
||||||
selectFileAttachType(index, type) {
|
|
||||||
this.formData.fileData[index].attType = type.value;
|
|
||||||
this.showFileAttachTypePopup = -1;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 获取附件类型标签
|
|
||||||
getAttachTypeLabel(typeValue) {
|
|
||||||
if (!typeValue) return '';
|
|
||||||
const option = this.fileAttachTypeOptions.find(type => type.value === typeValue);
|
|
||||||
return option ? option.label : '';
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除附件
|
|
||||||
removeFile(index) {
|
|
||||||
this.formData.fileData.splice(index, 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
// 上传文件
|
|
||||||
uploadFile(index) {
|
|
||||||
const fileData = this.formData.fileData[index];
|
|
||||||
|
|
||||||
// 检查是否选择了附件类型
|
|
||||||
if (!fileData.attType) {
|
|
||||||
uni.showToast({
|
|
||||||
title: '请先选择附件类型',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
});
|
||||||
return;
|
},
|
||||||
}
|
|
||||||
|
// 选择文件附件类型
|
||||||
// 调用 uni.chooseMessageFile API 选择文件
|
selectFileAttachType(index, type) {
|
||||||
uni.chooseMessageFile({
|
this.formData.fileData[index].attType = type.value;
|
||||||
count: 1,
|
this.showFileAttachTypePopup = -1;
|
||||||
type: 'file',
|
},
|
||||||
extension: ['pdf', 'doc', 'docx', 'jpg', 'jpeg', 'png'], // 支持的文件类型
|
|
||||||
success: (res) => {
|
// 获取附件类型标签
|
||||||
const tempFile = res.tempFiles[0];
|
getAttachTypeLabel(typeValue) {
|
||||||
console.log("选择的文件:", tempFile);
|
if (!typeValue) return '';
|
||||||
|
const option = this.fileAttachTypeOptions.find(type => type.value === typeValue);
|
||||||
// 设置文件名
|
return option ? option.label : '';
|
||||||
fileData.attachName = tempFile.name;
|
},
|
||||||
|
|
||||||
// 显示上传中提示
|
// 删除附件
|
||||||
uni.showLoading({
|
removeFile(index) {
|
||||||
title: '上传中',
|
this.formData.fileData.splice(index, 1);
|
||||||
mask: true
|
},
|
||||||
});
|
|
||||||
|
// 上传文件
|
||||||
// 直接使用uni.uploadFile上传文件
|
uploadFile(index) {
|
||||||
uni.uploadFile({
|
const fileData = this.formData.fileData[index];
|
||||||
url: RequsetUrl + apiArr.upload, // 完整的上传接口URL
|
|
||||||
filePath: tempFile.path, // 文件路径
|
// 检查是否选择了附件类型
|
||||||
name: 'file', // 文件对应的key,根据后端要求设置
|
if (!fileData.attType) {
|
||||||
formData: {
|
|
||||||
attType: fileData.attType // 附件类型
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
Authorization: uni.getStorageSync("ctoken") // 添加认证信息
|
|
||||||
},
|
|
||||||
success: (uploadRes) => {
|
|
||||||
// 解析响应数据
|
|
||||||
const res = JSON.parse(uploadRes.data);
|
|
||||||
|
|
||||||
// 更新附件信息
|
|
||||||
fileData.attFileId = res.data.respData.attFileId;
|
|
||||||
fileData.attachName = tempFile.name; // 文件名
|
|
||||||
|
|
||||||
uni.showToast({
|
|
||||||
title: '上传成功',
|
|
||||||
icon: 'success'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: (error) => {
|
|
||||||
console.error('文件上传失败:', error);
|
|
||||||
uni.showToast({
|
|
||||||
title: '上传失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
complete: () => {
|
|
||||||
uni.hideLoading(); // 隐藏加载提示
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
fail: (err) => {
|
|
||||||
console.error('选择文件失败:', err);
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '选择文件失败',
|
title: '请先选择附件类型',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
// 调用 uni.chooseMessageFile API 选择文件
|
||||||
|
uni.chooseMessageFile({
|
||||||
|
count: 1,
|
||||||
|
type: 'file',
|
||||||
|
extension: ['pdf', 'doc', 'docx', 'jpg', 'jpeg', 'png'], // 支持的文件类型
|
||||||
|
success: (res) => {
|
||||||
|
const tempFile = res.tempFiles[0];
|
||||||
|
console.log("选择的文件:", tempFile);
|
||||||
|
|
||||||
|
// 设置文件名
|
||||||
|
fileData.attachName = tempFile.name;
|
||||||
|
|
||||||
|
// 显示上传中提示
|
||||||
|
uni.showLoading({
|
||||||
|
title: '上传中',
|
||||||
|
mask: true
|
||||||
|
});
|
||||||
|
|
||||||
|
// 直接使用uni.uploadFile上传文件
|
||||||
|
uni.uploadFile({
|
||||||
|
url: RequsetUrl + apiArr.upload, // 完整的上传接口URL
|
||||||
|
filePath: tempFile.path, // 文件路径
|
||||||
|
name: 'file', // 文件对应的key,根据后端要求设置
|
||||||
|
formData: {
|
||||||
|
attType: fileData.attType // 附件类型
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
Authorization: uni.getStorageSync("ctoken") // 添加认证信息
|
||||||
|
},
|
||||||
|
success: (uploadRes) => {
|
||||||
|
// 解析响应数据
|
||||||
|
const res = JSON.parse(uploadRes.data);
|
||||||
|
|
||||||
|
// 更新附件信息
|
||||||
|
fileData.attFileId = res.data.respData.attFileId;
|
||||||
|
fileData.attachName = tempFile.name; // 文件名
|
||||||
|
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传成功',
|
||||||
|
icon: 'success'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (error) => {
|
||||||
|
console.error('文件上传失败:', error);
|
||||||
|
uni.showToast({
|
||||||
|
title: '上传失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
},
|
||||||
|
complete: () => {
|
||||||
|
uni.hideLoading(); // 隐藏加载提示
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error('选择文件失败:', err);
|
||||||
|
uni.showToast({
|
||||||
|
title: '选择文件失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 表单验证
|
// 表单验证
|
||||||
validateForm() {
|
validateForm() {
|
||||||
const { formData } = this;
|
const { formData } = this;
|
||||||
|
|
||||||
// 验证必需字段
|
// 验证必需字段
|
||||||
if (!formData.mch_id) {
|
if (!formData.mch_id) {
|
||||||
uni.showToast({ title: '请输入商户号', icon: 'none' });
|
uni.showToast({ title: '请输入商户号', icon: 'none' });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!formData.contactMobile) {
|
if (!formData.contactMobile) {
|
||||||
uni.showToast({ title: '请输入联系手机号', icon: 'none' });
|
uni.showToast({ title: '请输入联系手机号', icon: 'none' });
|
||||||
return false;
|
return false;
|
||||||
@ -237,49 +233,22 @@ export default {
|
|||||||
uni.showToast({ title: '请输入有效的手机号', icon: 'none' });
|
uni.showToast({ title: '请输入有效的手机号', icon: 'none' });
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
ecQuery() {
|
|
||||||
// const storeValue = uni.getStorageSync('storeValue');
|
|
||||||
// if (!storeValue || !storeValue.contractId) {
|
|
||||||
// uni.showToast({
|
|
||||||
// title: '请先提交申请',
|
|
||||||
// icon: 'none'
|
|
||||||
// });
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// const params = {
|
|
||||||
// contractId: storeValue.contractId
|
|
||||||
// }
|
|
||||||
request(apiArr.queryLedgerMer, "POST", {}).then(res => {
|
|
||||||
if (res.respData.splitStatus === 'VALID') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '审核通过',
|
|
||||||
icon: 'success'
|
|
||||||
});
|
|
||||||
} else if (res.respData.contractStatus === 'INVALID') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '审核未通过',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 表单提交逻辑
|
// 表单提交逻辑
|
||||||
submitForm() {
|
submitForm() {
|
||||||
// 验证表单
|
// 验证表单
|
||||||
if (!this.validateForm()) {
|
if (!this.validateForm()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '提交中...',
|
title: '提交中...',
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
|
|
||||||
// 准备请求参数
|
// 准备请求参数
|
||||||
const submitData = {
|
const submitData = {
|
||||||
mch_id: this.formData.mch_id,
|
mch_id: this.formData.mch_id,
|
||||||
@ -289,7 +258,7 @@ export default {
|
|||||||
eleContractNo: this.formData.eleContractNo,
|
eleContractNo: this.formData.eleContractNo,
|
||||||
attachments: []
|
attachments: []
|
||||||
};
|
};
|
||||||
|
|
||||||
// 只添加有attFileId的文件到attachments
|
// 只添加有attFileId的文件到attachments
|
||||||
const validFiles = this.formData.fileData.filter(file => file.attFileId);
|
const validFiles = this.formData.fileData.filter(file => file.attFileId);
|
||||||
if (validFiles.length > 0) {
|
if (validFiles.length > 0) {
|
||||||
@ -299,16 +268,28 @@ export default {
|
|||||||
attachStorePath: file.attFileId
|
attachStorePath: file.attFileId
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('提交的数据:', submitData);
|
console.log('提交的数据:', submitData);
|
||||||
|
|
||||||
|
// 调用applyLedgerMer接口提交数据
|
||||||
request(apiArr.applyLedgerMer, "POST", submitData).then(res => {
|
request(apiArr.applyLedgerMer, "POST", submitData).then(res => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.showToast({
|
|
||||||
title: '提交成功',
|
if (res && res.cmdRetCode === 'SUCCESS') {
|
||||||
icon: 'success'
|
uni.showToast({
|
||||||
});
|
title: '提交成功',
|
||||||
uni.setStorageSync('storeValue', { fz_apply_id: res.resp_data.ec_apply_id });
|
icon: 'success'
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateBack();
|
||||||
|
}, 1500);
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: res?.retMsg || '提交失败',
|
||||||
|
icon: 'none'
|
||||||
|
});
|
||||||
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
console.error('提交失败:', error);
|
console.error('提交失败:', error);
|
||||||
|
|||||||
@ -138,109 +138,4 @@ page {
|
|||||||
.contract-form {
|
.contract-form {
|
||||||
padding: 20rpx;
|
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,22 +108,6 @@
|
|||||||
<button type="button" class="submit-btn" @click="submitApplication">提交申请</button>
|
<button type="button" class="submit-btn" @click="submitApplication">提交申请</button>
|
||||||
</view>
|
</view>
|
||||||
</form>
|
</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>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -165,10 +149,7 @@ export default {
|
|||||||
acctTypeOptions: [
|
acctTypeOptions: [
|
||||||
{ label: '对公', value: '57' },
|
{ label: '对公', value: '57' },
|
||||||
{ label: '对私', value: '58' }
|
{ label: '对私', value: '58' }
|
||||||
],
|
]
|
||||||
// 自定义弹窗状态
|
|
||||||
showCustomModal: false,
|
|
||||||
applyUrl: ''
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -262,30 +243,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 合同查询
|
// 合同查询
|
||||||
ecQuery() {
|
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');
|
const storeValue = uni.getStorageSync('storeValue');
|
||||||
if (!storeValue || !storeValue.ec_apply_id) {
|
if (!storeValue || !storeValue.ec_apply_id) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -298,20 +255,8 @@ export default {
|
|||||||
ec_apply_id: storeValue.ec_apply_id
|
ec_apply_id: storeValue.ec_apply_id
|
||||||
}
|
}
|
||||||
request(apiArr.ecQuery, "POST", params).then(res => {
|
request(apiArr.ecQuery, "POST", params).then(res => {
|
||||||
if (res.resp_data.ec_status === 'COMPLETED') {
|
|
||||||
uni.showToast({
|
|
||||||
title: '申请通过',
|
|
||||||
icon: 'success'
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.showToast({
|
|
||||||
title: '申请未通过',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取合同类别显示文本
|
// 获取合同类别显示文本
|
||||||
getEcTypeLabel(code) {
|
getEcTypeLabel(code) {
|
||||||
// 兼容直接传入value或者包含value属性的对象
|
// 兼容直接传入value或者包含value属性的对象
|
||||||
@ -326,16 +271,24 @@ export default {
|
|||||||
},
|
},
|
||||||
// 调试点击事件
|
// 调试点击事件
|
||||||
handleEcTypeClick() {
|
handleEcTypeClick() {
|
||||||
|
console.log('点击了合同类别,当前状态:', this.showEcTypePicker);
|
||||||
this.showEcTypePicker = true;
|
this.showEcTypePicker = true;
|
||||||
|
console.log('设置后状态:', this.showEcTypePicker);
|
||||||
},
|
},
|
||||||
handleCertTypeClick() {
|
handleCertTypeClick() {
|
||||||
|
console.log('点击了证件类型,当前状态:', this.showCertTypePicker);
|
||||||
this.showCertTypePicker = true;
|
this.showCertTypePicker = true;
|
||||||
|
console.log('设置后状态:', this.showCertTypePicker);
|
||||||
},
|
},
|
||||||
handleAcctTypeClick() {
|
handleAcctTypeClick() {
|
||||||
|
console.log('点击了结算卡性质,当前状态:', this.showAcctTypePicker);
|
||||||
this.showAcctTypePicker = true;
|
this.showAcctTypePicker = true;
|
||||||
|
console.log('设置后状态:', this.showAcctTypePicker);
|
||||||
},
|
},
|
||||||
// 合同类别选择确认
|
// 合同类别选择确认
|
||||||
onEcTypeConfirm(e) {
|
onEcTypeConfirm(e) {
|
||||||
|
console.log('合同类别确认事件:', e);
|
||||||
|
// uview-ui的u-picker组件返回的数据格式
|
||||||
const selectedValue = e.value[0];
|
const selectedValue = e.value[0];
|
||||||
// 查找对应的选项对象
|
// 查找对应的选项对象
|
||||||
const selectedOption = this.ecTypeOptions.find(item => item.value === selectedValue);
|
const selectedOption = this.ecTypeOptions.find(item => item.value === selectedValue);
|
||||||
@ -344,6 +297,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 证件类型选择确认
|
// 证件类型选择确认
|
||||||
onCertTypeConfirm(e) {
|
onCertTypeConfirm(e) {
|
||||||
|
console.log('证件类型确认事件:', e);
|
||||||
const selectedValue = e.value[0];
|
const selectedValue = e.value[0];
|
||||||
const selectedOption = this.certTypeOptions.find(item => item.value === selectedValue.value);
|
const selectedOption = this.certTypeOptions.find(item => item.value === selectedValue.value);
|
||||||
this.formData.cert_type = selectedOption ? selectedOption.value : selectedValue;
|
this.formData.cert_type = selectedOption ? selectedOption.value : selectedValue;
|
||||||
@ -351,6 +305,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 结算卡性质选择确认
|
// 结算卡性质选择确认
|
||||||
onAcctTypeConfirm(e) {
|
onAcctTypeConfirm(e) {
|
||||||
|
console.log('结算卡性质确认事件:', e);
|
||||||
const selectedValue = e.value[0];
|
const selectedValue = e.value[0];
|
||||||
const selectedOption = this.acctTypeOptions.find(item => item.value === selectedValue.value);
|
const selectedOption = this.acctTypeOptions.find(item => item.value === selectedValue.value);
|
||||||
this.formData.acct_type_code = selectedOption ? selectedOption.value : selectedValue;
|
this.formData.acct_type_code = selectedOption ? selectedOption.value : selectedValue;
|
||||||
@ -375,13 +330,15 @@ export default {
|
|||||||
if (!this.validateForm()) {
|
if (!this.validateForm()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// 整合参数并输出到控制台
|
||||||
|
console.log('提交的合同申请参数:', this.formData);
|
||||||
request(apiArr.ecApply, "POST", this.formData).then(res => {
|
request(apiArr.ecApply, "POST", this.formData).then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提交成功',
|
title: '提交成功',
|
||||||
icon: 'success'
|
icon: 'success'
|
||||||
});
|
});
|
||||||
|
// 保存合同申请ID
|
||||||
uni.setStorageSync('storeValue', { ec_apply_id: res.resp_data.ec_apply_id });
|
uni.setStorageSync('storeValue', { ec_apply_id: res.resp_data.ec_apply_id });
|
||||||
uni.setStorageSync('applyUrl', res.resp_data.result_url);
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -7,17 +7,19 @@
|
|||||||
<view class="localBox">
|
<view class="localBox">
|
||||||
<view class="localBoxItem">
|
<view class="localBoxItem">
|
||||||
<view class="local">
|
<view class="local">
|
||||||
<image id="local" src="https://static.hshuishang.com/property-img-file/local_localIcon.png" mode="aspectFill">
|
<image id="local"
|
||||||
</image>
|
src="https://static.hshuishang.com/property-img-file/local_localIcon.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
{{ address }}
|
{{ address }}
|
||||||
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<view class="searchBox">
|
<view class="searchBox">
|
||||||
<image src="https://static.hshuishang.com/property-img-file/com_communitySearchIcon.png" mode="aspectFill">
|
<image
|
||||||
</image>
|
src="https://static.hshuishang.com/property-img-file/com_communitySearchIcon.png"
|
||||||
<input type="text" v-model="searchText" placeholder="请输入您想搜索的内容" @confirm="handleSearch" />
|
mode="aspectFill"></image>
|
||||||
|
<input type="text" placeholder="请输入您想搜索的内容" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -52,7 +54,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
||||||
<image src="https://static.hshuishang.com/property-img-file/local_review.png" mode="aspectFill"></image>
|
<image src="https://static.hshuishang.com/property-img-file/local_review.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
点评
|
点评
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -64,7 +67,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<view class="empty">
|
<view class="empty">
|
||||||
<image src="https://static.hshuishang.com/property-img-file/com_nearbyList_empty.png" mode="aspectFill"></image>
|
<image src="https://static.hshuishang.com/property-img-file/com_nearbyList_empty.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
暂无数据
|
暂无数据
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -78,7 +82,8 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="btn_right" @click="toPayInfo">
|
<view class="btn_right" @click="toPayInfo">
|
||||||
<image src="https://static.hshuishang.com/property-img-file/lcoal_payIcon.png" mode="aspectFill"></image>
|
<image src="https://static.hshuishang.com/property-img-file/lcoal_payIcon.png"
|
||||||
|
mode="aspectFill"></image>
|
||||||
快捷支付记录
|
快捷支付记录
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -117,7 +122,7 @@ export default {
|
|||||||
merchatList: [],
|
merchatList: [],
|
||||||
|
|
||||||
changeId: "",
|
changeId: "",
|
||||||
searchText: ''
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
@ -141,7 +146,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
// 跳转快捷支付记录
|
// 跳转快捷支付记录
|
||||||
toPayInfo() {
|
toPayInfo(){
|
||||||
NavgateTo("/packages/localLife/payInfo/index")
|
NavgateTo("/packages/localLife/payInfo/index")
|
||||||
},
|
},
|
||||||
back() {
|
back() {
|
||||||
@ -160,7 +165,7 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
isShop: 1,
|
isShop: 1,
|
||||||
}
|
}
|
||||||
await request(apiArr.getMerChantCateList, "POST", params).then((res) => {
|
await request(apiArr.getMerChantCateList, "POST",params).then((res) => {
|
||||||
res.rows = res.rows.filter((item) => item.is_visible == 1)
|
res.rows = res.rows.filter((item) => item.is_visible == 1)
|
||||||
console.log(res);
|
console.log(res);
|
||||||
// 将数据分成每10个一组
|
// 将数据分成每10个一组
|
||||||
@ -171,12 +176,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//搜索商家
|
|
||||||
handleSearch() {
|
|
||||||
this.page_num = 1;
|
|
||||||
this.merchatList = [];
|
|
||||||
this.getMechantList();
|
|
||||||
},
|
|
||||||
//查询商家列表
|
//查询商家列表
|
||||||
async getMechantList() {
|
async getMechantList() {
|
||||||
let that = this;
|
let that = this;
|
||||||
@ -184,7 +183,6 @@ export default {
|
|||||||
merchant_cate_id: this.changeId,
|
merchant_cate_id: this.changeId,
|
||||||
page_num: that.page_num,
|
page_num: that.page_num,
|
||||||
page_size: that.page_size,
|
page_size: that.page_size,
|
||||||
merchant_name: that.searchText
|
|
||||||
}
|
}
|
||||||
await request(apiArr.getMerchantList, "POST", params).then((res) => {
|
await request(apiArr.getMerchantList, "POST", params).then((res) => {
|
||||||
let latitude = uni.getStorageSync("location").lat;
|
let latitude = uni.getStorageSync("location").lat;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user