doum
2026-04-30 7a0b33a5f2e0ba589bf35a1b8d896700a21f94a4
small-program/pages/store-apply/store-apply.vue
@@ -3,13 +3,19 @@
      <view class="top-gradient"></view>
      <view class="process-wrap">
         <view class="process-step" :class="{ active: currentStep === 1 }" @tap="currentStep = 1">
            <view class="step-dot"></view>
         <view class="process-step" :class="{ active: currentStep === 1, done: currentStep > 1 }" @tap="currentStep = 1">
            <view class="step-dot" :class="{ 'step-dot--done': currentStep > 1 }">
               <view v-if="currentStep === 1" class="step-dot__inner"></view>
               <u-icon v-else name="checkmark" color="#ffffff" size="14"></u-icon>
            </view>
            <text>门店信息</text>
         </view>
         <view class="process-line"></view>
         <view class="process-step" :class="{ active: currentStep === 2 }" @tap="currentStep = 2">
            <view class="step-dot step-index">2</view>
         <view class="process-step" :class="{ active: currentStep === 2, done: currentStep > 2 }" @tap="currentStep = 2">
            <view class="step-dot" :class="{ 'step-dot--inactive': currentStep !== 2 }">
               <view v-if="currentStep === 2" class="step-dot__inner"></view>
               <text v-else class="step-dot__index">2</text>
            </view>
            <text>主体资质</text>
         </view>
      </view>
@@ -61,15 +67,14 @@
         <view class="form-group phone-group">
            <view class="label-row"><text class="label">联系人电话</text><text class="required">*</text></view>
            <view class="input-with-icon">
               <input class="text-input" type="number" maxlength="11" v-model="form.linkPhone" placeholder="请输入联系人电话" placeholder-style="color: #c1c7d0;" />
               <view class="clear-icon"></view>
               <input class="text-input" type="number" maxlength="11" :value="form.linkPhone" @input="handleLinkPhoneInput" placeholder="请输入联系人电话" placeholder-style="color: #c1c7d0;" />
            </view>
         </view>
         <view class="divider"></view>
         <view class="form-group">
            <view class="label-row"><text class="label">联系人身份证号</text><text class="required">*</text></view>
            <input class="text-input" type="idcard" maxlength="18" v-model="form.idcard" placeholder="请输入联系人身份证号" placeholder-style="color: #c1c7d0;" />
            <input class="text-input" type="idcard" maxlength="18" :value="form.idcard" @input="handleIdcardInput" placeholder="请输入联系人身份证号" placeholder-style="color: #c1c7d0;" />
         </view>
         <view class="divider"></view>
@@ -91,7 +96,7 @@
         <view class="upload-section">
            <view class="upload-title-row between-row">
               <view class="label-row"><text class="label">门店内部招牌</text><text class="required">*</text></view>
               <view class="label-row"><text class="label">门店内部照片</text><text class="required">*</text></view>
               <text class="upload-tip">最多上传3张照片</text>
            </view>
            <view class="upload-grid">
@@ -203,7 +208,11 @@
               <input class="text-input" v-model="form.legalPersonName" placeholder="请输入法人姓名" placeholder-style="color: #c1c7d0;" />
            </view>
            <view class="divider"></view>
            <view class="form-group compact-group">
               <view class="label-row"><text class="label">法人手机号</text><text class="required">*</text></view>
               <input class="text-input" v-model="form.legalPersonPhone" placeholder="请输入法人姓名" placeholder-style="color: #c1c7d0;" />
            </view>
            <view class="divider"></view>
            <view class="form-group compact-group">
               <view class="label-row"><text class="label">企业支付宝账号</text><text class="required">*</text></view>
               <input class="text-input" v-model="form.aliAccount" placeholder="请输入企业支付宝账号" placeholder-style="color: #c1c7d0;" />
@@ -228,14 +237,14 @@
               </view>
               <view class="upload-grid double-upload-grid">
                  <view class="upload-box id-upload-box" @click="chooseLegalPersonCardFront">
                     <image v-if="!form.legalPersonCardFront" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
                     <image v-else class="preview-image" :src=" legalPersonCardFrontUrl" mode="aspectFill"></image>
                     <text v-if="!form.legalPersonCardFront" class="upload-text">上传人像面</text>
                     <image v-if="!form.idcardImg" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
                     <image v-else class="preview-image" :src="idcardImgUrl" mode="aspectFill"></image>
                     <text v-if="!form.idcardImg" class="upload-text">上传人像面</text>
                  </view>
                  <view class="upload-box id-upload-box" @click="chooseLegalPersonCardBack">
                     <image v-if="!form.legalPersonCardBack" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
                     <image v-else class="preview-image" :src="legalPersonCardBackUrl" mode="aspectFill"></image>
                     <text v-if="!form.legalPersonCardBack" class="upload-text">上传国徽面</text>
                     <image v-if="!form.idcardImgBack" class="camera-icon" src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
                     <image v-else class="preview-image" :src="idcardImgBackUrl" mode="aspectFill"></image>
                     <text v-if="!form.idcardImgBack" class="upload-text">上传国徽面</text>
                  </view>
               </view>
            </view>
