Browse Source

个人注册修改

yangc 8 years ago
parent
commit
20b730d8c6

+ 0 - 747
components/register-saler/RegHeader.vue

@@ -13,750 +13,3 @@
     </div>
   </div>
 </template>
-<!--<template>
-  <div class="container vendor_store_apply">
-    <div>
-      &lt;!&ndash; Nav tabs &ndash;&gt;
-      <ul class="nav nav-tabs">
-        <li><div style="height: 39px;line-height: 39px;font-size: 14px;">店铺类型:</div></li>
-        <li class="custom_tab" :class="{active: tab == 'ORIGINAL_FACTORY'}" @click="toggleTab('ORIGINAL_FACTORY')">
-          <a href="javascript:void(0)">原厂</a>
-        </li>
-        <li class="custom_tab" :class="{active: tab == 'AGENCY'}" @click="toggleTab('AGENCY')">
-          <a href="javascript:void(0)">代理商</a>
-        </li>
-        <li class="custom_tab" :class="{active: tab == 'DISTRIBUTION'}" @click="toggleTab('DISTRIBUTION')">
-          <a href="javascript:void(0)">经销商</a>
-        </li>
-      </ul>
-      &lt;!&ndash; Tab panes &ndash;&gt;
-      <div class="tab-content" style="border: 1px #5078CB solid; padding-bottom: 30px;">
-        &lt;!&ndash; 原厂 &ndash;&gt;
-        <div role="tabpanel" class="tab-pane" v-if="tab == 'ORIGINAL_FACTORY'" :class="{active: tab == 'ORIGINAL_FACTORY'}">
-          <div class="row com_row">
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload :typeData="'BUSINESS_LICENSE'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload  :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
-          </div>
-          &lt;!&ndash;增加品牌&ndash;&gt;
-          <div class="brand-type row" v-for="(brand, index) in brands">
-            <div class="col-md-1">品牌{{index+1}}<em>*</em></div>
-            <div class="col-md-7">
-              <input type="text" v-model="brand.name" @change="onBrandChanged(brand)" class="form-control" name="brandName"  autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
-            </div>
-            <div class="brand-small-upload col-md-4">
-              <div class="brand-small-img">
-                <upload :typeData="index" @uploadAction="onUpload"></upload>
-              </div>
-              <div class="file-text">品牌logo/商标注册原件/授权说明书</div>
-              <div v-show="brands.length > 1" @click="deleteBrand(index)" class="delete" title="删除">{{index}}<i class="fa fa-trash"></i></div>
-              <div class="col-md-12"> <em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
-            </div>
-          </div>
-          <div class="add-brand row">
-            <a href="javascript:void(0)" title="增加品牌" @click="addBrand"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
-          </div>
-          <div class="unpass-reason row" style="display: none">
-            原因:<span style="color: #d32526;">原因</span>
-          </div>
-        </div>
-        &lt;!&ndash;原厂end&ndash;&gt;
-        &lt;!&ndash;代理商 begin&ndash;&gt;
-        <div role="tabpanel" class="tab-pane" v-if="tab == 'AGENCY'" :class="{active: tab == 'AGENCY'}">
-          <div class="row com_row">
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload :typeData="'BUSINESS_LICENSE'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload  :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
-          </div>
-          &lt;!&ndash;增加品牌&ndash;&gt;
-          <div class="brand-type row" v-for="(brand, index) in brands">
-            <div class="col-md-1">品牌{{index+1}}<em>*</em></div>
-            <div class="col-md-7">
-              <input type="text" v-model="brand.name" @change="onBrandChanged(brand)" class="form-control" name="brandName"  autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
-            </div>
-            <div class="brand-small-upload col-md-4">
-              <div class="brand-small-img">
-                <upload :typeData="index" @uploadAction="onUpload"></upload>
-              </div>
-              <div class="file-text">代理资格证/代理授权书</div>
-              <div v-show="brands.length > 1" @click="deleteBrand(index)" class="delete" title="删除">{{index}}<i class="fa fa-trash"></i></div>
-              <div class="col-md-12"> <em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
-            </div>
-          </div>
-          <div class="add-brand row">
-            <a href="javascript:void(0)" title="增加品牌" @click="addBrand"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
-          </div>
-          <div class="unpass-reason row" style="display: none">
-            原因:<span style="color: #d32526;">原因</span>
-          </div>
-        </div>
-        &lt;!&ndash;代理商 end&ndash;&gt;
-        &lt;!&ndash;经销商 begin&ndash;&gt;
-        <div role="tabpanel" class="tab-pane" v-if="tab == 'DISTRIBUTION'" :class="{active: tab == 'DISTRIBUTION'}">
-          <div class="row com_row">
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload :typeData="'BUSINESS_LICENSE'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload  :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
-          </div>
-        </div>
-        &lt;!&ndash;经销商 end&ndash;&gt;
-      </div>
-      &lt;!&ndash; Submit button &ndash;&gt;
-      <div style="padding: 28px 40px;">
-        <button type="button" class="btn btn-primary" style="float: right" @click="submitApply">提交申请</button>
-        <div class="clear-fix"></div>
-      </div>
-    </div>
-    &lt;!&ndash;删除上传图片&ndash;&gt;
-    <div class="com-del-box" style="display: none">
-      <div class="title">
-        <a><i class="fa fa-close fa-lg"></i></a>
-      </div>
-      <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>是否删除选中信息</p>
-        <div><a>取消</a><a>确认</a></div>
-      </div>
-    </div>
-    &lt;!&ndash;删除品牌图片&ndash;&gt;
-    <div class="com-del-box" style="display: none">
-      <div class="title">
-        <a><i class="fa fa-close fa-lg"></i></a>
-      </div>
-      <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>品牌信息为重要信息,确定删除吗?</p>
-        <div><a>取消</a><a>确认</a></div>
-      </div>
-    </div>
-    &lt;!&ndash;提示框&ndash;&gt;
-    <div class="com-del-box" v-if="showBrandNameInvalid">
-      <div class="title">
-        <a @click="showBrandNameInvalid = false"><i class="fa fa-close fa-lg"></i></a>
-      </div>
-      <div class="content">
-        <p style="line-height: 20px;margin-top: 10px;">非常抱歉,目前暂无此品牌!您可在<br/>“品牌申请”中,提出申请。</p>
-        <p style="line-height: 20px;">前往<a @click="showBrandNameInvalid = false"  target="_blank" href="/vendor#/brand/apply/" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-  import Upload from '~components/common/upload/upload.vue'
-  export default {
-    data () {
-      return {
-        tab: 'ORIGINAL_FACTORY',
-        brands: [{
-          type: 'BRAND',
-          name: '',
-          url: '',
-          isPdf: false,
-          brandUuid: ''
-        }],
-        businessLicenseUrl: '',
-        taxPayerUrl: '',
-        taxRegistrationUrl: '',
-        showBrandNameInvalid: false
-      }
-    },
-    components: {
-      Upload
-    },
-    methods: {
-      toggleTab (t) {
-        this.tab = t
-        this.brands = [{
-          type: 'BRAND',
-          name: '',
-          url: '',
-          isPdf: false,
-          brandUuid: ''
-        }]
-      },
-      onUpload: function (obj) {
-        if (obj.type === 'BUSINESS_LICENSE') {
-          this.businessLicenseUrl = obj.url
-        } else if (obj.type === 'TAX_PAYER') {
-          this.taxPayerUrl = obj.url
-        } else if (obj.type === 'TAX_REGISTRATION') {
-          this.taxRegistrationUrl = obj.url
-        } else if (typeof obj.type === 'number') {
-          this.brands[obj.type].url = obj.url
-        }
-      },
-      onBrandChanged: function (item) {
-        this.$http.get('/api/product/brand', {params: {name: item.name, op: 'by_name'}})
-          .then(response => {
-            item.brandUuid = response.data.uuid
-            item.isPdf = item.url.substring(item.url.length - 4, item.url.length) === '.pdf'
-          }, err => {
-            console.log(err)
-            this.showBrandNameInvalid = true
-          })
-      },
-      submitApply: function () {
-        let validCode = 0
-        if (this.businessLicenseUrl === '') {
-          this.$message.error('请上传营业执照')
-        } else {
-          this.brands.forEach(function (item) {
-            if (item.name === '') {
-              validCode = 1
-            } else if (item.url === '') {
-              validCode = 2
-            }
-          })
-          if (validCode === 0) {
-            let qualifications = []
-            qualifications.push({
-              type: 'BUSINESS_LICENSE',
-              resourceUrl: this.businessLicenseUrl,
-              isPdf: this.isPdf(this.businessLicenseUrl)
-            })
-            if (this.taxPayerUrl !== '') {
-              qualifications.push({
-                type: 'TAX_PAYER',
-                resourceUrl: this.taxPayerUrl,
-                isPdf: this.isPdf(this.taxPayerUrl)
-              })
-            }
-            if (this.taxPayerUrl !== '') {
-              qualifications.push({
-                type: 'TAX_REGISTRATION',
-                resourceUrl: this.taxRegistrationUrl,
-                isPdf: this.isPdf(this.taxRegistrationUrl)
-              })
-            }
-//            console.log(qualifications)
-            this.$http.post('/store-service/applications', {
-              brands: this.brands,
-              qualifications: qualifications,
-              type: this.tab
-            }).then(response => {
-              if (response.data.success) {
-                this.$message.success('感谢您对优软商城的支持,我们会尽快对您提交的信息进行审核,预计审核时间为3个工作日,审核结果将以站内消息及邮件形式通知您!')
-                window.setTimeout(function () {
-                  window.location.href = '/vendor#/store-apply/'
-                }, 1000)
-              }
-            })
-          } else {
-            if (validCode === 1) {
-              this.$message.error('请添加品牌信息')
-            } else if (validCode === 2) {
-              this.$message.error('请上传品牌图片')
-            }
-          }
-        }
-      },
-      addBrand: function () {
-        this.brands.push({
-          type: 'BRAND',
-          name: '',
-          url: '',
-          isPdf: false,
-          brandUuid: ''
-        })
-      },
-      deleteBrand: function (index) {
-        this.brands.splice(index, 1)
-      },
-      isPdf: function (url) {
-        return url.substring(url.length - 4, url.length) === '.pdf'
-      }
-    }
-  }
-</script>
-<style>
-  .com-input{
-    width: 100%;
-    height: 100%;
-    text-align: center;
-    position: absolute;
-    bottom: 0;
-    left: 0;
-    opacity: 0;
-    display: inline-block !important;
-  }
-  .el-upload-list&#45;&#45;picture-card .el-upload-list__item{
-    width: 160px;
-    height: 120px;
-    top: 69px;
-  }
-  div.vendor_store_apply {
-    margin: 0 auto;
-    width: 1026px;
-    background-color: #FFFFFF;
-    margin-bottom: 20px;
-    margin-top: 20px;
-  }
-
-  div.vendor_store_apply .com_row {
-    padding: 0 40px;
-    min-height: 40px;
-  }
-
-  div.vendor_store_apply .title_row {
-    margin-bottom: 20px;
-    border-bottom: #e8e8e8 1px solid;
-  }
-
-  div.vendor_store_apply .custom_col {
-    margin: 0;
-    padding: 0;
-  }
-
-  div.vendor_store_apply .custom_col img.previewImage {
-    max-width: 160px;
-    max-height: 120px;
-    cursor: pointer;
-    /*padding: 0 30px;*/
-  }
-
-  div.vendor_store_apply .row h2 {
-    padding: 10px 0;
-    font-size: 16px;
-    font-weight: 500;
-    color: #000000;
-  }
-
-  div.vendor_store_apply .row span {
-    display: block;
-    padding: 10px 0;
-    font-size: 14px;
-    color: #000000;
-  }
-
-  div.vendor_store_apply #file_upload {
-    width: 100px;
-    height: 100px;
-    border:1px solid #CDCDCD;
-    /*background: url("static/img/vendor/images/upload.png");*/
-  }
-
-  div.vendor_store_apply #upload_qualification {
-    width: 100px;
-    height: 100px;
-    opacity: 0;
-  }
-
-  div.vendor_store_apply .custom_tab {
-    margin: 0 15px;
-    width: 90px;
-    text-align: center;
-  }
-
-  div.vendor_store_apply .nav li.custom_tab.active>a,
-  div.vendor_store_apply .nav li.custom_tab.active>a:focus,
-  div.vendor_store_apply .nav li.custom_tab.active>a:hover {
-    border: 1px solid #5078CB;
-    border-bottom-color: transparent;
-    color: #5078cb;
-  }
-
-  div.vendor_store_apply .uploadify-button {
-    display: block;
-  }
-
-  div.vendor_store_apply .custom_col .show_image_area {
-    height: 120px;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-  }
-  .nav-tabs{
-    height: 41px;
-    background: none;
-    padding: 0 40px;
-  }
-  .nav-tabs>li>a{
-    border-radius: 0;
-    color: #333;
-  }
-  div.vendor_store_apply .btn-primary{
-    background: #5078cb;
-    border-radius: 0;
-  }
-  div.vendor_store_apply .btn-primary:hover{
-    background: #3f7ae3;
-  }
-  div.vendor_store_apply .com_row .col-md-2{
-    width: 120px;
-  }
-  div.vendor_store_apply .com_row .col-md-10 span{
-    color: #666;
-  }
-
-  /*修改的样式*/
-  div.vendor_store_apply .custom_col .show_image_area{
-    position: relative;
-    overflow: hidden;
-  }
-  .hover-show{
-    position: absolute;
-    width: 100%;
-    height: 100%;
-    top: 120px;
-    left: 0;
-    background: rgba(0,0,0,.5);
-  }
-  div.vendor_store_apply .custom_col .show_image_area .hover-show{
-    top: 0;
-  }
-  .hover-show .delete{
-    padding: 0;
-    width: 30px;
-    height: 30px;
-    float: right;
-    text-align: center;
-  }
-  .hover-show .delete:hover{
-    cursor: pointer;
-  }
-  .hover-show .delete i{
-    color: #fff;
-    font-size: 18px;
-  }
-  .hover-show a{
-    display: inline-block;
-    width: 100%;
-    height: 60px;
-    font-size: 14px;
-    color: #fff;
-    text-align: center;
-    line-height: 60px;
-  }
-  .hover-show a i{
-    margin-right: 5px;
-    font-size: 16px;
-  }
-  .brand-type{
-    line-height: 34px;
-    font-size: 14px;
-    margin: 20px 20px 5px 20px;
-  }
-  .brand-type .brand-small-img{
-    position: relative;
-    width: 84px;
-    height: 84px;
-    overflow: hidden;
-    text-align: center;
-    border: #e8e8e8 1px solid;
-  }
-  .brand-type .brand-small-img .preview img{
-    max-width: 84px;
-    max-height: 84px;
-  }
-  .brand-type em{
-    color: #ff0000;
-  }
-  .brand-type .col-md-7,.brand-type .col-md-1{
-    margin-top: 25px;
-  }
-  .brand-small-upload .file-text,.brand-type .brand-small-img{
-    float: left;
-  }
-  .brand-small-upload .file-text{
-    width: 120px;
-    margin-left: 10px;
-    line-height: 20px;
-    margin-top: 6%;
-  }
-  .brand-small-upload .delete{
-    float: right;
-    text-align: center;
-    line-height: 84px;
-  }
-  .brand-small-upload .delete i{
-    font-size: 18px;
-    color: #5078cb;
-  }
-  .brand-small-upload .delete:hover{
-    cursor: pointer;
-  }
-  .brand-small-upload .delete:hover i{
-    color: #f00;
-  }
-  .brand-small-upload .brand-small-img .hover-show{
-    top: 0;
-  }
-  .brand-small-upload .brand-small-img .hover-show{
-  }
-  .brand-small-upload .brand-small-img .hover-show span i{
-    color: #fff;
-  }
-  .brand-small-upload .brand-small-img .hover-show span.delete{
-    line-height: 30px;
-    padding: 0;
-  }
-  .brand-small-upload .brand-small-img .hover-show a{
-    line-height: 30px;
-    height: 30px;
-  }
-  .tab-content .com_row{
-    margin:40px 0 0;
-    border-bottom: #ccc 1px dashed;
-    padding-bottom: 40px !important;
-  }
-  .tab-content .com_row .col-md-12{
-    color: #999;
-    margin-top: 20px;
-    font-size: 12px;
-    padding-left: 50px;
-  }
-  .brand-small-upload .col-md-12{
-    color: #999;
-    font-size: 12px;
-    padding-left: 0;
-  }
-  .tab-content .com_row .col-md-12 em,.brand-small-upload .col-md-12 em{
-    color: #f00;
-  }
-  .add-brand{
-    text-align: center;
-    border-bottom: #ccc 1px dashed;
-    margin: 0 0 20px 0;
-    height: 34px;
-  }
-  .add-brand a{
-    font-size: 14px;
-    color: #5078cb;
-    width: 200px;
-    height: 15px;
-    display: inline-block;
-    border: #ccc 1px dashed;
-    border-top: 0;
-    border-bottom-left-radius: 50px;
-    border-bottom-right-radius: 50px;
-    margin-top: 31px;
-    background: #fff;
-    line-height: 15px;
-    text-decoration: none;
-  }
-  .add-brand a i{
-    margin-right: 5px;
-    font-size: 20px;
-    vertical-align: middle;
-  }
-  .add-brand a em{
-    position: relative;
-    top: -10px;
-    font-weight: bold;
-    font-style: inherit;
-  }
-  .add-brand a:hover em, .add-brand a:active em, .add-brand a:focus em{
-    color: #d32526;
-    text-decoration: none;
-  }
-  .unpass-reason {
-    margin: 0 40px;
-    line-height: 34px;
-  }
-
-  /* 预览框 end */
-
-  .brand-type .dropdown-menu {
-    width: 95%;
-  }
-  .brand-type .dropdown-menu li {
-    font-size: 14px;
-  }
-  .com-del-box{
-    position: fixed;
-    z-index: 2;
-    height: 152px;
-    opacity: 1;
-    background-color: white;
-    width: 310px;
-    -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
-    box-shadow: 0 5px 15px rgba(0,0,0,.5);
-    margin: -155px 0 0 -75px;
-    top: 55%;
-    left: 50%;
-  }
-  .com-del-box .title{
-    height: 30px;
-    background-color: #5078cb;
-    text-align: right;
-    padding-right: 15px;
-    line-height: 30px;
-  }
-  .com-del-box .title a{
-    color: white;
-    font-size: 16px;
-  }
-  .com-del-box .content{
-    width: 100%;
-    text-align: center;
-    margin: 0 auto;
-  }
-  .com-del-box .content p{
-    line-height: 50px;
-    font-size: 14px;
-    padding-top: 10px;
-  }
-  .com-del-box .content p i{
-    color: #5078cb;
-    font-size: 16px;
-    margin-right: 10px;
-  }
-  .com-del-box .content div{
-    width: 100%;
-    text-align: center;
-    margin: 0 auto;
-  }
-  .com-del-box .content div a{
-    width: 55px;
-    height: 26px;
-    line-height: 26px;
-    display: inline-block;
-    text-align: center;
-    font-size: 14px;
-  }
-  .com-del-box .content div a:first-child{
-    background: #b4b5b9;
-    color: #333;
-    margin-right: 10px;
-  }
-  .com-del-box .content div a:last-child{
-    background: #5078cb;
-    color: #fff;
-  }
-  .com-del-box .content div a:hover{
-    background: #3f7ae3;
-    color: #fff;
-  }
-  div.vendor_store_apply .custom_col .show_image_area{
-    width: 160px;
-    border: #dcdcdc 1px solid;
-    margin: 0 10px 0 0;
-    padding: 0;
-  }
-  div.vendor_store_apply .tab-content .custom_col{
-    width: 280px;
-  }
-  div.vendor_store_apply .tab-content .custom_col:first-child{
-    margin-left: 50px;
-  }
-  div.vendor_store_apply .custom_col .row .col-md-5:last-child{
-    width: 110px;
-  }
-  div.vendor_store_apply .custom_col .row .col-md-5:last-child span{
-    margin-top: 85% !important;
-    padding-bottom: 0 !important;
-  }
-  .hoverShow{
-    position: absolute;
-    width: 30px;
-    height: 30px;
-    top: 0px;
-    right: 0;
-    background: rgba(0,0,0,.4);
-    display: none;
-  }
-
-  div.vendor_store_apply .custom_col .show_image_area:hover .hoverShow{
-    display: block;
-  }
-  div.vendor_store_apply .custom_col .show_image_area .deleteImg{
-    position: absolute;
-    right: 7px;
-    top: 0;
-    display: inline-block;
-    padding: 0;
-    margin-top: 6px;
-    font-size: 18px;
-    color: #fff;
-  }
-  .hover-show a{
-    color: #fff;
-    text-decoration: none;
-  }
-  .hover-show a:hover, .hover-show a:active, .hover-show a:focus{
-    color: #fff;
-    text-decoration: none;
-  }
-</style>-->

