-
zhangwei
6 天以前 0543f4989353b1ea9e83e3c5e6b14abd56b69167
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
<template>
  <div class="content pb-6">
    <div class="header">
      <div class="headimg">
        <img width="167px" height="44px" src="@/assets/home/logo.png" alt="" />
      </div>
    </div>
    <div class="center w-[70%] bg-white mx-auto m-12">
      <div class="flex items-center p-5 pl-6">
        <img src="@/assets/home/xian.png" alt="" />
        <span style="margin-left: 5px">注册向导</span>
      </div>
      <div class="w-[95%] border-1 border-[#E5E5E5] mx-auto pt-5 pb-2">
        <el-steps style="max-width: 100%" :active="active" align-center>
          <el-step title="阅读注册协议" />
          <el-step title="填写基本信息" />
          <el-step title="信息登记完成" />
        </el-steps>
      </div>
      <div v-if="active == 1" class="h-[100%]">
        <div class="text-center pt-5 pb-1.5">注册条款</div>
        <div
          class="w-[95%] h-65 border-1 border-[#E5E5E5] mx-auto p-2 overflow-y-auto"
        >
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
          <h3>注册采购供应商应具备以下条件</h3>
        </div>
      </div>
      <div v-else-if="active == 2" class="flex justify-center mt-5">
        <el-form
          ref="ruleFormRef"
          style="width: 95%"
          :model="state.ruleForm"
          :rules="state.rules"
          label-width="auto"
        >
          <el-row>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
              <el-form-item label="企业类型">
                <el-select
                  v-model="state.ruleForm.enterpriseType"
                  placeholder="请选择"
                  clearable
                >
                  <el-option label="成立" value="Valid" />
                  <el-option label="驳回" value="Rejected" />
                  <el-option label="其它" value="Other" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row><div class="baseclass">基本资料</div></el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
              <el-form-item label="交易主体">
                <el-input
                  v-model="state.ruleForm.transactionName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
              <el-form-item label="营业执照">
                <el-upload
                  :limit="1"
                  :action="`${baseUrlApi('/api/upFile/upBizLicense')}`"
                  :show-file-list="false"
                  :on-success="handleAvatarSuccess"
                  :before-upload="beforeAvatarUpload"
                >
                  <img
                    v-if="state.ruleForm.businessLicense"
                    :src="state.ruleForm.businessLicense"
                    class="avatar"
                  />
                  <el-button v-else type="primary">上传</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
              <el-form-item label="企业名称">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="统一社会信用代码">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="注册资金">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                >
                  <template #append>万元</template></el-input
                >
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="8">
              <el-form-item label="法定代表人">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
 
            <el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
              <el-form-item label="住所地">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
 
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="联系电话">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
 
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="成立时间">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
 
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="主营业务">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
 
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="邮箱">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
              <el-form-item label="法定代表人">
                <el-upload>
                  <el-button type="primary">上传身份证</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="姓名">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="身份证">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="联系电话">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
              <el-form-item label="业务经办人">
                <el-upload>
                  <el-button type="primary">上传身份证</el-button>
                </el-upload>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="姓名">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="身份证">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="联系电话">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
              <el-form-item label="开户行">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
              <el-form-item label="银行账号">
                <el-input
                  v-model="state.ruleForm.nickName"
                  placeholder="请输入"
                />
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </div>
      <template v-else>
        <el-result title="恭喜您,登记完成!">
          <template #icon>
            <img src="@/assets/home/result.png" />
          </template>
          <template #extra>
            <el-button type="primary">确认</el-button>
          </template>
        </el-result>
      </template>
      <div v-if="active !== 3" class="mx-auto pt-2 pb-5 flex justify-center">
        <el-button :disabled="active == 1" @click="backStep">上一步</el-button>
        <el-button type="primary" @click="nextStep"
          ><span v-if="active == 1">同意</span>下一步</el-button
        >
      </div>
    </div>
  </div>
</template>
<script setup lang="tsx">
import { h, ref, reactive } from "vue";
import type { FormInstance, FormRules, UploadProps } from "element-plus";
import { message } from "@/utils/message";
import { baseUrlApi } from "@/api/util";
import {
  addDialog,
  closeDialog,
  updateDialog,
  closeAllDialog
} from "@/components/ReDialog";
 
