Quellcode durchsuchen

开店申请移动端样式修改

shenjj vor 7 Jahren
Ursprung
Commit
a9fb5a79c6

+ 1 - 1
components/mobile/MobileHeader.vue

@@ -196,7 +196,7 @@
           title = '产品详情'
         } else if (val === '/mobile/user/bindEnterprise') {
           this.showSearchIcon = false
-          title = '绑定企业'
+          title = '信息确认'
         } else if (this.startWith(val, '/mobile/center/vendor/attentionBus')) {
           this.showSearchIcon = false
           title = '优软商城'

+ 13 - 1
components/mobile/register-saler/register/StepFirst.vue

@@ -98,7 +98,8 @@
         <div class="BangdingPageAlertTitle">该企业<span>已注册优软账号</span>,如希望使用当前企业进行开店申请,请先申请<span>企业绑定</span>!</div>
         <div class="BangdingPageAlertBtn">
           <span @click="resetOnkeyDown()">重新输入</span>
-          <nuxt-link tag="span" to="/mobile/user/bindEnterprise">立即绑定</nuxt-link>
+          <span @click="toBindenterprise()">立即绑定</span>
+          <!--<nuxt-link tag="span" to="/mobile/user/bindEnterprise">立即绑定</nuxt-link>-->
         </div>
       </div>
     </div>
@@ -256,6 +257,17 @@
 //      })
     },
     methods: {
+      toBindenterprise() {
+        this.$http.get('/basic/enterprise/findByName/' + encodeURIComponent(this.data.name)).then(response => {
+          let status
+          if (response.data) {
+            status = 1
+          } else {
+            status = 2
+          }
+          this.$router.push(`/mobile/user/bindEnterprise?name=${response.data.name}&businessCode=${response.data.businessCode}&showStatus=${status}`)
+        })
+      },
       resetOnkeyDown: function() {
         this.showBangdingPage = false
         this.data.name = ''

+ 1 - 1
components/mobile/register-saler/register/StepSecond.vue

@@ -20,7 +20,7 @@
           </div>
         </div>
         <div class="row next-btn step-two-btn" style="padding-top: 0px;">
-          <button @click="sectionChange(1)" class="btn">不同意</button>
+          <button @click="sectionChange(1)" class="btn">上一步</button>
           <button @click="sectionChange(3)" class="btn" :style="!checkData.checked ? 'opacity: 1;':''">同意</button>
         </div>
       </div>

+ 3 - 0
components/mobile/register-saler/register/chooseStoretype.vue

@@ -23,6 +23,9 @@
       <i class="iconfont icon-xiangyou"></i>
       <div class="border-line"></div>
     </div>
+    <!--<div class="btn-area">-->
+      <!--<span @click="go(2)" style="background: #c1c1c1;border:#c1c1c1">上一步</span>-->
+    <!--</div>-->
   </div>
 </template>
 

+ 28 - 0
pages/mobile/store/register.vue

@@ -0,0 +1,28 @@
+<template>
+  <div>
+    <bind-enterprise :showInfo="showInfo"></bind-enterprise>
+  </div>
+</template>
+
+<script>
+  import bindEnterprise from '../user/bindEnterprise.vue'
+  export  default {
+    data() {
+      return {
+        showInfo: false
+      }
+    },
+    layout: 'mobile',
+    middleware: 'authenticated',
+    components: {
+      bindEnterprise
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .seek-operation {
+    height: auto;
+    padding-bottom: .59rem;
+  }
+</style>

+ 204 - 2
pages/mobile/user/bindEnterprise.vue

@@ -1,5 +1,9 @@
 <template>
-  <div class="mobile-fix-content mobile-center">
+  <div class="mobile-fix-content mobile-center" v-if="!showInfo">
+    <div class="block-wrap seek-operation">
+      <div class="block-wrap_moreinfo">抱歉,您的账户未绑定企业,暂无卖家权限</div>
+      <div class="block-wrap_morelist" @click="setShowApplyRecord(true)">查看申请记录</div>
+    </div>
     <div class="block-wrap seek-operation">
       <p><i></i>所属企业已开店</p>
       <div class="search-wrap">
@@ -19,23 +23,68 @@
     </div>
     <div class="operation" v-show="showSearchResultStatus !== 0">
       <template v-if="showSearchResultStatus === 1">
-        <a @click="bindEnterprise">申请绑定</a>
+        <a @click="bindEnterprise">提交申请</a>
         <p>管理员审核通过后成功绑定</p>
       </template>
       <template v-if="showSearchResultStatus === 2">
         <a>开设新店铺</a>
       </template>
     </div>
+    <div class="block-wrap seek-operation" v-if="!showInfo">
+      <p><i></i>所属企业未开店</p>
+      <div class="clearfix block-storeinfo">
+        <div class="pull-left">
+          <img src="/images/material/house.png"/>
+        </div>
+        <div class="pull-right">
+          <div class="pull-left-info">请点击下方按钮开设新的店铺</div>
+          <nuxt-link class="pull-left-btn" tag="div" to="/mobile/store">开设新店铺</nuxt-link>
+        </div>
+      </div>
+    </div>
+
     <remind-box :title="remindText" :timeoutCount="remindTimerCount"></remind-box>
+    <div class="mobile-modal" v-show="showApplyRecord">
+      <div class="mobile-modal-box">
+        <div class="mobile-modal-header">申请记录<i class="icon-guanbi iconfont" @click="setShowApplyRecord(false)"></i></div>
+        <div class="mobile-modal-headerjilu" ref="mobileModalBox">
+          <div>
+            <div class="record-wrap">
+            <div class="record-title">
+              <span>企业名称</span>
+              <span>管理员</span>
+              <span>申请时间</span>
+              <span>状态</span>
+            </div>
+            <ul>
+              <li v-for="item in applyList">
+                <span>{{item.enName}}</span>
+                <span>{{item.adminName}}</span>
+                <span>{{item.date | date}}</span>
+                <span :class="{'green-text': item.status === 311, 'red-text': item.status === 317}">{{item.status | status}}</span>
+              </li>
+            </ul>
+          </div>
+          </div>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 <script>
   import { RemindBox } from '~components/mobile/common'
   export default {
     layout: 'mobile',
+    props: {
+      showInfo: {
+        default: true
+      }
+    },
     middleware: 'authenticated',
     data () {
       return {
+        applyList: [],
+        showApplyRecord: false,
         keyword: '',
         enInfo: {},
         remindText: '',
@@ -47,7 +96,35 @@
     components: {
       RemindBox
     },
+    mounted() {
+      let keyword = this.$route.query.name || ''
+      let businessCode = this.$route.query.businessCode || ''
+      let showStatus = parseInt(this.$route.query.showStatus) || ''
+      this.keyword = keyword
+      this.enInfo.name = keyword
+      this.enInfo.businessCode = businessCode
+      this.showSearchResultStatus = showStatus
+      this.$nextTick(() => {
+        // document.addEventListener('click', this.checkCurrencySelect)
+        this._initscroll()
+      })
+    },
     methods: {
+      setShowApplyRecord: function (flag) {
+        if (flag) {
+          this.$http.get('/basic/enterprise/findApplyInfo', {params: {phone: this.user.data.userTel}})
+            .then(responses => {
+              this.applyList = responses.data
+              this.showApplyRecord = flag
+              this._initscroll()
+            }, err => {
+              console.log(err)
+              this.$message.error('系统错误')
+            })
+        } else {
+          this.showApplyRecord = flag
+        }
+      },
       onSearchEnterprise: function () {
         if (this.keyword) {
           this.$http.get('/basic/enterprise/findByName/' + encodeURIComponent(this.keyword)).then(response => {
@@ -83,6 +160,20 @@
         this.remindText = str
         this.remindTimerCount++
       }
+    },
+    filters: {
+      status: function (status) {
+        switch (status) {
+          case 311:
+            return '待审核'
+          case 316:
+            return '已通过'
+          case 317:
+            return '未通过'
+          default:
+            break
+        }
+      }
     }
   }
 </script>
@@ -171,5 +262,116 @@
         color: rgba(51, 51, 51, .89);
       }
     }
+    .block-storeinfo {
+      margin: 0.48rem 0.2rem 0;
+      padding-bottom: 0.2rem;
+      img {
+        width: 2.18rem;
+        height: 1.73rem;
+      }
+      .pull-left-info {
+        font-size: 0.28rem;
+        color: #3f84f6;
+      }
+      .pull-left-btn {
+        color: #fff;
+        font-size: 0.32rem;
+        width: 3.1rem;
+        height: 0.58rem;
+        text-align: center;
+        line-height: 0.58rem;
+        border-radius: 5px;
+        background: #3f84f6;
+        margin-top: 0.3rem;
+      }
+    }
+    .block-wrap_moreinfo {
+      font-size: 0.34rem;
+      color: #333;
+      text-align: center;
+      padding-top: 0.4rem;
+      margin-bottom: 0.2rem;
+    }
+    .block-wrap_morelist {
+      color: #3f84f6;
+      font-size: 0.32rem;
+      border: 0.01rem solid #3f84f6;
+      text-align: center;
+      width: 3.1rem;
+      height: 0.58rem;
+      line-height: 0.58rem;
+      border-radius: 5px;
+      margin: 0 auto;
+    }
+    .mobile-modal-box {
+      top: 1.66rem;
+      left: 3%;
+      right: 3%;
+      width: 7rem;
+      bottom: 1.66rem;
+      margin: 0 auto;
+    }
+    .mobile-modal-headerjilu {
+      background: #f3f3f3;
+      padding: .18rem 0;
+      width: 100%;
+      overflow: hidden;
+      height: 90%;
+      .record-wrap {
+        padding: 0 .18rem;
+        .record-title {
+          height: 28px;
+          line-height: 28px;
+          background: #8eb0f5;
+          border: 1px solid #e8e8e8;
+          color: #fff;
+        }
+        ul {
+          max-height: 150px;
+          overflow-y: auto;
+          overflow-x: hidden;
+          li {
+            border-bottom: 1px solid #e8e8e8;
+            height: 30px;
+            &:nth-child(even) {
+              background: #edf2fd;
+            }
+            &:nth-child(odd) {
+              background: #f7f9fe;
+            }
+            span {
+              line-height: 26px;
+              position: relative;
+              top: 2px;
+              &.green-text {
+                color: #379b1d;
+              }
+              &.red-text {
+                color: #f51c24;
+              }
+            }
+          }
+        }
+        span {
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          display: inline-block;
+          text-align: center;
+          &:nth-child(1) {
+            width: 2.6rem;
+          }
+          &:nth-child(2) {
+            width: 1.1rem;
+          }
+          &:nth-child(3) {
+            width: 1.84rem;
+          }
+          &:nth-child(4) {
+            width: 1.04rem;
+          }
+        }
+      }
+    }
   }
 </style>

+ 6 - 4
pages/mobile/user/index.vue

@@ -155,14 +155,16 @@
           if (this.storeStatus.uuid) {
             this.$router.push(url)
           } else {
-            console.log(this.applyStatus)
             if (this.applyStatus === 'PREPARE') {
               this.setRemindText('您的申请已提交,请耐心工作人员审核(2-3个工作日)')
             } else {
-              // 您的申请已提交,请耐心工作人员审核(2-3个工作日)
-              this.$router.push('/mobile/store')
+              if (!this.$store.state.option.user.data.enterprise.uu) {
+                // 进入个人绑定企业页面
+                this.$router.push('/mobile/store/register')
+              } else {
+                this.$router.push('/mobile/store')
+              }
             }
-            // this.setRemindText('请先前往pc端申请开店')
           }
         } else if (!this.user.data.enterprise.uu || this.user.data.enterprise.isVendor !== 313) {
           this.setRemindText('请先前往pc端完善企业信息')