@@ -257,11 +266,11 @@
            <image class="agree-icon" :src="agreed ? '/static/icon/ic_accept_sel@2x.png' : '/static/icon/ic_accept@2x.png'" mode="aspectFit" @tap="agreed = !agreed"></image>
            <view class="agreement-text-wrap">
               <text class="agreement-text">我已阅读并同意</text>
               <text class="agreement-link" @click="goToService(5)">《风险承诺》</text>
               <text class="agreement-link" @click="goToService(6)">《风险承诺》</text>
               <text class="agreement-text">、</text>
               <text class="agreement-link" @click="goToService(6)">《行李寄存须知》</text>
               <text class="agreement-link" @click="goToService(7)">《行李寄存须知》</text>
               <text class="agreement-text">及</text>
               <text class="agreement-link" @click="goToService(7)">《代理点合作协议》</text>
               <text class="agreement-link" @click="goToService(8)">《代理点合作协议》</text>
            </view>
         </view>
      </view>
@@ -313,8 +322,6 @@
               laborContractImgs: [],
               socialSecurityImgs: [],
               legalPersonCard: '',
               legalPersonCardFront: '',
               legalPersonCardBack: '',
               legalPersonName: '',
               legalPersonPhone: '',
               aliAccount: '',
@@ -324,8 +331,6 @@
            businessImgUrl:'',
            idcardImgUrl: '',
            idcardImgBackUrl: '',
            legalPersonCardFrontUrl: '',
            legalPersonCardBackUrl: '',
            previewMode: 'filled',
            imgPrefix: '',
            currentStep: 1,