+ 390 - 53
components/register-saler/register/StepFirst.vue

@@ -1,14 +1,14 @@
 <template>
   <!--填写注册信息-->
-  <div class="section" @click="onHideAddress">
+  <div class="section" @click="onHideBox">
     <div class="register">
       <div class="x-form-set-header">
-        <h4>企业注册信息</h4>
+        <h4>企业基本信息</h4>
       </div>
       <div class="row">
         <label class="col-sm-2 x-required">企业名称:</label>
         <div class="col-sm-5">
-          <input type="text" @change="nameCheck(3)" :disabled="!loginData.isSelf" v-model="data.name" class="form-control" name="name" required="" placeholder="填写营业执照上的企业名称">
+          <input :class="!validName.isValidTypeName || !validName.isValidName?'form-control error-box-border':'form-control'" type="text" @change="nameCheck(3)" @input="nameTypeCheck()" :disabled="!loginData.isSelf" v-model="data.name" name="name" required="" placeholder="填写营业执照上的企业名称">
         </div>
         <div class="x-text-help" v-show="validName.isValidTypeName && validName.isValidName && !validName.init">
           <i class="glyphicon glyphicon-ok x-icon-left"></i>
@@ -25,18 +25,14 @@
         </div>
       </div>
       <div class="row">
-        <label class="col-sm-2 x-required">企业简称:</label>
+        <label class="col-sm-2 x-required">营业执照号:</label>
         <div class="col-sm-5">