defineOptions({
  name: "RegisterNav"
});
const ruleFormRef = ref<FormInstance>();
const state = reactive({
  isShowPassword: false,
  ruleForm: {
    // 主键(唯一标识)
    id: null, // integer($int64),可空
    // 企业类型(从预设企业类型列表中选择)
    enterpriseType: null, // string,可空
    // 交易主体代码(同角色代码,不可空,最小长度为1)
    transactionCode: "", // string,必填
    // 交易主体名称
    transactionName: null, // string,可空
    // 营业执照文件路径
    businessLicense: null, // string,可空
    // 企业名称
    enterpriseName: null, // string,可空
    // 统一社会信用代码
    unifiedSocialCreditCode: null, // string,可空
    // 注册资金(单位:万元)
    registeredCapital: null, // number($double),可空
    // 法定代表人姓名
    legalRepresentativeName: null, // string,可空
    // 法定代表人身份证文件路径
    legalRepresentativeIdCard: null, // string,可空
    // 法定代表人身份证号码
    legalRepresentativeIdNumber: null, // string,可空
    // 法定代表人联系电话
    legalRepresentativePhone: null, // string($tel),可空
    // 企业住所(下拉选择,暂以字符串接收)
    residence: null, // string,可空
    // 企业联系电话
    enterprisePhone: null, // string($tel),可空
    // 企业成立时间(格式示例:2025-07-08 14:56:54)
    establishmentTime: null, // string($date-time),可空
    // 企业主营业务
    mainBusiness: null, // string,可空
    // 企业邮箱
    enterpriseEmail: null, // string,可空
    // 业务经办人姓名
    operatorName: null, // string,可空
    // 业务经办人身份证文件路径或标识(上传后存储信息)
    operatorIdCard: null, // string,可空
    // 业务经办人身份证号码
    operatorIdNumber: null, // string,可空
    // 业务经办人联系电话
    operatorPhone: null, // string($tel),可空
    // 企业开户行
    bankName: null, // string,可空
    // 企业银行账号
    bankAccount: null // string,可空
  },
  type: "",
  rules: {
    phoneVCode: [
      {
        required: true,
        message: "请输入手机验证码",
        trigger: "blur"
      }
    ],
    nickName: [
      {
        required: true,
        message: "请输入姓名",
        trigger: "blur"
      }
    ],
    phone: [
      {
        required: true,
        message: "请输入您的手机号码",
        trigger: "blur"
      }
    ],
    exRoleCode: [
      {
        required: true,
        message: "请选择角色",
        trigger: "blur"
      }
    ]
    // code: [{ required: true, message: t('message.account.placeholder4'), trigger: 'blur' }],
  },
  loading: {
    signIn: false
  },
  captchaImage: "",
  rotateVerifyVisible: false,
  // rotateVerifyImg: verifyImg,
  // rotateVerifyImg: themeConfig.value.logoUrl,
  secondVerEnabled: false,
  // captchaEnabled: false,
  isPassRotate: false,
  capsLockVisible: false,
  hideTenantForLogin: false,
  expirySeconds: 60, // 验证码过期时间
  phoneSeconds: 0, // 手机验证码倒计时
  roleList: []
});
 
let active = ref(1);
const nextStep = () => {
  if (active.value >= 2) {
    addDialog({
      width: "20%",
      title: "确认信息",
      contentRenderer: () => (
        <p>
          请您认真核对填报的资料是否正确,如因填报错误影响后续投标等操作,平台不承担任何责任,所有后果需要自行承担,请您谨慎填写!
        </p>
      ), // jsx 语法 (注意在.vue文件启用jsx语法,需要在script开启lang="tsx")
      closeCallBack: ({ options, args }) => {
        // options.props 是响应式的
        // const { formInline } = options.props as FormProps;
        // const text = `姓名:${formInline.user} 城市:${formInline.region}`;
        if (args?.command === "cancel") {
          // 您点击了取消按钮
          message(`您点击了取消按钮,当前表单数据为 `);
          // active.value -= 1;
        } else if (args?.command === "sure") {
          active.value += 1;
          message(`您点击了确定按钮,当前表单数据为 `);
        } else {
          message(
            `您点击了右上角关闭按钮或空白页或按下了esc键,当前表单数据为 `
          );
        }
      }
    });
    return;
  }
  active.value += 1;
};
const backStep = () => {
  active.value -= 1;
};
const handleAvatarSuccess: UploadProps["onSuccess"] = (
  response,
  uploadFile
) => {
  state.ruleForm.businessLicense = URL.createObjectURL(uploadFile.raw!);
};
 
const beforeAvatarUpload: UploadProps["beforeUpload"] = rawFile => {
  if (rawFile.type !== "image/jpeg") {
    message(`请上传jpeg类型的图片`, {
      type: "error"
    });
    return false;
  } else if (rawFile.size / 1024 / 1024 > 2) {
    message(`图片大小不能超过 2MB!`, {
      type: "error"
    });
    return false;
  }
  return true;
};
</script>
<style lang="scss" scoped>
.content {
  background-color: #f8f8f8;
  width: 100%;
  // height: 100%;
  .header {
    display: flex;
    align-items: center;
    height: 80px;
    width: 100%;
    margin: 0 auto;
    background-color: #fff;
    .headimg {
      width: 1200px;
      margin: 0 auto;
    }
  }
  :deep .el-step__icon {
    font-size: 12px;
    height: 20px;
    width: 20px;
  }
}
:deep .el-step__title {
  font-size: 12px;
}
</style>