diff --git a/api/contract.js b/api/contract.js index 0c6fd1ce..5fd989ea 100644 --- a/api/contract.js +++ b/api/contract.js @@ -6,5 +6,7 @@ export const apiArr = { applyLedgerReceiver: "/api/v2/wechat/lkl-split-business/apply-ledger-receiver", //分账接收方创建申请 applyBind: "/api/v2/wechat/lkl-split-business/apply-bind", //分账关系绑定申请 addMer: "/api/v2/wechat/lkl-split-business/add-mer", //商户进件 + queryMerchant: "/api/v2/wechat/lkl-split-business/query-merchant", //商户进件信息查询 applyLedgerMer: "/api/v2/wechat/lkl-split-business/apply-ledger-mer", //商户分账业务开通申请 + queryLedgerMer: "/api/v2/wechat/lkl-split-business/query-ledger-mer", //商户分账信息查询 }; diff --git a/packages/customerService/applyBind/index.vue b/packages/customerService/applyBind/index.vue index 750c0539..2d7496d2 100644 --- a/packages/customerService/applyBind/index.vue +++ b/packages/customerService/applyBind/index.vue @@ -15,7 +15,8 @@ - + @@ -23,7 +24,8 @@ - + @@ -40,8 +42,8 @@ - {{ getAttachTypeLabel(attachment.attachType) || '请选择附件类型' }} - + {{ getAttachTypeLabel(attachment.attachType) || '请选择附件类型' }} + @@ -67,7 +69,8 @@ 选择附件类型 - + {{ type.label }} @@ -121,7 +124,11 @@ export default { entrustFileName: '', entrustFilePath: '', // 可选附件列表 - attachments: [] + attachments: [{ + attachType: '', + attachName: '', + attachStorePath: '' + }] } }; }, diff --git a/packages/customerService/contract/index.css b/packages/customerService/contract/index.css index b40e17c3..64111f2b 100644 --- a/packages/customerService/contract/index.css +++ b/packages/customerService/contract/index.css @@ -1,430 +1,322 @@ -/* 全局样式重置与基础设置 */ +/* 全局样式重置 */ * { - margin: 0; - padding: 0; - font-family: "SimSun", "宋体", serif; + margin: 0; + padding: 0; + box-sizing: border-box; } -page { - padding-bottom: 0; +body { + font-family: 'SimSun', '宋体', serif; + font-size: 28rpx; + color: #333; + line-height: 1.5; + background-color: #fff; } +page{ + padding-bottom: 0rpx; +} + +/* 合同容器 */ .contract-container { - width: 100%; - background-color: #fff; - padding: 15px; - box-sizing: border-box; - margin: 0 auto; - position: relative; - word-break: break-word; - overflow-x: hidden; + max-width: 1200rpx; + margin: 0 auto; + padding: 140rpx 30rpx 40rpx; + background-color: #fff; } -/* 导航栏样式 */ -.nav { - display: flex; - justify-content: space-between; - align-items: center; - padding: 20rpx 30rpx; - border-bottom: 1px solid #e5e5e5; - background-color: #fafafa; +/* 提交申请按钮样式 */ +.submit-container { + display: flex; + justify-content: center; + align-items: center; + margin: 40rpx 0; + padding: 20rpx; } -.nav-title { - font-size: 32rpx; - font-weight: bold; - color: #333333; -} - -.save-btn { - font-size: 26rpx; - color: #0066cc; - background: transparent; - padding: 0; - margin: 0; -} - -/* 滚动容器样式 */ -.contract-scroll { - width: 100%; - padding: 20rpx 30rpx; - box-sizing: border-box; -} - -/* 合同内容区基础样式 */ -.contract-content { - width: 100%; - line-height: 1.8; - font-size: 28rpx; - color: #333333; -} - -/* 合同头部样式 */ -.header { - margin-bottom: 40rpx; - /* text-align: center; */ -} - -.qrcode-tip { - font-size: 24rpx; - color: #666666; - margin-bottom: 20rpx; -} - -.contract-title { - font-size: 36rpx; - font-weight: bold; - margin: 20rpx 0; - color: #333333; -} - -.party-info { - text-align: left; - margin: 30rpx 0; - line-height: 2; -} - -.preamble { - text-indent: 56rpx; - /* 首行缩进2字符(28rpx*2) */ - margin-bottom: 20rpx; -} - -/* 条款通用样式 */ -.clauses { - margin-bottom: 60rpx; -} - -.clause { - margin-bottom: 40rpx; -} - -.clause-num { - font-size: 30rpx; - font-weight: bold; - margin: 20rpx 0; - color: #333333; -} - -.clause-content { - margin-left: 40rpx; - line-height: 1.8; -} - -/* 服务项样式 */ -.service-item { - font-size: 28rpx; - font-weight: 600; - margin: 20rpx 0 10rpx 0; - display: block; -} - -.service-desc { - text-indent: 56rpx; - margin: 10rpx 0; - display: block; -} - -.service-list { - list-style: disc; - margin-left: 50rpx; - margin-bottom: 20rpx; - padding-left: 20rpx; -} - -.service-list li { - margin-bottom: 15rpx; - line-height: 1.8; - display: block; -} - -/* 表格通用样式 */ -.fee-table, -.info-table { - width: 100%; - border-collapse: collapse; - margin: 20rpx 0; - font-size: 26rpx; -} - -.fee-table th, -.fee-table td, -.info-table th, -.info-table td { - border: 1px solid #333333; - padding: 12rpx 8rpx; - text-align: center; -} - -.fee-table th, -.info-table th, -.info-table .table-label { - background-color: #f5f5f5; - font-weight: bold; -} - -/* 填写项样式 */ -.fill-input { - border: 1px solid #ddd; - border-radius: 4rpx; - padding: 0 8px; - margin: 0 4rpx; - font-size: 13px; - color: #333333; - background-color: #ffffff; - flex-shrink: 0; - height: 28px; - width: 80px; - box-sizing: border-box; - vertical-align: middle; -} - -.fill-tiny { - width: 60px; - /* 小尺寸输入框(如百分比、台数) */ - text-align: center; -} - -.fill-small { - width: 140px; - /* 中尺寸输入框(如银行名称、其他说明) */ -} - -.fill-normal { - width: 300rpx; - /* 常规尺寸输入框(如商户名称、地址) */ -} - -.fill-date { - width: 220rpx; - /* 日期输入框 */ - text-align: center; -} - -.fill-table { - width: 100%; - /* 表格内输入框:填满单元格 */ - margin: 0; - box-sizing: border-box; -} - -/* 单选/多选样式 */ -.radio-label, -.checkbox-label { - margin-right: 25rpx; - margin-bottom: 15rpx; - display: inline-flex; - align-items: center; - font-size: 26rpx; - color: #333; - flex-wrap: wrap; - gap: 8rpx; - line-height: 1.6; -} - -/* 单选/多选组容器:控制整体间距 */ -.radio-group-container, -.checkbox-group-container { - display: flex; - flex-direction: column; - gap: 15rpx; - margin: 15rpx 0; - width: 100%; -} - -/* 单个单选/多选选项:垂直居中对齐,统一高度 */ -.radio-label, -.checkbox-label { - display: flex; - align-items: flex-start; - margin-right: 0; - margin-bottom: 0; - word-break: break-word; - max-width: 100%; - flex-wrap: wrap; - gap: 8rpx; - /* radio/checkbox 与文本的间距 */ - font-size: 26rpx; - color: #333; - padding: 8rpx 0; - line-height: 1.8; -} - -/* 商户更名输入框:仅在选中时显示,与文本对齐 */ -#input-original-name { - margin-left: 10rpx; - /* 与“商户更名”文本的间距 */ - margin-top: 0; - /* 清除默认margin,确保垂直居中 */ -} - -/* 备注/说明文本样式 */ -.note, -.mode-note, -.risk-note, -.deduct-note, -.table-note, -.appendix-footnote { - font-size: 24rpx; - color: #666666; - margin: 10rpx 0; - text-indent: 56rpx; -} - -/* 签字区域样式 */ -.sign-main, -.sign-appendix { - display: flex; - justify-content: space-between; - margin: 60rpx 0; - padding: 0 40rpx; -} - -.sign-party { - text-align: center; - width: 45%; - line-height: 2.2; -} - -/* 附件通用样式 */ -.appendix { - margin: 80rpx 0; - padding: 20rpx; - border-top: 1px dashed #cccccc; -} - -.appendix-title { - font-size: 32rpx; - font-weight: bold; - text-align: center; - margin: 30rpx 0; - color: #333333; -} - -.appendix-subtitle { - font-size: 28rpx; - font-weight: bold; - margin: 30rpx 0 15rpx; - color: #333333; -} - -.appendix-note { - font-size: 24rpx; - color: #666666; - text-align: right; - margin-bottom: 30rpx; -} - -/* 授权书内容样式 */ -.authorization-content { - text-indent: 56rpx; - margin: 15rpx 0; - line-height: 1.8; -} - -/* 提交按钮样式 */ .submit-btn { - width: 90%; - margin: 0 auto; - background-color: #0066cc; - color: #ffffff; - font-size: 32rpx; - padding: 18rpx 0; - border-radius: 12rpx; - font-weight: 600; + width: 80%; + max-width: 400rpx; + height: 80rpx; + background-color: #007bff; + color: #fff; + border: none; + border-radius: 10rpx; + font-size: 32rpx; + font-weight: bold; + cursor: pointer; + transition: background-color 0.3s; } -/* 适配小程序端滚动条样式(隐藏默认滚动条) */ -::-webkit-scrollbar { - width: 0; - height: 0; - color: transparent; +.submit-btn:hover { + background-color: #0056b3; } -/* 补充样式优化 */ -.radio-group-container { - display: flex; - flex-wrap: wrap; - gap: 20rpx; - margin: 10rpx 0; +.submit-btn:active { + background-color: #004085; } -.radio-label, -.checkbox-label { - display: inline-flex; - align-items: center; - margin-right: 25rpx; - margin-bottom: 10rpx; - font-size: 26rpx; +.header{ + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 1000; + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 30rpx; + background-color: #fff; + padding: 20rpx 30rpx; + box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1); } +/* 合同标题 */ +.contract-title { + font-size: 36rpx; + font-weight: bold; + text-align: center; + margin-bottom: 40rpx; + color: #333; +} + +.header-title{ + font-size: 36rpx; +} + +.print-btn{ + padding: 2rpx 20rpx; + background-color: #007bff; + color: #fff; + border: none; + border-radius: 8rpx; + font-size: 28rpx; + cursor: pointer; +} + +/* 甲乙双方信息 */ +.party-info { + margin-bottom: 40rpx; +} + +.party-info p { + margin-bottom: 20rpx; + font-size: 28rpx; +} + +/* 合同内容 */ +.contract-content { + margin-bottom: 40rpx; +} + +.contract-intro { + margin-bottom: 30rpx; + text-align: justify; + font-size: 28rpx; +} + +/* 标题样式 */ +h2 { + font-size: 32rpx; + font-weight: bold; + margin-bottom: 30rpx; + color: #333; +} + +h3 { + font-size: 30rpx; + font-weight: bold; + margin-bottom: 20rpx; + color: #333; +} + +/* 章节样式 */ +.section { + margin-top: 20rpx; + margin-bottom: 40rpx; +} + +.section-desc input { + display: inline-block; +} + +.section-desc { + margin-bottom: 20rpx; + font-size: 28rpx; +} + +.section-desc { + line-height: 1.5; +} + +.input-field { + width: 40px; + vertical-align: middle; +} + +.subsection { + margin-bottom: 30rpx; + margin-left: 40rpx; +} + +.subsection p { + margin-bottom: 15rpx; + font-size: 28rpx; +} + +.subsection-item view { + display: flex; + align-items: center; +} + +.subsection-item input { + display: inline-block; +} + +/* 复选框组 */ .checkbox-group { - display: flex; - flex-wrap: wrap; - gap: 15rpx; + display: flex; + flex-wrap: wrap; + gap: 20rpx; + margin-bottom: 20rpx; } -.service-list li { - margin-bottom: 15rpx; - line-height: 1.6; +.checkbox-item { + display: flex; + align-items: center; + font-size: 28rpx; + cursor: pointer; } -.fee-label { - display: block; - margin: 8rpx 0; +.checkbox-label { + margin-right: 10rpx; } -.mode-item { - margin: 15rpx 0; - text-indent: 56rpx; +/* 输入框样式 */ +.input-field1 { + width: 500rpx; + height: 60rpx; + border: 1rpx solid #ccc; + border-radius: 8rpx; + padding: 0 20rpx; + font-size: 28rpx; + margin: 0 10rpx; } -.mode-note { - font-size: 24rpx; - color: #666; - margin: 10rpx 0; - text-indent: 56rpx; +.input-field { + width: 200rpx; + height: 40rpx; + border: 1rpx solid #ccc; + border-radius: 8rpx; + padding: 0 20rpx; + font-size: 28rpx; + margin: 0 10rpx; } -.table-note { - font-size: 24rpx; - color: #666; - margin: 10rpx 0 5rpx 0; +.input-field.small { + width: 100rpx; } -.authorization-content { - text-indent: 56rpx; - margin: 15rpx 0; - line-height: 1.8; +.input-field.very-small { + width: 100rpx; } -.sign-appendix { - display: flex; - flex-direction: column; - gap: 20rpx; - margin: 40rpx 0; - padding: 0 20rpx; +/* 费用标准样式 */ +.fee-standard { + display: flex; + flex-direction: column; + gap: 20rpx; + margin-bottom: 20rpx; } -.sign-appendix p { - line-height: 2; +.fee-standard .checkbox-item { + display: flex; + align-items: center; + font-size: 28rpx; + cursor: pointer; + flex-wrap: wrap; +} + +/* 表格样式 */ +.fee-table { + width: 100%; + border-collapse: collapse; + margin-bottom: 30rpx; + font-size: 28rpx; +} + +.wrap-text { + word-wrap: break-word; + word-break: break-all; + max-width: 100%; +} + +.fee-table th, +.fee-table td { + display: flex; + justify-content: center; + align-items: center; + border: 1rpx solid #ccc; + padding: 20rpx; + text-align: center; +} + +.fee-table th { + background-color: #f5f5f5; + font-weight: bold; +} + +.fee-table tr:nth-child(even) { + background-color: #fafafa; +} + +/* 响应式设计 */ +@media (max-width: 750rpx) { + .contract-container { + padding: 20rpx 15rpx; + } + + .contract-title { + font-size: 32rpx; + } + + h2 { + font-size: 28rpx; + } + + h3 { font-size: 26rpx; - display: flex; - align-items: center; - gap: 10rpx; + } + + .input-field { + width: 250rpx; + height: 50rpx; + font-size: 26rpx; + } + + .input-field.small { + width: 150rpx; + } + + .input-field.very-small { + width: 80rpx; + } + + .fee-table th, + .fee-table td { + padding: 15rpx; + font-size: 26rpx; + } } -/* 优化表格内输入框 */ -.info-table .fill-input, -.fee-table .fill-input { - box-sizing: border-box; - border: 1px solid #0066cc; - margin: 2rpx; -} +/* 打印样式 */ +@media print { + .contract-container { + max-width: 100%; + padding: 0; + } -/* 优化单选/多选按钮对齐 */ -radio, -checkbox { - margin-right: 8rpx; - vertical-align: middle; + .input-field { + border: 1rpx solid #000; + } } \ No newline at end of file diff --git a/packages/customerService/contract/index.vue b/packages/customerService/contract/index.vue index 9d839e50..d13a8596 100644 --- a/packages/customerService/contract/index.vue +++ b/packages/customerService/contract/index.vue @@ -1,974 +1,1429 @@ @@ -976,180 +1431,102 @@ export default { data() { return { - windowHeight: uni.getSystemInfoSync().windowHeight, - formData: { - // 保持完整的formData结构,确保每个字段都有对应的页面控件 - A1: '', A2: [], A3: [], A4: [], A5: '', A6: [], A7: '', A8: '', A9: [], A10: '', - A11: [], A12: [], A13: [], A14: '', A15: '', A16: '', A17: '', A18: '', A19: '', A20: '', - A21: '', A22: '', A23: '', A24: '', A25: '', A26: '', A27: '', A28: '', A29: '', A30: '', - A31: '', A32: '', A33: '', A34: '', A35: '', A36: '', A37: '', A38: '', A39: [], A40: '', - A41: '', A42: '', A43: [], A44: '', A45: '', A46: [], A47: '', A48: '', A49: '', A50: '', - A51: [], A52: '', A53: [], A54: '', A55: '', A56: '', A57: [], A58: '', A59: '', A60: '', - A61: '', A62: [], A63: '', A64: '', A65: '', A66: [], A67: '', A68: '', A69: '', A70: [], - A71: [], A72: [], A73: '', A74: '', A75: '', A76: '', A77: '', A78: '', A79: '', A80: '', - A81: '', A82: '', A83: '', A84: '', A85: '', A86: '', A87: '', A88: '', A89: '', A90: '', - A91: [], A92: [], A93: '', A94: '', A95: '', A96: '', A97: '', A98: [], A99: [], A100: [], - A101: [], A102: '', A103: '', A104: '', A105: '', A106: '', A107: '', A108: '', A109: '', - B1: '', B2: '', B3: [], B4: [], B5: [], B6: [], B7: '', B8: '', B9: '', B10: '', - B11: '', B12: '', B13: '', B14: '', B15: '', B16: [], B17: [], B18: '', B19: '', B20: '', - B21: '', B22: '', B23: '', B24: '', B25: '', B26: '', B27: '', B28: '', B29: '', B30: '', - B31: '', B32: '', B33: '', B34: '', B35: '', B36: '', B37: '', B38: '', B39: '', B40: '', - B41: '', B42: '', B43: '', B44: '', B45: '', B46: [], B47: '', B48: [], B49: [], B50: [], - B51: '', B52: [], B53: [], B54: [], B55: [], B56: [], B57: '', B58: '', B59: '', B60: '', - C1: '', C2: '', C3: '', C4: '', C5: '', C6: [], C7: [], C8: '', C9: '', C10: '', - C11: '', C12: '', C13: [], C14: [], C15: '', C16: '', C17: '', C18: '', C19: '', C20: [], - C21: [], C22: '', C23: '', C24: '', C25: '', C26: '', C27: '', C28: '', C29: '', C30: '', - C31: '', C32: '', C33: '', C34: '', C35: '', C36: '', C37: '', C38: '', C39: '', C40: '', - C41: '', C42: '', C43: '', C44: '', C45: '', C46: '', C47: '', C48: '', C49: '', C50: '', - C51: '', C52: '', C53: '', C54: '', C55: '', C56: '', - D1: '', D2: '', D3: '', D4: '', D5: '', D6: '', D7: '', D8: '', D9: '', D10: '', - D11: '', D12: '', E1: '', E2: '', E3: '', E4: '', E5: '', E6: '', E7: '', E8: '', - // 特殊字段 - 用于多选按钮 - A36_checked: [], // 单笔代付选中状态 - AN1: [] // B2B订单业务功能 + paramData: { + // A开头的字段 + A1: "", A2: "", A3: "", A4: "", A5: "", A6: "", A7: "", A8: "", A9: "", A10: "", + A11: "", A12: "", A13: "", A14: "", A15: "", A16: "", A17: "", A18: "", A19: "", A20: "", + A21: "", A22: "", A23: "", A24: "", A25: "", A26: "", A27: "", A28: "", A29: "", A30: "", + A31: "", A32: "", A33: "", A34: "", A35: "", A36: "", A37: "", A38: "", A39: "", A40: "", + A41: "", A42: "", A43: "", A44: "", A45: "", A46: "", A47: "", A48: "", A49: "", A50: "", + A51: "", A52: "", A53: "", A54: "", A55: "", A56: "", A57: "", A58: "", A59: "", A60: "", + A61: "", A62: "", A63: "", A64: "", A65: "", A66: "", A67: "", A68: "", A69: "", A70: "", + A71: "", A72: "", A73: "", A74: "", A75: "", A76: "", A77: "", A78: "", A79: "", A80: "", + A81: "", A82: "", A83: "", A84: "", A85: "", A86: "", A87: "", A88: "", A89: "", A90: "", + A91: "", A92: "", A93: "", A94: "", A95: "", A96: "", A97: "", A98: "", A99: "", A100: "", + A101: "", A102: "", A103: "", A104: "", A105: "", A106: "", A107: "", A108: "", A109: "", A115: "", + + // B开头的字段 + B1: "", B2: "", B3: "", B4: "", B5: "", B6: "", B7: "", B8: "", B9: "", B10: "", + B11: "", B12: "", B13: "", B14: "", B15: "", B16: "", B17: "", B18: "", B19: "", B20: "", + B21: "", B22: "", B23: "", B24: "", B25: "", B26: "", B27: "", B28: "", B29: "", B30: "", + B31: "", B32: "", B33: "", B34: "", B35: "", B36: "", B37: "", B38: "", B39: "", B40: "", + B41: "", B42: "", B43: "", B44: "", B45: "", B46: "", B47: "", B48: "", B49: "", B50: "", + B51: "", B52: "", B53: "", B54: "", B55: "", B56: "", B57: "", B58: "", B59: "", B60: "", + + // C开头的字段 + C1: "", C2: "", C3: "", C4: "", C5: "", C6: "", C7: "", C8: "", C9: "", C10: "", + C11: "", C12: "", C13: "", C14: "", C15: "", C16: "", C17: "", C18: "", C19: "", C20: "", + C21: "", C22: "", C23: "", C24: "", C25: "", C26: "", C27: "", C28: "", C29: "", C30: "", + C31: "", C32: "", C33: "", C34: "", C35: "", C36: "", C37: "", C38: "", C39: "", C40: "", + C41: "", C42: "", C43: "", C44: "", C45: "", C46: "", C47: "", C48: "", C49: "", C50: "", + C51: "", C52: "", C53: "", C54: "", C55: "", C56: "", + + // D开头的字段 + D1: "", D2: "", D3: "", D4: "", D5: "", D6: "", D7: "", D8: "", D9: "", D10: "", + D11: "", D12: "", + + // E开头的字段 + E1: "", E2: "", E3: "", E4: "", E5: "", E6: "", E7: "", E8: "", + + // AN开头的字段 + AN1: "" } }; }, - methods: { - // 处理单选按钮互斥 (已改为多选,此方法保留但不执行实际操作) - handleRadioChange(field, event) { - // 由于所有单选按钮已改为多选,此方法不再需要设置互斥逻辑 - // 为避免意外将数组字段覆盖为字符串,此方法不再执行任何操作 - console.log('单选按钮已改为多选,使用handleCheckboxChange代替'); - }, - - openDatePicker(key) { - uni.datePicker({ - mode: 'date', - success: (res) => { - const [year, month, day] = res.detail.value.split('-'); - if (key === 'A105') { - this.formData.A105 = year; - this.formData.A106 = month; - this.formData.A107 = day; - } else if (key === 'A108') { - this.formData.A108 = year; - this.formData.A109 = month; - this.formData.A110 = day; - } else if (['D2', 'D7', 'D9', 'D11', 'D12', 'E7'].includes(key)) { - this.formData[key] = `${year} ${month} ${day}`; - } - } - }); - }, - saveDraft() { - uni.setStorageSync('fullContractDraft', this.formData); - uni.showToast({ - title: '草稿已保存', - icon: 'success', - duration: 1500, - mask: true - }); - }, - formatSubmitData() { - return Object.entries(this.formData) - .map(([key, value]) => { - // 安全处理数组类型 - if (Array.isArray(value)) { - return `${key}:${value.filter(Boolean).join(',')}`; - } - // 安全处理其他类型 - return `${key}:${value ?? ''}`; - }) - .join(';'); - }, - submitForm() { - const requiredFields = [ - 'A1', 'A7', 'A10', 'A97', 'A105', 'A108', - 'B1', 'B2', 'B8', 'B9', 'B10', 'B19', 'B20', 'B24', 'B25', 'B26', 'B27', 'B30', - 'D1', 'D2', 'D4', 'D5', 'D7' - ]; - const emptyFields = requiredFields.filter(key => !this.formData[key]); - if (emptyFields.length > 0) { - uni.showToast({ - title: `必填项未填写:${emptyFields[0]}`, - icon: 'none', - duration: 2000 - }); - return; - } - - const submitStr = this.formatSubmitData(); - console.log('提交数据:', submitStr); - - uni.request({ - url: 'https://your-backend-domain.com/api/contract/submit-full', - method: 'POST', - header: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Authorization': uni.getStorageSync('token') || '' - }, - data: { - contractData: submitStr, - merchantId: uni.getStorageSync('merchantId') || '', - timestamp: new Date().getTime() - }, - success: (res) => { - if (res.statusCode === 200 && res.data.code === 200) { - uni.showToast({ - title: '合同提交成功!', - icon: 'success', - duration: 2000 - }); - setTimeout(() => { - uni.navigateTo({ - url: `/pages/contract/submit-success?orderNo=${res.data.data.orderNo}` - }); - }, 2000); - } else { - uni.showToast({ - title: res.data.msg || '提交失败,请重试', - icon: 'none', - duration: 2000 - }); - } - }, - fail: (err) => { - console.error('接口请求失败:', err); - uni.showToast({ - title: '网络异常,请检查网络后重试', - icon: 'none', - duration: 2000 - }); - } - }); + mounted() { + // 页面加载时从本地存储中恢复草稿 + const draft = uni.getStorageSync('contractDraft'); + if (draft) { + this.paramData = draft; } }, - onLoad() { - const savedDraft = uni.getStorageSync('fullContractDraft'); - if (savedDraft) { - // 合并对象而不是直接替换,确保数组字段保持数组类型 - Object.assign(this.formData, savedDraft); - - // 确保所有多选相关的数组字段保持数组类型 - const arrayFields = ['A2', 'A3', 'A4', 'A6', 'A9', 'A11', 'A12', 'A13', 'A39', 'A43', 'A46', 'A51', - 'A53', 'A57', 'A62', 'A66', 'A70', 'A71', 'A72', 'A91', 'A92', 'A98', 'A99', - 'A100', 'A101', 'B3', 'B4', 'B5', 'B6', 'B16', 'B17', 'B48', 'B49', 'B50', - 'B52', 'B53', 'B54', 'B55', 'B56', 'C6', 'C7', 'C13', 'C14', 'C20', 'C21', - 'A36_checked', 'AN1']; - - arrayFields.forEach(field => { - if (!Array.isArray(this.formData[field])) { - this.formData[field] = []; + methods: { + // 提交申请 + submitApplication() { + // 处理paramData中值为false的字段,转换为空字符串 + const processedParamData = { ...this.paramData }; + Object.keys(processedParamData).forEach(key => { + if (processedParamData[key] == false) { + processedParamData[key] = ""; } }); + + // 将处理后的paramData转换为JSON字符串 + const ecContentParameters = JSON.stringify(processedParamData); + // 输出指定格式的内容 + const result = { + "ec_content_parameters": ecContentParameters + }; + console.log("提交的内容:", JSON.stringify(result)); + // 可以根据实际需求进行后续操作,如发送请求等 + uni.showToast({ + title: '提交成功', + icon: 'success', + duration: 1500, + success: () => { + // 延迟返回,确保用户看到成功提示 + setTimeout(() => { + // 触发事件,传递协议内容给上一页 + uni.$emit('agreementSigned', { + ec_content: ecContentParameters + }); + // 返回上一页 + uni.navigateBack({ + delta: 1 + }); + }, 1000); + } + }); + }, + // 保存草稿箱 + saveDraft() { + // 将paramData保存到本地存储 + uni.setStorageSync('contractDraft', this.paramData); + uni.showToast({ + title: '草稿保存成功', + icon: 'success' + }); } - - const today = new Date(); - const year = today.getFullYear().toString(); - const month = (today.getMonth() + 1).toString().padStart(2, '0'); - const day = today.getDate().toString().padStart(2, '0'); - this.formData.A108 = year; - this.formData.A109 = month; - this.formData.A110 = day; - - // 设置默认值 - if (!this.formData.A102) this.formData.A102 = '中国境内'; } }; diff --git a/packages/customerService/establishAcceptor/index.vue b/packages/customerService/establishAcceptor/index.vue index 5d44b2ee..cfdc04a2 100644 --- a/packages/customerService/establishAcceptor/index.vue +++ b/packages/customerService/establishAcceptor/index.vue @@ -172,8 +172,8 @@ export default { // 账户类型选项 accountTypeOptions: [ - { value: 'PERSONAL', label: '个人账户' }, - { value: 'COMPANY', label: '企业账户' } + { value: '57', label: '对公' }, + { value: '58', label: '对私' } ], // 附件类型选项 diff --git a/packages/customerService/sign/index.vue b/packages/customerService/sign/index.vue index a4ba9316..fc307c9e 100644 --- a/packages/customerService/sign/index.vue +++ b/packages/customerService/sign/index.vue @@ -134,6 +134,7 @@ export default { data() { return { formData: { + mch_id: '000', ec_type_code: 'Ec007', cert_type: '', cert_name: '', @@ -176,6 +177,22 @@ export default { if (options.ec_content) { this.formData.ec_content_parameters = options.ec_content; } + + // 监听协议签署成功事件 + uni.$on('agreementSigned', (data) => { + if (data && data.ec_content) { + this.formData.ec_content_parameters = data.ec_content; + uni.showToast({ + title: '协议签署成功', + icon: 'success' + }); + } + }); + }, + + // 页面卸载时移除事件监听 + onUnload() { + uni.$off('agreementSigned'); }, methods: { //下载合同 diff --git a/packages/storeManagement/index/index.vue b/packages/storeManagement/index/index.vue index 753d3dc4..a6e45548 100644 --- a/packages/storeManagement/index/index.vue +++ b/packages/storeManagement/index/index.vue @@ -132,6 +132,16 @@ export default { name: "电子签约", url: "/packages/customerService/sign/index", }, + { + image: "https://static.hshuishang.com/contract.png", + name: "商户进件", + url: "/packages/customerService/addMer/index", + }, + { + image: "https://static.hshuishang.com/contract.png", + name: "分账开通", + url: "/packages/customerService/applyLedgerMer/index", + }, { image: "https://static.hshuishang.com/contract.png", name: "创建接收方", @@ -141,16 +151,6 @@ export default { image: "https://static.hshuishang.com/contract.png", name: "申请绑定", url: "/packages/customerService/applyBind/index", - }, - { - image: "https://static.hshuishang.com/contract.png", - name: "商户进件", - url: "/packages/customerService/addMer/index", - }, - { - image: "https://static.hshuishang.com/contract.png", - name: "分账申请", - url: "/packages/customerService/applyLedgerMer/index", } ], walletInfo: {},