فهرست منبع

Merge remote-tracking branch 'origin/release-201830-wangcz'

# Conflicts:
#	components/mobile/center/upoff-material.vue
wangcz 7 سال پیش
والد
کامیت
fff179fde6
45فایلهای تغییر یافته به همراه2211 افزوده شده و 56 حذف شده
  1. 2 2
      Dockerfile
  2. 180 0
      assets/scss/common.scss
  3. 3 0
      components/applyPurchase/SayPrice.vue
  4. 3 3
      components/default/Footer.vue
  5. 28 1
      components/default/Header.vue
  6. 2 2
      components/default/MessageBoard.vue
  7. 918 0
      components/lotteryDraw/lottery.vue
  8. 6 0
      components/main/Nav.vue
  9. 5 2
      components/mobile/center/outOfStorage/StorageList.vue
  10. 0 5
      components/mobile/center/outOfStorage/otherStorage.vue
  11. 768 0
      components/mobile/center/upoff-material.vue
  12. 1 2
      components/mobile/staffManagement/StaffList.vue
  13. 1 1
      components/pcb/product/Detail.vue
  14. 7 7
      components/product/component/StoreInfo.vue
  15. 2 2
      nuxt.config.js
  16. 23 0
      pages/lotteryDraw/index.vue
  17. 1 1
      pages/mobile/center/vendor/index.vue
  18. 14 2
      pages/mobile/center/vendor/material.vue
  19. 4 0
      pages/mobile/center/vendor/message.vue
  20. 6 1
      pages/mobile/center/vendor/outOfStorage/index.vue
  21. 4 4
      pages/mobile/center/vendor/outOfStorage/purchase/_storeid.vue
  22. 22 4
      pages/mobile/order/details.vue
  23. 36 16
      pages/mobile/order/logistics.vue
  24. 2 1
      plugins/element-ui.js
  25. BIN
      static/images/btbBusiness/dynamic-graph.gif
  26. BIN
      static/images/logo/uas.png
  27. BIN
      static/images/logo_uas.png
  28. BIN
      static/images/lottery/banner.png
  29. BIN
      static/images/lottery/describe.png
  30. BIN
      static/images/lottery/hua.png
  31. BIN
      static/images/lottery/level-01.png
  32. BIN
      static/images/lottery/level-02.png
  33. BIN
      static/images/lottery/level-020.png
  34. BIN
      static/images/lottery/level-03.png
  35. BIN
      static/images/lottery/level-030.png
  36. BIN
      static/images/lottery/level-04.png
  37. BIN
      static/images/lottery/level-040.png
  38. BIN
      static/images/lottery/mall_qr.png
  39. BIN
      static/images/lottery/moeny.png
  40. BIN
      static/images/lottery/qr.png
  41. BIN
      static/images/lottery/red_moeny.png
  42. BIN
      static/images/lottery/up.png
  43. BIN
      static/images/lottery/update.png
  44. 81 0
      store/lottery.js
  45. 92 0
      store/lottery/lotteryInfo.js

+ 2 - 2
Dockerfile

@@ -6,6 +6,6 @@ RUN chmod +x run.sh
 #RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
 #RUN cnpm install -g node-gyp
 #RUN cnpm install -g yarn
-RUN yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass -g
-RUN yarn
+RUN /opt/yarn-v1.5.1/bin/yarn config set sass-binary-site http://npm.taobao.org/mirrors/node-sass -g
+RUN /opt/yarn-v1.5.1/bin/yarn
 CMD [ "bash", "run.sh" ]

+ 180 - 0
assets/scss/common.scss

@@ -936,3 +936,183 @@ img.new-animate{
     top: 46px !important ;
   }
 }
+//进度条
+.progress_bar .el-progress{
+  width: 511px;
+  height: 15px;
+  border-radius: 7px;
+}
+.progress_bar .el-progress-bar__inner{
+  background: #ffbe04;
+}
+.progress_bar .el-progress-bar__innerText{
+  font-size: 16px;
+  color: #0083c5;
+}
+
+//未中奖 询价不够
+.no-prise .el-dialog--small{
+  top: 30% !important;
+  width: 682px;
+  height: 328px;
+  background-color: #ffffff;
+  border-radius: 13px;
+}
+.no-prise .el-dialog--small .el-dialog__body{
+  position: relative;
+}
+.no-prise .el-dialog--small .el-dialog__header {
+  display: none;
+}
+.no-prise .dialog-content img.hua{
+  position: absolute;
+  top: -170px;
+  left: 50%;
+  margin-left: -218px;
+}
+.no-prise .dialog-content p{
+  margin-top: 100px;
+  font-size: 36px;
+  color: #846244;
+}
+.no-prise .dialog-content .close{
+  position: absolute;
+  top: 0px;
+  right: 0px;
+  width: 30px;
+  height: 30px;
+  line-height: 23px;
+  text-align: center;
+  font-size: 30px;
+  background: rgba(0,0,0,.9);
+  border-radius: 50%;
+}
+.no-prise .el-dialog__footer {
+  margin: 0 auto;
+  text-align: center;
+}
+.no-prise .dialog-footer a{
+  display: inline-block;
+  width: 278px;
+  height: 57px;
+  line-height: 57px;
+  text-align: center;
+  font-size: 36px;
+  color: #ffffff;
+  background-color: #f29844;
+  border-radius: 28px;
+}
+
+//中奖提示
+.get-prise .el-dialog--small {
+  height: auto;
+}
+.get-prise .dialog-content p{
+  font-size: 28px;
+  text-align: left;
+}
+.get-prise .qr{
+  padding: 0 90px 0 20px;
+  overflow: hidden
+}
+.get-prise .qr p{
+  float: left;
+  width: 300px;
+  margin-top: 20px;
+  text-align: left;
+}
+.get-prise .qr img{
+  float: right;
+  height: 100px;
+}
+.get-prise .dialog-footer a{
+  margin-top: 10px;
+}
+//查看中奖产品
+.look-prise .el-dialog--small{
+  width: 825px;
+  height: auto;
+}
+.look-prise .btn-tip{
+  margin: 43px auto 0;
+  width: 278px;
+  height: 57px;
+  line-height: 57px;
+  text-align: center;
+  font-size: 36px;
+  color: #fff;
+  background-color: #f29844;
+  border-radius: 28px
+}
+.look-prise .prise-tab{
+  overflow: hidden;
+  margin: 20px 0;
+}
+.look-prise .prise-tab span{
+  display: inline-block;
+  float: left;
+  color: #f08829;
+  font-size: 30px;
+  &:first-child{
+    width: 180px;
+  }
+  &:nth-child(2){
+    width: 170px;
+  }
+  &:nth-child(3){
+    width: 170px;
+  }
+  &:last-child{
+    width: 150px;
+  }
+}
+.look-prise ul{
+  list-style: none;
+  margin-top: 40px;
+}
+.look-prise ul li {
+  overflow: hidden;
+  margin-bottom: 24px;
+  &:last-child {
+    margin-bottom: 40px;
+  }
+}
+.look-prise ul li div{
+  float: left;
+  overflow: hidden;
+  color: #846244;
+  font-size: 24px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  &:first-child{
+    width: 180px;
+  }
+  &:nth-child(2){
+    width: 170px;
+  }
+  &:nth-child(3){
+    width: 170px;
+  }
+  &:last-child{
+    width: 150px;
+  }
+}
+.look-prise .prise-style{
+  font-size: 20px;
+  color: #f08829;
+}
+.look-prise .prise-style img{
+  margin-left: 20px;
+  width: 100px;
+  height: 100px;
+}
+.look-prise .no_prise{
+  margin: 60px auto 50px;
+  font-size: 32px;
+  color: #f08829;
+}
+.look-prise .no_prise i{
+  margin-right: 10px;
+  font-size: 40px;
+  color: #f08829;
+}

+ 3 - 0
components/applyPurchase/SayPrice.vue

@@ -419,6 +419,9 @@
                   width: 300px;
                   text-align: left;
                   color: #4290f7;
+                  word-break: break-all;
+                  word-wrap: break-word;
+                  vertical-align: top;
                 }
               }
             }

+ 3 - 3
components/default/Footer.vue

@@ -21,8 +21,8 @@
         <div class="item">
           <h5>更多服务</h5>
           <ul class="list-unstyled">
-            <li><a href="http://www.usoftchina.com/"  target="_blank">优软科技</a></li>
-            <li><a href="http://www.ubtob.com" target="_blank">优软云</a></li>
+            <li><a href="http://uas.usoftchina.com/"  target="_blank">优软科技</a></li>
+            <li><a href="http://www.usoftchina.com" target="_blank">优软云</a></li>
           </ul>
         </div>
         <div class="item">
@@ -68,7 +68,7 @@
           url: 'http://www.yitoa.com',
           title: '深圳市英唐智能科技'
         }, {
-          url: 'http://www.usoftchina.com/usoft',
+          url: 'http://uas.usoftchina.com',
           title: '深圳市优软科技'
         }, {
           url: 'http://www.51cube.com',

+ 28 - 1
components/default/Header.vue

@@ -54,6 +54,7 @@
             <a class="item" href="/user#/index">买家中心</a>
             <a class="item" @click="toVendor">卖家中心</a>
             <a class="item" href="/sso#/index">帐户中心</a>
+            <a class="item" href="/user#/messagePersonal">消息 ({{count}})</a>
           </template>
           <template v-else>
             <a class="item" @click="onLoginClick()">登录</a>
@@ -77,7 +78,9 @@
 //        keyword: '',
 //        isSearching: false
 //         ShowApplyAdv: true,
-        showEnterpriseToggle: false
+        showEnterpriseToggle: false,
+        messageUrl: process.env.messageUrl,
+        count: 0
       }
     },
     computed: {
@@ -98,6 +101,30 @@
         return this.$store.state.option.url
       }
     },