-          <input type="text" :disabled="!loginData.isSelf" @change="simpleNameCheck" v-model="data.simpleName" class="form-control" name="name" required="" placeholder="请填写正确的企业名称,2~40个字符">
+          <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control'" :disabled="!loginData.isSelf" @input="validLicence.init=false" @change="licenceCheck(3)" v-model="data.licenceId" name="name" required="" placeholder="请填写营业执照上的注册号">
         </div>
-        <div class="x-text-help" v-show="validSimpleName.isValidSimpleName && !validSimpleName.init">
+        <div class="x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
           <i class="glyphicon glyphicon-ok x-icon-left"></i>
         </div>
-        <div class="col-sm-5" v-show="!validSimpleName.isValidSimpleName && !validSimpleName.init">
-          <p>
-            <i class="fa fa-info-circle"></i>请填写正确的企业名称,2~40个字符
-          </p>
-        </div>
+        <div class="col-sm-5" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
       </div>
       <div class="row">
         <label class="col-sm-2 x-required">营业执照:</label>
@@ -54,14 +50,14 @@
         <div class="col-sm-5" v-show="!validUpload.isValidUpload && !validUpload.init"><p><i class="fa fa-info-circle"></i>请上传营业执照扫描件(≤5M的图片或PDF)</p></div>
       </div>
       <div class="row">