@@ -342,7 +347,9 @@
            idCardImages: [],
            permitImages: [],
            laborContractImages: [],
            socialSecurityImages: []
            socialSecurityImages: [],
            linkPhoneTimer: null,
            idcardTimer: null
         }
      },
      onLoad() {
@@ -351,6 +358,18 @@
         this.getMyShopData()
      },
      methods: {
         handleLinkPhoneInput(e) {
            if (this.linkPhoneTimer) clearTimeout(this.linkPhoneTimer)
            this.linkPhoneTimer = setTimeout(() => {
               this.form.linkPhone = e.detail.value
            }, 100)
         },
         handleIdcardInput(e) {
            if (this.idcardTimer) clearTimeout(this.idcardTimer)
            this.idcardTimer = setTimeout(() => {
               this.form.idcard = e.detail.value
            }, 100)
         },
         goToStep2() {
            if (!this.form.name) {
               uni.showToast({ title: '请输入门店名称', icon: 'none' })
@@ -372,8 +391,17 @@
               uni.showToast({ title: '请输入联系人电话', icon: 'none' })
               return
            }
            const mobileRegex = /^1\d{10}$/
            if (!mobileRegex.test(this.form.linkPhone)) {
               uni.showToast({ title: '请输入正确的手机号', icon: 'none' })
               return
            }
            if (!this.form.idcard) {
               uni.showToast({ title: '请输入联系人身份证号', icon: 'none' })
               return
            }
            if (this.form.idcard.length !== 18) {
               uni.showToast({ title: '请输入18位身份证号', icon: 'none' })
               return
            }
            if (!this.form.storeFrontImgs || this.form.storeFrontImgs.length === 0) {
@@ -381,7 +409,7 @@
               return
            }
            if (!this.form.storeInteriorImgs || this.form.storeInteriorImgs.length === 0) {
               uni.showToast({ title: '请上传门店内部招牌', icon: 'none' })
               uni.showToast({ title: '请上传门店内部照片', icon: 'none' })
               return
            }
            this.currentStep = 2
@@ -422,6 +450,16 @@
                  uni.showToast({ title: '请输入法人姓名', icon: 'none' })
                  return
               }
               if (!this.form.legalPersonPhone) {
                  uni.showToast({ title: '请输入法人手机号', icon: 'none' })
                  return
               }
               const mobileRegex = /^1\d{10}$/
               const landlineRegex = /^\d{3,4}-?\d{7,8}$/
               if (!mobileRegex.test(this.form.legalPersonPhone) && !landlineRegex.test(this.form.legalPersonPhone)) {
                  uni.showToast({ title: '请输入正确的手机号或固定电话', icon: 'none' })
                  return
               }
               if (!this.form.aliAccount) {
                  uni.showToast({ title: '请输入企业支付宝账号', icon: 'none' })
                  return
@@ -434,11 +472,15 @@
                  uni.showToast({ title: '请输入法人身份证号', icon: 'none' })
                  return
               }
               if (!this.form.legalPersonCardFront) {
               if (!/^\d{18}$/.test(this.form.legalPersonCard)) {
                  uni.showToast({ title: '请输入18位身份证号', icon: 'none' })
                  return
               }
               if (!this.form.idcardImg) {
                  uni.showToast({ title: '请上传法人身份证人像面', icon: 'none' })
                  return
               }
               if (!this.form.legalPersonCardBack) {
               if (!this.form.idcardImgBack) {
                  uni.showToast({ title: '请上传法人身份证国徽面', icon: 'none' })
                  return
               }
@@ -446,8 +488,6 @@
                  uni.showToast({ title: '请上传营业执照', icon: 'none' })
                  return
               }
               this.form.idcardImgBack = this.form.legalPersonCardBack
               this.form.idcardImg = this.form.legalPersonCardFront
            }
            if (!this.agreed) {
               uni.showToast({ title: '请先阅读并同意协议', icon: 'none' })
@@ -497,9 +537,7 @@
                  this.businessImgUrl=data.businessImgUrl||''
                  this.idcardImgUrl=data.idcardImgUrl||''
                  this.idcardImgBackUrl=data.idcardImgBackUrl||''
                  this.legalPersonCardFrontUrl=data.idcardImgUrl||''
                  this.legalPersonCardBackUrl=data.idcardImgBackUrl||''
                  this.qualificationType = data.companyType === 0 ? 'personal' : 'company'
                  this.qualificationType = data.companyType === 'personal' ? 'personal' : 'company'
                  if (data.storeFrontImgs) {
                     this.storeFrontImages = data.storeFrontImgUrls
                     this.uploadedImagesStoreFront = data.storeFrontImgUrls.map(url => ({ url }))
@@ -528,7 +566,6 @@
                     this.form.socialSecurityImgs = data.socialSecurityImgs
                  }
                  this.form.legalPersonCard = data.legalPersonCard || ''
                  this.form.legalPersonCardBack = data.legalPersonCardBack || ''
                  this.form.businessImg = data.businessImg || ''
               }
            } catch (error) {
@@ -565,7 +602,9 @@
         },
         confirmArea(e) {
            this.form.areaId = e.value[e.value.length - 1].id
            this.form.areaName = e.value[0].text + '/' + e.value[1].text + '/' + e.value[2].text
            this.form.provinceName = e.value[0].text
            this.form.cityName = e.value[1].text
            this.form.areaName = e.value[2].text
            this.showAreaPicker = false
         },
         chooseAddress() {
@@ -696,7 +735,7 @@
            this.form.storeInteriorImgs = this.idCardImages.map(url => this.getShortPath(url))
         },
         async chooseIdCardImage() {
            const maxCount = 2
            const maxCount = 3
            const currentCount = this.idCardImages.length
            const remainingCount = maxCount - currentCount
            if (remainingCount <= 0) {
@@ -858,8 +897,8 @@
                  uni.showLoading({ title: '上传中...', mask: true })
                  try {
                     const uploadResults = await this.uploadFiles(tempFilePaths, 1)
                     this.form.legalPersonCardFront = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
                     this.legalPersonCardFrontUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
                     this.form.idcardImg = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
                     this.idcardImgUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
                     uni.hideLoading()
                     uni.showToast({ title: '上传成功', icon: 'success' })
                  } catch (error) {
@@ -878,8 +917,8 @@
                  uni.showLoading({ title: '上传中...', mask: true })
                  try {
                     const uploadResults = await this.uploadFiles(tempFilePaths, 1)
                     this.form.legalPersonCardBack = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
                     this.legalPersonCardBackUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
                     this.form.idcardImgBack = uploadResults[0].imgaddr || uploadResults[0].path || uploadResults[0]
                     this.idcardImgBackUrl = uploadResults[0].url || uploadResults[0].path || uploadResults[0]
                     uni.hideLoading()
                     uni.showToast({ title: '上传成功', icon: 'success' })
                  } catch (error) {
@@ -1016,24 +1055,46 @@
   .process-step.active {
      color: #222222;
      font-weight: 600;
   }
   .process-step.done {
      color: #10B2FA;
   }
   .step-dot {
      width: 26rpx;
      height: 26rpx;
      width: 50rpx;
      height: 50rpx;
      border-radius: 50%;
      background: #16b0fa;
      background: #afe4fe;
      margin-bottom: 14rpx;
      border: 5rpx solid #a2e2ff;
   }
   .step-index {
      background: #b9bdc6;
      font-size: 18rpx;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      &__inner {
         width: 26rpx;
         height: 26rpx;
         border-radius: 50%;
         background: #13b2fc;
         box-sizing: border-box;
      }
      &__index {
         font-size: 30rpx;
         font-weight: 400;
         color: #ffffff;
         line-height: 1;
      }
      &--inactive {
         background: #8C939F;
      }
      &--done {
         background: #10B2FA;
      }
   }
   .process-line {
@@ -1121,7 +1182,6 @@
   .text-input,
   .select-row {
      height: 54rpx;
      margin-top: 14rpx;
      font-weight: 400;
      font-size: 30rpx;