+    mounted () {
+      if(this.user.logged && this.user.data) {
+        let userUU = this.user.data.userUU
+        let enUU = this.user.data.enterprise ? this.user.data.enterprise.uu : null
+        if(userUU && enUU) {
+          let param = {
+            'receiverUu': userUU,
+            'receiverEnuu': enUU,
+            'consumerApp': 'MALL',
+            'isRead': 0
+          }
+          this.$http.get(`/messages/count`, {params: param})
+            .then((res) => {
+              if(res.data) {
+                this.count = res.data.count ? (res.data.count < 100 ? res.data.count : '99+') : 0
+              } else {
+                this.count = 0
+              }
+            }).catch((err) => {
+              console.log(err)
+          })
+        }
+      }
+    },
     methods: {
       logout () {
         this.$http.get('/logout/crossBefore').then(response => {

+ 2 - 2
components/default/MessageBoard.vue

@@ -170,8 +170,8 @@
       date: function (num) {
         const d = new Date(num)
         const year = d.getFullYear()
-        const month = d.getMonth() + 1 < 10 ? '0' + d.getMonth() : '' + d.getMonth()
-        const day = d.getDay() < 10 ? '0' + d.getDay() : '' + d.getDay()
+        const month = d.getMonth() + 1 < 10 ? '0' + (d.getMonth() + 1) : '' + d.getMonth() + 1
+        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
         return year + '-' + month + '-' + day
       }
     },

+ 918 - 0
components/lotteryDraw/lottery.vue

@@ -0,0 +1,918 @@
+<template>
+  <div class="lucky" v-if="nextLevel">
+    <div class="banner"></div>
+    <div class="lottery container">
+      <div class="level" style="margin-top: 80px;" v-if="user.itemName === '王者'">
+        <img src="/images/lottery/level-04.png" alt=""/>
+        <div class="high_title">联系客服直接领取</div>
+      </div>
+      <div class="level" v-else>
+        <div class="low_level">
+          <img :src="user.itemName === '青铜' ? '/images/lottery/level-01.png' : user.itemName === '黄金' ? '/images/lottery/level-02.png' : '/images/lottery/level-03.png'" alt=""/>
+          <div class="level_title">青铜买家用户每发布十条询价便可获得一次抽奖机会</div>
+        </div>
+        <div class="up"><img src="/images/lottery/up.png" alt=""/><span>升级</span></div>
+        <div class="high_level">
+          <img :src="nextLevel.nextItem.name === '黄金' ? '/images/lottery/level-020.png' : nextLevel.nextItem.name === '钻石' ? '/images/lottery/level-030.png' : '/images/lottery/level-040.png'" alt=""/>
+        </div>
+        <div class="progress_bar" v-show="this.user.itemName === '青铜'">
+          <div class="buyer_inquiry inquiry">
+            <el-progress :text-inside="true" :stroke-width="15" :percentage="inquiryRate"></el-progress>
+            <span class="all_count"><span v-text="buyerInquiryCount"></span>条询价</span>
+            <div class="tip_text"><img src="/images/lottery/update.png" alt=""/>买家再增加<span v-text="activityInquiryCount"></span>条报价,便可升级{{this.nextLevel.nextItem.name}}用户</div>
+          </div>
+          <div class="vendor_inquiry inquiry">
+            <el-progress :text-inside="true" :stroke-width="15" :percentage="replyRate"></el-progress>
+            <span class="all_count"><span v-text="vendorInquiryCount"></span>条询价</span>
+            <div class="tip_text"><img src="/images/lottery/update.png" alt=""/>卖家再增加<span v-text="activityReplyCount"></span>条报价,便可升级{{this.nextLevel.nextItem.name}}用户</div>
+          </div>
+        </div>
+        <div class="progress_bar" v-show="this.user.itemName === '黄金'">
+          <div class="buyer_inquiry inquiry" v-if="this.user.role === 'CUSTOMER'">
+            <el-progress :text-inside="true" :stroke-width="15" :percentage="inquiryRate"></el-progress>
+            <span class="all_count"><span v-text="buyerInquiryCount"></span>条询价</span>
+            <div class="tip_text"><img src="/images/lottery/update.png" alt=""/>买家再增加<span v-text="activityInquiryCount"></span>条报价,便可升级{{this.nextLevel.nextItem.name}}用户</div>
+          </div>
+          <div class="vendor_inquiry inquiry" v-if="this.user.role === 'SELLER'">
+            <el-progress :text-inside="true" :stroke-width="15" :percentage="replyRate"></el-progress>
+            <span class="all_count"><span v-text="vendorInquiryCount"></span>条询价</span>
+            <div class="tip_text"><img src="/images/lottery/update.png" alt=""/>卖家再增加<span v-text="activityReplyCount"></span>条报价,便可升级{{this.nextLevel.nextItem.name}}用户</div>
+          </div>
+        </div>
+        <div class="progress_bar" v-show="this.user.itemName === '钻石' && this.user.role === 'CUSTOMER'">
+          <div class="buyer_inquiry inquiry">
+            <el-progress :text-inside="true" :stroke-width="15" :percentage="inquiryRate"></el-progress>
+            <span class="all_count"><span v-text="buyerInquiryCount"></span>条询价</span>
+            <div class="tip_text"><img src="/images/lottery/update.png" alt=""/>买家再增加<span v-text="activityInquiryCount"></span>条报价,便可升级{{this.nextLevel.nextItem.name}}用户</div>
+          </div>
+          <div class="buyer_trad inquiry">
+            <el-progress :text-inside="true" :stroke-width="15" :percentage="tradeRate"></el-progress>
+            <span class="all_count"><span v-text="buyerTradeCount"></span>元</span>
+            <div class="tip_text"><img src="/images/lottery/update.png" alt=""/>买家再增加<span v-text="activityTradeCount"></span>元交易额,便可升级{{this.nextLevel.nextItem.name}}用户</div>
+          </div>
+        </div>
+      </div>
+      <div class="prize">
+        <div class="press-prise">
+          <div class="press_prise">
+            <ul class="nineGrid">
+              <li class="row">
+                <div v-for="(prise, index) in currentPrizes.slice(0, 3)" :class="activeIndex === index ? `active` : ``">
+                  <div class="wrapper">
+                    <img :src="prise.img" alt="">
+                    <p v-text="prise.name"></p>
+                  </div>
+                  <div class="mask"></div>
+                </div>
+              </li>
+              <li class="row">
+                <div :class="activeIndex === 7 ? 'active': ''" class="grid_center">
+                  <div class="wrapper">
+                    <img :src="sevenPrize.img" alt="">
+                    <p v-text="sevenPrize.name"></p>
+                  </div>
+                  <div class="mask"></div>
+                </div>
+                <div class="getLuck" @click="startLottery">
+                  <p>立即抽奖</p>
+                </div>
+                <div :class="activeIndex === 3 ? 'active': ''" class="grid_center">
+                  <div class="wrapper">
+                    <img :src="thirdPrize.img" alt="">
+                    <p v-text="thirdPrize.name"></p>
+                  </div>
+                  <div class="mask"></div>
+                </div>
+              </li>
+              <li class="row">
+                <div v-for="(prise, index) in currentPrize" :class="activeIndex === 6-index ? `active` : ``">
+                  <div class="wrapper">
+                    <img :src="prise.img" alt="">
+                    <p v-text="prise.name"></p>
+                  </div>
+                  <div class="mask"></div>
+                </div>
+              </li>
+            </ul>
+          </div>
+          <div class="lave-count">剩余<span>{{restCount}}</span>次</div>
+          <div class="tab-prise">
+            <span class="toggle"
+                  v-for="(item, index) in user.userDetails"
+                  :class="{'active' : index === selectLevelIndex}"
+                  @click="toggleLevel(item)">{{item.itemName}}用户</span>
+          </div>
+        </div>
+        <div class="look_prise">
+          <div class="header">
+            <span>获奖名单</span>
+            <span @click="lookMyPrizes(true)">查看我的奖品</span>
+          </div>
+          <div class="body">
+            <div class="list_head">
+              <span>时间</span>
+              <span>用户</span>
+              <span>奖品</span>
+            </div>
+            <ul>
+              <li v-for="(record, index) in recordData" :key="index" :style="'top: -' + 40 * scrollTimerIndex + 'px'" :class="{'scrollTop': isTop}">
+                <div class="time" :title="record.drawnTime" v-text="record.drawnTime">2018-08-08</div>
+                <div class="company" :title="record.userName" v-text="record.userName">深圳市优软科技有限公司公司深圳市优软科技有限公司公司</div>
+                <div class="prise_level" :title="record.prizeName" v-text="record.prizeName">一等奖</div>
+              </li>
+            </ul>
+          </div>
+        </div>
+      </div>
+      <div class="describe">
+        <img src="/images/lottery/describe.png" alt=""/>
+      </div>
+      <div class="rule">
+        <header>活动规则</header>
+        <div class="section">
+          <div class="list">1、活动时间:九月起;</div>
+          <div class="list">2、三个月内的重复型号询价,不计入抽奖机会;</div>
+          <div class="list">3、钻石用户连续3个月内累计的数据达到抽奖资格,将于最近的一次抽奖中参与,如9-10-11月内达到抽奖资格,将在12月底的抽奖(钻石用户领奖在每个季度最后一个工作日),钻石用户奖品 将由我们电话联系用户;</div>
+          <div class="list">4、获得实物礼品的客户,联系客服微信领取;</div>
+          <div class="list">5、活动礼品按周发放;</div>
+          <div class="list">6、对活动规则以及礼品发送有疑问,请联系在线客服(友情提示:客服在线时间周一至周五,早九点至晚六点,法定节假日除外);</div>
+          <div class="list">7、领奖时,兑换码和手机号为一致,便可兑换奖品,望您妥善保管;</div>
+          <div class="list">8、本次活动所属权归优软商城所有。</div>
+        </div>
+      </div>
+    </div>
+    <!--去登录-->
+    <div class="no-prise login">
+      <el-dialog
+        :visible.sync="showLoginBox">
+        <div class="dialog-content">
+          <img src="/images/lottery/hua.png" class="hua" alt=""/>
+          <p>你还未登录,请登陆后抽奖</p>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <a type="button" @click="goLogin">确认</a>
+        </span>
+      </el-dialog>
+    </div>
+    <!--未获得抽奖机会-->
+    <div class="no-prise">
+      <el-dialog
+        :visible.sync="showNoPriseBox">
+        <div class="dialog-content">
+          <img src="/images/lottery/hua.png" class="hua" alt=""/>
+          <p>您未获得抽奖机会,请您先发布询价</p>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <a type="button" @click="sureInquiry(false)">确认</a>
+        </span>
+      </el-dialog>
+    </div>
+    <!--未抽中奖品还有机会-->
+    <div class="no-prise">
+      <el-dialog
+        :visible.sync="showChooseBox">
+        <div class="dialog-content">
+          <img src="/images/lottery/hua.png" class="hua" alt=""/>
+          <p>很遗憾,您没有中奖,下次还有机会!</p>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <a type="button" @click="showChooseBox = false">确认</a>
+        </span>
+      </el-dialog>
+    </div>
+    <!--中奖提示-->
+    <div class="no-prise get-prise" v-if="winningInfo.data">
+      <el-dialog
+        :visible.sync="showGetPriseBox">
+        <div class="dialog-content" v-if="winningInfo.data.name === ''">
+          <!--<div class="close" @click="showGetPriseBox = false">&times;</div>-->
+          <img src="/images/lottery/hua.png" class="hua" alt=""/>
+          <p>很遗憾,您没有中奖,下次还有机会!</p>
+          <span slot="footer" class="dialog-footer">
+          <a type="button" @click="closeGotPriseInfo(false)">确认</a>
+        </span>
+        </div>
+        <div class="dialog-content" v-else>
+          <!--<div class="close" @click="showGetPriseBox = false">&times;</div>-->
+          <img src="/images/lottery/hua.png" class="hua" alt=""/>
+          <p>恭喜您抽中<span v-text="winningInfo.data.name"></span>,请添加客服微信使用兑换码兑换</p>
+          <div class="qr"><p>扫描微信二维码或添加XXX微信领取奖品</p><img src="/images/lottery/qr.png" alt=""/></div>
+          <span slot="footer" class="dialog-footer">
+          <a type="button" @click="closeGotPriseInfo(false)">确认</a>
+        </span>
+        </div>
+      </el-dialog>
+    </div>
+    <!--查看我的奖品-->
+    <div class="no-prise look-prise">
+      <el-dialog
+        :visible.sync="lookPriseBox">
+        <div class="dialog-content">
+          <div class="close" @click="lookPriseBox = false">&times;</div>
+          <img src="/images/lottery/hua.png" class="hua" alt=""/>
+          <div class="btn-tip">奖品列表</div>
+          <div v-if="ownRecordData.content && ownRecordData.content.length">
+            <div style="margin: 0 auto; text-align: center; width: 700px;">
+              <div class="prise-tab"><span>奖品</span><span>竞换码</span><span>中奖时间</span><span>竞换状态</span></div>
+              <ul>
+                <li v-for="item in ownRecordData.content">
+                  <div :title="item.prizeName" v-text="item.prizeName">一等奖</div>
+                  <div :title="item.code" v-text="item.code">YRQT0010</div>
+                  <div :title="item.drawnTime" v-text="item.drawnTime">2018年12月30日</div>
+                  <div v-text="item.status === 100 ? '已兑奖' : item.status === 200 ? '未兑奖' : ''">已兑换</div>
+                </li>
+              </ul>
+              <div style="float: right;">
+                <page :total="ownRecordData.totalElements" :page-size="pageParams.count"
+                      :current="pageParams.page" @childEvent="handleCurrentChange"></page>
+              </div>
+            </div>
+            <div class="prise-style">兑奖方式:扫描微信二维码或添加XXXX微信领取奖品 <img src="/images/lottery/mall_qr.png" alt=""/></div>
+          </div>
+          <div v-else>
+            <div class="no_prise"><i class="fa fa-smile-o fa-lg"></i>暂无中奖记录</div>
+          </div>
+        </div>
+      </el-dialog>
+    </div>
+    <!--二维码-->
+    <div class="qr-active">
+      <img src="/images/lottery/qr.png" alt=""/>
+    </div>
+  </div>
+</template>
+<script>
+  import Page from '~components/common/page/pageComponent.vue'
+  export default {
+    name: 'lottery',
+    data () {
+      return {
+        pageParams: {
+          page: 1,
+          count: 3
+        },
+        activeIndex: -1,  // 当前转动到哪个位置,起点位置
+        count: 8,    // 总共有多少个位置
+        timer: 0,    // 每次转动定时器
+        speed: 200,   // 初始转动速度
+        times: 0,    // 转动次数
+        cycle: 50,   // 转动基本次数:即至少需要转动多少次再进入抽奖环节
+        prize: -1,   // 中奖位置
+        click: true,
+        showToast: false,
+        showLoginBox: false,
+        showNoPriseBox: false,
+        lookPriseBox: false,
+        showChooseBox: false,
+        showGetPriseBox: false,
+        scrollTimer: {},
+        scrollTimerIndex: 0,
+        isTop: false,
+        selectLevelIndex: 0,
+        // 询价
+        buyerInquiryCount: 0,
+        activityInquiryCount: 0,
+        inquiryRate: 0,
+        // 回复
+        vendorInquiryCount: 0,
+        activityReplyCount: 0,
+        replyRate: 0,
+        thirdPrize: {},
+        sevenPrize: {},
+        // 钻石交易
+        buyerTradeCount: 0,
+        activityTradeCount: 0,
+        tradeRate: 0,
+        restCount: 0,
+        pCode: '',
+        gotIndexItem: 0
+      }
+    },
+    components: {
+      Page
+    },
+    fetch ({ store }) {
+      return Promise.all([
+        // 获取个人中奖
+        store.dispatch('lottery/getOwnLotteryInfo', {activityCode: '11wwwwwwww',itemCode: this.user.itemCode})
+      ])
+    },
+    computed: {
+      user () {
+        console.log(this.$store.state.lottery.lotteryInfo.userInfo.data.data, 'user')
+        return this.$store.state.lottery.lotteryInfo.userInfo.data ? this.$store.state.lottery.lotteryInfo.userInfo.data.data : []
+      },
+      nextLevel () {
+        console.log(this.$store.state.lottery.lotteryInfo.nextLevel.data.data, 'next')
+        return this.$store.state.lottery.lotteryInfo.nextLevel.data ? this.$store.state.lottery.lotteryInfo.nextLevel.data.data : []
+      },
+      recordData () {
+        return this.$store.state.lottery.lotteryInfo.record.data ? this.$store.state.lottery.lotteryInfo.record.data.data : []
+      },
+      ownRecordData () {
+        return this.$store.state.lottery.lotteryInfo.ownRecord.data ? this.$store.state.lottery.lotteryInfo.ownRecord.data : []
+      },
+      currentPrizes () {
+        console.log(this.$store.state.lottery.lotteryInfo.prizes.data, 'current')
+        return this.$store.state.lottery.lotteryInfo.prizes.data ? this.$store.state.lottery.lotteryInfo.prizes.data.data : []
+      },
+      currentPrize () {
+        return this.currentPrizes.slice(4,7).reverse()
+      },
+      winningInfo () {
+        return this.$store.state.lottery.lotteryInfo.ownLotteryInfo.data ? this.$store.state.lottery.lotteryInfo.ownLotteryInfo.data : []
+      }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        this.scrollInterval(true)
+        this.getDetail()
+        this.getLevel()
+      })
+    },
+    methods: {
+      // 去询价
+      sureInquiry (type) {
+        this.showNoPriseBox = type
+        this.$router.push('/applyPurchase')
+      },
+      // 获取第3和第7奖品详情
+      getDetail () {
+        this.currentPrizes.forEach((item, index) => {
+          if (index === 3) {
+            this.thirdPrize = item
+          }
+          if (index === 7) {
+            this.sevenPrize = item
+          }
+        })
+      },
+      // 获取等级
+      getLevel () {
+        this.nextLevel.currentItem.activityItemDetails.forEach(item => {
+          let percent = Number(100)
+          if (item.type === 'CUSTOMER_UPGRADE' && this.user.itemName === '青铜') {
+            this.buyerInquiryCount = item.amount
+            this.activityInquiryCount =  this.buyerInquiryCount - this.user.activityInquiryCount
+            let inquiry = (percent - ((this.activityInquiryCount / this.buyerInquiryCount) * 100)).toFixed(0)
+            this.inquiryRate = Number(inquiry)
+          }
+          if (item.type === 'SELLER_UPGRADE' && this.user.itemName === '青铜') {
+            this.vendorInquiryCount = item.amount
+            this.activityReplyCount =  this.vendorInquiryCount - this.user.activityReplyCount
+            let replay = (percent - ((this.activityReplyCount / this.vendorInquiryCount) * 100)).toFixed(0)
+            this.replyRate = Number(replay)
+          }
+          if (this.user.role === 'CUSTOMER' && item.type === 'CUSTOMER_UPGRADE' && this.user.itemName === '黄金') {
+            this.buyerInquiryCount = item.amount
+            this.activityInquiryCount =  this.buyerInquiryCount - this.user.itemCount
+            let inquiry = (percent - ((this.activityInquiryCount / this.buyerInquiryCount) * 100)).toFixed(0)
+            this.inquiryRate = Number(inquiry)
+          }
+          if (this.user.role === 'SELLER' && item.type === 'SELLER_UPGRADE' && this.user.itemName === '黄金') {
+            this.vendorInquiryCount = item.amount
+            this.activityReplyCount =  this.vendorInquiryCount - this.user.itemCount
+            let replay = (percent - ((this.activityReplyCount / this.vendorInquiryCount) * 100)).toFixed(0)
+            this.replyRate = Number(replay)
+          }
+          if (this.user.role === 'CUSTOMER' && item.type === 'CUSTOMER_UPGRADE' && item.resource === 'INQUIRY' && this.user.itemName === '钻石') {
+            this.buyerInquiryCount = item.amount
+            this.activityInquiryCount =  this.buyerInquiryCount - this.user.itemCount
+            let inquiry = (percent - ((this.activityInquiryCount / this.buyerInquiryCount) * 100)).toFixed(0)
+            this.inquiryRate = Number(inquiry)
+          }
+          if (this.user.role === 'CUSTOMER' && item.type === 'CUSTOMER_UPGRADE' && item.resource === 'TRADE_AMOUNT' && this.user.itemName === '钻石') {
+            this.buyerTradeCount = item.amount
+            this.activityTradeCount =  this.buyerTradeCount - this.user.activityTradeCount
+            let trad = (percent - ((this.activityTradeCount / this.buyerTradeCount) * 100)).toFixed(3)
+            this.tradeRate = Number(trad)
+          }
+        })
+      },
+      getOwnWiningInfo () {
+        this.$http.get('/lottery/user/draw', {params: {activityCode: '11wwwwwwww', itemCode: this.pCode ? this.pCode : this.user.itemCode}})
+          .then(res => {
+            console.log(res.data, 'res.data')
+            let _arr = []
+            for (let i = 0; i < this.currentPrizes.length; i++) {
+              console.log(this.currentPrizes[i].code, 'code')
+              if (this.currentPrizes[i].code === res.data.data.code) {
+                _arr.push(this.currentPrizes[i])
+              }
+            }
+            this.gotIndexItem = _arr.slice(0, 1)[0].$index
+            console.log(_arr.slice(0, 1)[0], 'gotItem0')
+            console.log(this.gotIndexItem, 'gotItem')
+            console.log(_arr)
+            this.$store.commit('lottery/lotteryInfo/GET_OWN_LOTTERY_INFO_SUCCESS', res.data)
+          }, err => {
+            this.$store.commit('lottery/lotteryInfo/GET_OWN_LOTTERY_INFO_FAILURE', err)
+            console.log(err)
+          })
+      },
+      // 切换等级
+      toggleLevel (item) {
+        console.log(item, 'item')
+        if (item.itemName === '钻石') {
+          this.$message.info('钻石等级暂不能自主抽奖')
+        } else {
+          this.pCode = item.itemCode
+          this.restCount = item.lotteryCount
+          if (this.pCode) {
+            this.$http.get('/lottery//user/prizes', {params: {activityCode: '11wwwwwwww', itemCode: this.pCode}})
+              .then(res => {
+                this.$store.commit('lottery/lotteryInfo/GET_CURRENT_GRADE_PRIZES_SUCCESS', res.data)
+                setTimeout( () => {
+                  this.getDetail()
+                }, 0)
+              }, err => {
+                this.$store.commit('lottery/lotteryInfo/GET_CURRENT_GRADE_PRIZES_FAILURE', err)
+              })
+          }
+        }
+      },
+      // 查看我的奖品
+      lookMyPrizes (type) {
+        this.lookPriseBox = type
+      },
+      // 去登录
+      goLogin () {
+        this.$router.push('/auth/login?returnUrl=' + window.location.href)
+      },
+      // 开始抽奖
+      startLottery () {
+        if (this.$store.state.option.user.logged) {
+          if (this.restCount < 1) {
+            this.showNoPriseBox = true
+          } else {
+            if (!this.click) {
+              return
+            }
+            this.getOwnWiningInfo()
+            this.closeToast()
+            this.speed = 200
+            this.click = false
+            this.startRoll()
+          }
+        } else {
+          this.showLoginBox = true
+        }
+      },
+      // 开始转动
+      startRoll () {
+        this.times += 1  // 转动次数
+        this.oneRoll()  // 转动过程调用的每一次转动方法,这里是第一次调用初始化
+        // 如果当前转动次数达到要求 && 目前转到的位置是中奖位置
+        if (this.times > this.cycle + 10 && this.prize === this.activeIndex) {
+          clearTimeout(this.timer)   // 清除转动定时器,停止转动
+          this.prize = -1
+          this.times = 0
+          this.click = true
+          this.showToast = true
+          // console.log('你已经中奖了')
+          this.showGetPriseBox = true
+        } else {
+          if (this.times < this.cycle) {
+            this.speed -= 10   // 加快转动速度
+          } else if (this.times === this.cycle) {    // 随机获得一个中奖位置
+            // const index = parseInt(Math.random() * 10, 0) || 0
+            this.prize = this.gotIndexItem
+            if (this.prize > 7) {
+              this.prize = 7
+            }
+            // console.log(`中奖位置${this.prize}`)
+          } else if (this.times > this.cycle + 10 &&
+            ((this.prize === 0 && this.activeIndex === 7) || this.prize === this.activeIndex + 1)) {
+            this.speed += 110
+          } else {
+            this.speed += 20
+          }
+          if (this.speed < 40) {
+            this.speed = 40
+          }
+          this.timer = setTimeout(this.startRoll, this.speed)
+        }
+      },
+      // 每一次转动
+      oneRoll () {
+        let index = this.activeIndex  // 当前转动到哪个位置
+        const count = this.count  // 总共有多少个位置
+        index += 1
+        if (index > count - 1) {
+          index = 0
+        }
+        this.activeIndex = index
+      },
+      // 关闭弹出框
+      closeToast () {
+        this.showToast = false
+      },
+      // 我的奖品
+      scrollInterval (flag) {
+        // let _arr = {}
+        // _arr = this.recordData
+        if (flag && this.recordData.length > 5) {
+          this.scrollTimer = setInterval(() => {
+            this.scrollTimerIndex ++
+            this.isTop = (this.scrollTimerIndex % 45 === 0)
+            if (this.isTop) {
+              this.scrollTimerIndex = 0
+              // for (let i = 0; i < this.recordData; i++) {
+              //   _arr.push(this.recordData.pop())
+              // }
+            }
+          }, 3000)
+        } else {
+          clearInterval(this.scrollTimer)
+        }
+      },
+      // 个人奖品分页
+      handleCurrentChange (page) {
+        this.pageParams.page = page
+        this.pageCommodity(this.pageParams)
+      },
+      async pageCmpGoods (pageParams) {
+        console.log(pageParams)
+        params.page = pageParams.page
+        params.count = pageParams.count
+        params.activityCode = '11wwwwwwww'
+        try {
+          let { data } = await this.$http.get('/lottery/user/winninghistories/one', { params })
+          this.$store.commit('lottery/lotteryInfo/GET_OWN_WIN_RECORD_SUCCESS', data)
+        } catch (err) {
+          this.$store.commit('lottery/lotteryInfo/GET_OWN_WIN_RECORD_FAILURE', err)
+        }
+      },
+      closeGotPriseInfo (type) {
+        this.showGetPriseBox = type
+        this.prize = -1
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .lucky {
+    position: relative;
+    margin: 0 auto;
+    width: 100%;
+    text-align: center;
+    background: #88dcf4;
+    .qr-active {
+      position: fixed;
+      top: 300px;
+      right: 50px;
+    }
+    .banner{
+      margin: 0 auto;
+      height: 552px;
+      text-align: center;
+      background: url('/images/lottery/banner.png') center center/auto 100% no-repeat #018bff;
+    }
+    .lottery{
+      margin: 0 auto;
+      padding-bottom: 100px !important;
+      width: 1190px;
+      text-align: center;
+      .level{
+        position: relative;
+        margin-top: 140px;
+        .low_level{
+          width: 372px;
+          .level_title {
+            margin: 20px auto 0;
+            padding: 9px 23px 10px 22px;
+            text-align: left;
+            font-size: 20px;
+            font-weight: bold;
+            color: #fff;
+            background-color: #fcac46;
+            border-radius: 15px;
+          }
+        }
+        .high_title{
+          width: 184px;
+          margin: 20px auto 0;
+          padding: 10px 12px;
+          text-align: left;
+          font-size: 20px;
+          font-weight: bold;
+          color: #fff;
+          background-color: #fcac46;
+          border-radius: 15px;
+        }
+        .up {
+          position: absolute;
+          top: 20px;
+          left: 320px;
+          span{
+            position: absolute;
+            top: 28px;
+            left: 229px;
+            font-size: 30px;
+            font-weight: bold;
+            color: #693100;
+          }
+        }
+        .high_level {
+          position: absolute;
+          top: -107px;
+          left: 803px
+        }
+        .progress_bar {
+          position: absolute;
+          top: 245px;
+          left: 460px;
+          width: 511px;
+          .inquiry {
+            position: relative;
+            div.tip_text{
+              padding-left: 20px;
+              margin-top: 18px;
+              font-size: 24px;
+              color: #0082c4;
+              text-align: left;
+              img{
+                margin: -4px 10px 0 0;
+              }
+            }
+            span.all_count{
+              position: absolute;
+              top: -5px;
+              left: 525px;
+              width: 136px;
+              font-size: 24px;
+              color: #0083c5;
+              text-align: left;
+            }
+          }
+          .vendor_inquiry, .buyer_trad{
+            margin-top: 60px;
+          }
+        }
+      }
+      .prize{
+        overflow: hidden;
+        margin: 110px auto;
+        .press-prise {
+          float: left;
+          margin: 0 auto;
+          width: 500px;
+          text-align: center;
+          .lave-count{
+            margin: 22px 0;
+            font-size: 30px;
+            font-weight: bold;
+            color: #ff6600;
+            >span{
+              font-size: 30px;
+              font-weight: bold;
+              color: #ff6600;
+            }
+          }
+          .tab-prise{
+            span.toggle{
+              display: inline-block;
+              width: 131px;
+              height: 44px;
+              line-height: 44px;
+              text-align: center;
+              font-size: 24px;
+              font-weight: bold;
+              color: #ffffff;
+              background-color: #fdd557;
+              border-radius: 15px;
+              cursor: pointer;
+              margin-right: 16px;
+              &:hover, &.active{
+                background-color: #ff9000;
+              }
+            }
+          }
+        }
+        .press_prise{
+          position: relative;
+          width: 494px;
+          height: 309px;
+          background-color: #ffbe04;
+          border-radius: 13px;
+          .nineGrid {
+            padding-right: 15px;
+            position: absolute;
+            top: 8px;
+            left: 8px;
+            width: 478px;
+            height: 293px;
+            background-color: #ff9000;
+            border-radius: 13px;
+            li {
+              height: 86px;
+              display: flex;
+              > div {
+                flex: 1;
+                height: 100%;
+                text-align: center;
+                position: relative;
+                margin-top: 10px;
+                .wrapper {
+                  width: 148px;
+                  height: 80px;
+                  background-color: #fff2cf;
+                  border-radius: 13px;
+                  box-shadow: 0 7px 0 #ffc63c;
+                  -moz-box-shadow: 0 7px 0 #ffc63c;
+                  -o-box-shadow: 0 7px 0 #ffc63c;
+                  -webkit-box-shadow: 0 7px 0 #ffc63c;
+                }
+                img {
+                  /*width: 46px;*/
+                  /*height: 38px;*/
+                  vertical-align: middle;
+                  margin: 8px 0;
+                }
+                p{
+                  color: #ff6000;
+                  font-size: 16px;
+                  font-weight: bold;
+                }
+                .mask {
+                  position: absolute;
+                  top: 0;
+                  left: 0;
+                  width: 148px;
+                  height: 86px;
+                  opacity: 0.5;
+                  border-radius: 10px;
+                  background-color: #000;
+                  display: none;
+                }
+              }
+              >div:nth-child(2) .wrapper {
+                background: #fee6a7;
+              }
+              >div.grid_center .wrapper{
+                background: #fee6a7;
+              }
+              > div.active {
+                .mask {
+                  display: block;
+                }
+              }
+              > div:first-child {
+                margin-left: 24px;
+              }
+              > div.getLuck {
+                margin-right: 6px;
+                width: 148px;
+                height: 80px;
+                background-color: #fddb00;
+                border-radius: 13px;
+                box-shadow: 0 7px 0 #ffc63c;
+                -moz-box-shadow: 0 7px 0 #ffc63c;
+                -o-box-shadow: 0 7px 0 #ffc63c;
+                -webkit-box-shadow: 0 7px 0 #ffc63c;
+                cursor: pointer;
+                p {
+                  font-size: 27px;
+                  font-weight: 900;
+                  color: #f91f00;
+                  line-height: 85px;
+                }
+              }
+            }
+            li:nth-child(2), li:last-child  {
+              margin-top: 8px;
+            }
+          }
+        }
+        .look_prise{
+          float: right;
+          width: 582px;
+          .header {
+            padding: 0 8px 0 28px;
+            overflow: hidden;
+            width: 582px;
+            height: 50px;
+            line-height: 50px;
+            background-color: #fdd557;
+            border-radius: 13px 13px 0px 0px;
+            span{
+              color: #846244;
+              &:first-child {
+                float: left;
+                font-size: 30px;
+              }
+              &:last-child {
+                display: inline-block;
+                margin-top: 8px;
+                float: right;
+                width: 134px;
+                height: 35px;
+                line-height: 35px;
+                font-size: 18px;
+                border-radius: 5px;
+                border: solid 1px #846244;
+                cursor: pointer                                         ;
+              }
+            }
+          }
+          .body{
+            padding: 0 24px 29px;
+            background: #fff;
+            border-radius: 0px 0px 13px 13px;
+            .list_head{
+              width: 100%;
+              height: 54px;
+              line-height: 54px;
+              border-bottom: solid 1px #846244;
+              span{
+                display: inline-block;
+                text-align: center;
+                font-size: 20px;
+                font-weight: bold;
+                color: #846244;
+                &:first-child {
+                  width: 120px;
+                }
+                &:nth-child(2) {
+                  width: 300px;
+                }
+                &:last-child {
+                  width: 110px;
+                }
+              }
+            }
+            ul{
+              width: 100%;
+              height: 296px;
+              overflow: hidden;
+              li{
+                display: inline-block;
+                overflow: hidden;
+                height: 40px;
+                line-height: 40px;
+                position: relative;
+                top: 0;
+                transition: top 1s;
+                -moz-transition: top 1s;
+                -webkit-transition: top 1s;
+                -o-transition: top 1s;
+                &.scrollTop {
+                  transition: top 0s;
+                  -moz-transition: top 0s;
+                  -webkit-transition: top 0s;
+                  -o-transition: top 0s;
+                }
+                div{
+                  float: left;
+                  font-size: 18px;
+                  color: #846244;
+                  overflow: hidden;
+                  text-overflow: ellipsis;
+                  white-space: nowrap;
+                  &:first-child {
+                    width: 120px;
+                  }
+                  &:nth-child(2) {
+                    width: 300px;
+                  }
+                  &:last-child {
+                    width: 110px;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+      .describe{
+        margin-bottom: 88px;
+      }
+      .rule{
+        margin: 0 auto;
+        width: 1040px;
+        text-align: center;
+        header{
+          padding-left: 14px;
+          width: 100%;
+          height: 50px;
+          line-height: 50px;
+          font-size: 24px;
+          color: #846244;
+          background-color: #fdd557;
+          border-radius: 13px 13px 0px 0px;
+        }
+        .section{
+          padding: 20px 20px 36px 14px;
+          background-color: #ffffff;
+          border-radius: 0px 0px 13px 13px;
+          .list{
+            line-height: 36px;
+            text-align: left;
+            font-size: 24px;
+            color: #846244;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 6 - 0
components/main/Nav.vue

@@ -44,6 +44,12 @@
       <nuxt-link to="/pcb" class="item">
         <span>PCB专区</span>
       </nuxt-link>
+      <a class="item" href="https://zb.usoftchina.com/" target="_blank">
+        <span>U创网</span>
+      </a>
+      <a class="item" href="https://bbs.usoftchina.com/" target="_blank">
+        <span>U客论坛</span>
+      </a>
       <nuxt-link to="/news" class="item">
         <span>优软快讯</span>
       </nuxt-link>

+ 5 - 2
components/mobile/center/outOfStorage/StorageList.vue

@@ -15,8 +15,11 @@
         <div class="linetext">{{switchType === 'INBOUND' ? '入库单号' : '出库单号'}}: <span>系统自动生成</span></div>
         <div class="linetext" v-if="switchType === 'INBOUND'">发货单: <span v-text="item.invoiceid || '-'">21324</span></div>
         <div class="linetext" v-if="switchType === 'OUTBOUND'">订单号: <span v-text="item.orderid || '-'">21324</span></div>
-        <div class="linetext">{{switchType === 'INBOUND' ? '卖家名称' : '买家名称'}}: <span v-text="item.buyentername || item.buyerentername || item.buyername || '-'">21324</span></div>
-        <div class="linetext">录入人: <span v-text="item.sellername || '-'">21324</span></div>
+        <div class="linetext">{{switchType === 'INBOUND' ? '卖家名称' : '买家名称'}}:
+          <span v-if="switchType === 'INBOUND'" v-text="item.sellername || '-'">21324</span>
+          <span v-else v-text="item.buyentername || item.buyername || '-'">21324</span>
+        </div>
+        <!--<div class="linetext">录入人: <span v-text="item.sellername || '-'">21324</span></div>-->
         <div class="linetext">录入时间: <span v-text="item.createtime ? baseUtils.formatDate(new Date(item.createtime), 'yyyy-MM-dd hh:mm:ss') : '-'">21324</span></div>
         <div class="look-btn">
           <span @click="loadAllInfo(item, 1)" v-text="switchType === 'INBOUND' ? '收货入库' : '发货出库'"></span>

+ 0 - 5
components/mobile/center/outOfStorage/otherStorage.vue

@@ -56,11 +56,6 @@
         default: 'INBOUND'
       }
     },
-    fetch({route, store}) {
-      return Promise.all([
-        store.dispatch('loadCurrencyData')
-      ])
-    },
     data () {
       return {
         remindText: '',

+ 768 - 0
components/mobile/center/upoff-material.vue

@@ -0,0 +1,768 @@
+<template>
+    <div class="upoff-material-wrapper" v-if="showUpoff">
+      <div class="mobile-nav">
+        <div class="mobile-header mobile-center-header">
+          <a @click="hide"><i class="iconfont icon-fanhui"></i></a>
+          <p>编辑上下架</p>
+          <p class="en-name">
+            <img :src="`/images/mobile/center/${user.data.enterprise && user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}
+          </p>
+        </div>
+      </div>
+      <div class="upoff-materiel-wrapper" @click="clearInfo()">
+        <div ref="scroll" style="height: 100%;overflow-y:scroll">
+          <div>
+            <div style="background: #fff;border: 1px solid #dcdcdc;padding:0 0.2rem 0.5rem">
+              <div class="opoff-title clearfix">
+                <!-- :class="item.standard ? 'standed' : 'istanded'"-->
+                <div class="icon"  :class="chooseItem.standard === 1 ? 'standed' : 'istanded'"></div>
+                <div class="opoff-title-text pull-left">{{chooseItem.pcmpcode || '-'}}</div>
+              </div>
+              <div class="off-content">
+                <div class="clearfix">
+                  <span class="name">品牌:</span>
+                  <span class="con">{{chooseItem.pbranden || chooseItem.pbrand || '-'}}</span>
+                </div>
+                <div class="clearfix">
+                  <span class="name">物料名称:</span>
+                  <span class="con">{{chooseItem.kind || chooseItem.kinden || '-'}}</span>
+                </div>
+                <div class="clearfix">
+                  <span class="name">规格:</span>
+                  <span class="con">{{chooseItem.spec || '-'}}</span>
+                </div>
+                <div class="clearfix">
+                  <span class="name">库存(PCS):</span>
+                  <span class="con">{{chooseItem.erpReserve || '-'}}</span>
+                </div>
+                <div class="clearfix">
+                  <span class="name">平均成本:</span>
+                  <span class="con">{{chooseItem.price || '-'}}</span>
+                </div>
+              </div>
+              <div class="off-info clearfix">
+                <div class="minBuyqty pull-left">
+                  <span>最小起订量:</span>
+                  <input type="number" maxlength="10" @blur="minBuyQtyBlur()" v-model="chooseItem.goods.minBuyQty" placeholder="请输入最小起订量" />
+                </div>
+                <div class="pull-left" style="margin-left:0.2rem">
+                  <span>可拆卖:</span>
+                  <div class="progress-wrapper" :class="{active: chooseItem.goods.breakUp}" @click="changeBreakUp()">
+                    <div class="progress-btn"></div>
+                  </div>
+                </div>
+                <div class="pull-left">
+                  <span>上架:</span>
+                  <div class="progress-wrapper" :class="{active: chooseItem.goods.autoPublish}" @click="changeautoPublish()">
+                    <div class="progress-btn"></div>
+                  </div>
+                </div>
+              </div>
+              <div class="off-info clearfix">
+                <div class="pull-left">
+                  <span class="name">销售方式:</span>
+                  <div class="selectInput" @click.stop="showdropmenu()">
+                    <span v-if="chooseItem.storeInfoOms">{{chooseItem.storeInfoOms}}</span>
+                    <span v-else>{{chooseItem.goods.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}</span>
+                    <img src="/images/mobile/product/drop_icon.png" v-if="!ShowShopshelfOff"/>
+                    <ul :class="{active : showDrop }" v-if="!ShowShopshelfOff">
+                      <li v-for="item in storeObj" @click.stop="chooseStore(item)">{{item}}</li>
+                    </ul>
+                  </div>
+                </div>
+                <div class="pull-left" style="margin-left: 0.2rem">
+                  <span class="name">交期:</span>
+                  <input type="tel" placeholder="天数" v-model="chooseItem.goods.minDelivery" class="input startInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.minDelivery)" />
+                  -
+                  <input type="tel" placeholder="天数" v-model="chooseItem.goods.maxDelivery" class="input endInput" maxlength="3" @blur="minDeliveryBlur(chooseItem.goods.maxDelivery)"/>
+                </div>
+              </div>
+              <div class="off-info clearfix">
+              <div class="pscList-top clearfix">
+                <div class="pull-left">梯度/pcs</div>
+                <div class="pull-right">单价</div>
+              </div>
+              <ul class="prices">
+                <li v-for="(item, index) in chooseItem.goods.prices" v-bind:key="index">
+                  <div class="clearfix">
+                    <div class="pull-left">
+                      <input v-if="index > 0" oninput="if(value.length>5)value=value.slice(0,9)"
+                             type="tel" placeholder="数量" class="otherNumber"
+                             :class="{firstNumber: index === 0}"
+                             v-model.lazy.trim="item.start"
+                             :disabled="index === 0" :readonly="index === 0"
+                             @blur="startpriceBlur(item, index)" maxlength="9"
+                      />
+                      <input v-else oninput="if(value.length>5)value=value.slice(0,9)"
+                             type="tel" placeholder="数量" class="otherNumber"
+                             :class="{firstNumber: index === 0}"
+                             v-model.lazy.trim="item.start"
+                             :disabled="index === 0" :readonly="index === 0"
+                             @blur="startpriceBlur(item, index)" maxlength="9"
+                      />
+                      <!--<label v-if="index !== chooseItem.goods.prices.length - 1">-</label>-->
+                      <label v-if="index !== chooseItem.goods.prices.length - 1">以上</label>
+                      <label v-if="index === chooseItem.goods.prices.length - 1">以上</label>
+                      <!--<input oninput="if(value.length>5)value=value.slice(0,9)"-->
+                             <!--type="tel" placeholder="数量" class="otherNumber"-->
+                             <!--v-model.lazy.trim="item.end"-->
+                             <!--v-if="index !== chooseItem.goods.prices.length - 1"-->
+                             <!--@blur="endpriceBlur(item, index)"-->
+                             <!--maxlength="9"/>-->
+                    </div>
+                    <div class="pull-right">
+                      <input v-show="storeInfoStore.enType !== 'HK'"
+                             class="priceM" type="text"
+                             placeholder="单价(¥)"
+                             v-model.lazy="item.rMBPrice"
+                             @blur="rMBPriceBlur(item, 'rMBPrice')"/>
+                      <input v-show="storeInfoStore.enType === 'HK'"
+                             class="priceM" type="text"
+                             placeholder="单价($)"
+                             v-model.lazy="item.uSDPrice"
+                             @blur="rMBPriceBlur(item, 'uSDPrice')"/>
+                      <span @click="miuPrice(index)" class="clearfix"><img class="pull-left" src="/images/mobile/product/mui_icon.png"/></span>
+                      <span @click="addPrice()" class="clearfix"><img class="pull-left" src="/images/mobile/product/add_icon.png"/></span>
+                    </div>
+                  </div>
+                </li>
+              </ul>
+            </div>
+            </div>
+            <div class="update-materiel-wrapper-controll clearfix">
+              <div class="pull-left" @click.stop="saveMateriel()">保存</div>
+              <div class="pull-right" @click.stop="hide('cancel')">取消</div>
+            </div>
+          </div>
+        </div>
+      </div>
+
+      <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
+    </div>
+</template>
+<script>
+  import { RemindBox } from '~components/mobile/common'
+    export default {
+      props: {
+        chooseItem: {
+          type: Object,
+          default: {}
+        },
+        firstPrice: {
+          type: String,
+          default: ''
+        },
+        isFromME: {
+          type: Boolean,
+          default: true
+        }
+      },
+      computed: {
+        storeInfoStore() {
+          return this.$store.state.option.storeStatus.data
+        }
+      },
+      data() {
+        return {
+          collectResult: '',
+          timeoutCount: 0,
+          ShowShopshelfOff: false,
+          showDrop: false,
+          storeObj: ['寄售', '自营'],
+          showUpoff: false,
+        }
+      },
+      methods: {
+        clearInfo() {},
+        changeBreakUp() {
+          this.chooseItem.goods.breakUp = !this.chooseItem.goods.breakUp
+          this.minBuyQtyBlur()
+        },
+        saveMateriel() {
+          if (!/^\d{1,6}$/.test(this.chooseItem.goods.minBuyQty)) {
+            this.timeoutCount++
+            this.collectResult = '最小起订量只能输入数字'
+            return false
+          } else if (this.chooseItem.goods.minBuyQty && !toString(this.chooseItem.goods.minBuyQty).trim()) {
+            this.timeoutCount++
+            this.collectResult = '最小起订量不能为空'
+            return false
+          } else if (!this.chooseItem.goods.minDelivery && !toString(this.chooseItem.goods.minDelivery).trim()) {
+            this.timeoutCount++
+            this.collectResult = '请填写最小交期时间'
+            return false
+          } else if (!this.chooseItem.goods.maxDelivery && !toString(this.chooseItem.goods.maxDelivery).trim()) {
+            this.timeoutCount++
+            this.collectResult = '请填写最大交期时间'
+            return false
+          } else if (!this.chooseItem.goods.minDelivery || !this.chooseItem.goods.maxDelivery) {
+            this.timeoutCount++
+            this.collectResult = '交期不能为空'
+            return false
+          } else if (!/^\d{1,3}$/.test(this.chooseItem.goods.minDelivery) || !/^\d{1,3}$/.test(this.chooseItem.goods.maxDelivery)) {
+            this.timeoutCount++
+            this.collectResult = '交期只能输入数字'
+            return false
+          } else {
+            let isHas = false
+            for (let i = 0; i < this.chooseItem.goods.prices.length; i++) {
+              if (!this.chooseItem.goods.prices[i].start) {
+                this.timeoutCount++
+                this.collectResult = '分段数量必须填写'
+                isHas = true
+                break
+              } else if (Math.abs(this.chooseItem.goods.prices[i].rMBPrice) <= 0 && this.storeInfoStore.enType !== 'HK') {
+                this.timeoutCount++
+                this.collectResult = '单价必须是大于0的数字'
+                isHas = true
+                break
+              } else if (Math.abs(this.chooseItem.goods.prices[i].uSDPrice) <= 0 && this.storeInfoStore.enType === 'HK') {
+                this.timeoutCount++
+                this.collectResult = '单价必须是大于0的数字'
+                isHas = true
+                break
+              } else if (!/^\d+$/.test(this.chooseItem.goods.prices[i].start) || (this.chooseItem.goods.prices[i].end !== '' && !/^\d+$/.test(this.chooseItem.goods.prices[i].end))) {
+                this.timeoutCount++
+                this.collectResult = '分段数量必须是正整数'
+                isHas = true
+                break
+              } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.goods.prices[i].rMBPrice) && this.storeInfoStore.enType !== 'HK') {
+                this.timeoutCount++
+                this.collectResult = '单价只能输入数字'
+                isHas = true
+                break
+              } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.goods.prices[i].uSDPrice) && this.storeInfoStore.enType === 'HK') {
+                this.timeoutCount++
+                this.collectResult = '单价只能输入数字'
+                isHas = true
+                break
+              }
+            }
+            if (isHas === true) {
+              return false
+            }
+          }
+          this.chooseItem.goods.selfSale = this.storeInfoStore.uuid ? 1 : 2
+          if (!this.chooseItem.storeInfoOms) {
+            this.chooseItem.storeInfoOms = this.chooseItem.goods.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'
+          }
+          if (this.storeInfoStore.uuid) {
+            if (this.chooseItem.storeInfoOms === '寄售') {
+              this.chooseItem.goods.selfSale = 2
+            } else if (this.chooseItem.storeInfoOms === '自营') {
+              this.chooseItem.goods.selfSale = 1
+            }
+          }
+          this.chooseItem.goods.prices[this.chooseItem.goods.prices.length - 1].end = '9999999999'
+          // if (this.storeInfoStore.enType === 'HK') {
+          //   for (let i = 0; i < this.chooseItem.goods.prices.length; i++) {
+          //     this.chooseItem.goods.prices[i].uSDPrice = this.chooseItem.goods.prices[i].rMBPrice
+          //     this.chooseItem.goods.prices[i].uSDNTPrice = ''
+          //   }
+          // }
+          this.$http.put('/trade/goods', this.chooseItem.goods).then(res => {
+            if (res.data.success) {
+              this.timeoutCount++
+              this.collectResult = '保存成功'
+              setTimeout(() => {
+                this.hide()
+              }, 300)
+            } else {
+              this.timeoutCount++
+              this.collectResult = res.data.message
+            }
+          }, err => {
+            this.timeoutCount++
+            this.collectResult = err.response.data
+          })
+        },
+        // 最低起订量失去焦点操作
+        minBuyQtyBlur() {
+          if (Math.abs(this.chooseItem.minPackQty) <= 0) {
+            this.timeoutCount++
+            this.collectResult = '包装数必须是大于0的整数'
+            this.chooseItem.minPackQty = 1
+          } else if (Math.abs(this.chooseItem.goods.minBuyQty) <= 0) {
+            this.timeoutCount++
+            this.collectResult = '起订量必须是大于0的整数'
+            this.chooseItem.goods.minBuyQty = 1
+          } else if ((!this.chooseItem.goods.breakUp && this.chooseItem.goods.minBuyQty) && this.chooseItem.goods.minBuyQty % this.chooseItem.minPackQty !== 0) {
+            this.timeoutCount++
+            this.collectResult = '不可拆卖时,起订量必须是包装数量的倍数'
+            if (!this.chooseItem.minPackQty) {
+              this.chooseItem.minPackQty = 1
+            } else {
+              if (this.chooseItem.minPackQty > this.chooseItem.goods.minBuyQty) {
+                this.chooseItem.goods.minBuyQty = this.chooseItem.minPackQty
+              } else {
+                this.chooseItem.goods.minBuyQty = this.chooseItem.goods.minBuyQty - this.chooseItem.goods.minBuyQty % this.chooseItem.minPackQty
+              }
+            }
+          }
+          if (Number(this.firstPrice) <= Number(this.chooseItem.goods.minBuyQty)) {
+            this.chooseItem.goods.prices[0].start = this.firstPrice
+          } else {
+            this.chooseItem.goods.prices[0].start = this.chooseItem.goods.minBuyQty
+          }
+        },
+        changeautoPublish() {
+          this.chooseItem.goods.autoPublish = !this.chooseItem.goods.autoPublish
+        },
+        showdropmenu() {
+          this.showDrop = !this.showDrop
+        },
+        // 选择销售方式
+        chooseStore(item) {
+          if (!this.isFromME && item === '自营') {
+            this.timeoutCount++
+            this.collectResult = `您还未开店铺,不能选择自营`
+            this.showDrop = false
+            return
+          }
+          this.chooseItem.storeInfoOms = item
+          this.showdropmenu()
+        },
+        minDeliveryBlur(str) {
+          if (Math.abs(this.chooseItem.goods.minDelivery) === 0) {
+            this.timeoutCount++
+            this.collectResult = `交期天数不能为0`
+            this.chooseItem.goods.minDelivery = ''
+            return false
+          } else if (Math.abs(this.chooseItem.goods.minDelivery) === 0) {
+            this.timeoutCount++
+            this.collectResult = `交期天数不能为0`
+            this.chooseItem.goods.minDelivery = ''
+            return false
+          }
+          if (Math.abs(this.chooseItem.goods.minDelivery) > Math.abs(this.chooseItem.goods.minDelivery)) {
+            this.timeoutCount++
+            this.collectResult = `最短交期应小于等于最长交期`
+            this.chooseItem.goods.minDelivery = ''
+          }
+        },
+        show() {
+          this.showUpoff = true
+        },
+        hide(type) {
+          this.showUpoff = false
+          this.$emit('upoffMaterial', type, this.chooseItem)
+        },
+        // 开始价格阶段失去焦点
+        startpriceBlur(item, index) {
+          if (index > 0) {
+            if (item.start === '' || toString(item.start).trim() === '') {
+              return false
+            } else if (this.chooseItem.goods.prices[index].start <= this.chooseItem.goods.prices[index - 1].start){
+              this.timeoutCount++
+              this.collectResult = '输入值会导致梯度重叠,请重新修改'
+              item.start = ''
+            }
+            this.chooseItem.goods.prices[index - 1].end = item.start - 1
+          }
+        },
+        // 单价失去焦点
+        rMBPriceBlur(item, key) {
+          if (item[key] === '' || !item[key]) { return false }
+          if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(item[key])) {
+            this.timeoutCount++
+            this.collectResult = '单价只能输入数字带6位小数'
+          } else if (Math.abs(item[key]) === 0) {
+            return false
+          } else if (Math.abs(item[key]) >= 10000) {
+            this.timeoutCount++
+            item[key] = 9999
+            this.collectResult = '单价不能高于10000'
+            return false
+          }
+          item[key] = item[key].toString()
+          let splits = item[key].split('.')
+          if (splits[0].length >= 4) {
+            splits[0] = splits[0].substr(0, 4)
+            item[key] = splits[0]
+          }
+          if (splits[1]) {
+            item[key] = splits[0] + '.' + splits[1]
+          }
+          if (splits[1] && splits[1].length > 6) {
+            splits[1] = splits[1].substr(0, 7)
+            let str = splits[1].substr(0, 6)
+            if (splits[1][splits[1].length - 1] >= 5) {
+              str = splits[1].substr(0, 6)
+              str = Math.abs(str) + 1
+            }
+            item[key] = splits[0] + '.' + Math.ceil(str)
+          }
+        },
+        addPrice() {
+          if (this.chooseItem.goods.prices.length === 3) {
+            this.timeoutCount++
+            this.collectResult = '价格梯度最多只能有三个分段'
+            return false
+          }
+          let copy = Object.assign({}, this.chooseItem.goods.prices[this.chooseItem.goods.prices.length - 1], {
+            end: ''
+          })
+          this.chooseItem.goods.prices[this.chooseItem.goods.prices.length - 1] = copy
+          this.chooseItem.goods.prices.push({
+            end: '',
+            rMBNTPrice: '',
+            rMBPrice: '',
+            uSDNTPrice: '',
+            uSDPrice: '',
+            start: ''
+          })
+        },
+        miuPrice(index) {
+          if (index === 0) {
+            if (this.chooseItem.goods.prices.length === 3) {
+              this.chooseItem.goods.prices[0].rMBPrice = this.chooseItem.goods.prices[1].rMBPrice
+              this.chooseItem.goods.prices[0].uSDPrice = this.chooseItem.goods.prices[1].uSDPrice
+              this.chooseItem.goods.prices[0].end = this.chooseItem.goods.prices[1].end
+              this.chooseItem.goods.prices[1].start = this.chooseItem.goods.prices[2].start
+              this.chooseItem.goods.prices[1].rMBPrice = this.chooseItem.goods.prices[2].rMBPrice
+              this.chooseItem.goods.prices[1].uSDPrice = this.chooseItem.goods.prices[2].uSDPrice
+              this.chooseItem.goods.prices[1].end = '9999999999'
+              this.chooseItem.goods.prices.splice(2, 1)
+            } else {
+              index++
+              if (this.chooseItem.goods.prices.length === 1) return
+              this.chooseItem.goods.prices[0].rMBPrice = this.chooseItem.goods.prices[1].rMBPrice
+              this.chooseItem.goods.prices[0].uSDPrice = this.chooseItem.goods.prices[1].uSDPrice
+              this.chooseItem.goods.prices[0].end = '9999999999'
+              this.chooseItem.goods.prices.splice(index, 1)
+            }
+          } else if (index === 1) {
+            if (this.chooseItem.goods.prices.length === 3) {
+              this.chooseItem.goods.prices[1].rMBPrice = this.chooseItem.goods.prices[2].rMBPrice
+              this.chooseItem.goods.prices[1].uSDPrice = this.chooseItem.goods.prices[2].uSDPrice
+              this.chooseItem.goods.prices[1].end = '9999999999'
+              this.chooseItem.goods.prices.splice(2, 1)
+            } else {
+              this.chooseItem.goods.prices[0].end = '9999999999'
+              this.chooseItem.goods.prices.splice(index, 1)
+            }
+          } else {
+            this.chooseItem.goods.prices[1].end = '9999999999'
+            this.chooseItem.goods.prices.splice(index, 1)
+          }
+          console.log(this.chooseItem.goods.prices)
+        },
+        // 结束价格阶段失去焦点
+        endpriceBlur(item, index) {
+          if (item.end === '') {
+            return false
+          } else if (Math.abs(item.end) + 1 <= Math.abs(item.start)) {
+            this.timeoutCount++
+            this.collectResult = `输入值不能小于${item.start}`
+            item.end = ''
+            return false
+          } else if (this.chooseItem.goods.prices[index + 1].start !== '' && toString(this.chooseItem.goods.prices[index + 1].start).trim() !== '' && Math.abs(item.end) + 1 > Math.abs(this.chooseItem.goods.prices[index + 1].start)) {
+            this.timeoutCount++
+            this.collectResult = `输入值不能大于${this.chooseItem.goods.prices[index + 1].start - 1}`
+            item.end = ''
+            return false
+          } else if (this.chooseItem.goods.prices[index + 1].end !== '' && toString(this.chooseItem.goods.prices[index + 1].end).trim() !== '' && Math.abs(item.end) + 1 > Math.abs(this.chooseItem.goods.prices[index + 1].end)) {
+            this.timeoutCount++
+            this.collectResult = `输入值不能大于${this.chooseItem.goods.prices[index + 1].end}`
+            item.end = ''
+            return false
+          }
+          this.chooseItem.goods.prices[index + 1].start = Math.abs(item.end) + 1
+          console.log(this.chooseItem.goods.prices)
+        }
+      },
+      components: {
+        RemindBox
+      }
+    }
+</script>
+<style scoped lang='scss'>
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  @mixin lineHeight($value) {
+    height: $value;
+    line-height: $value;
+  }
+  .upoff-material-wrapper {
+    position: fixed;
+    z-index: 1000;
+    background: #f1f3f6;
+    /*background: red;*/
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    .mobile-header{
+      position: fixed;
+      top: 0;
+      z-index: 100;
+      width:100%;
+      height: 1.26rem;
+      line-height: 1.26rem;
+      /*border-bottom:.01rem solid #ccc;*/
+      background: #3e82f5;
+      padding:0 .2rem 0 .1rem;
+      color:#fff;
+    }
+    .mobile-header p{
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      font-size:.36rem;
+      text-align: center;
+      width: 6rem;
+      padding-left: 1rem;
+    }
+    .mobile-center-header p.en-name {
+      font-size: .3rem;
+    }
+    .mobile-header a{
+      font-size:.28rem;
+      color:#fff;
+      position: absolute;
+    }
+    .mobile-header a i{
+      font-size: .48rem;
+      margin-right: -.1rem;
+    }
+    .upoff-materiel-wrapper {
+      border-radius: 0.07rem;
+      position: fixed;
+      overflow: hidden;
+      bottom: 0;
+      top: 1.46rem;
+      left: 0.2rem;
+      right: 0.2rem;
+      /*padding: 0 0.25rem;*/
+      /*background: #fff;*/
+      .opoff-title {
+        border-bottom: 1px solid #dcdcdc;
+        padding: 0.25rem 0;
+        .opoff-title-text {
+          font-size: 0.28rem;
+          color: #3f84f6;
+          @include overFlowHidden();
+          width: 5.81rem;
+        }
+        .icon {
+          width: 0.6rem;
+          height: 0.36rem;
+          line-height: 0.36rem;
+          float: left;
+          background-size: 100%;
+          background-repeat: no-repeat;
+          margin-right: 0.12rem;
+          text-align: center;
+          &.istanded {
+            background-image: url('/images/mobile/@2x/istanded.png')
+          }
+          &.standed {
+            background-image: url('/images/mobile/@2x/standed.png')
+          }
+        }
+      }
+      .off-content {
+        padding: 0.42rem 0;
+        border-bottom: 1px solid #dcdcdc;
+        .clearfix {
+          margin-bottom: 0.25rem;
+          &:nth-last-of-type(1) {
+            margin-bottom: 0;
+          }
+          @include overFlowHidden();
+        }
+        .name {
+          color: #666;
+          font-size:0.28rem;
+        }
+        .con{
+          color: #333;
+          font-size:0.28rem;
+        }
+      }
+      .off-info {
+        margin-top: 0.3rem;
+        line-height: 0.5rem;
+        span {
+          color: #666;
+          font-size: 0.28rem;
+        }
+        .minBuyqty {
+          input {
+            border: 1px solid #d2d2d2;
+            border-radius: 2px;
+            text-indent: .12rem;
+            width: 1.5rem;
+            font-size: 0.24rem;
+            color: #333;
+          }
+        }
+        .progress-wrapper {
+          width: .68rem;
+          height: .32rem;
+          border-radius: 0.32rem;
+          position: relative;
+          display: inline-block;
+          vertical-align: top;
+          margin-left: 0.15rem;
+          margin-top: 0.12rem;
+          background: #c4c5c6;
+          .progress-btn {
+            position: absolute;
+            height: 0.28rem;
+            width: 0.28rem;
+            border-radius: 50%;
+            left: 0.01rem;
+            top: 0.01rem;
+            background: #fff;
+            box-shadow: 0 0 5px #000;
+          }
+          &.active {
+            background: #22ac38;
+            .progress-btn {
+              left: 0.37rem;
+            }
+          }
+        }
+        .selectInput {
+          display: inline-block;
+          position: relative;
+          vertical-align: top;
+          height: 0.5rem;
+          line-height: 0.5rem;
+          border: 1px solid #d2d2d2;
+          border-radius: 2px;
+          width: 1.78rem;
+          text-indent: 0.12rem;
+          img {
+            position: absolute;
+            width: 0.17rem;
+            height: 0.11rem;
+            right:0.1rem;
+            top: 0.17rem;
+          }
+          &.selectInput2 {
+            width: 1.56rem;
+          }
+          span {
+            height: 0.5rem;
+            line-height: 0.5rem;
+            display: block;
+          }
+          ul {
+            position: absolute;
+            left: 0;
+            top: .5rem;
+            z-index: 12;
+            width: 100%;
+            max-height: 3rem;
+            overflow-y: auto;
+            display: none;
+            li {
+              text-indent: 0px;
+              width: 100%;
+              background: #666;
+              color: rgba(255, 255, 255, 0.89);
+              text-align: center;
+              font-size: .3rem;
+            }
+            &.active {
+              display: block;
+            }
+          }
+        }
+        .startInput, .endInput {
+          text-indent: 0;
+          text-align: center;
+          width: 1rem;
+          height: 0.5rem;
+          line-height: 0.5rem;
+          border: 1px solid #d2d2d2;
+          border-radius: 2px;
+        }
+        .pscList-top {
+          height: 0.5rem;
+          line-height: 0.5rem;
+          background: #e5e5e5;
+          font-size: 0.28rem;
+          color: #666;
+          border-radius: 3px;
+          .pull-left {
+            margin-left: 0.2rem
+          }
+          .pull-right {
+            margin-right: 0.2rem
+          }
+        }
+        ul.prices{
+          margin: 0.2rem 0 0;
+          padding-bottom: 0.2rem;
+          .clearfix {
+            margin-bottom: 0.14rem;
+            font-size: 0.24rem;
+            color: #666;
+            .priceM {
+              width: 1.6rem;
+              height: 0.5rem;
+              border: 1px solid #d2d2d2;
+              text-align: center;
+              line-height: 0.5rem;
+              border-radius: 3px;
+            }
+            span {
+              width: 0.34rem;
+              height: 0.34rem;
+              margin-top: 0.08rem;
+              display: inline-block;
+              vertical-align: top;
+              &:nth-of-type(1){
+                margin: 0.08rem 0.2rem 0;
+              }
+              img {
+                width: 100%;
+              }
+            }
+            .firstNumber {
+              width: 0.4rem;
+              background: #eeeeee !important;
+              height: 0.5rem;
+              border:1px solid #d2d2d2;
+              border-radius: 3px;
+              line-height: 0.5rem;
+              text-align: center;
+              font-size: 0.24rem;
+            }
+            .otherNumber {
+              width: 1.6rem;
+              background: #fff;
+              height: 0.5rem;
+              border:1px solid #d2d2d2;
+              border-radius: 3px;
+              line-height: 0.5rem;
+              text-align: center;
+              font-size: 0.24rem;
+            }
+          }
+        }
+      }
+    }
+    .update-materiel-wrapper-controll {
+      margin: 0.4rem 0.2rem 0;
+      div {
+        width: 48%;
+        background: #b5b5b5;
+        font-size: 0.3rem;
+        color: #fafbfc;
+        text-align: center;
+        @include lineHeight(0.62rem);
+        border-radius: 0.07rem;
+        &:first-child {
+          background: #3f84f6;
+        }
+      }
+    }
+  }
+</style>

+ 1 - 2
components/mobile/staffManagement/StaffList.vue

@@ -176,8 +176,7 @@
           if (val && val.content) {
             this.AuditList = [...this.AuditList, ...val.content]
           }
-        },
-        immediate: true
+        }
       }
     },
     computed: {

+ 1 - 1
components/pcb/product/Detail.vue

@@ -230,7 +230,7 @@
         }
       },
       buy (flag) {
-        this.baseUtils.buyOrCar(flag, null, this, this.commodity)
+        this.baseUtils.buyOrCar(flag, null, this, this.commodity, '/user#/order/pay/', this.fragment.num)
       },
       goLink: function () {
         this.baseUtils.goLinkUser(this, this.storeInfo.enUU)

+ 7 - 7
components/product/component/StoreInfo.vue

@@ -40,9 +40,9 @@
       <table class="table">
         <thead>
           <tr class="height54">
-            <th class="text-center" width="100">型号</th>
-            <th class="text-center" width="80">包装方式</th>
-            <th class="text-center" width="110">生产日期</th>
+            <th class="text-center" width="160">型号</th>
+            <th class="text-center" width="130">包装方式</th>
+            <!--<th class="text-center" width="110">生产日期</th>-->
             <th class="text-center" width="170">库存</th>
             <th class="text-center" width="80">梯度/pcs</th>
             <th class="text-center" width="100">香港交货<span style="font-size: 12px;">($)</span></th>
@@ -62,10 +62,10 @@
               <a v-if="list.packaging">{{list.packaging}}</a>
               <a v-if="!list.packaging">—</a>
             </td>
-            <td>
-              <a v-if="list.produceDate">{{list.produceDate}}</a>
-              <a v-if="!list.produceDate">—</a>
-            </td>
+            <!--<td>-->
+              <!--<a v-if="list.produceDate">{{list.produceDate}}</a>-->
+              <!--<a v-if="!list.produceDate">—</a>-->
+            <!--</td>-->
             <td style="text-align: left;padding-left: 25px;">
               <a>
                 <div v-if="list.reserve">

+ 2 - 2
nuxt.config.js

@@ -7,7 +7,7 @@ const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.u
 // 公共物料
 const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftmall.com/' : 'http://218.17.158.219:24000/')
 // 公共cms
-const cmsUrl = process.env.CMS_URL || (isProdMode ? 'https://cms.usoftmall.com' : 'https://cms.usoftmall.com')
+const cmsUrl = process.env.CMS_URL || (isProdMode ? 'http://cms.usoftchina.com' : 'http://cms.usoftchina.com')
 // 消息
 const messageUrl = process.env.MESSAGE_URL || (isProdMode ? 'https://api-message.ubtob.com/' : 'http://192.168.253.6:24000/message')
 // B2B
@@ -34,7 +34,7 @@ module.exports = {
       { 'http-equiv': 'X-UA-Compatible', content: 'IE=edge,chrome=1' },
       { name: 'render', content: 'webkit' },
       { name: 'viewport', content: 'width=device-width, initial-scale=1' },
-      { hid: 'description', name: 'description', content: '优软商城(mall.usoftchina.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!' }
+      { hid: 'description', name: 'description', content: '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!' }
     ],
     link: [
       { rel: 'icon', type: 'image/x-icon', href: '/u.png' }

+ 23 - 0
pages/lotteryDraw/index.vue

@@ -0,0 +1,23 @@
+<template>
+  <div>
+    <lottery/>
+  </div>
+</template>
+<script>
+  import lottery from '~components/lotteryDraw/lottery.vue'
+  export default {
+    layout: 'main',
+    fetch ({ store }) {
+      return Promise.all([
+        store.dispatch('lottery/getUserInfo', {activityCode: '11wwwwwwww'}),
+        store.dispatch('lottery/getNextLevel', {activityCode: '11wwwwwwww'}),
+        store.dispatch('lottery/getWinningRecord', {activityCode: '11wwwwwwww', size: 20}),
+        store.dispatch('lottery/getOwnWinningRecord', {activityCode: '11wwwwwwww', page: 1, count: 10}),
+        store.dispatch('lottery/currentGradePrizes', {activityCode: '11wwwwwwww'})
+      ])
+    },
+    components: {
+      lottery
+    }
+  }
+</script>

+ 1 - 1
pages/mobile/center/vendor/index.vue

@@ -85,7 +85,7 @@
       }
     },
     fetch ({ store }) {
-     let user = store.state.option.user.data
+       let user = store.state.option.user.data
       return Promise.all([
         store.dispatch('loadStoreStatus', { op: 'check' }),
         // store.dispatch('messageShow/loadMessageCount', {receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', isRead: 0})

+ 14 - 2
pages/mobile/center/vendor/material.vue

@@ -272,7 +272,7 @@
 
     <!-- 物料上下架 -->
     <div>
-      <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial" :firstPrice="firstPrice">
+      <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial" :firstPrice="firstPrice" :isFromME="isFromME">
 
       </upoff-material>
     </div>
@@ -318,6 +318,15 @@
       }
     },
     created() {
+      this.isFromME = true // 自营
+      this.$http.get('/store-service/stores', { params: { filter: 'enUU', enUU: this.$store.state.option.user.data.enterprise.uu } }).then(response => {
+        if (!response.data.uuid || response.data.uuid === '33069557578d44e69bd91ad12d28a8d4') {
+          this.isFromME = false
+        }
+        // this.$store.commit('option/REQUEST_STORE_STATUS_SUCCESS', response.data)
+      }, err => {
+        // this.$store.commit('option/REQUEST_STORE_STATUS_FAILURE', err)
+      })
       this.getResourceProvidor()
       // this.MaterielItem.packaging = this.packObj[0]
     },
@@ -861,6 +870,8 @@
         }
         .list {
           /*height: 0.46rem;*/
+          @include overFlowHidden();
+          width: 100%;
           .left {
             float: left;
             overflow: hidden;
@@ -919,7 +930,8 @@
           .text {
             display: inline-block;
             color: #333;
-            font-size: 0.3rem
+            font-size: 0.3rem;
+
           }
           .table {
             width: 5.5rem;

+ 4 - 0
pages/mobile/center/vendor/message.vue

@@ -17,6 +17,10 @@
       let user = this.user.data
       this.$store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
     },
+//    created () {
+//      let user = this.user.data
+//      this.$store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+//    },
     components: {
       Message
     }

+ 6 - 1
pages/mobile/center/vendor/outOfStorage/index.vue

@@ -20,8 +20,8 @@
           </div>
           <div class="tab-content">
             <span :class="{'active': handleItem === 0}" @click="setHandleItem(0)">{{switchType === 'INBOUND' ? '查看入库记录' : '查看出库记录'}}</span>
-            <span :class="{'active': handleItem === 1}" @click="setHandleItem(1)">{{switchType === 'INBOUND' ? '其它入库' : '其它出库'}}</span>
             <span :class="{'active': handleItem === 2}" @click="setHandleItem(2)">{{switchType === 'INBOUND' ? '采购入库' : '销售出库'}}</span>
+            <span :class="{'active': handleItem === 1}" @click="setHandleItem(1)">{{switchType === 'INBOUND' ? '其它入库' : '其它出库'}}</span>
           </div>
           <div class="filters-wrap" v-show="handleItem !== 1">
             <base-filter
@@ -54,6 +54,11 @@
   export default {
     middleware: 'authenticated',
     layout: 'mobile',
+    fetch({store}) {
+      return Promise.all([
+        store.dispatch('loadCurrencyData')
+      ])
+    },
     data () {
       return {
         remindText: '',

+ 4 - 4
pages/mobile/center/vendor/outOfStorage/purchase/_storeid.vue

@@ -13,11 +13,11 @@
         </div>
         <div class="storage-info">
           <div class="linetext">入库单: <span>系统自动生成</span></div>
-          <div class="linetext">卖家名称: <span v-text="storageList.buyentername || storageList.buyername">21324</span></div>
+          <div class="linetext">卖家名称: <span v-text="storageList.sellername || '-'">21324</span></div>
           <div class="linetext">所属订单: <span v-text="storageList.orid || '-'">21324</span></div>
           <div class="linetext" v-if="allObj.logistics">物流公司:<span v-text="allObj.logistics.companyName"></span></div>
           <div class="linetext" v-if="allObj.logistics">物流单号:<span v-text="allObj.logistics.number"></span></div>
-          <div class="linetext">录入人: <span v-text="storageList.sellername || '-'">21324</span></div>
+          <!--<div class="linetext">录入人: <span v-text="storageList.sellername || '-'">21324</span></div>-->
           <div class="linetext">录入时间: <span v-text="storageList.createtime ? baseUtils.formatDate(new Date(storageList.createtime), 'yyyy-MM-dd hh:mm:ss') : '-'">21324</span></div>
         </div>
         <ul class="list-unstyled" v-if="storageList.invoiceDetails" style="margin-bottom:.8rem;">
@@ -55,13 +55,13 @@
           <div class="linetext"><em>*</em>物流单号:<span>
             <input style="width:3rem;" type="text" v-model="allObj.logisticsInfo.number">
           </span></div>
-          <div class="linetext">录入人: <span v-text="storageList.sellername || '-'">21324</span></div>
+          <!--<div class="linetext">录入人: <span v-text="storageList.sellername || '-'">21324</span></div>-->
           <div class="linetext">录入时间: <span v-text="storageList.createtime ? baseUtils.formatDate(new Date(storageList.createtime), 'yyyy-MM-dd hh:mm:ss') : '-'">21324</span></div>
         </div>
         <ul class="list-unstyled" v-if="storageList.purchaseDetails" style="margin-bottom:.8rem;">
           <li class="info-list clearfix" v-for="(item, index) in storageList.purchaseDetails">
             <span class="super"><em v-text="index + 1">1</em></span>
-            <div class="linetext width50 fl">型号: <span v-text="item.batchCode || '-'">21324</span></div>
+            <div class="linetext width50 fl">型号: <span v-text="item.cmpCode || '-'">21324</span></div>
             <div class="linetext width50 fl">品牌: <span v-text="item.brName || '-'">21324</span></div>
             <div class="linetext width50 fl">物料名称: <span v-text="item.kiName || '-'">21324</span></div>
             <div class="linetext width50 fl">规格: <span v-text="item.spec || '-'">21324</span></div>

+ 22 - 4
pages/mobile/order/details.vue

@@ -165,7 +165,7 @@
         <div class="clearfix">
           <div class="name pull-left">发票信息</div>
           <template v-if="orderList.invoicetype === 1205 || orderList.invoicetype === 1206">
-            <div class="pull-right clearfix" @click="showinvoiceType = !showinvoiceType" style="line-height: 0.88rem;padding: 0;border-bottom: 0;max-width: 6rem;">
+            <div class="pull-right clearfix" @click="ChangeshowinvoiceType()" style="line-height: 0.88rem;padding: 0;border-bottom: 0;max-width: 6rem;">
               <div class="overHiddenText" style="float:left">{{orderList.invoicetitle}}</div>
               <div class="smallfont" style="font-size: 0.24rem;float: left">
                   ({{orderList.invoicetype === 1205 ? '增值税(专用)发票': '增值税普通发票'}})
@@ -265,9 +265,10 @@
     ></remind-str>
     <!-- 发票信息 -->
     <div class="mobile-modal"  @touchmove="preventTouchMove($event)" v-if="orderList.invoicetype === 1205 || orderList.invoicetype === 1206" v-show="showinvoiceType">
-      <div class="mobile-modal-box mobile-link-en mobile-link-en2" style="margin-top: -3.5rem">
+      <div class="mobile-modal-box mobile-link-en mobile-link-en2" style="margin-top: -3.8rem">
         <div class="mobile-modal-header">发票信息<i @click="showinvoiceType = false" class="icon-guanbi iconfont"></i></div>
-        <div class="order-details-invoiceinfo" >
+        <div class="order-details-invoiceinfo"  ref="invoiceWrapper">
+          <div>
           <div class="order-details-invoiceinfo-content">
             <!--<div class="invoiceList clearfix" >-->
               <!--<div class="pull-left">发票类型:</div>-->
@@ -319,8 +320,12 @@
             <!--</div>-->
             <div class="invoiceList clearfix">
               <div class="pull-left">收票地址:</div>
+              <!---->
               <div class="pull-left">{{invoiceAddress.area}}{{invoiceAddress.detailAddress}}</div>
             </div>
+
+          </div>
+            <div style="position: relative;height: 0.6rem"></div>
           </div>
         </div>
       </div>
@@ -443,6 +448,7 @@
     import { RemindStr } from '~components/mobile/base'
     import { EncryptionFilter } from '~utils/tools.js'
     import { RemindBox } from '~components/mobile/common'
+    import BScroll from 'better-scroll'
     export default {
       name: 'orderdetails',
       layout: 'mobile',
@@ -584,6 +590,15 @@
         }
       },
       methods: {
+        ChangeshowinvoiceType() {
+          this.showinvoiceType = !this.showinvoiceType
+          this.$nextTick(() => {
+            this.invoiceScroll = new BScroll(this.$refs.invoiceWrapper, {
+              click: true
+            })
+
+          })
+        },
         // 确认付款
         gotoPay(item) {
           let id = EncryptionFilter(item.orderid)
@@ -1016,6 +1031,7 @@
       mounted() {
         this.$nextTick(res => {
           this.$refs.listBtn.children.length > 0 ? this.ShowFixedBtn = true : this.ShowFixedBtn = false
+
         })
       }
     }
@@ -1817,15 +1833,17 @@
       left: 2.5%;
     }
     .order-details-invoiceinfo {
+      max-height: 65vh;
+      overflow: hidden;
       background: #f3f3f3;
       padding: 0.2rem;
       border-bottom-left-radius: 0.07rem;
       border-bottom-right-radius: 0.07rem;
+      position: relative;
       .order-details-invoiceinfo-content {
         background: #fff;
         padding: 0.3rem 0.2rem;
         border-radius: 0.07rem;
-        position: relative;
         border: 1px solid #dcdcdc;
         img {
           position: absolute;

+ 36 - 16
pages/mobile/order/logistics.vue

@@ -91,23 +91,43 @@
           this.getInfo()
         },
         getInfo() {
-          this.$http.get(`/trade/order/invoiceid?id=${this.detailsInfo.id}&invoiceid=${this.idsList[this.nowIds]}`).then(data => {
-            this.logistics = data.data.data.logistics
-            this.$http.get(`/kdn/logistics/query?companyName=${this.logistics.companyName}&logisticsCode=${this.logistics.number}`).then(res => {
-              let str = res.data.traces
-              this.logisticsInfo = JSON.parse(res.data.traces).reverse()
-              if (str.indexOf('揽件') !== -1 || str.indexOf('收件') !== -1 || str.indexOf('转运') !== -1 || str.indexOf('运输') !== -1 || str.indexOf('发往') !== -1 ||
-                str.indexOf('发出') !== -1 || str.indexOf('收入') !== -1 || str.indexOf('扫描') !== -1 || str.indexOf('到达') !== -1) {
-                this.status = 'transit'
-              }
-              if (str.indexOf('派送') !== -1 || str.indexOf('派件') !== -1) {
-                this.status = 'send'
-              }
-              if (str.indexOf('签收') !== -1) {
-                this.status = 'signin'
-              }
+          if (this.$route.query.type === 'buyer') {
+            this.$http.get(`/trade/order/invoiceid?id=${this.detailsInfo.id}&invoiceid=${this.idsList[this.nowIds]}`).then(data => {
+              this.logistics = data.data.data.logistics
+              this.$http.get(`/kdn/logistics/query?companyName=${this.logistics.companyName}&logisticsCode=${this.logistics.number}`).then(res => {
+                let str = res.data.traces
+                this.logisticsInfo = JSON.parse(res.data.traces).reverse()
+                if (str.indexOf('揽件') !== -1 || str.indexOf('收件') !== -1 || str.indexOf('转运') !== -1 || str.indexOf('运输') !== -1 || str.indexOf('发往') !== -1 ||
+                  str.indexOf('发出') !== -1 || str.indexOf('收入') !== -1 || str.indexOf('扫描') !== -1 || str.indexOf('到达') !== -1) {
+                  this.status = 'transit'
+                }
+                if (str.indexOf('派送') !== -1 || str.indexOf('派件') !== -1) {
+                  this.status = 'send'
+                }
+                if (str.indexOf('签收') !== -1) {
+                  this.status = 'signin'
+                }
+              })
             })
-          })
+          } else {
+            this.$http.get(`/trade/logistics/${this.detailsInfo.lgtId}`).then(data => {
+              this.logistics = data.data
+              this.$http.get(`/kdn/logistics/query?companyName=${this.logistics.companyName}&logisticsCode=${this.logistics.number}`).then(res => {
+                let str = res.data.traces
+                this.logisticsInfo = JSON.parse(res.data.traces).reverse()
+                if (str.indexOf('揽件') !== -1 || str.indexOf('收件') !== -1 || str.indexOf('转运') !== -1 || str.indexOf('运输') !== -1 || str.indexOf('发往') !== -1 ||
+                  str.indexOf('发出') !== -1 || str.indexOf('收入') !== -1 || str.indexOf('扫描') !== -1 || str.indexOf('到达') !== -1) {
+                  this.status = 'transit'
+                }
+                if (str.indexOf('派送') !== -1 || str.indexOf('派件') !== -1) {
+                  this.status = 'send'
+                }
+                if (str.indexOf('签收') !== -1) {
+                  this.status = 'signin'
+                }
+              })
+            })
+          }
         }
       }
     }

+ 2 - 1
plugins/element-ui.js

@@ -1,5 +1,5 @@
 import Vue from 'vue'
-import { Message, Breadcrumb, BreadcrumbItem, Tree, Pagination, Upload, Dialog, DatePicker, Switch } from 'element-ui'
+import { Message, Breadcrumb, BreadcrumbItem, Tree, Pagination, Upload, Dialog, DatePicker, Switch, Progress } from 'element-ui'
 
 Vue.use(Breadcrumb)
 Vue.use(BreadcrumbItem)
@@ -9,5 +9,6 @@ Vue.use(Upload)
 Vue.use(Dialog)
 Vue.use(DatePicker)
 Vue.use(Switch)
+Vue.use(Progress)
 
 Vue.prototype.$message = Message

BIN
static/images/btbBusiness/dynamic-graph.gif


BIN
static/images/logo/uas.png


BIN
static/images/logo_uas.png


BIN
static/images/lottery/banner.png


BIN
static/images/lottery/describe.png


BIN
static/images/lottery/hua.png


BIN
static/images/lottery/level-01.png


BIN
static/images/lottery/level-02.png


BIN
static/images/lottery/level-020.png


BIN
static/images/lottery/level-03.png


BIN
static/images/lottery/level-030.png


BIN
static/images/lottery/level-04.png


BIN
static/images/lottery/level-040.png


BIN
static/images/lottery/mall_qr.png


BIN
static/images/lottery/moeny.png


BIN
static/images/lottery/qr.png


BIN
static/images/lottery/red_moeny.png


BIN
static/images/lottery/up.png


BIN
static/images/lottery/update.png


+ 81 - 0
store/lottery.js

@@ -0,0 +1,81 @@
+import axios from '~/plugins/axios'
+
+export const actions = {
+  // 获取用户信息
+  getUserInfo ({ commit }, params = {}) {
+    commit('lotteryInfo/REQUEST_USER_INFO')
+    return axios.get('/lottery/userInfo', {params})
+      .then(response => {
+        commit('lotteryInfo/GET_USER_INFO_SUCCESS', response.data)
+      }, err => {
+        commit('lotteryInfo/GET_USER_INFO_FAILURE', err)
+      })
+  },
+  // 获取下一等级
+  getNextLevel ({ commit }, params = {}) {
+    commit('lotteryInfo/REQUEST_NEXT_LEVEL')
+    return axios.get('/lottery/user/activityItems', {params})
+      .then(response => {
+        commit('lotteryInfo/GET_NEXT_LEVEL_SUCCESS', response.data)
+      }, err => {
+        commit('lotteryInfo/GET_NEXT_LEVEL_FAILURE', err)
+      })
+  },
+  // 获取活动参与者中奖记录
+  getWinningRecord ({ commit }, params = {}) {
+    commit('lotteryInfo/REQUEST_WIN_RECORD')
+    return axios.get('/lottery/user/winninghistories', {params})
+      .then(response => {
+        commit('lotteryInfo/GET_WIN_RECORD_SUCCESS', response.data)
+      }, err => {
+        commit('lotteryInfo/GET_WIN_RECORD_FAILURE', err)
+      })
+  },
+  // 获取个人中奖记录
+  getOwnWinningRecord  ({ commit }, params = {}) {
+    commit('lotteryInfo/REQUEST_OWN_WIN_RECORD')
+    return axios.get('/lottery/user/winninghistories/one', {params})
+      .then(response => {
+        commit('lotteryInfo/GET_OWN_WIN_RECORD_SUCCESS', response.data)
+      }, err => {
+        commit('lotteryInfo/GET_OWN_WIN_RECORD_FAILURE', err)
+      })
+  },
+  // 获取当前等级对应奖品
+  currentGradePrizes ({ commit }, params = {}) {
+    let resItems = []
+    commit('lotteryInfo/REQUEST_CURRENT_GRADE_PRIZES')
+    return axios.get('/lottery/user/prizes', {params})
+      .then(res => {
+        // if (res.data.data) {
+        //   resItems = res.data
+        //   for (let i = 0; i < resItems.data.length; i++) {
+        //     resItems.data[i].$index = i
+        //     resItems.code = 200
+        //     resItems.success = true
+        //   }
+        //   console.log(resItems, 'resItems')
+        //   commit('lotteryInfo/GET_CURRENT_GRADE_PRIZES_SUCCESS', resItems)
+        // }
+        resItems = res.data
+        for (let i = 0; i < resItems.data.length; i++) {
+          resItems.data[i].$index = i
+          resItems.code = 200
+          resItems.success = true
+        }
+        commit('lotteryInfo/GET_CURRENT_GRADE_PRIZES_SUCCESS', resItems)
+      }, err => {
+        commit('lotteryInfo/GET_CURRENT_GRADE_PRIZES_FAILURE', err)
+      })
+  },
+  // 抽奖
+  getOwnLotteryInfo ({ commit }, params = {}) {
+    commit('lotteryInfo/REQUEST_OWN_LOTTERY_INFO')
+    return axios.get('/lottery/user/draw', {params})
+      .then(response => {
+        commit('lotteryInfo/GET_OWN_LOTTERY_INFO_SUCCESS', response.data)
+      }, err => {
+        commit('lotteryInfo/GET_OWN_LOTTERY_INFO_FAILURE', err)
+      })
+  }
+}

+ 92 - 0
store/lottery/lotteryInfo.js

@@ -0,0 +1,92 @@
+/**
+ * 用户信息
+ */
+export const state = () => ({
+  userInfo: {
+    fetching: false,
+    data: {}
+  },
+  nextLevel: {
+    fetching: false,
+    data: {}
+  },
+  record: {
+    fetching: false,
+    data: {}
+  },
+  ownRecord: {
+    fetching: false,
+    data: {}
+  },
+  prizes: {
+    fetching: false,
+    data: {}
+  },
+  ownLotteryInfo: {
+    fetching: false,
+    data: {}
+  }
+})
+
+export const mutations = {
+  REQUEST_USER_INFO (state) {
+    state.userInfo.fetching = true
+  },
+  GET_USER_INFO_FAILURE (state) {
+    state.userInfo.fetching = false
+  },
+  GET_USER_INFO_SUCCESS (state, result = {}) {
+    state.userInfo.fetching = false
+    state.userInfo.data = result
+  },
+  REQUEST_NEXT_LEVEL (state) {
+    state.nextLevel.fetching = true
+  },
+  GET_NEXT_LEVEL_FAILURE (state) {
+    state.nextLevel.fetching = false
+  },
+  GET_NEXT_LEVEL_SUCCESS (state, result = {}) {
+    state.nextLevel.fetching = false
+    state.nextLevel.data = result
+  },
+  REQUEST_WIN_RECORD (state) {
+    state.record.fetching = true
+  },
+  GET_WIN_RECORD_FAILURE (state) {
+    state.record.fetching = false
+  },
+  GET_WIN_RECORD_SUCCESS (state, result = {}) {
+    state.record.fetching = false
+    state.record.data = result
+  },
+  REQUEST_OWN_WIN_RECORD (state) {
+    state.ownRecord.fetching = true
+  },
+  GET_OWN_WIN_RECORD_FAILURE (state) {
+    state.ownRecord.fetching = false
+  },
+  GET_OWN_WIN_RECORD_SUCCESS (state, result = {}) {
+    state.ownRecord.fetching = false
+    state.ownRecord.data = result
+  },
+  REQUEST_CURRENT_GRADE_PRIZES (state) {
+    state.prizes.fetching = true
+  },
+  GET_CURRENT_GRADE_PRIZES_FAILURE (state) {
+    state.prizes.fetching = false
+  },
+  GET_CURRENT_GRADE_PRIZES_SUCCESS (state, result = {}) {
+    state.prizes.fetching = false
+    state.prizes.data = result
+  },
+  REQUEST_OWN_LOTTERY_INFO (state) {
+    state.ownLotteryInfo.fetching = true
+  },
+  GET_OWN_LOTTERY_INFO_FAILURE (state) {
+    state.ownLotteryInfo.fetching = false
+  },
+  GET_OWN_LOTTERY_INFO_SUCCESS (state, result = {}) {
+    state.ownLotteryInfo.fetching = false
+    state.ownLotteryInfo.data = result
+  }
+}