-        <label class="col-sm-2 x-required">营业执照号:</label>
+        <label class="col-sm-2 x-required">法定代表人:</label>
         <div class="col-sm-5">
-          <input type="text" :disabled="!loginData.isSelf" @change="licenceCheck(3)" v-model="data.licenceId" class="form-control" name="name" required="" placeholder="请填写营业执照上的注册号">
+          <input type="text" :class="!validLawPerson.isValidLawPerson?'form-control error-box-border':'form-control'" @input="lawPersonCheck()" v-model="data.lawPerson" name="name" required="" placeholder="请填写营业执照上的法定代表人">
         </div>
-        <div class="x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
+        <div class="x-text-help" v-show="validLawPerson.isValidLawPerson && !validLawPerson.init">
           <i class="glyphicon glyphicon-ok x-icon-left"></i>
         </div>
-        <div class="col-sm-5" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
+        <div class="col-sm-5" v-show="!validLawPerson.isValidLawPerson && !validLawPerson.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的法定代表人</p></div>
       </div>
       <div class="row">
         <label class="col-sm-2 x-required">企业地址:</label>
@@ -116,13 +112,107 @@
         <div class="col-sm-5" v-show="!validAddress.isValidAddress && !validAddress.init"><p><i class="fa fa-info-circle"></i>填写总部所在地详细地址</p></div>
       </div>
       <div class="row">
-        <label class="col-sm-2">官网地址:</label>
+        <label class="col-sm-2">联系人:</label>
+        <div class="col-sm-5">
+          <input type="text" class="form-control" title="请填写企业对外的联系人,为空则默认为管理员" v-model="data.linkman" name="name" required="" placeholder="请填写企业对外的联系人,为空则默认为管理员">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">联系电话:</label>
+        <div class="col-sm-5">
+          <input :class="!validPhone.isValidPhone?'form-control error-box-border':'form-control'" type="text" v-model="data.phone" @input="phoneCheck()" name="name" required="" placeholder="例如:13838883888">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">邮箱:</label>
+        <div class="col-sm-5">
+          <input type="text" :class="!validEmail.isValidEmail?'form-control error-box-border':'form-control'" v-model="data.email" @input="emailCheck()" required="" placeholder="例如:123123@usoft.com">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">企业传真:</label>
+        <div class="col-sm-5">
+          <input type="text" :class="!validFax.isValidFax?'form-control error-box-border':'form-control'" v-model="data.fax" @input="faxCheck()" required="" placeholder="例如:0755-268XXXXX">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">企业官网:</label>
         <div class="col-sm-5">
-          <input type="url" :disabled="!loginData.isSelf" @change="websiteCheck" v-model="data.website" class="form-control" name="name" required="" placeholder="例如:http://www.example.com">
-         <!-- <span class="web">http://</span>-->
+          <input type="text" class="form-control" v-model="data.website" name="name" required="" placeholder="www.usoftchina.com" style="padding-left:55px;">
+          <span class="web">http://</span>
         </div>
         <div class="col-sm-5"></div>
       </div>
