Compare commits

...

3 Commits

Author SHA1 Message Date
赵毅
a0c801ee61 修改下载合同功能逻辑 2025-12-12 15:26:41 +08:00
赵毅
93dcdc6357 优化协议签署页面的布局 2025-12-12 15:26:10 +08:00
赵毅
49f790fd21 商户进件添加费率相关属性 修改证件类型传值 2025-12-12 15:25:33 +08:00
3 changed files with 160 additions and 85 deletions

View File

@ -3,11 +3,11 @@
<form class="acceptor-form" @submit.prevent="submitForm">
<!-- 基本信息 -->
<view class="form-section">
<view class="form-item">
<!-- <view class="form-item">
<label class="form-label required">商户ID</label>
<input type="number" class="form-input" v-model.number="formData.mch_id" placeholder="请输入商户ID"
required>
</view>
</view> -->
<view class="form-item">
<label class="form-label required">商户注册名称</label>
@ -17,22 +17,20 @@
<view class="form-item">
<label class="form-label required">商户地区代码</label>
<view class="popup-select" @click="showAreaPopup = true">
<span>{{ selectedAreaLabel || '请选择商户地区代码' }}</span>
</view>
<input type="text" class="form-input" v-model="formData.merRegDistCode"
placeholder="请输入商户地区代码" required>
</view>
<view class="form-item">
<label class="form-label required">商户详细地址</label>
<input type="text" class="form-input" v-model="formData.merRegAddr"
placeholder="请输入去除省、市、区后的详细地址6-200字符" required>
placeholder="请输入去除省、市、区后的详细地址" required>
</view>
<view class="form-item">
<label class="form-label required">商户MCC编号</label>
<view class="popup-select" @click="showMccPopup = true">
<span>{{ selectedMccLabel || '请选择商户MCC编号' }}</span>
</view>
<input type="text" class="form-input" v-model="formData.mccCode"
placeholder="请输入商户MCC编号" required>
</view>
<view class="form-item">
@ -58,9 +56,8 @@
<view class="form-item">
<label class="form-label required">商户经营内容</label>
<view class="popup-select" @click="showBusiContentPopup = true">
<span>{{ selectedBusiContentLabel || '请选择商户经营内容' }}</span>
</view>
<input type="text" class="form-input" v-model="formData.merBusiContent"
placeholder="请输入商户经营内容" required>
</view>
</view>
@ -148,6 +145,22 @@
<span>{{ selectedAcctTypeLabel || '请选择结算账户性质' }}</span>
</view>
</view>
<!-- 费率信息 -->
<view class="form-item">
<label class="form-label required">费率类型</label>
<input type="text" class="form-input" v-model="formData.feeData[0].feeRateTypeCode" placeholder="请输入费率类型" required>
</view>
<view class="form-item">
<label class="form-label required">费率类型名称</label>
<input type="text" class="form-input" v-model="formData.feeData[0].feeRateTypeName" placeholder="请输入费率类型名称" required>
</view>
<view class="form-item">
<label class="form-label required">手续费率(%)</label>
<input type="number" class="form-input" v-model="formData.feeData[0].feeRatePct" placeholder="请输入手续费率" step="0.01" required>
</view>
</view>
<!-- 附件上传 -->
@ -283,7 +296,7 @@ export default {
return {
//
formData: {
mch_id: null, // ID
mch_id: '000', // ID
merRegName: '', //
merRegDistCode: '', //
merRegAddr: '', //
@ -306,7 +319,13 @@ export default {
acctNo: '', //
acctName: '', //
acctTypeCode: '', //
feeData: [], //
feeData: [
{
feeRateTypeCode: "",
feeRateTypeName: "",
feeRatePct: ""
}
], //
fileData: [
{
attType: '',
@ -354,10 +373,15 @@ export default {
],
idTypeOptions: [
{ value: 'IDCARD', label: '身份证' },
{ value: 'PASSPORT', label: '护照' },
{ value: 'MILITARY_ID', label: '军人证' },
{ value: 'OTHER', label: '其他' }
{ value: '01', label: '身份证' },
{ value: '02', label: '护照' },
{ value: '03', label: '港澳通行证' },
{ value: '04', label: '台胞证' },
{ value: '10', label: '外国人永久居留身份证' },
{ value: '11', label: '港澳居民居住证' },
{ value: '12', label: '台湾居民居住证' },
{ value: '13', label: '执行事务合伙人' },
{ value: '99', label: '其它证件' },
],
acctTypeOptions: [
@ -632,6 +656,22 @@ export default {
uni.showToast({ title: '请选择结算账户性质', icon: 'none' });
return false;
}
//
if (!formData.feeData[0].feeRateTypeCode) {
uni.showToast({ title: '请输入费率类型', icon: 'none' });
return false;
}
if (!formData.feeData[0].feeRateTypeName) {
uni.showToast({ title: '请输入费率类型名称', icon: 'none' });
return false;
}
if (!formData.feeData[0].feeRatePct) {
uni.showToast({ title: '请输入手续费率', icon: 'none' });
return false;
}
return true;
},
@ -707,7 +747,7 @@ export default {
acctNo: this.formData.acctNo,
acctName: this.formData.acctName,
acctTypeCode: this.formData.acctTypeCode,
feeData: [],
feeData: this.formData.feeData,
fileData: []
};

View File

@ -530,7 +530,7 @@
<h3>第十条 </h3>
<view class="subsection-item">
<text>乙方(含乙方分支机构合作方,下同)为甲方提供的受理终端(包含收款码)仅限甲方在</text>
<input type="text" v-model="paramData.A101" class="input-field very-small" />
<input type="text" v-model="paramData.A101" class="input-field" />
<text>
地区使用甲方应提供符合受理终端安装要求的场地条件并妥善保管和使用如因甲方管理或使用不当造成终端损坏或遗失的甲方应按市场价向乙方赔偿赔付方式为现金转账或授权乙方从甲方终端押金交易资金等途径扣除双方协议终止或解除时乙方有权收回关闭放置在甲方的受理终端或关闭网络支付接口
</text>
@ -783,7 +783,7 @@
<view class="subsection-item">
<input type="text" class="input-field small" v-model="paramData.B1" placeholder="年" />
<input type="text" class="input-field small" v-model="paramData.B2" placeholder="月" />
NO<input type="text" v-model="paramData.A115" class="input-field small" />
NO<input type="text" class="input-field small" />
</view>
<view class="section">
@ -1149,7 +1149,7 @@
<view class="section">
<view class="subsection-item">
<text>鉴于我方为拉卡拉支付股份有限公司简称拉卡拉的特约商户已与拉卡拉签订特约商户支付服务合作协议并且我方结算账户所属银行</text>
<input type="text" v-model="paramData.D1" class="input-field very-small" />
<input type="text" v-model="paramData.D1" class="input-field" />
<text>简称银行会不定期开展商户手续费补贴等营销活动</text>
</view>
@ -1182,9 +1182,9 @@
<view class="subsection-item">
<text>我方同意并指定</text>
<input type="text" v-model="paramData.D4" class="input-field very-small" />
<input type="text" v-model="paramData.D4" class="input-field" />
<text>公司联系方式</text>
<input type="text" v-model="paramData.D5" class="input-field very-small" />
<input type="text" v-model="paramData.D5" class="input-field" />
<text>(含其分支机构及总公司以下简称数据处理方)为我方提供数据处理服务同意并授权数据处理方为终端布放与受理标识张贴终端维护商户培训耗材配送交易证明材料调取对账目的收集存储并向拉卡拉传送我方通过线下或线上方式提供的入网信息(包括但不限于拉卡拉商户注册登记表中的信息商户提交的电子版及纸质版资料以及监管部门要求的其他信息)同意并授权拉卡拉将我方金融信息(包括我方企业名称统一社会信用代码法定代表人姓名及证件号码经营地址联系人姓名及证件号码联系人手机号联系人电子邮箱结算账户信息交易数据入账信息对账单明细数据下同)提供给数据处理方同意并授权数据处理方从拉卡拉接收并处理前述我方相关信息</text>
</view>

View File

@ -108,7 +108,7 @@
<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>
@ -177,7 +177,7 @@ export default {
if (options.ec_content) {
this.formData.ec_content_parameters = options.ec_content;
}
//
uni.$on('agreementSigned', (data) => {
if (data && data.ec_content) {
@ -189,7 +189,7 @@ export default {
}
});
},
//
onUnload() {
uni.$off('agreementSigned');
@ -214,68 +214,103 @@ export default {
mask: true
});
// URL
const downloadUrl = `${RequsetUrl}${apiArr.ecDownload}?ec_apply_id=${storeValue.ec_apply_id}`;
request(apiArr.ecDownload, "POST", params).then(res => {
const respData = res.resp_data;
//
if (respData.ec_status === 'COMPLETED' && respData.ec_file) {
try {
// Base64URLBase64
const base64Data = respData.ec_file;
// URLBase64
const safeBase64 = base64Data.replace(/-/g, '+').replace(/_/g, '/');
// uni.downloadFile
uni.downloadFile({
url: downloadUrl,
header: {
'Authorization': uni.getStorageSync('ctoken')
},
success: (res) => {
uni.hideLoading();
//
uni.saveFile({
tempFilePath: res.tempFilePath,
success: (saveRes) => {
uni.showToast({
title: '下载成功',
icon: 'success'
});
//
uni.showModal({
title: '提示',
content: '合同已下载完成,是否立即打开?',
success: (modalRes) => {
if (modalRes.confirm) {
//
uni.openDocument({
filePath: saveRes.savedFilePath,
showMenu: true,
success: (openRes) => {
console.log('文件打开成功');
},
fail: (err) => {
console.error('文件打开失败:', err);
uni.showToast({
title: '文件打开失败',
icon: 'none'
});
}
});
}
//
const fileName = `contract_${respData.ec_apply_id || Date.now()}.pdf`;
// uni-app使API
//
const fs = uni.getFileSystemManager();
//
const tempFilePath = `${uni.env.USER_DATA_PATH}/${fileName}`;
try {
// Base64
fs.writeFile({
filePath: tempFilePath,
data: safeBase64,
encoding: 'base64',
success: () => {
uni.hideLoading();
uni.showToast({
title: '合同下载成功',
icon: 'success'
});
console.log('文件保存成功:', tempFilePath);
//
uni.openDocument({
filePath: tempFilePath,
showMenu: true,
success: (openRes) => {
console.log('文件打开成功:', openRes);
},
fail: (openErr) => {
console.error('文件打开失败:', openErr);
uni.showToast({
title: '文件打开失败',
icon: 'none'
});
}
});
},
fail: (writeErr) => {
uni.hideLoading();
console.error('文件写入失败:', writeErr);
uni.showToast({
title: '合同下载失败',
icon: 'none'
});
}
});
},
fail: (err) => {
console.error('文件保存失败:', err);
} catch (fsError) {
uni.hideLoading();
console.error('文件系统操作失败:', fsError);
uni.showToast({
title: '文件保存失败',
title: '文件系统错误',
icon: 'none'
});
}
});
},
fail: (err) => {
} catch (error) {
uni.hideLoading();
console.error('处理文件数据失败:', error);
uni.showToast({
title: '文件处理失败',
icon: 'none'
});
}
} else {
uni.hideLoading();
console.error('下载请求失败:', err);
uni.showToast({
title: '下载失败,请稍后重试',
icon: 'none'
});
if (respData.ec_status !== 'COMPLETED') {
uni.showToast({
title: '电子合同尚未完成',
icon: 'none'
});
} else {
uni.showToast({
title: '合同文件不存在',
icon: 'none'
});
}
}
});
}).catch(err => {
uni.hideLoading();
console.error('下载合同失败:', err);
uni.showToast({
title: '下载失败,请重试',
icon: 'none'
});
})
},
//
ecQuery() {
@ -283,12 +318,12 @@ export default {
this.applyUrl = uni.getStorageSync('applyUrl');
this.showCustomModal = true;
},
//
closeModal() {
this.showCustomModal = false;
},
//
openApplyUrl() {
if (this.applyUrl) {
@ -297,11 +332,11 @@ export default {
});
}
},
//
confirmQuery() {
this.showCustomModal = false;
//
const storeValue = uni.getStorageSync('storeValue');
if (!storeValue || !storeValue.ec_apply_id) {
@ -328,7 +363,7 @@ export default {
}
})
},
//
getEcTypeLabel(code) {
// valuevalue