123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <template>
- <view class="cmain">
- <view class="form_group">
- <view class="lable re">认证类型</view>
- <u-radio-group v-model="item.type" style="margin-top: 15px;">
- <u-radio :name=1 label="企业收购商"></u-radio>
- <u-radio :name=2 label="个人收购商" style="margin-left: 20px;"></u-radio>
- </u-radio-group>
- </view>
- <view class="form_group">
- <view class="lable re">(企业)名称</view>
- <input type="text" placeholder="请输入" v-model="item.name" />
- </view>
- <view class="form_group">
- <view class="lable re">(法人)姓名</view>
- <input type="text" placeholder="请输入" v-model="item.legalPerson" />
- </view>
- <view class="form_group">
- <view class="lable re">身份证</view>
- <input type="text" placeholder="请输入" v-model="item.idCard" />
- </view>
- <view class="form_group">
- <view class="lable re">联系号码</view>
- <input type="text" placeholder="请输入" v-model="item.contact" />
- </view>
- <view class="form_group">
- <view class="lable re">银行账号</view>
- <input type="text" placeholder="请输入" v-model="item.bankAccount" />
- </view>
- <view class="form_group" v-if="item.type==1">
- <view class="lable re">营业执照</view>
- <card v-model="item.businessLicense" pic="../../static/images/yyzz.png"></card>
- </view>
- <button class="btn" @click="save()" v-if="item.judgeStatus != 1">提交审核</button>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- item: {}
- };
- },
- onLoad(e) {
- this.http.request({
- url: '/level-two-server/app/TbPurchaser/info',
- success: res => {
- if (res.data.data) {
- this.item = res.data.data;
- uni.setNavigationBarTitle({
- title: '我的认证资料'
- });
- } else {
- this.item.type = 1
- uni.setNavigationBarTitle({
- title: '填写认证资料'
- });
- }
- }
- });
- },
- methods: {
- save() {
- let rule = [{
- name: 'name',
- checkType: 'notnull',
- errorMsg: '请填写(企业)名称'
- },
- {
- name: 'legalPerson',
- checkType: 'notnull',
- errorMsg: '请填写(法人)姓名'
- },
- {
- name: 'idCard',
- checkType: 'notnull',
- errorMsg: '请填写身份证'
- },
- {
- name: 'contact',
- checkType: 'notnull',
- errorMsg: '请填写联系号码'
- },
- {
- name: 'bankAccount',
- checkType: 'notnull',
- errorMsg: '请填写银行账号'
- },
- ];
- if (this.item.type == 1) {
- rule.push({
- name: 'businessLicense',
- checkType: 'notnull',
- errorMsg: '请上传营业执照'
- } )
- }
- if (!this.verify.check(this.item, rule)) {
- uni.showModal({
- content: this.verify.error,
- showCancel: false
- });
- return false;
- }
- this.http.request({
- url: '/level-two-server/app/TbPurchaser/identification',
- method: 'POST',
- data: this.item,
- success: res => {
- uni.showToast({
- title: '提交成功'
- });
- setTimeout(() => {
- uni.$emit('authentication');
- uni.navigateBack();
- }, 1000);
- }
- });
- }
- }
- };
- </script>
- <style lang="scss">
- .btn {
- margin-top: 25px;
- }
- </style>
|