+      <div class="row">
+        <label class="col-sm-2">行业:</label>
+        <div class="col-sm-5 select-dot">
+          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @focus="onShowProfession()" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.profession" class="form-control" name="name" required="" placeholder="请选择所在行业">
+          <div v-show="showProfessionBox"
+               @mouseenter="isInProfessionBox = true"
+               @mouseleave="isInProfessionBox = false"
+               style="display: block; left: 14px; width: 473px" class="dropdown-menu x-union-menu">
+            <div class="x-union-list">
+              <ul class="list-unstyled auto-width">
+                <li v-for="profession in professionData.profession"
+                    :class="profession == currentProfession.profession ? 'active' : ''"
+                    v-text="profession"
+                    @click="getProfessionDetail(profession)"></li>
+              </ul>
+              <ul class="list-unstyled auto-width">
+                <li v-for="detail in professionData.detail"
+                    :class="detail == currentProfession.detail ? 'active' : ''"
+                    v-text="detail"
+                    @click="chooseProfessionDetail(detail)"></li>
+              </ul>
+              <ul class="list-unstyled auto-width">
+                <li v-for="detail in professionData.thirdDetail"
+                    :class="detail == currentProfession.thirdDetail ? 'active' : ''"
+                    v-text="detail"
+                    @click="chooseProfessionThirdDetail(detail)"></li>
+              </ul>
+            </div>
+          </div>
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">企业LOGO:</label>
+        <div class="col-sm-5">
+          <input type="file" @change="uploadLogo" class="form-control file-input upload-area" required="" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png">
+          <img class="preview-logo-img" :src="data.logoUrl == ''?'/images/all/upload-bg.png':data.logoUrl" alt="">
+        </div>
+        <div class="col-sm-5"  v-show="!validLogo.isValidLogo"><p><i class="fa fa-info-circle"></i>logo大小不能超过100K</p></div>
+        <div class="logo-text">个性化展示您的企业形象,图片不超过100Kb,建议宽x高=100x60</div>
+     <!--   <div class="x-text-help" v-show="validUpload.isValidUpload && !validUpload.init">
+          <i class="glyphicon glyphicon-ok x-icon-left"></i>
+        </div>
+        <div class="col-sm-5" v-show="!validUpload.isValidUpload && !validUpload.init"><p><i class="fa fa-info-circle"></i>请上传营业执照扫描件(≤5M的图片或PDF)</p></div>-->
+      </div>
+      <div class="row">
+        <label class="col-sm-2">经营范围标签:</label>
+        <div class="col-sm-8">
+          <div class="no-tags" v-if="!data.tagsData || data.tagsData.length == 0">暂无标签</div>
+          <div class="tags-list">
+            <ul>
+              <li v-for="(tag, index) in data.tagsData"><span v-text="tag"></span><i class="glyphicon glyphicon-remove" @click="removeTag(index)"></i></li>
+            </ul>
+          </div>
+        </div>
+        <div class="col-sm-5 tags-box">
+          <input type="text" @input="tagCheck()" class="form-control" v-model="tag" name="name" required="">
+          <span class="add-tag-btn" @click="addTags()">+添加标签</span>
+        </div>
+        <div class="col-sm-5">
+          <div class="x-text-tip">
+            <i class="glyphicon glyphicon-info-sign x-icon-left"></i>标签长度不超过10个字
+          </div>
+        </div>
+        <div class="col-sm-12 tags-lists"><em class="pull-left">例如:</em><span>企业管理咨询</span><span>电子产品开发</span><span>货运代理</span></div>
+      </div>
       <div class="row next-btn"><button class="btn" :style="loginData.isSelf && !isValid ? 'opacity: .65;':''" @click="sectionChange(2)">下一步</button></div>
     </div>
   </div>
@@ -133,11 +223,18 @@
       return {
         data: {
           name: '',
-          simpleName: '',
+          lawPerson: '',
           url: '',
           licenceId: '',
           address: '',
-          website: ''
+          linkman: '',
+          phone: '',
+          email: '',
+          fax: '',
+          website: '',
+          profession: '',
+          logoUrl: '',
+          tagsData: []
         },
         validName: {
           isValidTypeName: true,
@@ -152,18 +249,36 @@
           isValidLicence: true,
           init: true
         },
-        validSimpleName: {
-          isValidSimpleName: true,
-          init: true
-        },
         validAddress: {
           isValidAddress: true,
           init: true
         },
+        validLawPerson: {
+          isValidLawPerson: true,
+          init: true
+        },
+        validPhone: {
+          isValidPhone: true,
+          init: true
+        },
+        validEmail: {
+          isValidEmail: true,
+          init: true
+        },
+        validFax: {
+          isValidFax: true,
+          init: true
+        },
+        validLogo: {
+          isValidLogo: true,
+          init: true
+        },
         isValid: false,
         isPdf: false,
         showAddressBox: false,
         isInAddressBox: false,
+        showProfessionBox: false,
+        isInProfessionBox: false,
         temCityData: {},
         cityData: {
           province: [],
@@ -175,7 +290,19 @@
           currentCity: '',
           currentDistrict: '',
           detail: ''
-        }
+        },
+        tempProfession: {},
+        professionData: {
+          profession: [],
+          detail: [],
+          thirdDetail: []
+        },
+        currentProfession: {
+          profession: '',
+          detail: '',
+          thirdDetail: ''
+        },
+        tag: ''
       }
     },
     props: ['loginData', 'enterpriseData', 'businessImgUrl'],
@@ -183,18 +310,20 @@
       enterpriseData: function (val, oldVal) {
         if (val !== {}) {
           this.data.name = val.enName || ''
-          this.data.simpleName = val.enShortname || ''
           this.data.licenceId = val.enBussinessCode || ''
           this.data.address = val.enAddress || ''
           this.data.website = val.enUrl || ''
           this.data.url = val.enBussinessCodeImage || ''
           if (this.loginData.isSelf) {
             this.nameCheck(3)
-            this.simpleNameCheck()
+            this.nameTypeCheck()
             this.licenceCheck(3)
             this.addressCheck()
-            this.websiteCheck()
             this.imgUrlCheck()
+            this.lawPersonCheck()
+            this.phoneCheck()
+            this.emailCheck()
+            this.faxCheck()
             this.checkFullData()
             this.submitRegisterData()
           }
@@ -213,6 +342,12 @@
           this.cityData.province.push(province)
         }
       })
+      this.$http.get('/data/profession.json').then(response => {
+        this.tempProfession = response.data
+        for (let profession in response.data) {
+          this.professionData.profession.push(profession)
+        }
+      })
     },
     methods: {
       sectionChange: function (type) {
@@ -220,13 +355,8 @@
           this.$message.error('请填写正确的注册信息')
         } else {
           this.checkFullData()
-          let enterprise = {
-            enName: this.data.name,
-            enShortName: this.data.simpleName,
-            enBussinessCode: this.data.licenceId,
-            enAddress: this.data.address,
-            enUrl: this.data.website
-          }
+          let enterprise = this.data
+          enterprise.tagsData = enterprise.tagsData.toString()
           let data = {}
           data.enterprise = enterprise
           data.isValidRegister = this.isValid
@@ -284,52 +414,70 @@
         }
         this.validCheck()
       },
