@xm-zx/material 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,182 @@
1
+ # @xm-zx/material
2
+
3
+ 企业开户材料提交流程组件,适用于 uni-app Vue3 项目。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install @xm-zx/material
9
+ ```
10
+
11
+ ## 使用
12
+
13
+ ### 全局注册
14
+
15
+ ```js
16
+ import { createApp } from 'vue'
17
+ import ZxMaterial from '@xm-zx/material'
18
+
19
+ const app = createApp(App)
20
+ app.use(ZxMaterial)
21
+ ```
22
+
23
+ ### 按需引入
24
+
25
+ ```js
26
+ import { ZxMaterial, Instructions, PayVerify, SmsVerify, Settlement } from '@xm-zx/material'
27
+ ```
28
+
29
+ ### 组件使用
30
+
31
+ ```vue
32
+ <template>
33
+ <ZxMaterial
34
+ ref="materialRef"
35
+ :financeEnterpriseId="financeEnterpriseId"
36
+ :accountType="accountType"
37
+ :accountOpeningData="accountOpeningData"
38
+ @queryEnterprise="handleQueryEnterprise"
39
+ @queryStatus="handleQueryStatus"
40
+ @updateSettleStatus="handleUpdateSettleStatus"
41
+ @smallAmountPayment="handleSmallAmountPayment"
42
+ @sendVerifySms="handleSendVerifySms"
43
+ @confirmVerifyCode="handleConfirmVerifyCode"
44
+ @settleAuthenticApply="handleSettleAuthenticApply"
45
+ @settleAuthenticConfirm="handleSettleAuthenticConfirm"
46
+ @authentication="handleAuthentication"
47
+ @reSubmit="handleReSubmit"
48
+ @toIndex="handleToIndex"
49
+ />
50
+ </template>
51
+
52
+ <script setup>
53
+ import { ref } from 'vue'
54
+
55
+ const materialRef = ref(null)
56
+ const accountOpeningData = ref({})
57
+
58
+ // 查询企业信息
59
+ const handleQueryEnterprise = async ({ financeEnterpriseId }) => {
60
+ const res = await yourApi.queryEnterprise(financeEnterpriseId)
61
+ materialRef.value.setAccountOpeningInfo(res.data)
62
+ }
63
+
64
+ // 查询开户状态
65
+ const handleQueryStatus = async ({ accountOpeningApplicationId }) => {
66
+ const res = await yourApi.queryStatus(accountOpeningApplicationId)
67
+ materialRef.value.setStatus(res.data.accountOpeningStatus)
68
+ }
69
+
70
+ // 更新结算授权状态
71
+ const handleUpdateSettleStatus = async ({ accountOpeningApplicationId, callback }) => {
72
+ await yourApi.updateSettleStatus({ accountOpeningApplicationId })
73
+ callback()
74
+ }
75
+
76
+ // 小额打款验证
77
+ const handleSmallAmountPayment = async ({ accountOpeningApplicationId, verifyAmount, callback }) => {
78
+ const res = await yourApi.smallAmountPayment({ accountOpeningApplicationId, verifyAmount })
79
+ uni.showToast({ title: res.msg, icon: 'none' })
80
+ callback()
81
+ }
82
+
83
+ // 发送短信验证码
84
+ const handleSendVerifySms = async ({ accountOpeningApplicationId, verifyType }) => {
85
+ const res = await yourApi.sendVerifySms({ accountOpeningApplicationId, verifyType })
86
+ uni.showToast({ title: res.msg, icon: 'none' })
87
+ }
88
+
89
+ // 确认验证码
90
+ const handleConfirmVerifyCode = async ({ accountOpeningApplicationId, verifyType, verifyCode, callback }) => {
91
+ const res = await yourApi.confirmVerifyCode({ accountOpeningApplicationId, verifyType, verifyCode })
92
+ uni.showToast({ title: res.msg, icon: 'none' })
93
+ callback()
94
+ }
95
+
96
+ // 结算授权申请
97
+ const handleSettleAuthenticApply = async ({ accountOpeningApplicationId }) => {
98
+ const res = await yourApi.settleAuthenticApply({ accountOpeningApplicationId })
99
+ uni.showToast({ title: res.msg, icon: 'none' })
100
+ }
101
+
102
+ // 结算授权确认
103
+ const handleSettleAuthenticConfirm = async ({ accountOpeningApplicationId, verifyCode, callback }) => {
104
+ const res = await yourApi.settleAuthenticConfirm({ accountOpeningApplicationId, verifyCode })
105
+ uni.showToast({ title: res.msg, icon: 'none' })
106
+ callback()
107
+ }
108
+
109
+ // 去开户
110
+ const handleAuthentication = ({ financeEnterpriseId, accountType }) => {
111
+ uni.navigateTo({
112
+ url: `/subPages/authorization/index?financeEnterpriseId=${financeEnterpriseId}&accountType=${accountType}`
113
+ })
114
+ }
115
+
116
+ // 重新提交
117
+ const handleReSubmit = ({ financeEnterpriseId }) => {
118
+ uni.navigateTo({
119
+ url: `/subPages/authorization/index?financeEnterpriseId=${financeEnterpriseId}`
120
+ })
121
+ }
122
+
123
+ // 返回首页
124
+ const handleToIndex = () => {
125
+ uni.switchTab({ url: '/pages/tab/tabOne' })
126
+ }
127
+ </script>
128
+ ```
129
+
130
+ ## 组件说明
131
+
132
+ | 组件名 | 说明 |
133
+ |--------|------|
134
+ | ZxMaterial | 完整的开户材料提交流程组件 |
135
+ | Instructions | 材料准备说明组件 |
136
+ | PayVerify | 小额打款验证组件 |
137
+ | SmsVerify | 短信验证组件 |
138
+ | Settlement | 结算授权组件 |
139
+
140
+ ## Props
141
+
142
+ ### ZxMaterial
143
+
144
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
145
+ |------|------|------|--------|------|
146
+ | financeEnterpriseId | String | 否 | '' | 企业ID |
147
+ | accountType | String | 否 | '' | 账户类型 |
148
+ | accountOpeningData | Object | 否 | {} | 开户信息(外部传入) |
149
+
150
+ ## Events
151
+
152
+ | 事件名 | 说明 | 回调参数 |
153
+ |--------|------|----------|
154
+ | queryEnterprise | 查询企业信息 | { financeEnterpriseId } |
155
+ | queryStatus | 查询开户状态 | { accountOpeningApplicationId } |
156
+ | updateSettleStatus | 更新结算状态 | { accountOpeningApplicationId, callback } |
157
+ | smallAmountPayment | 小额打款验证 | { accountOpeningApplicationId, verifyAmount, callback } |
158
+ | sendVerifySms | 发送短信验证码 | { accountOpeningApplicationId, verifyType } |
159
+ | confirmVerifyCode | 确认验证码 | { accountOpeningApplicationId, verifyType, verifyCode, callback } |
160
+ | settleAuthenticApply | 结算授权申请 | { accountOpeningApplicationId } |
161
+ | settleAuthenticConfirm | 结算授权确认 | { accountOpeningApplicationId, verifyCode, callback } |
162
+ | authentication | 去开户 | { financeEnterpriseId, accountType } |
163
+ | reSubmit | 重新提交 | { financeEnterpriseId } |
164
+ | toIndex | 返回首页 | - |
165
+
166
+ ## Expose Methods
167
+
168
+ | 方法名 | 说明 | 参数 |
169
+ |--------|------|------|
170
+ | getInfo | 触发查询企业信息 | - |
171
+ | setAccountOpeningInfo | 设置开户信息 | data |
172
+ | setStatus | 设置开户状态 | status |
173
+
174
+ ## 设计说明
175
+
176
+ 组件不直接调用 API,而是通过事件将数据抛出,由外部项目处理 API 调用。
177
+
178
+ ## 注意事项
179
+
180
+ - 本组件依赖 `uv-ui` 组件库
181
+ - 需要在 uni-app Vue3 项目中使用
182
+ - 需要外部实现 API 调用逻辑
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@xm-zx/material",
3
+ "version": "1.0.0",
4
+ "description": "企业开户材料提交流程组件,适用于 uni-app Vue3 项目。",
5
+ "main": "src/index.js",
6
+ "files": [
7
+ "src",
8
+ "types"
9
+ ],
10
+ "keywords": [
11
+ "uni-app",
12
+ "vue3",
13
+ "material",
14
+ "enterprise",
15
+ "account-opening"
16
+ ],
17
+ "author": "zx",
18
+ "license": "MIT",
19
+ "private": false
20
+ }
@@ -0,0 +1,253 @@
1
+ <template>
2
+ <view>
3
+ <view class="material-section">
4
+ <view class="material-section-title">
5
+ <span>材料准备</span>
6
+ <image src="/static/icons/b_underline.png" class="g_underline" />
7
+ </view>
8
+ <view class="material-section-desc">需要拍摄原件,且在证件有效期内</view>
9
+ <view class="material-card material-card--light" v-if="type != 'PERSONAL'">
10
+ <view class="material-card-info">
11
+ <view class="material-card-title">营业执照</view>
12
+ <view class="material-card-desc">{{ accountType == 'INDIVIDUAL' ? '个体工商户' : ''}}营业执照(实拍原件)</view>
13
+ </view>
14
+ <image class="material-card-img material-card-img--sm" src="https://qiniu-cdn.joinsun.vip/prod/mp-trade-supplier/businessLicense.png" />
15
+ </view>
16
+ <view class="material-card material-card--light">
17
+ <view class="material-card-info">
18
+ <view class="material-card-title">法人或经营者证件</view>
19
+ <view class="material-card-desc">身份证或护照等(实拍原件)</view>
20
+ </view>
21
+ <image class="material-card-img material-card-img--md" src="https://qiniu-cdn.joinsun.vip/prod/mp-trade-supplier/idCard.png" />
22
+ </view>
23
+ <view class="material-card material-card--gray material-card--top">
24
+ <view class="material-card-info">
25
+ <view class="material-card-title">实名认证信息</view>
26
+ <view class="material-card-desc material-card-desc--tall">{{ accountType == 'INDIVIDUAL' ? '法人银行卡信息和法人手机号' : '企业对公银行开户信息或法人(经营者)手机号'}}</view>
27
+ </view>
28
+ <image class="material-card-img material-card-img--lg" src="https://qiniu-cdn.joinsun.vip/prod/mp-trade-supplier/bankCard.png" />
29
+ </view>
30
+ <view class="material-card material-card--gray material-card--top">
31
+ <view class="material-card-info">
32
+ <view class="material-card-title">经办人证件及授权书</view>
33
+ <view class="material-card-desc material-card-desc--tall">企业经办人开户,需要上传经办人身份证、联系人授权书<text class="download-text" @click="download">{{ isdownload ? '正在下载' : '下载模板'}}</text></view>
34
+ </view>
35
+ <image class="material-card-img material-card-img--lg" src="https://qiniu-cdn.joinsun.vip/prod/mp-channel/PowerOfAttorney.png" />
36
+ </view>
37
+ </view>
38
+ <view class="material-btn-box">
39
+ <button class="material-btn" @click="authentication">立即开户</button>
40
+ </view>
41
+ <uv-popup mode="center" ref="popupRef" :safeAreaInsetBottom="false" closeable round="20rpx">
42
+ <view class="popup-box">
43
+ <image src="/static/icons/material/download-success.png" class="download-success" />
44
+ <view class="popup-title">下载成功</view>
45
+ <view class="popup-desc">授权书盖公章后,拍照上传图片即可</view>
46
+ <view class="popup-btn" @click="savaCheck">查看文件</view>
47
+ </view>
48
+ </uv-popup>
49
+ </view>
50
+ </template>
51
+
52
+ <script setup>
53
+ import { ref } from 'vue'
54
+
55
+ const TEMPLATE_DOWNLOAD_URL = 'https://img-1.joinsun.vip/upload/120407_6c8ed9d8f8213279c612e90405e2e757.doc'
56
+
57
+ const props = defineProps({
58
+ financeEnterpriseId: {
59
+ type: String,
60
+ default: ''
61
+ },
62
+ accountType: {
63
+ type: String,
64
+ default: ''
65
+ },
66
+ type: {
67
+ type: String,
68
+ default: ''
69
+ }
70
+ })
71
+
72
+ const emit = defineEmits(['authentication'])
73
+
74
+ const isdownload = ref(false)
75
+ const popupRef = ref(null)
76
+ const tempFilePath = ref('')
77
+
78
+ const showMsg = (msg) => {
79
+ uni.showToast({ title: msg, icon: 'none' })
80
+ }
81
+
82
+ const download = () => {
83
+ isdownload.value = true
84
+ uni.downloadFile({
85
+ url: TEMPLATE_DOWNLOAD_URL,
86
+ success(res) {
87
+ tempFilePath.value = res.tempFilePath
88
+ popupRef.value.open()
89
+ isdownload.value = false
90
+ },
91
+ fail() {
92
+ showMsg('下载失败')
93
+ isdownload.value = false
94
+ }
95
+ })
96
+ }
97
+
98
+ const savaCheck = () => {
99
+ uni.getFileSystemManager().saveFile({
100
+ tempFilePath: tempFilePath.value,
101
+ success(res) {
102
+ uni.openDocument({
103
+ filePath: res.savedFilePath,
104
+ showMenu: true
105
+ })
106
+ }
107
+ })
108
+ }
109
+
110
+ const authentication = () => {
111
+ emit('authentication')
112
+ }
113
+ </script>
114
+
115
+ <style lang="scss" scoped>
116
+ .material-section {
117
+ position: relative;
118
+ z-index: 2;
119
+ padding: 24rpx 0 0 0;
120
+ background: #fff;
121
+ border-radius: 16rpx;
122
+ }
123
+ .material-section-title {
124
+ font-size: 36rpx;
125
+ color: #333;
126
+ height: 40rpx;
127
+ line-height: 40rpx;
128
+ font-weight: normal;
129
+ margin: 0 0 24rpx 24rpx;
130
+ position: relative;
131
+ font-family: 'AlibabaBold';
132
+ }
133
+ .g_underline {
134
+ position: absolute;
135
+ width: 142rpx;
136
+ height: 8rpx;
137
+ bottom: 0;
138
+ left: 0;
139
+ }
140
+ .material-section-desc {
141
+ font-size: 28rpx;
142
+ color: #989899;
143
+ height: 40rpx;
144
+ line-height: 40rpx;
145
+ font-weight: normal;
146
+ margin: 0 0 40rpx 24rpx;
147
+ }
148
+ .material-card {
149
+ width: 654rpx;
150
+ padding: 24rpx;
151
+ border-radius: 20rpx;
152
+ display: flex;
153
+ align-items: center;
154
+ justify-content: space-between;
155
+ margin: 0 auto 24rpx auto;
156
+ &--light { background: #f8fbfd; }
157
+ &--gray { background: #f4f8fa; }
158
+ &--top { padding-top: 40rpx; }
159
+ }
160
+ .material-card-info {
161
+ display: flex;
162
+ flex-direction: column;
163
+ justify-content: center;
164
+ }
165
+ .material-card-title {
166
+ font-size: 32rpx;
167
+ color: #333;
168
+ height: 40rpx;
169
+ line-height: 40rpx;
170
+ font-weight: normal;
171
+ font-family: 'AlibabaMedium';
172
+ margin-bottom: 16rpx;
173
+ }
174
+ .material-card-desc {
175
+ font-size: 28rpx;
176
+ color: #989899;
177
+ height: 40rpx;
178
+ line-height: 40rpx;
179
+ font-weight: normal;
180
+ width: 416rpx;
181
+ .download-text {
182
+ color: #188EFE;
183
+ margin-left: 4rpx;
184
+ }
185
+ &--tall { height: 80rpx; }
186
+ }
187
+ .material-card-img {
188
+ flex-shrink: 0;
189
+ height: 112rpx;
190
+ &--sm { width: 150rpx; }
191
+ &--md { width: 188rpx; }
192
+ &--lg { width: 178rpx; }
193
+ }
194
+ .material-btn-box {
195
+ width: 100vw;
196
+ position: fixed;
197
+ left: 0;
198
+ bottom: calc(40rpx + env(safe-area-inset-bottom));
199
+ display: flex;
200
+ justify-content: center;
201
+ z-index: 10;
202
+ }
203
+ .material-btn {
204
+ width: 702rpx;
205
+ height: 88rpx;
206
+ background: #188EFE;
207
+ color: #fff;
208
+ border-radius: 10rpx;
209
+ font-size: 32rpx;
210
+ font-weight: normal;
211
+ text-align: center;
212
+ line-height: 88rpx;
213
+ border: none;
214
+ }
215
+ .popup-box {
216
+ width: 654rpx;
217
+ height: 512rpx;
218
+ display: flex;
219
+ flex-direction: column;
220
+ align-items: center;
221
+ .download-success {
222
+ width: 120rpx;
223
+ height: 120rpx;
224
+ margin-top: 80rpx;
225
+ }
226
+ .popup-title {
227
+ height: 44rpx;
228
+ line-height: 44rpx;
229
+ font-size: 32rpx;
230
+ font-family: 'AlibabaBold';
231
+ text-align: center;
232
+ margin: 24rpx auto 40rpx auto;
233
+ }
234
+ .popup-desc {
235
+ height: 40rpx;
236
+ line-height: 40rpx;
237
+ text-align: center;
238
+ color: #19191980;
239
+ font-size: 28rpx;
240
+ margin-bottom: 36rpx;
241
+ }
242
+ .popup-btn {
243
+ width: 574rpx;
244
+ height: 88rpx;
245
+ text-align: center;
246
+ line-height: 88rpx;
247
+ background: #188EFE;
248
+ color: #fff;
249
+ font-size: 32rpx;
250
+ border-radius: 12rpx;
251
+ }
252
+ }
253
+ </style>
@@ -0,0 +1,449 @@
1
+ <template>
2
+ <view class="material-main" :style="{
3
+ background: step == 1 ? '#fff' : '#f5f5f5'
4
+ }">
5
+ <view class="process">
6
+ <view class="process-top">
7
+ <image :src="getStepIcon(1)" :class="getStepClass(1)" />
8
+ <view :class="step > 1 ? 'is-connect connect' : 'connect'"></view>
9
+ <image :src="getStepIcon(2)" :class="getStepClass(2)" />
10
+ <view :class="step > 2 ? 'is-connect connect' : 'connect'"></view>
11
+ <image :src="getStepIcon(3)" :class="getStepClass(3)" />
12
+ <view :class="step > 3 ? 'is-connect connect' : 'connect'"></view>
13
+ <image :src="step == 4 && !isSms ? '/static/icons/material/in-progress.png' : getStepIcon(4)" :class="step == 4 && !isSms ? 'in-progress' : getStepClass(4)" />
14
+ <view :class="step > 4 ? 'is-connect connect' : 'connect'"></view>
15
+ <image :src="getStepIcon(5)" :class="getStepClass(5)" />
16
+ </view>
17
+ <view class="process-bottom">
18
+ <view :class="step >= 1 ? 'step-text black-color' : 'step-text'">提交材料</view>
19
+ <view :class="step >= 2 && isPay ? 'step-text black-color' : 'step-text'">小额打款</view>
20
+ <view :class="step >= 3 ? 'step-text black-color' : 'step-text'">开户审核</view>
21
+ <view :class="step >= 4 ? 'step-text black-color' : 'step-text'">短信验证</view>
22
+ <view :class="step == 5 ? 'step-text black-color' : 'step-text'">结算授权</view>
23
+ </view>
24
+ </view>
25
+ <Instructions v-if="step == 1 && currentStatus !== AccountOpeningStatus.SUBMIT_FAIL" :financeEnterpriseId="financeEnterpriseId" :accountType="accountOpeningInfo.accountType" @authentication="handleAuthentication" />
26
+ <!-- 提交失败提示(SUBMIT_FAIL状态) -->
27
+ <view v-if="step == 1 && currentStatus === AccountOpeningStatus.SUBMIT_FAIL" class="review-box">
28
+ <image src="https://qiniu-cdn.joinsun.vip/prod/mp-advance/verifyFail.png" class="verifyReview" />
29
+ <view class="review-title">提交失败</view>
30
+ <view class="review-desc">原因:{{ accountOpeningInfo.failureReason }}</view>
31
+ <view class="review-btn" @click="reSubmit">重新提交</view>
32
+ </view>
33
+ <!-- 验证小额打款 -->
34
+ <view v-if="step == 2 && !isPay" class="review-box">
35
+ <image src="https://qiniu-cdn.joinsun.vip/prod/mp-advance/verifyReview.png" class="verifyReview" />
36
+ <view class="review-title">开户资料已提交审核</view>
37
+ <view class="review-desc">点击下方进行小额打款,验证银行账户真实性</view>
38
+ <view class="review-btn" @click="userClickedPay = true">去验证</view>
39
+ </view>
40
+ <payVerify v-if="step == 2 && isPay" @submit="handlePayVerifySubmit" />
41
+ <!-- 开户审核 -->
42
+ <view v-if="step == 3 && currentStatus === AccountOpeningStatus.FAIL" class="review-box">
43
+ <image src="https://qiniu-cdn.joinsun.vip/prod/mp-advance/verifyFail.png" class="verifyReview" />
44
+ <view class="review-title">开户资料审核未通过</view>
45
+ <view class="review-desc review-desc--dark">原因:{{ accountOpeningInfo.failureReason }}</view>
46
+ <view class="review-btn" @click="reSubmit">去修改</view>
47
+ </view>
48
+ <view v-if="step == 3 && currentStatus === AccountOpeningStatus.PENDING_MANUAL_REVIEW" class="review-box">
49
+ <image src="https://qiniu-cdn.joinsun.vip/prod/mp-advance/verifyReview.png" class="verifyReview" />
50
+ <view class="review-title review-title--wide">小额打款验证成功,开户申请预计在3个工作日内完成,请您耐心等待</view>
51
+ <view class="review-btn" @click="toIndex">我知道了</view>
52
+ </view>
53
+ <!-- 短信验证 -->
54
+ <smsVerify v-if="step == 4 && !isSms" @sendSms="handleSendSms" @submit="handleSmsVerifySubmit" />
55
+ <view v-if="step == 4 && currentStatus === AccountOpeningStatus.OPENING" class="review-box">
56
+ <image src="https://qiniu-cdn.joinsun.vip/prod/mp-advance/verifyReview.png" class="verifyReview" />
57
+ <view class="review-title review-title--spaced">开户中,获取开户结果</view>
58
+ <view class="review-btn" @click="getResult">获取结果</view>
59
+ </view>
60
+ <view v-if="step == 4 && currentStatus === AccountOpeningStatus.SUCCESS" class="review-box">
61
+ <image src="https://qiniu-cdn.joinsun.vip/prod/mp-advance/verifySuccess.png" class="verifySuccess" />
62
+ <view class="review-title review-title--spaced">开户成功,授权结算后即可完成所有步骤</view>
63
+ <view class="review-btn" @click="goToSettlement">去授权结算</view>
64
+ </view>
65
+ <!-- 结算授权 -->
66
+ <settlement v-if="step == 5 && !isSettlement" @sendSms="handleSendSettleVerify" @submit="handleSettleVerifySubmit" />
67
+ <view v-if="step == 5 && isSettlement" class="review-box">
68
+ <image src="https://qiniu-cdn.joinsun.vip/prod/mp-advance/verifyOk.png" class="verifyOk" />
69
+ <view class="review-title review-title--spaced">恭喜您已完成所有开户任务</view>
70
+ <view class="review-btn" @click="toIndex">我知道了</view>
71
+ </view>
72
+ </view>
73
+ </template>
74
+
75
+ <script setup>
76
+ import { ref, computed, watch, onMounted } from 'vue'
77
+ import Instructions from './Instructions.vue'
78
+ import payVerify from './payVerify.vue'
79
+ import smsVerify from './smsVerify.vue'
80
+ import settlement from './settlement.vue'
81
+
82
+ const props = defineProps({
83
+ // 企业ID
84
+ financeEnterpriseId: {
85
+ type: String,
86
+ default: ''
87
+ },
88
+ // 账户类型
89
+ accountType: {
90
+ type: String,
91
+ default: ''
92
+ },
93
+ // 开户信息(外部传入)
94
+ accountOpeningData: {
95
+ type: Object,
96
+ default: () => ({})
97
+ }
98
+ })
99
+
100
+ const emit = defineEmits([
101
+ 'queryEnterprise', // 查询企业信息
102
+ 'queryStatus', // 查询开户状态
103
+ 'updateSettleStatus', // 更新结算授权状态
104
+ 'smallAmountPayment', // 小额打款验证
105
+ 'sendVerifySms', // 发送短信验证码
106
+ 'confirmVerifyCode', // 确认验证码
107
+ 'settleAuthenticApply', // 结算授权申请
108
+ 'settleAuthenticConfirm',// 结算授权确认
109
+ 'authentication', // 去开户
110
+ 'reSubmit', // 重新提交
111
+ 'toIndex' // 返回首页
112
+ ])
113
+
114
+ // 状态枚举
115
+ const AccountOpeningStatus = {
116
+ INIT: 'INIT',
117
+ SUBMIT_FAIL: 'SUBMIT_FAIL',
118
+ WAIT_SMALL_AMOUNT_VERIFY: 'WAIT_SMALL_AMOUNT_VERIFY',
119
+ PENDING_MANUAL_REVIEW: 'PENDING_MANUAL_REVIEW',
120
+ PENDING_SMS_VERIFY: 'PENDING_SMS_VERIFY',
121
+ PENDING_LEGAL_SMS_VERIFY: 'PENDING_LEGAL_SMS_VERIFY',
122
+ OPENING: 'OPENING',
123
+ SUCCESS: 'SUCCESS',
124
+ FAIL: 'FAIL',
125
+ SETTLE_AUTHENTIC: 'SETTLE_AUTHENTIC',
126
+ SETTLE_AUTHENTIC_SUCCESS: 'SETTLE_AUTHENTIC_SUCCESS'
127
+ }
128
+
129
+ // 短信验证相关状态
130
+ const SMS_VERIFY_STATUSES = [
131
+ AccountOpeningStatus.PENDING_SMS_VERIFY,
132
+ AccountOpeningStatus.PENDING_LEGAL_SMS_VERIFY
133
+ ]
134
+
135
+ // 当前状态
136
+ const currentStatus = ref('')
137
+ const accountOpeningInfo = ref({})
138
+ const forceToSettlement = ref(false)
139
+ const userClickedPay = ref(false)
140
+ const userClickedSettlement = ref(false)
141
+ </script>
142
+
143
+ // 获取步骤图标
144
+ const getStepIcon = (targetStep) => {
145
+ if (step.value > targetStep) return '/static/icons/material/in-success.png'
146
+ if (step.value === targetStep) return '/static/icons/material/in-progress.png'
147
+ return `/static/icons/material/step${targetStep}.png`
148
+ }
149
+
150
+ // 获取步骤图标样式
151
+ const getStepClass = (targetStep) => {
152
+ return step.value === targetStep ? 'in-progress' : 'step-icon'
153
+ }
154
+
155
+ // 状态到步骤的映射函数
156
+ const getStepByStatus = (status) => {
157
+ if (!status) return 1
158
+
159
+ switch (status) {
160
+ case AccountOpeningStatus.INIT:
161
+ case AccountOpeningStatus.SUBMIT_FAIL:
162
+ return 1
163
+ case AccountOpeningStatus.WAIT_SMALL_AMOUNT_VERIFY:
164
+ return 2
165
+ case AccountOpeningStatus.PENDING_MANUAL_REVIEW:
166
+ case AccountOpeningStatus.FAIL:
167
+ return 3
168
+ case AccountOpeningStatus.PENDING_SMS_VERIFY:
169
+ case AccountOpeningStatus.PENDING_LEGAL_SMS_VERIFY:
170
+ case AccountOpeningStatus.SUCCESS:
171
+ case AccountOpeningStatus.OPENING:
172
+ return 4
173
+ case AccountOpeningStatus.SETTLE_AUTHENTIC:
174
+ case AccountOpeningStatus.SETTLE_AUTHENTIC_SUCCESS:
175
+ return 5
176
+ default:
177
+ return 1
178
+ }
179
+ }
180
+
181
+ // 根据状态计算步骤
182
+ const step = computed(() => {
183
+ if (forceToSettlement.value && SMS_VERIFY_STATUSES.includes(currentStatus.value)) {
184
+ return 5
185
+ }
186
+ return getStepByStatus(currentStatus.value)
187
+ })
188
+
189
+ // 根据状态判断各种子状态
190
+ const isPay = computed(() => {
191
+ if (userClickedPay.value) return true
192
+ return currentStatus.value !== AccountOpeningStatus.WAIT_SMALL_AMOUNT_VERIFY
193
+ })
194
+
195
+ const isSms = computed(() => {
196
+ if (SMS_VERIFY_STATUSES.includes(currentStatus.value)) {
197
+ return false
198
+ }
199
+ return true
200
+ })
201
+
202
+ const isSettlement = computed(() => {
203
+ if (userClickedSettlement.value) return true
204
+ return currentStatus.value === AccountOpeningStatus.SETTLE_AUTHENTIC_SUCCESS
205
+ })
206
+
207
+ // 设置开户信息(供外部调用)
208
+ const setAccountOpeningInfo = (data) => {
209
+ accountOpeningInfo.value = data
210
+ accountOpeningInfo.value.accountType = props.accountType || data.accountType
211
+ const newStatus = data?.accountOpeningStatus || data?.accountOpeningInfo?.status || ''
212
+ if (newStatus) {
213
+ currentStatus.value = newStatus
214
+ resetForceFlags()
215
+ }
216
+ }
217
+
218
+ // 设置状态(供外部调用)
219
+ const setStatus = (status) => {
220
+ currentStatus.value = status
221
+ resetForceFlags()
222
+ }
223
+
224
+ // 重置强制标志
225
+ const resetForceFlags = () => {
226
+ const resetStatuses = [
227
+ AccountOpeningStatus.SUCCESS,
228
+ AccountOpeningStatus.OPENING,
229
+ AccountOpeningStatus.SETTLE_AUTHENTIC,
230
+ AccountOpeningStatus.SETTLE_AUTHENTIC_SUCCESS
231
+ ]
232
+ if (resetStatuses.includes(currentStatus.value)) {
233
+ forceToSettlement.value = false
234
+ }
235
+ }
236
+
237
+ // 查询企业信息
238
+ const getInfo = () => {
239
+ emit('queryEnterprise', { financeEnterpriseId: props.financeEnterpriseId })
240
+ }
241
+
242
+ // 查询开户状态
243
+ const getResult = () => {
244
+ emit('queryStatus', { accountOpeningApplicationId: accountOpeningInfo.value.accountOpeningApplicationId })
245
+ }
246
+
247
+ // 跳转到结算授权
248
+ const goToSettlement = () => {
249
+ emit('updateSettleStatus', {
250
+ accountOpeningApplicationId: accountOpeningInfo.value.accountOpeningApplicationId,
251
+ callback: () => {
252
+ if (SMS_VERIFY_STATUSES.includes(currentStatus.value)) {
253
+ forceToSettlement.value = true
254
+ }
255
+ getInfo()
256
+ }
257
+ })
258
+ }
259
+
260
+ // 重新提交
261
+ const reSubmit = () => {
262
+ emit('reSubmit', { financeEnterpriseId: props.financeEnterpriseId })
263
+ }
264
+
265
+ // 去开户
266
+ const handleAuthentication = () => {
267
+ emit('authentication', {
268
+ financeEnterpriseId: props.financeEnterpriseId,
269
+ accountType: props.accountType
270
+ })
271
+ }
272
+
273
+ // 小额打款验证
274
+ const handlePayVerifySubmit = (amount) => {
275
+ emit('smallAmountPayment', {
276
+ accountOpeningApplicationId: accountOpeningInfo.value.accountOpeningApplicationId,
277
+ verifyAmount: amount,
278
+ callback: () => getInfo()
279
+ })
280
+ }
281
+
282
+ // 发送短信验证码
283
+ const handleSendSms = () => {
284
+ emit('sendVerifySms', {
285
+ accountOpeningApplicationId: accountOpeningInfo.value.accountOpeningApplicationId,
286
+ verifyType: 'OPEN_ACCT_SMS_CONTACT_AUTH'
287
+ })
288
+ }
289
+
290
+ // 确认短信验证码
291
+ const handleSmsVerifySubmit = (code) => {
292
+ emit('confirmVerifyCode', {
293
+ accountOpeningApplicationId: accountOpeningInfo.value.accountOpeningApplicationId,
294
+ verifyType: 'OPEN_ACCT_SMS_CONTACT_AUTH',
295
+ verifyCode: code,
296
+ callback: () => getInfo()
297
+ })
298
+ }
299
+
300
+ // 发送结算授权验证码
301
+ const handleSendSettleVerify = () => {
302
+ emit('settleAuthenticApply', {
303
+ accountOpeningApplicationId: accountOpeningInfo.value.accountOpeningApplicationId
304
+ })
305
+ }
306
+
307
+ // 确认结算授权
308
+ const handleSettleVerifySubmit = (code) => {
309
+ emit('settleAuthenticConfirm', {
310
+ accountOpeningApplicationId: accountOpeningInfo.value.accountOpeningApplicationId,
311
+ verifyCode: code,
312
+ callback: () => getInfo()
313
+ })
314
+ }
315
+
316
+ // 返回首页
317
+ const toIndex = () => {
318
+ emit('toIndex')
319
+ }
320
+
321
+ // 监听外部传入的数据
322
+ watch(() => props.accountOpeningData, (newVal) => {
323
+ if (newVal && Object.keys(newVal).length > 0) {
324
+ setAccountOpeningInfo(newVal)
325
+ }
326
+ }, { immediate: true, deep: true })
327
+
328
+ onMounted(() => {
329
+ if (props.financeEnterpriseId) {
330
+ getInfo()
331
+ }
332
+ })
333
+
334
+ // 暴露方法给父组件
335
+ defineExpose({
336
+ getInfo,
337
+ setAccountOpeningInfo,
338
+ setStatus,
339
+ accountOpeningInfo,
340
+ currentStatus,
341
+ step
342
+ })
343
+ </script>
344
+
345
+ <style lang="scss" scoped>
346
+ .material-main {
347
+ min-height: 100vh;
348
+ position: relative;
349
+ }
350
+ .process {
351
+ height: 204rpx;
352
+ background: #f5f5f5;
353
+ overflow: hidden;
354
+ .process-top {
355
+ display: flex;
356
+ align-items: center;
357
+ justify-content: center;
358
+ margin-top: 48rpx;
359
+ .step-icon {
360
+ width: 56rpx;
361
+ height: 56rpx;
362
+ }
363
+ .in-progress {
364
+ width: 36rpx;
365
+ height: 36rpx;
366
+ }
367
+ .connect {
368
+ width: 92rpx;
369
+ height: 12rpx;
370
+ background: #eaeaea;
371
+ }
372
+ .is-connect {
373
+ background: #188EFE;
374
+ }
375
+ }
376
+ .process-bottom {
377
+ margin-top: 24rpx;
378
+ display: flex;
379
+ align-items: center;
380
+ justify-content: space-around;
381
+ padding: 0 12rpx;
382
+ .step-text {
383
+ height: 28rpx;
384
+ line-height: 28rpx;
385
+ font-size: 24rpx;
386
+ color: #19191980;
387
+ }
388
+ }
389
+ }
390
+ .review-box {
391
+ display: flex;
392
+ flex-direction: column;
393
+ align-items: center;
394
+ justify-content: center;
395
+ margin-top: 150rpx;
396
+ .verifyReview {
397
+ width: 176rpx;
398
+ height: 176rpx;
399
+ }
400
+ .verifySuccess {
401
+ width: 154rpx;
402
+ height: 176rpx;
403
+ }
404
+ .verifyOk {
405
+ width: 168rpx;
406
+ height: 176rpx;
407
+ }
408
+ .review-title {
409
+ height: 44rpx;
410
+ line-height: 44rpx;
411
+ font-size: 32rpx;
412
+ font-family: 'AlibabaMedium';
413
+ margin: 48rpx 0;
414
+ &--wide {
415
+ width: 686rpx;
416
+ height: auto;
417
+ margin-bottom: 148rpx;
418
+ text-align: center;
419
+ }
420
+ &--spaced {
421
+ margin-bottom: 170rpx;
422
+ margin-top: 70rpx;
423
+ }
424
+ }
425
+ .review-desc {
426
+ height: 40rpx;
427
+ line-height: 40rpx;
428
+ font-size: 28rpx;
429
+ margin-bottom: 104rpx;
430
+ color: #989899;
431
+ &--dark {
432
+ color: #19191980;
433
+ }
434
+ }
435
+ .review-btn {
436
+ width: 702rpx;
437
+ height: 88rpx;
438
+ border-radius: 12rpx;
439
+ background: #188EFE;
440
+ color: #fff;
441
+ text-align: center;
442
+ line-height: 88rpx;
443
+ font-size: 32rpx;
444
+ }
445
+ }
446
+ .black-color {
447
+ color: #191919 !important;
448
+ }
449
+ </style>
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <view class="payVerify-box">
3
+ <view class="payVerify-title">小额打款验证</view>
4
+ <view class="payVerify-desc">平台会向企业提交的银行账户中转入一笔小额资金,收到后请金额将填入下方并提交。</view>
5
+ <uv-input border="none" fontSize="48rpx" color="#000" type="digit" v-model="amount" :customStyle="inputStyle" />
6
+ <view class="payVerify-tip">金额需>0</view>
7
+ <view class="payVerify-btn" @click="submit">提交验证</view>
8
+ </view>
9
+ </template>
10
+
11
+ <script setup>
12
+ import { ref } from 'vue'
13
+
14
+ const emit = defineEmits(['submit'])
15
+
16
+ const amount = ref('')
17
+
18
+ const inputStyle = {
19
+ height: '120rpx',
20
+ padding: '0',
21
+ paddingLeft: '24rpx',
22
+ background: '#fff',
23
+ fontWeight: 'bold'
24
+ }
25
+
26
+ const showMsg = (msg) => {
27
+ uni.showToast({ title: msg, icon: 'none' })
28
+ }
29
+
30
+ const submit = () => {
31
+ const value = parseFloat(amount.value)
32
+ if (!amount.value || isNaN(value) || value <= 0) {
33
+ showMsg('金额需大于0')
34
+ return
35
+ }
36
+ emit('submit', value)
37
+ }
38
+ </script>
39
+
40
+ <style lang="scss" scoped>
41
+ .payVerify-box {
42
+ padding: 0 24rpx;
43
+ margin-top: 10rpx;
44
+ .payVerify-title {
45
+ height: 60rpx;
46
+ line-height: 60rpx;
47
+ font-size: 44rpx;
48
+ color: #000;
49
+ font-family: 'AlibabaMedium';
50
+ }
51
+ .payVerify-desc {
52
+ line-height: 40rpx;
53
+ font-size: 28rpx;
54
+ color: #19191980;
55
+ margin: 24rpx 0 48rpx 0;
56
+ }
57
+ .payVerify-tip {
58
+ height: 40rpx;
59
+ line-height: 40rpx;
60
+ color: #ff2100;
61
+ margin-top: 20rpx;
62
+ }
63
+ .payVerify-btn {
64
+ width: 702rpx;
65
+ height: 88rpx;
66
+ text-align: center;
67
+ line-height: 88rpx;
68
+ background: #188EFE;
69
+ border-radius: 12rpx;
70
+ color: #fff;
71
+ font-size: 32rpx;
72
+ margin-top: 48rpx;
73
+ }
74
+ }
75
+ </style>
@@ -0,0 +1,140 @@
1
+ <template>
2
+ <view class="payVerify-box">
3
+ <view class="payVerify-title">结算授权</view>
4
+ <view class="payVerify-desc">已向经办人手机号发送验证码,请在5分钟内输入验证码</view>
5
+ <uv-input border="none" fontSize="48rpx" color="#000" type="digit" v-model="code" :customStyle="inputStyle" >
6
+ <template #suffix>
7
+ <uv-code unique-key="page-login" ref="codeRef" changeText="重新发送Xs" @change="codeChange" @end="setTipsColor(false)" @start="setTipsColor(true)"></uv-code>
8
+ <view class="code-btn" :class="{ 'code-btn--disabled': tipsColor }" @click="getCode">{{ tips || '获取验证码' }}</view>
9
+ </template>
10
+ </uv-input>
11
+ <view class="payVerify-btn" @click="submit">提交验证</view>
12
+ <uv-popup mode="bottom" round="20rpx" ref="getCodePopupRef" closeable>
13
+ <view class="popup-box">
14
+ <view class="popup-title">授权结算</view>
15
+ <view class="popup-content">请授权好惠通-众项网络开通账资金结算免验证服务,确认授权后经办人手机号将会收到短信验证码</view>
16
+ <view class="popup-btn" @click="popupOk">确认授权</view>
17
+ </view>
18
+ </uv-popup>
19
+ </view>
20
+ </template>
21
+
22
+ <script setup>
23
+ import { ref } from 'vue'
24
+
25
+ const emit = defineEmits(['sendSms', 'submit'])
26
+
27
+ const codeRef = ref(null)
28
+ const getCodePopupRef = ref(null)
29
+ const tips = ref('')
30
+ const tipsColor = ref(false)
31
+ const code = ref('')
32
+
33
+ const inputStyle = {
34
+ height: '120rpx',
35
+ padding: '0',
36
+ paddingLeft: '24rpx',
37
+ background: '#fff',
38
+ fontWeight: 'bold'
39
+ }
40
+
41
+ const showMsg = (msg) => {
42
+ uni.showToast({ title: msg, icon: 'none' })
43
+ }
44
+
45
+ const codeChange = (e) => {
46
+ tips.value = e
47
+ }
48
+
49
+ const setTipsColor = (value) => {
50
+ tipsColor.value = value
51
+ }
52
+
53
+ const getCode = () => {
54
+ if (codeRef.value.canGetCode) {
55
+ getCodePopupRef.value.open()
56
+ }
57
+ }
58
+
59
+ const popupOk = () => {
60
+ if (codeRef.value.canGetCode) {
61
+ codeRef.value.start()
62
+ getCodePopupRef.value.close()
63
+ emit('sendSms')
64
+ }
65
+ }
66
+
67
+ const submit = () => {
68
+ if (!code.value) {
69
+ showMsg('请先填写验证码')
70
+ return
71
+ }
72
+ emit('submit', code.value)
73
+ }
74
+ </script>
75
+
76
+ <style lang="scss" scoped>
77
+ .payVerify-box {
78
+ padding: 0 24rpx;
79
+ margin-top: 10rpx;
80
+ .payVerify-title {
81
+ height: 60rpx;
82
+ line-height: 60rpx;
83
+ font-size: 44rpx;
84
+ color: #000;
85
+ font-family: 'AlibabaMedium';
86
+ }
87
+ .payVerify-desc {
88
+ line-height: 40rpx;
89
+ font-size: 28rpx;
90
+ color: #19191980;
91
+ margin: 24rpx 0 48rpx 0;
92
+ }
93
+ .payVerify-btn {
94
+ width: 702rpx;
95
+ height: 88rpx;
96
+ text-align: center;
97
+ line-height: 88rpx;
98
+ background: #188EFE;
99
+ border-radius: 12rpx;
100
+ color: #fff;
101
+ font-size: 32rpx;
102
+ margin-top: 48rpx;
103
+ }
104
+ }
105
+ .code-btn {
106
+ width: 242rpx;
107
+ height: 88rpx;
108
+ border-radius: 12rpx;
109
+ margin-left: 20rpx;
110
+ font-size: 28rpx;
111
+ text-align: center;
112
+ line-height: 88rpx;
113
+ color: #188EFE;
114
+ &--disabled { color: #19191980; }
115
+ }
116
+ .popup-box {
117
+ padding: 32rpx;
118
+ .popup-title {
119
+ height: 50rpx;
120
+ line-height: 50rpx;
121
+ font-size: 36rpx;
122
+ font-family: 'AlibabaMedium';
123
+ }
124
+ .popup-content {
125
+ margin-top: 80rpx;
126
+ margin-bottom: 50rpx;
127
+ font-size: 32rpx;
128
+ }
129
+ .popup-btn {
130
+ width: 686rpx;
131
+ height: 88rpx;
132
+ text-align: center;
133
+ line-height: 88rpx;
134
+ border-radius: 10rpx;
135
+ background: #188EFE;
136
+ color: #fff;
137
+ font-size: 36rpx;
138
+ }
139
+ }
140
+ </style>
@@ -0,0 +1,101 @@
1
+ <template>
2
+ <view class="payVerify-box">
3
+ <view class="payVerify-title">短信验证</view>
4
+ <view class="payVerify-desc">向经办人手机号发送验证码,请在5分钟内输入验证码</view>
5
+ <uv-input border="none" fontSize="48rpx" color="#000" type="digit" v-model="code" :customStyle="inputStyle" >
6
+ <template #suffix>
7
+ <uv-code unique-key="page-login" ref="codeRef" changeText="重新发送Xs" @change="codeChange" @end="setTipsColor(false)" @start="setTipsColor(true)"></uv-code>
8
+ <view class="code-btn" :class="{ 'code-btn--disabled': tipsColor }" @click="getCode">{{ tips || '获取验证码' }}</view>
9
+ </template>
10
+ </uv-input>
11
+ <view class="payVerify-btn" @click="submit">提交验证</view>
12
+ </view>
13
+ </template>
14
+
15
+ <script setup>
16
+ import { ref } from 'vue'
17
+
18
+ const emit = defineEmits(['sendSms', 'submit'])
19
+
20
+ const codeRef = ref(null)
21
+ const tips = ref('')
22
+ const tipsColor = ref(false)
23
+ const code = ref('')
24
+
25
+ const inputStyle = {
26
+ height: '120rpx',
27
+ padding: '0',
28
+ paddingLeft: '24rpx',
29
+ background: '#fff',
30
+ fontWeight: 'bold'
31
+ }
32
+
33
+ const showMsg = (msg) => {
34
+ uni.showToast({ title: msg, icon: 'none' })
35
+ }
36
+
37
+ const codeChange = (e) => {
38
+ tips.value = e
39
+ }
40
+
41
+ const setTipsColor = (value) => {
42
+ tipsColor.value = value
43
+ }
44
+
45
+ const getCode = () => {
46
+ if (codeRef.value.canGetCode) {
47
+ codeRef.value.start()
48
+ emit('sendSms')
49
+ }
50
+ }
51
+
52
+ const submit = () => {
53
+ if (!code.value) {
54
+ showMsg('请先填写验证码')
55
+ return
56
+ }
57
+ emit('submit', code.value)
58
+ }
59
+ </script>
60
+
61
+ <style lang="scss" scoped>
62
+ .payVerify-box {
63
+ padding: 0 24rpx;
64
+ margin-top: 10rpx;
65
+ .payVerify-title {
66
+ height: 60rpx;
67
+ line-height: 60rpx;
68
+ font-size: 44rpx;
69
+ color: #000;
70
+ font-family: 'AlibabaMedium';
71
+ }
72
+ .payVerify-desc {
73
+ line-height: 40rpx;
74
+ font-size: 28rpx;
75
+ color: #19191980;
76
+ margin: 24rpx 0 48rpx 0;
77
+ }
78
+ .payVerify-btn {
79
+ width: 702rpx;
80
+ height: 88rpx;
81
+ text-align: center;
82
+ line-height: 88rpx;
83
+ background: #188EFE;
84
+ border-radius: 12rpx;
85
+ color: #fff;
86
+ font-size: 32rpx;
87
+ margin-top: 48rpx;
88
+ }
89
+ }
90
+ .code-btn {
91
+ width: 242rpx;
92
+ height: 88rpx;
93
+ border-radius: 12rpx;
94
+ margin-left: 20rpx;
95
+ font-size: 28rpx;
96
+ text-align: center;
97
+ line-height: 88rpx;
98
+ color: #188EFE;
99
+ &--disabled { color: #19191980; }
100
+ }
101
+ </style>
package/src/index.js ADDED
@@ -0,0 +1,19 @@
1
+ import ZxMaterial from './components/ZxMaterial/index.vue'
2
+ import Instructions from './components/ZxMaterial/Instructions.vue'
3
+ import PayVerify from './components/ZxMaterial/payVerify.vue'
4
+ import SmsVerify from './components/ZxMaterial/smsVerify.vue'
5
+ import Settlement from './components/ZxMaterial/settlement.vue'
6
+
7
+ // 单独导出组件
8
+ export { ZxMaterial, Instructions, PayVerify, SmsVerify, Settlement }
9
+
10
+ // 默认导出插件
11
+ export default {
12
+ install(app) {
13
+ app.component('ZxMaterial', ZxMaterial)
14
+ app.component('Instructions', Instructions)
15
+ app.component('PayVerify', PayVerify)
16
+ app.component('SmsVerify', SmsVerify)
17
+ app.component('Settlement', Settlement)
18
+ }
19
+ }
@@ -0,0 +1,144 @@
1
+ import { DefineComponent } from 'vue'
2
+
3
+ // 开户状态枚举
4
+ export type AccountOpeningStatus =
5
+ | 'INIT'
6
+ | 'SUBMIT_FAIL'
7
+ | 'WAIT_SMALL_AMOUNT_VERIFY'
8
+ | 'PENDING_MANUAL_REVIEW'
9
+ | 'PENDING_SMS_VERIFY'
10
+ | 'PENDING_LEGAL_SMS_VERIFY'
11
+ | 'OPENING'
12
+ | 'SUCCESS'
13
+ | 'FAIL'
14
+ | 'SETTLE_AUTHENTIC'
15
+ | 'SETTLE_AUTHENTIC_SUCCESS'
16
+
17
+ // 开户信息
18
+ export interface AccountOpeningInfo {
19
+ accountOpeningApplicationId?: string
20
+ accountOpeningStatus?: AccountOpeningStatus
21
+ accountType?: string
22
+ failureReason?: string
23
+ [key: string]: any
24
+ }
25
+
26
+ // 查询企业参数
27
+ export interface QueryEnterpriseParams {
28
+ financeEnterpriseId: string
29
+ }
30
+
31
+ // 查询状态参数
32
+ export interface QueryStatusParams {
33
+ accountOpeningApplicationId: string
34
+ }
35
+
36
+ // 更新结算状态参数
37
+ export interface UpdateSettleStatusParams {
38
+ accountOpeningApplicationId: string
39
+ callback: () => void
40
+ }
41
+
42
+ // 小额打款参数
43
+ export interface SmallAmountPaymentParams {
44
+ accountOpeningApplicationId: string
45
+ verifyAmount: number
46
+ callback: () => void
47
+ }
48
+
49
+ // 发送验证码参数
50
+ export interface SendVerifySmsParams {
51
+ accountOpeningApplicationId: string
52
+ verifyType: string
53
+ }
54
+
55
+ // 确认验证码参数
56
+ export interface ConfirmVerifyCodeParams {
57
+ accountOpeningApplicationId: string
58
+ verifyType: string
59
+ verifyCode: string
60
+ callback: () => void
61
+ }
62
+
63
+ // 结算授权申请参数
64
+ export interface SettleAuthenticApplyParams {
65
+ accountOpeningApplicationId: string
66
+ }
67
+
68
+ // 结算授权确认参数
69
+ export interface SettleAuthenticConfirmParams {
70
+ accountOpeningApplicationId: string
71
+ verifyCode: string
72
+ callback: () => void
73
+ }
74
+
75
+ // 开户参数
76
+ export interface AuthenticationParams {
77
+ financeEnterpriseId: string
78
+ accountType: string
79
+ }
80
+
81
+ // 重新提交参数
82
+ export interface ReSubmitParams {
83
+ financeEnterpriseId: string
84
+ }
85
+
86
+ // 组件 Props
87
+ export interface ZxMaterialProps {
88
+ financeEnterpriseId?: string
89
+ accountType?: string
90
+ accountOpeningData?: AccountOpeningInfo
91
+ }
92
+
93
+ export interface InstructionsProps {
94
+ financeEnterpriseId?: string
95
+ accountType?: string
96
+ type?: string
97
+ }
98
+
99
+ // 组件 Emits
100
+ export interface ZxMaterialEmits {
101
+ (e: 'queryEnterprise', params: QueryEnterpriseParams): void
102
+ (e: 'queryStatus', params: QueryStatusParams): void
103
+ (e: 'updateSettleStatus', params: UpdateSettleStatusParams): void
104
+ (e: 'smallAmountPayment', params: SmallAmountPaymentParams): void
105
+ (e: 'sendVerifySms', params: SendVerifySmsParams): void
106
+ (e: 'confirmVerifyCode', params: ConfirmVerifyCodeParams): void
107
+ (e: 'settleAuthenticApply', params: SettleAuthenticApplyParams): void
108
+ (e: 'settleAuthenticConfirm', params: SettleAuthenticConfirmParams): void
109
+ (e: 'authentication', params: AuthenticationParams): void
110
+ (e: 'reSubmit', params: ReSubmitParams): void
111
+ (e: 'toIndex'): void
112
+ }
113
+
114
+ export interface PayVerifyEmits {
115
+ (e: 'submit', amount: number): void
116
+ }
117
+
118
+ export interface SmsVerifyEmits {
119
+ (e: 'sendSms'): void
120
+ (e: 'submit', code: string): void
121
+ }
122
+
123
+ export interface SettlementEmits {
124
+ (e: 'sendSms'): void
125
+ (e: 'submit', code: string): void
126
+ }
127
+
128
+ export interface InstructionsEmits {
129
+ (e: 'authentication'): void
130
+ }
131
+
132
+ declare const ZxMaterial: DefineComponent<ZxMaterialProps, {}, {}, {}, {}, {}, {}, ZxMaterialEmits>
133
+ declare const Instructions: DefineComponent<InstructionsProps, {}, {}, {}, {}, {}, {}, InstructionsEmits>
134
+ declare const PayVerify: DefineComponent<{}, {}, {}, {}, {}, {}, {}, PayVerifyEmits>
135
+ declare const SmsVerify: DefineComponent<{}, {}, {}, {}, {}, {}, {}, SmsVerifyEmits>
136
+ declare const Settlement: DefineComponent<{}, {}, {}, {}, {}, {}, {}, SettlementEmits>
137
+
138
+ export { ZxMaterial, Instructions, PayVerify, SmsVerify, Settlement }
139
+
140
+ declare const _default: {
141
+ install: (app: any) => void
142
+ }
143
+
144
+ export default _default