xuxueyang
2024-07-15 f09d9ec905b6247b36a394158662fe90d02197a5
sub_pages/supplier/supplier-info/supplier-info.vue
@@ -94,7 +94,8 @@
               <u-icon class="m-l-a" name="arrow-right"></u-icon>
            </view> -->
            <view class="m-l-a m-r-0 flex " :class="[!dto['province']?'desc-gray':'']">
               <uni-data-picker @change="(e)=>{PickArea(dto,e)}" placeholder="" :localdata="regionDataPlus">
               <uni-data-picker :area="true" @change="(e)=>{PickArea(dto,e)}" placeholder=""
                  :localdata="regionDataPlus">
                  {{ dto['province'] || '请选择' }}{{ dto['city'] && ('/' + dto['city']) || '' }}{{
                                          dto['region'] && ('/' + dto['region']) || ''
                                        }}
@@ -223,6 +224,43 @@
               city: '',
               region: '',
            },
            requireFields: [{
                  name: '店铺类型',
                  key: 'typeId'
               },
               {
                  name: '店铺名称',
                  key: 'name'
               },
               {
                  name: '店铺头像',
                  key: 'cover'
               },
               {
                  name: '联系人姓名',
                  key: 'contactName'
               },
               {
                  name: '联系方式',
                  key: 'contactTel'
               },
               {
                  name: '集货站',
                  key: 'stationId'
               },
               {
                  name: '地区',
                  key: 'province'
               },
               {
                  name: '地址',
                  key: 'address'
               },
               {
                  name: '店铺简介',
                  key: 'description'
               },
            ],
            show_select_type: false,
            show_select_station: false,
            columns_types: [],
@@ -328,7 +366,7 @@
            this.regionDataPlus = res.data && JSON.parse(res.data.replaceAll('code', 'value').replaceAll('name',
               'text')) || []
               
            console.log('area', this.regionDataPlus)
            // console.log('area', this.regionDataPlus)
         },
@@ -367,6 +405,8 @@
               if (this.dto.idcardType == '1') {
                  this.dto.idcardType = '身份证'
               } else {
                  this.dto.idcardType = '营业执照'
               }
               this.dto.userId = this.currentInfo.id
@@ -397,6 +437,8 @@
               }
               if (this.dto.idcardType == '1') {
                  this.dto.idcardType = '身份证'
               } else {
                  this.dto.idcardType = '营业执照'
               }
            }
@@ -404,7 +446,20 @@
         },
         async submit() {
            for (var field of this.requireFields) {
               if (!this.dto[field.key]) {
                  this.$message.showToast(`${field.name}信息未填写`)
                  return
               }
            }
            if (this.dto.idcardType == '身份证' && this.dto.idCards.length == 0) {
               this.$message.showToast(`${this.dto.idcardType}信息未填写`)
               return
            }
            if (this.dto.idcardType !== '身份证' && this.dto.pictures.length == 0) {
               this.$message.showToast(`${this.dto.idcardType}信息未填写`)
               return
            }
            await this.$message.confirm(`是否确定提交/修改店铺信息`)
@@ -424,6 +479,12 @@
               this.$store.dispatch('getCurrentInfo')
               this.backpage()
            } else {
               console.log('error re', re)
               if (re.code === 30000 && Array.isArray(re.msg)) {
                  this.$message.showToast('字段未填写完整')
               }
            }
         },
@@ -449,6 +510,10 @@
               }) {
                  if (errMsg === 'chooseImage:ok') {
                     // console.log(tempFiles[0])
                     if (tempFiles[0].size > 1024 * 1024 * 5) {
                        that.$message.confirm('图片最多支持5M大小,超出大小限制')
                        return
                     }
                     that.$message.showLoading()
                     that.$http.upload(tempFiles[0].path).then(async res => {
                        var pic = res.data && res.data.length > 0 && res.data[