+      uploadLogo: function (e) {
+        this.validLogo.init = false
+        let file = e.target.files[0]
+        if (file.size > 100 * 1024) {
+          this.validLogo.isValidLogo = false
+//          this.$message.error('图片请勿超过100Kb')
+        } else {
+          let param = new FormData()
+          param.append('file', file, file.name)
+          let config = {
+            headers: {'Content-Type': file.type}
+          }
+          this.$http.post('/file', param, config)
+            .then(response => {
+              this.validLogo.isValidLogo = true
+              this.data.logoUrl = response.data[0].path
+            }, err => {
+              console.log(err)
+              this.$message.error('图片上传失败')
+            })
+        }
+      },
       validCheck: function () {
         this.isValid =
           this.validUpload.isValidUpload && !this.validUpload.init &&
           this.validName.isValidTypeName && !this.validName.init && this.validName.isValidName &&
           this.validLicence.isValidLicence && !this.validLicence.init &&
-          this.validSimpleName.isValidSimpleName && !this.validSimpleName.init &&
-            this.validAddress.isValidAddress && !this.validAddress.init
+          this.validAddress.isValidAddress && !this.validAddress.init &&
+          this.validLawPerson.isValidLawPerson && !this.validLawPerson.init &&
+          (this.validPhone.init || this.validPhone.isValidPhone) &&
+          (this.validEmail.init || this.validEmail.isValidEmail) &&
+          (this.validFax.init || this.validFax.isValidFax)
       },
       checkFullData: function () {
         this.isValid =
           this.validUpload.isValidUpload &&
           this.validName.isValidTypeName && this.validName.isValidName &&
           this.validLicence.isValidLicence &&
-          this.validSimpleName.isValidSimpleName &&
-          this.validAddress.isValidAddress
+          this.validAddress.isValidAddress &&
+          this.validLawPerson.isValidLawPerson
+      },
+      nameTypeCheck: function () {
+        this.validName.isValidTypeName = this.data.name !== '' && this.data.name.length >= 2 && this.data.name.length <= 99 && this.commonValid(this.data.name)
+        this.validName.init = false
       },
       nameCheck: function (num) {
-    //    let tmpInit = this.validName.init
-    //    this.validName.init = true
         if (num > 0) {
           this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
             .then(response => {
               if (response.data.code !== 12) {
                 this.validName.init = false
                 this.validName.isValidName = response.data.success
-                this.validName.isValidTypeName = this.data.name !== '' && this.data.name.length >= 2 && this.data.name.length <= 99 && this.commonValid(this.data.name)
                 this.validCheck()
               } else {
-                //          this.validName.init = tmpInit
                 this.nameCheck(num - 1)
               }
             })
         }
       },
-      simpleNameCheck: function () {
-        this.validSimpleName.init = false
-        this.validSimpleName.isValidSimpleName = this.data.simpleName !== '' && this.data.simpleName.length >= 2 && this.data.simpleName.length <= 40 && this.commonValid(this.data.simpleName)
-        this.validCheck()
-      },
       imgUrlCheck: function () {
         this.validUpload.init = false
         this.validUpload.isValidUpload = this.data.url !== ''
       },
       licenceCheck: function (num) {
-     //   let tmpInit = this.validLicence.init
-     //   this.validLicence.init = true
         if (num > 0) {
           this.$http.post('/basic/enterprise/register/valid/businessCode?businessCode=' + this.data.licenceId)
             .then(response => {
@@ -349,8 +497,25 @@
         this.validAddress.isValidAddress = this.data.address !== ''
         this.validCheck()
       },
-      websiteCheck: function () {
-     // (/^([\w-]+\.)+[\w-]+(/[\w-./?%&=])?$/).test(this.messageBoard.userTel)
+      lawPersonCheck: function () {
+        this.validLawPerson.init = false
+        this.validLawPerson.isValidLawPerson = this.data.lawPerson !== ''
+        this.validCheck()
+      },
+      phoneCheck: function () {
+        this.validPhone.init = false
+        this.validPhone.isValidPhone = (/^[\d-]{8,}$/).test(this.data.phone) || this.data.phone === ''
+        this.validCheck()
+      },
+      emailCheck: function () {
+        this.validEmail.init = false
+        this.validEmail.isValidEmail = (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(this.data.email) || this.data.email === ''
+        this.validCheck()
+      },
+      faxCheck: function () {
+        this.validFax.init = false
+        this.validFax.isValidFax = (/^(([\0]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/).test(this.data.fax) || this.data.fax === ''
+        this.validCheck()
       },
       commonValid: function (str) {
         return str.indexOf(' ') === -1
@@ -358,7 +523,6 @@
       submitRegisterData: function () {
         let enterprise = {
           enName: this.data.name,
-          enShortName: this.data.simpleName,
           enBussinessCode: this.data.licenceId,
           enAddress: this.data.address,
           enUrl: this.data.website
@@ -369,6 +533,10 @@
         data.url = this.data.url
         this.$emit('registerAction', data)
       },
+      onHideBox: function () {
+        this.onHideAddress()
+        this.onHideProfession()
+      },
       onShowAddress: function () {
         this.showAddressBox = true
         this.isClickInputAddress = true
@@ -379,6 +547,16 @@
         }
         this.isClickInputAddress = false
       },
+      onShowProfession: function () {
+        this.showProfessionBox = true
+        this.isClickInputProfession = true
+      },
+      onHideProfession: function () {
+        if (!this.isInProfessionBox && !this.isClickInputProfession) {
+          this.showProfessionBox = false
+        }
+        this.isClickInputProfession = false
+      },
       getCity: function (province) {
         this.cityData.city = []
         this.address.currentCity = ''
@@ -409,6 +587,60 @@
         } else {
           this.$message.error('请输入省、市、区')
         }
+      },
+      getProfessionDetail: function (profession) {
+        this.currentProfession.profession = profession
+        this.currentProfession.detail = ''
+        this.professionData.detail = []
+        this.currentProfession.thirdDetail = ''
+        this.professionData.thirdDetail = []
+        let _this = this
+        _this.professionData.detail = []
+        for (let item in this.tempProfession[profession]) {
+          if (typeof this.tempProfession[profession][item] !== 'object') {
+            _this.professionData.detail.push(this.tempProfession[profession][item])
+          } else {
+            _this.professionData.detail.push(item)
+          }
+        }
+      },
+      chooseProfessionDetail: function (detail) {
+        this.currentProfession.detail = detail
+        this.currentProfession.thirdDetail = ''
+        this.professionData.thirdDetail = []
+        if (typeof this.tempProfession[this.currentProfession.profession][detail] !== 'object') {
+          this.data.profession = detail
+          this.showProfessionBox = false
+        } else {
+          this.professionData.thirdDetail = this.tempProfession[this.currentProfession.profession][detail]
+        }
+      },
+      chooseProfessionThirdDetail: function (thirdDetail) {
+        this.currentProfession.thirdDetail = thirdDetail
+        this.data.profession = thirdDetail
+        this.showProfessionBox = false
+      },
+      tagCheck: function () {
+        if (this.tag.length > 10) {
+          this.tag = this.tag.substring(0, 10)
+        }
+      },
+      addTags: function () {
+        let flag = true
+        let _this = this
+        this.data.tagsData.forEach(function (item) {
+          if (item === _this.tag) {
+            flag = false
+          }
+        })
+        if (flag) {
+          this.data.tagsData.push(this.tag)
+        } else {
+          this.tag = ''
+        }
+      },
+      removeTag: function (index) {
+        this.data.tagsData.splice(index, 1)
       }
     }
   }
@@ -493,4 +725,109 @@
   .x-text-help {
     color: green;
   }
+  .register .row .upload-area   {
+    width: 130px;
+    height: 130px;
+    left: 15px;
+    padding: 0;
+    z-index: 100;
+  }
+  .error-box-border {
+    border-color: #f4645f!important;
+  }
+  .x-btn-blank:hover, .x-btn-blank[disabled] {
+    border: 1px solid #adadad;
+    background: #e6e6e6;
+    color: #333;
+  }
+  .register .row .auto-width {
+    width: auto!important;
+  }
+  .select-dot input {
+    background: url("../../../static/images/all/dot.png") no-repeat;
+    background-position-x: 353px;
+    background-position-y: 10px;
+  }
+  .register .row .logo-text {
+    font-size: 12px;
+    width: 180px;
+    position: relative;
+    top: 5px;
+    left: 175px;
+    text-align: center;
+    color: #999;
+    line-height: 20px;
+  }
+  .preview-logo-img {
+    width: 130px;
+    height: 130px;
+  }
+  .no-tags {
+    float: left;
+    padding: 2px 14px;
+    line-height: 20px;
+    border: #5078cb 1px solid;
+    border-radius: 5px;
+    font-size: 12px;
+    margin: 0 3px;
+    background: #5078cb;
+    color: #fff;
+    margin-top: 5px;
+  }
+  .register .row .add-tag-btn {
+    position: absolute;
+    right: 24px;
+    color: #5078cb;
+    font-size: 12px;
+    cursor: pointer;
+  }
+  .register .row .tags-box {
+    margin-top: 15px;
+  }
+  .register .row .tags-list ul{
+    list-style: none;
+  }
+  .register .row .tags-list ul li {
+    display: inline-block;
+    padding: 2px 14px;
+    line-height: 20px;
+    border: #5078cb 1px solid;
+    border-radius: 5px;
+    font-size: 12px;
+    color: #5078cb;
+    margin: 0 3px;
+  }
+  .register .row .tags-list ul li i{
+    font-size: 12px;
+    color: red;
+    position: relative;
+    top: -3px;
+    right: -12px;
+  }
+  .register .row .tags-lists {
+    margin-top: 10px;
+  }
+  .register .row .tags-lists em {
+    font-style: inherit;
+    margin-left: 163px;
+    font-size: 12px;
+    color: #999;
+  }
+  .register .row .tags-lists span {
+    float: left;
+    padding: 2px 14px;
+    line-height: 20px;
+    border: #5078cb 1px solid;
+    border-radius: 5px;
+    font-size: 12px;
+    color: #5078cb;
+    margin: 0 3px;
+  }
+  .register .row .x-text-tip {
+    color: #777;
+    margin-top: 15px;
+  }
+  .register .row .x-text-tip i {
+    margin-right: 5px;
+  }
 </style>

+ 10 - 13
components/register-saler/register/StepSecond.vue

@@ -3,19 +3,11 @@
   <div class="section">
     <div class="agreement">
       <div class="join_xieyi">
-        <h3>《优软商城服务条款》</h3>
-        <p><span>第一章 接受条款 </span></p>
-        <p>1.   本协议内容包括协议正文及所有优软商城已经发布或将来可能发布的各类规则,所有规则为协议不可分割的一部分,与协议正文具有同等法律效力。 </p>
-        <p>2.   以任何方式进入优软商城并使用服务即表示您已充分阅读、理解并同意接受本协议的条款和条件(以下合称“条款“)</p>
-        <p>3.   优软商城有权根据业务需要酌情修订“条款”,并以网站公告的形式进行更新,不再单独通知予您。经修
-          订的“条款”一经在   优软商城公布,即产生效力。如您不同意相关修订,请您立即停止使用“服务”。如您继
-          续使 用“服务”,则将  视您已接受经 修 订的“条款”,当您与优软商城发生争议时,应以最新的“条款”为准。</p>
-        <p><span>第二章 定义</span></p>
-        <p>1.   本协议内容包括协议正文及所有优软商城已经发布或将来可能发布的各类规则,所有规则为协议不可分割的一部分,与协议正文具有同等法律效力。 </p>
-        <p>2.   以任何方式进入优软商城并使用服务即表示您已充分阅读、理解并同意接受本协议的条款和条件(以下合称“条款“)</p>
-        <p>3.   优软商城有权根据业务需要酌情修订“条款”,并以网站公告的形式进行更新,不再单独通知予您。经修
-          订的“条款”一经在   优软商城公布,即产生效力。如您不同意相关修订,请您立即停止使用“服务”。如您继
-          续使 用“服务”,则将  视您已接受经 修 订的“条款”,当您与优软商城发生争议时,应以最新的“条款”为准。</p>
+        <div>
+          <span @click="chooseTag=1" :class="chooseTag==1?'active':''">优软商城服务条款</span>
+          <span @click="chooseTag=2" :class="chooseTag==2?'active':''">优软商城买卖条例</span>
+        </div>
+        <textarea readonly></textarea>
       </div>
     </div>
     <div class="row" style="margin-left: 30px; text-align: center;">
@@ -35,6 +27,11 @@
 <script>
   export default {
     props: ['checkData', 'loginData', 'cacheData'],
+    data () {
+      return {
+        chooseTag: 1
+      }
+    },
     methods: {
       sectionChange: function (type) {
         if (type === 3) {

+ 28 - 20
components/register-saler/register/StepThird.vue

@@ -60,7 +60,7 @@
               </div>
               <!--增加品牌-->
               <div class="brand-type row" v-for="(brand, index) in brands">
-                <div class="col-md-1">品牌{{index+1}}<em>*</em></div>
+                <div class="col-md-1">品牌{{index+1}}<em v-if="index == 0">*</em></div>
                 <div class="col-md-7">
                   <input type="text" v-model="brand.name"
                          @input="onBrandInput(brand, index)"
@@ -86,7 +86,7 @@
                   </div>
                   <div class="file-text">品牌logo/商标注册原件/授权说明书</div>
                   <div v-show="brands.length > 1" @click="deleteBrand(index)" class="delete" title="删除"><i class="fa fa-trash"></i></div>
-                  <div class="col-md-12"> <em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
+                  <div class="col-md-12"><em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
                 </div>
               </div>
               <div class="add-brand row">
@@ -342,14 +342,16 @@
         }
       },
       onCheck: function (item, index) {
-        this.$http.get('/api/product/brand', {params: {name: item.name, op: 'by_name'}})
-          .then(response => {
-            item.brandUuid = response.data.uuid
-            item.isPdf = item.url.substring(item.url.length - 4, item.url.length) === '.pdf'
-          }, err => {
-            console.log(err)
-            this.showBrandNameInvalid = true
-          })
+        if (item.name && item.name !== '') {
+          this.$http.get('/api/product/brand', {params: {name: item.name, op: 'by_name'}})
+            .then(response => {
+              item.brandUuid = response.data.uuid
+              item.isPdf = item.url.substring(item.url.length - 4, item.url.length) === '.pdf'
+            }, err => {
+              console.log(err)
+              this.showBrandNameInvalid = true
+            })
+        }
       },
       onBrandInput: function (brand, index) {
         this.showSimilarKey.flag = false
@@ -421,13 +423,13 @@
         if (this.businessLicenseUrl === '') {
           this.$message.error('请上传营业执照')
         } else {
-          this.brands.forEach(function (item) {
-            if (item.name === '') {
-              validCode = 1
-            } else if (item.url === '') {
-              validCode = 2
-            }
-          })
+//          this.brands.forEach(function (item) {
+//          })
+          if (this.brands[0].name === '') {
+            validCode = 1
+          } else if (this.brands[0].url === '') {
+            validCode = 2
+          }
           if (validCode === 0 || this.tab === 'DISTRIBUTION') {
             let qualifications = []
             qualifications.push({
@@ -450,8 +452,14 @@
               })
             }
 //            console.log(qualifications)
+            let tmpBrands = []
+            this.brands.forEach(function (item) {
+              if (item.name !== '' && item.url !== '') {
+                tmpBrands.push(item)
+              }
+            })
             this.$http.post('/store-service/applications', {
-              brands: this.brands,
+              brands: tmpBrands,
               qualifications: qualifications,
               type: this.tab
             }).then(response => {
@@ -469,7 +477,7 @@
                   })
                 window.setTimeout(function () {
                   window.location.href = '/vendor#/store-apply/'
-                }, 1500)
+                }, 3000)
               } else {
                 this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
                 this.$message.error('开通店铺失败')
@@ -829,7 +837,7 @@
     font-weight: bold;
     font-style: inherit;
   }
-  .add-brand a:hover em, .add-brand a:active em, .add-brand a:focus em{
+  .add-brand a:hover em{
     color: #d32526;
     text-decoration: none;
   }

+ 62 - 23
pages/register-saler/index.vue

@@ -58,7 +58,7 @@
     color: #666;
   }
   .step-menu{
-    width: 96%;
+    width: 100%;
     margin: 0 auto;
     height: 34px;
     background: #e8e8e8;
@@ -97,8 +97,7 @@
   }
   .become-store .section .register .row{
     line-height: 34px;
-    padding-bottom: 10px;
-    width: 80%;
+    padding-bottom: 15px;
     margin: 0 auto;
   }
   .become-store .section .register .row p{
@@ -111,15 +110,15 @@
   }
   .x-form-set-header {
     position: relative;
-    margin-bottom: 20px;
+    margin-bottom: 45px;
   }
   .x-form-set-header h4 {
     font-size: 20px;
     font-weight: 400;
     color: #888;
     margin-top: 0;
-    padding-bottom: 8px;
-    border-bottom: 1px solid #ebebeb;
+    padding-bottom: 14px;
+    text-align: center;
   }
   .x-form-set-header:after {
     content: "";
@@ -128,6 +127,8 @@
     background: #5078cb;
     position: absolute;
     left: 0;
+    right: 0;
+    margin: 0 auto;
     bottom: 0;
   }
   .x-required:before {
@@ -150,16 +151,16 @@
     padding-top: 30px !important;
   }
   .next-btn button{
-    width: 120px;
-    height: 34px;
-    background: #5078CB;
-    text-align: center;
-    border: none;
-    font-size: 14px;
+    width: 175px;
+    padding: 0;
+    height: 35px;
+    line-height: 35px;
+    border-radius: 0;
+    background: #5078cb;
     color: #fff;
-    margin-top: 30px;
-    border-radius: 3px;
-    margin: 0 20px;
+    font-weight: 700;
+    letter-spacing: 4px;
+    margin-right: 20px;
   }
   .no-apply{
     width: 150px;
@@ -209,13 +210,51 @@
     text-align: center;
   }
   /*服务协议*/
-  .join_xieyi{ width:92%; margin:0px auto; border-top:#eee 1px solid;border-bottom:#eee 1px solid; padding-top:50px; padding-bottom:50px; margin-bottom: 30px;}
-  .join_xieyi h3{ font-size:24px; color:#0099ff; text-align:center; padding-bottom:10px;}
-  .join_xieyi p{ font-size:14px; color:#666; line-height:35px; width:100%; margin:0px auto;}
-  .join_xieyi p span{ font-size:16px; font-weight:bold; color:#333; position:relative; margin-left:14px; height:30px; display:inline-block; margin-top:20px;}
- /* .section{
-    display: none;
-  } */
+  .join_xieyi
+  {
+    width:618px;
+    height: 356px;
+    margin-top: 40px;
+    margin-left: 190px;
+  }
+  .join_xieyi div {
+    width: 26px;
+    display: inline-block;
+  }
+  .join_xieyi div span {
+    display: block;
+    height: 176px;
+    border: 1px solid;
+    text-align: center;
+    padding-top: 23px;
+    cursor: pointer;
+    background: #e5e5e5;
+    color: #a0a0a0;
+  }
+  .join_xieyi div span:first-child {
+    border-bottom: none;
+  }
+  .join_xieyi div span:hover {
+    color: #708ed2;
+    border-color: #708ed2;
+    background: #fff;
+  }
+  .join_xieyi div span.active {
+    color: #708ed2;
+    border-color: #708ed2;
+    background: #fff;
+  }
+
+  .join_xieyi textarea {
+    display: inline-block;
+    float: right;
+    width: 592px;
+    height: 352px;
+    overflow: auto;
+    word-break: break-all;
+    outline: none;
+    border-left: none;
+  }
   .x-btn-blank{
     border: 1px solid #ccc;
     background: #fff;
@@ -548,7 +587,7 @@
     font-weight: bold;
     font-style: inherit;
   }
-  .add-brand a:hover em, .add-brand a:active em, .add-brand a:focus em{
+  .add-brand a:hover em{
     color: #d32526;
     text-decoration: none;
   }

+ 1 - 0
static/data/profession.json

@@ -0,0 +1 @@
+{"IT|通信|电子|互联网":["互联网/电子商务","计算机软件","IT服务(系统/数据/维护)","电子技术/半导体/集成电路","计算机硬件","通信/电信/网络设备","通信/电信运营、增值服务","网络游戏"],"金融业":["基金/证券/期货/投资","保险","银行","信托/担保/拍卖/典当"],"房地产|建筑业":{"房地产/建筑/建材/工程":["房地产金融服务类","房地产工程施工类","房地产工程货物类"],"家居/室内设计/装饰装潢":"家居/室内设计/装饰装潢","物业管理/商业中心":"物业管理/商业中心"},"商业服务":["专业服务/咨询(财会/法律/人力资源等)","广告/会展/公关","中介服务","检验/认证","外包服务"],"贸易|批发|零售|租赁业":["快速消费品(食品/饮料/烟酒/日化)","耐用消费品(服饰/纺织/皮革/家具/家电)","贸易/进出口","零售/批发","租赁服务"],"文体教育|工艺美术":["教育/培训/院校","礼品/玩具/工艺美术/收藏品/奢侈品"],"生产|加工|制造":["汽车/摩托车","大型设备/机电设备/重工业","加工制造(原料加工/模具)","仪器仪表及工业自动化","印刷/包装/造纸","办公用品及设备","医药/生物工程","医疗设备/器械","航空/航天研究与制造"],"交通|运输|物流|仓储":["交通/运输","物流/仓储"],"服务业":["医疗/护理/美容/保健/卫生服务","酒店/餐饮","旅游/度假"],"文化|传媒|娱乐|体育":["媒体/出版/影视/文化传播","娱乐/体育/休闲"],"能源|矿产|环保":["能源/矿产/采掘/冶炼","石油/石化/化工","电气/电力/水利","环保"],"政府|非盈利机构":["政府/公共事业/非盈利机构","学术/科研"],"农|林|牧|渔|其他":["农/林/牧/渔","跨领域经营","其他"]}

BIN
static/images/all/dot.png


BIN
static/images/all/upload-bg.png