Browse Source

Merge remote-tracking branch 'origin/feature-material-wangcz' into dev

# Conflicts:
#	nuxt.config.js
#	store/product.js
wangcz 7 years ago
parent
commit
863f1467c3

+ 2 - 0
components/mobile/MobileHeader.vue

@@ -174,6 +174,8 @@
         } else if (this.startWith(val, '/mobile/center/vendor/productdetails')) {
           title = '产品信息'
 //          this.rightIcon = 'phone'
+        } else if (this.startWith(val, '/mobile/center/vendor/material')) {
+          title = '库存管理'
         } else if (this.startWith(val, '/mobile/center/vendor/product')) {
           if (this.$route.query.providerType === 'enterprise') {
             title = '公司产品库'

+ 2 - 1
components/mobile/center/index.js

@@ -1,4 +1,5 @@
 import Seek from './Seek.vue'
 import Message from './Message.vue'
 import addinvoice from './addinvoice.vue'
-export { Seek, Message, addinvoice }
+import upoffMaterial from './upoff-material.vue'
+export { Seek, Message, addinvoice, upoffMaterial }

+ 96 - 0
components/mobile/center/outOfStorage/StorageList.vue

@@ -0,0 +1,96 @@
+<template>
+  <div class="storage">
+    <ul class="list-unstyled">
+      <li v-for="item in listData" v-if="handleItem === 0">
+        <div class="linetext">{{switchType === 'INBOUND' ? '入库单' : '出库单'}}: <span v-text="item.inOutId || '-'">21324</span></div>
+        <div class="linetext">{{switchType === 'INBOUND' ? '卖家名称' : '买家名称'}}: <span v-text="item.affiliatedEnterprise || '-'">21324</span></div>
+        <div class="linetext">类型: <span v-text="setFilterType(item.opertatorType)">21324</span></div>
+        <div class="linetext">录入人: <span v-text="item.operaterUserName || '-'">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.id, 0)">查看更多</span>
+        </div>
+      </li>
+      <li v-for="item in listData" v-if="handleItem === 2">
+        <div class="linetext">{{switchType === 'INBOUND' ? '入库单' : '出库单'}}: <span>系统自动生成</span></div>
+        <div class="linetext">订单号: <span v-text="item.purchaseid || '-'">21324</span></div>
+        <div class="linetext">{{switchType === 'INBOUND' ? '卖家名称' : '买家名称'}}: <span 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.purchaseid, 1)" v-text="switchType === 'INBOUND' ? '收货入库' : '发货出库'"></span>
+        </div>
+      </li>
+    </ul>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      handleItem: {
+        type: Number,
+        default: 0
+      },
+      listData: {
+        type: Array,
+        default: []
+      },
+      switchType: {
+        type: String,
+        default: 'INBOUND'
+      }
+    },
+    methods: {
+      setFilterType (type) {
+        let bound = ''
+        if(type === 'OTHER_INBOUND') {
+          bound = '其他入库'
+        } else if(type === 'OTHER_OUTBOUND'){
+          bound = '其他出库'
+        } else if (type === 'PURCHASE_INBOUND') {
+          bound = '采购入库'
+        } else if(type === 'SELL_OUTBOUND') {
+          bound = '销售出库'
+        } else {
+          bound = '全部类型'
+        }
+        return bound
+      },
+      loadAllInfo (type, i) {
+        if(i === 0) {
+          this.$router.push('/mobile/center/vendor/outOfStorage/' + type)
+        } else if(i === 1){
+          this.$router.push('/mobile/center/vendor/outOfStorage/purchase/' + this.baseUtils.enidfilter(type))
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  $base-color: #3f84f6;
+  .storage{
+    ul{
+      li{
+        padding: 0.24rem 0.24rem;
+        background: #fff;
+        margin-bottom:.2rem;
+        .linetext{
+          color:#666;
+          line-height: .6rem;
+          overflow: hidden;
+          -o-text-overflow: ellipsis;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          span{
+            color:#333;
+          }
+        }
+        .look-btn{
+          padding: 0.2rem 0;
+          border-top: 1px solid #d3d3d3;
+          text-align: center;
+        }
+      }
+    }
+  }
+</style>

+ 4 - 0
components/mobile/center/outOfStorage/index.js

@@ -0,0 +1,4 @@
+import StorageList from './StorageList.vue'
+import OtherStorage from './otherStorage'
+
+export { StorageList, OtherStorage }

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

@@ -0,0 +1,321 @@
+<template>
+  <div class="storage">
+    <div class="btn-click">
+      <span class="base-color" @click="saveClick()">保存</span>
+      <span class="clear" @click="saveClick('clear')">取消</span>
+    </div>
+    <div class="storage-info">
+      <div class="linetext">{{switchType === 'INBOUND' ? '入库单' : '出库单'}}:<span>系统自动生成</span></div>
+      <div class="linetext">{{switchType === 'INBOUND' ? '卖家名称' : '买家名称'}}:
+        <span><input type="text" v-model="enName" :placeholder="switchType === 'INBOUND' ? '请输入卖家名称' : '请输入买家名称'"></span>
+      </div>
+      <div class="linetext">录入人: <span v-text="user.logged">21324</span></div>
+      <div class="linetext">录入时间: <span v-text="baseUtils.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')">21324</span></div>
+    </div>
+    <ul class="list-unstyled">
+      <li class="info-list clearfix" v-for="(item, index) in allObj">
+        <span class="super"><em v-text="index + 1">1</em></span>
+        <div class="linetext width50 fl">型号:
+          <span>
+            <input type="text" style="width:2rem;" v-model="item.cmpCode" @input="onCodeChange(index)">
+          </span>
+        </div>
+        <div class="linetext width50 fl">品牌: <span v-text="item.brand">21324</span></div>
+        <div class="linetext width50 fl">物料名称: <span v-text="item.pcmpcode">21324</span></div>
+        <div class="linetext width50 fl">规格: <span v-text="item.spec">21324</span></div>
+        <div class="linetext width50 fl"><em>*</em>{{switchType === 'INBOUND' ? '入库数' : '出库数'}}(PCS): <span>
+          <input type="text" style="width:1rem;" v-model.number="item.qty">
+        </span></div>
+        <div class="linetext width50 fl">单价(¥):<span><input type="text" style="width:2rem;" v-model.number="item.price"></span></div>
+        <div class="content-line" v-show="item.showSimilarCodeList && item.cmpCode">
+          <ul class="similar">
+            <li v-for="sCode in similarCode" @click.stop="setCode(sCode, index)">
+              <span v-text="sCode.cmpCode"></span>
+              <span v-text="sCode.brand"></span>
+            </li>
+          </ul>
+        </div>
+        <div class="look-btn">
+          <span @click="addClick()" v-if="index === allObj.length - 1">新增</span>
+          <span @click="addClick(index)" v-if="index !== 0">删除</span>
+        </div>
+      </li>
+    </ul>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    props: {
+      switchType: {
+        type: String,
+        default: 'INBOUND'
+      }
+    },
+    data () {
+      return {
+        remindText: '',
+        timeoutCount:0,
+        enName: '',
+        allObj:[],
+        storageObj: {
+          cmpCode: '',
+          brand: '',
+          pcmpcode: '',
+          spec: '',
+          qty: '',
+          price: '',
+          showSimilarCodeList: false,
+        },
+        similarCode:[]
+      }
+    },
+    components: {
+      RemindBox
+    },
+    mounted () {
+      let _this = this
+      this.allObj.push(this.storageObj)
+      document.body.onclick = function() {
+        _this.allObj.forEach(val => {
+          val.showSimilarCodeList = false
+        })
+      }
+    },
+    methods: {
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      setFilterType (type) {
+        let bound = ''
+        if(type === 'OTHER_INBOUND') {
+          bound = '其他入库'
+        } else if(type === 'OTHER_OUTBOUND'){
+          bound = '其他出库'
+        } else if (type === 'PURCHASE_INBOUND') {
+          bound = '采购入库'
+        } else if(type === 'SELL_OUTBOUND') {
+          bound = '销售出库'
+        } else {
+          bound = '全部类型'
+        }
+        return bound
+      },
+      initData () {
+        this.enName = ''
+        this.allObj = []
+        this.allObj.push(this.storageList)
+      },
+      onCodeChange (type) {
+        this.allObj[type].showSimilarCodeList = true
+        this.allObj[type].cmpCode = this.allObj[type].cmpCode.trim()
+        this.getSimilarCode(type)
+      },
+      getSimilarCode: function (type) {
+        if (this.allObj[type].cmpCode) {
+          this.$http.get('/trade/products/code/keyword', {params: {keyword: this.allObj[type].cmpCode}})
+            .then(response => {
+              if(response.data){
+                this.similarCode = response.data || []
+              } else {
+                this.onRemind('没有找到产品信息')
+              }
+              this.allObj[type].showSimilarCodeList = response.data.length > 0
+            }).catch((err) => {
+              this.allObj[type].showSimilarCodeList = false
+              this.similarCode = []
+              this.onRemind('没有找到产品信息')
+            })
+        } else {
+          this.allObj[type].showSimilarCodeList = false
+        }
+      },
+      setCode (data, type) {
+        this.allObj[type].cmpCode = data.cmpCode
+        this.allObj[type].brand = data.pbranden
+        this.allObj[type].pcmpcode = data.kind
+        this.allObj[type].spec = data.spec
+        this.allObj[type].productId = data.id
+        this.allObj[type].showSimilarCodeList = false
+      },
+      addClick (type) {
+        if(type) {
+         this.allObj.splice(type, 1)
+        } else {
+          let _item = {
+            cmpCode: '',
+            brand: '',
+            pcmpcode: '',
+            spec: '',
+            qty: '',
+            price: '',
+            showSimilarCodeList: false,
+          }
+          this.allObj.push(_item)
+        }
+      },
+      saveClick (type) {
+        if(type === 'clear') {
+          console.log('clear')
+          this.initData()
+        }else {
+          if(!this.enName) {
+            this.onRemind('请输入' + this.switchType === 'INBOUND' ? '请输入卖家名称' : '请输入买家名称')
+          } else {
+            let arr = []
+            this.allObj.forEach(val => {
+              if(!val.price && !val.qty && !val.productId) {
+                this.onRemind('请将数据补充完整')
+                return
+              }
+              arr.push({price: val.price, productId: val.productId, qty:val.qty})
+            })
+            this.$http.post(`/CommodityInOutbound/${this.switchType === 'INBOUND'? 'inBound': 'outBound'}/other?enName=${this.enName}`, arr)
+              .then(response => {
+                if(response.data.code === 1){
+                  this.onRemind('保存信息成功')
+                }
+              })
+          }
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  $base-color: #3f84f6;
+  $title-color: #ffa200;
+  $red-color: #ff0000;
+  .storage{
+    position: relative;
+    margin-bottom:.3rem;
+    .btn-click{
+      padding: 0.24rem 0.24rem;
+      position: fixed;
+      bottom: 1rem;
+      left: 0;
+      right: 0;
+      text-align: center;
+      span{
+        display:inline-block;
+        width:30%;
+        height: .6rem;
+        line-height: .6rem;
+        margin: 0 .1rem;
+        border-radius:.05rem;
+        &.clear{
+          color:#fafbfc;
+          background: #b5b5b5;
+        }
+        &.base-color{
+          color:#fff;
+          background: $base-color;
+        }
+      }
+    }
+    .storage-info{
+      padding: 0.24rem 0.24rem;
+      background: #fff;
+      margin-bottom:.2rem;
+    }
+    .content-line{
+      position: absolute;
+      border: 1px solid #7e7e7e;
+      border-radius: .05rem;
+      left: .3rem;
+      top: 32%;
+      background: #fff;
+      width: 6.5rem;
+      max-height: 2.5rem;
+      overflow-y: auto;
+      z-index: 12;
+      .similar {
+        li {
+          height: .5rem;
+          line-height: .5rem;
+          font-size: .26rem;
+          color: #999;
+          padding-left: .19rem;
+          &:focus, &:active, &:hover {
+            background: #999;
+            color: #fff;
+          }
+          span{
+            display: inline-block;
+            width: 50%;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+        }
+      }
+    }
+    .look-btn{
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      width: 100%;
+      border-top: 1px solid #d3d3d3;
+      text-align: center;
+      span{
+        display:inline-block;
+        width:50%;
+        text-align: center;
+        line-height: .8rem;
+      }
+    }
+    .linetext{
+      color:#666;
+      line-height: .6rem;
+      overflow: hidden;
+      -o-text-overflow: ellipsis;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      input{
+        height: .5rem;
+        font-size: .24rem;
+        border-radius: .04rem;
+        border: 1px solid #d2d2d2;
+        padding: 0 .1rem;
+      }
+      em{
+        color:$red-color;
+      }
+      span{
+        color:#333;
+        &.base-color{
+          color:$base-color;
+        }
+      }
+    }
+    > ul{
+      margin-bottom:1rem;
+    }
+    .info-list{
+      position:relative;
+      padding: 0.3rem 0.24rem 1rem;
+      background: #fff;
+      margin-bottom:.2rem;
+      .width50{
+        display:inline-block;
+        width: 48%;
+        margin-left: .1rem;
+      }
+      >span{
+        display:inline-block;
+        position:absolute;
+        left:0;
+        top:0;
+        padding: 0 .1rem;
+        background: $title-color;
+        border-radius: 0 .5rem .5rem 0;
+        line-height: .3rem;
+        height:.3rem;
+        color:#fff;
+        font-size: .24rem;
+      }
+    }
+  }
+</style>

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

@@ -0,0 +1,728 @@
+<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 standed"  :class="chooseItem.standard ? '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="chooseItem.goods.minBuyQty"
+                             :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="chooseItem.currencyName === 'RMB'"
+                             class="priceM" type="text"
+                             placeholder="单价(¥)"
+                             v-model.lazy="item.rMBPrice"
+                             @blur="rMBPriceBlur(item)"/>
+                      <input v-show="chooseItem.currencyName !== 'RMB'"
+                             class="priceM" type="text"
+                             placeholder="单价($)"
+                             v-model.lazy="item.rMBPrice"
+                             @blur="rMBPriceBlur(item)"/>
+                      <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: {}
+        }
+      },
+      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.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.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'
+          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.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
+              }
+            }
+          }
+          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) {
+          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)
+        },
+        // 开始价格阶段失去焦点
+        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) {
+          if (item.rMBPrice === '' || !item.rMBPrice) { return false }
+          if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(item.rMBPrice)) {
+            this.timeoutCount++
+            this.collectResult = '单价只能输入数字带6位小数'
+          } else if (Math.abs(item.rMBPrice) === 0) {
+            return false
+          } else if (Math.abs(item.rMBPrice) >= 10000) {
+            this.timeoutCount++
+            item.rMBPrice = 9999
+            this.collectResult = '单价不能高于10000'
+            return false
+          }
+          item.rMBPrice = item.rMBPrice.toString()
+          let splits = item.rMBPrice.split('.')
+          if (splits[0].length >= 4) {
+            splits[0] = splits[0].substr(0, 4)
+            item.rMBPrice = splits[0]
+          }
+          if (splits[1]) {
+            item.rMBPrice = 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.rMBPrice = 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: '',
+            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].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].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].end = '9999999999'
+              this.chooseItem.goods.prices.splice(index, 1)
+            }
+          } else if (index === 1) {
+            if (this.chooseItem.prices.goods.length === 3) {
+              this.chooseItem.goods.prices[1].rMBPrice = this.chooseItem.goods.prices[2].rMBPrice
+              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 - 0
nuxt.config.js

@@ -161,6 +161,7 @@ module.exports = {
     '/static/**': baseUrl,
     '/vendor**': baseUrl,
     '/trade/**': baseUrl,
+    '/CommodityInOutbound/**': baseUrl,
     '/recommendation/**': baseUrl,
     '/store-service/**': baseUrl,
     '/basic/**': baseUrl,

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

@@ -84,7 +84,7 @@
         store.dispatch('shop/loadStoreCollectInfo')
       ]
      if (user.enterprise.uu) {
-       promises.push(store.dispatch('messageShow/loadMessageCount', {receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', isRead: 0}))
+       // promises.push(store.dispatch('messageShow/loadMessageCount', {receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', isRead: 0}))
      }
       return Promise.all(promises)
     },

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

@@ -20,6 +20,10 @@
             <img src="/images/mobile/center/vendor/material-person.png" alt="">
             <p>个人产品库</p>
           </nuxt-link>
+          <nuxt-link tag="li" to="/mobile/center/vendor/outOfStorage?providerType=person">
+            <img src="/images/mobile/center/vendor/material-person.png" alt="">
+            <p>出入库</p>
+          </nuxt-link>
           <nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=onLine">
             <img src="/images/mobile/center/vendor/onsale.png" alt="">
             <p>在售产品</p>
@@ -88,7 +92,7 @@
      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})
+        // store.dispatch('messageShow/loadMessageCount', {receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', isRead: 0})
       ])
     },
     components: {

+ 1178 - 0
pages/mobile/center/vendor/material.vue

@@ -0,0 +1,1178 @@
+<template>
+  <div>
+    <div class="material-wrapper" >
+      <div class="order-nav">
+        <div :class="activeType === '' ? 'active': ''" @click="ChangeList('')"><span>公司产品库</span></div>
+        <div :class="activeType === 'mine' ? 'active' : ''" @click="ChangeList('mine')"><span>我的产品库</span></div>
+      </div>
+      <div class="search-content">
+        <input type="text" placeholder="请输入您要查找的品牌或型号" v-model="seekKeyword" @keyup.13="searchSeek">
+        <span @click="searchSeek" >
+            <i class="iconfont icon-sousuo"></i>
+            </span>
+      </div>
+
+      <div class="scrollContent" id="provider-wrapper">
+        <div class="providerList" v-for="(item, index) in GetEnterpriseListData">
+          <div class="top">
+            <div class="icon" :class="item.standard ? 'standed' : 'istanded'"></div>
+            <div class="text" style="width: 4.3rem">
+              {{item.pcmpcode}}
+            </div>
+            <div class="text" style="width: 1rem;color: #666;font-size: 0.28rem">
+              {{item.goods && item.goods.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营' || '寄售'}}
+              <!--{{item.goods && item.goods.selfSale === 1 ? '自营' : '寄售' || '-'}}-->
+            </div>
+            <div class="text" style="width: 1rem;color: #666;font-size: 0.28rem">
+              {{item.goods && item.goods.autoPublish ? '已上架' : '已下架' }}
+            </div>
+            <!-- <div class="pms">
+               {{item.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}
+             </div>-->
+            <!--<img class="store-type" v-if="item.goods && item.goods.storeid === '33069557578d44e69bd91ad12d28a8d4'" src="/images/mobile/product/consignment.png" alt="">-->
+            <!--<img class="store-type" src="/images/mobile/product/self.png" alt="" v-else >=-->
+            <img class="store-type" src="/images/mobile/product/mine_icon.png" v-if="item.addProductPerson"/>
+          </div>
+          <div class="middle">
+            <div class="list" style="height: 0.46rem;">
+              <div class="fl">
+                <div class="name">品牌:</div>
+                <div class="text">{{item.pbranden || item.pbrand || '-'}}</div>
+              </div>
+              <!--<div class="fr">-->
+                <!--<div class="button" @click="update(item)">编辑</div>-->
+                <!--<div class="button" @click="offProduct(item, index)">下架</div>-->
+              <!--</div>-->
+            </div>
+            <div class="list">
+                <div class="name">物料名称:</div>
+                <div class="text">{{item.kind || item.kinden || '-'}}</div>
+              <!--<div class="fr">-->
+                <!--<div class="textinfo" v-if="item.goods && item.goods.breakUp">可拆卖</div>-->
+              <!--</div>-->
+            </div>
+            <div class="list">
+              <div class="name">规格:</div>
+              <div class="text">{{item.spec || '-'}}</div>
+            </div>
+            <div class="list">
+              <div class="fl">
+                <div class="name">包装方式:</div>
+                <div class="text">{{item.packaging || '无包装信息'}}</div>
+              </div>
+              <div class="fr">
+                <div class="name">库存:</div>
+                <div class="text">{{item.erpReserve || '-'}}</div>
+              </div>
+
+            </div>
+
+            <div class="list">
+              <div class="fl">
+                <div class="name">最小包装数:</div>
+                <div class="text">{{item.minPackQty || '-'}}</div>
+              </div>
+              <div class="fr">
+                <div class="name">成本单价:</div>
+                <div class="text">{{item.price || '-'}}</div>
+              </div>
+            </div>
+
+            <div class="list">
+              <div class="fl">
+                <div class="name">最小起订量:</div>
+                <div class="text">{{item.goods && item.goods.minBuyQty || '-'}}</div>
+              </div>
+              <div class="fr">
+                <div class="name">交期(天):</div>
+                <div class="text" v-if="item.goods && item.goods.b2cMaxDelivery && (item.goods.b2cMaxDelivery != item.goods.b2cMinDelivery)" v-text="item.goods.b2cMinDelivery + '-'+ item.goods.b2cMaxDelivery"></div>
+                <div class="text" v-if="item.goods && item.goods.b2cMaxDelivery && (item.goods.b2cMaxDelivery == item.goods.b2cMinDelivery)" v-text="item.goods.b2cMinDelivery"></div>
+              </div>
+            </div>
+            <!--<div class="list">-->
+              <!--<div class="name">生产日期:</div>-->
+              <!--<div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>-->
+            <!--</div>-->
+
+            <div class="list">
+              <div class="name left">价格梯度:</div>
+              <div class="table left">
+                <ul>
+                  <li class="title">
+                    <div>分段数量/PCS</div>
+                    <div>分段单价</div>
+                  </li>
+                  <template  v-if="item.goods">
+                    <li v-for="price in item.goods.prices">
+                      <div>{{price.start}}+</div>
+                      <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
+                      <div v-else>${{price.rMBPrice}}</div>
+                    </li>
+                  </template>
+                </ul>
+              </div>
+            </div>
+
+          </div>
+          <div class="clearfix">
+            <div class="pull-right add" @click="addProtoperson(item)" :class="{noadd: item.addProductPerson}">加入个人产品</div>
+            <div class="pull-right look" @click="toAddpro(item, index)">编辑上架</div>
+            <div class="pull-right look" @click="updateMateriel(item)">编辑物料</div>
+          </div>
+        </div>
+      </div>
+      <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
+      <pull-up :fixId="'provider-wrapper'" :searchMore="isSearchSearchingMore" :allPage="EnterprisePage" :page="seekPage" @pullUpAction="getMoreSearch"></pull-up>
+
+    </div>
+    <!-- 编辑物料 -->
+    <div class="update-materiel" v-show="showMateriel" @click="closeAlert">
+      <div class="mobile-nav">
+        <div class="mobile-header mobile-center-header">
+          <a @click="showMateriel = false"><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="update-materiel-wrapper" @click="clearInfo()">
+        <template v-if="MaterielItem.standard === 1">
+          <img class="imgUrl" src="/images/mobile/@2x/productDetail/Strand.png" />
+        </template>
+        <template v-else>
+          <img class="imgUrl" src="/images/mobile/@2x/productDetail/isStrand.png" />
+        </template>
+        <div ref="scroll" style="height: 100%;overflow-y:scroll">
+          <div>
+            <div style="background: #fff;border: 1px solid #dcdcdc;padding-bottom: 0.5rem;">
+              <div class="update-materiel-wrapper-list clearfix" :class="{'overHidden': MaterielItem.standard === 1}">
+                <div class="name pull-left"><a class="red">*</a>品牌:</div>
+                <template v-if="MaterielItem.standard === 1">
+                  {{MaterielItem.pbranden}}
+                </template>
+                <template v-else>
+                  <div class="input pull-left clearfix" :class="{'overHidden': MaterielItem.standard === 1}">
+                    <input type="text" v-model="MaterielItem.pbranden" placeholder="请勿填中文符号" @blur.stop="checkBrand" @input.stop="onBrandChange"/>
+                    <ul class="similar brand-similar-list" v-show="showSimilarBrandList && MaterielItem.pbranden">
+                      <li v-for="sBrand in similarBrand" @click.stop="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
+                    </ul>
+                    <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.pbranden = ''"></i>
+                  </div>
+                </template>
+              </div>
+              <div class="update-materiel-wrapper-list clearfix" :class="{'overHidden': MaterielItem.standard === 1}">
+                <div class="name pull-left"><a class="red">*</a>物料名称:</div>
+                <template v-if="MaterielItem.standard === 1">
+                  {{MaterielItem.kind}}
+                </template>
+                <template v-else>
+                  <div class="input pull-left clearfix"  style="width: 4.44rem">
+                    <!--<input type="text" v-model="MaterielItem.kind" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">-->
+                    <input type="text" placeholder="请输入物料名称" v-model="MaterielItem.kind"/>
+                    <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.kind = ''"></i>
+                  </div>
+                </template>
+              </div>
+              <div class="update-materiel-wrapper-list clearfix">
+                <div class="name pull-left"><a class="red">*</a>型号:</div>
+                <template v-if="MaterielItem.standard === 1">
+                  {{MaterielItem.pcmpcode}}
+                </template>
+                <template v-else>
+                  <div class="input pull-left clearfix">
+                    <input type="text" v-model="MaterielItem.pcmpcode" @blur.stop="checkCode" @input.stop="onCodeChange" placeholder="请勿填中文符号">
+                    <ul class="similar" v-show="showSimilarCodeList && MaterielItem.pcmpcode">
+                      <li v-for="sCode in similarCode" @click.stop="setCode(sCode.code)">{{sCode.code}}</li>
+                    </ul>
+                    <!--<input type="text" placeholder="请输入型号" v-model="MaterielItem.pcmpcode"/>-->
+                    <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.pcmpcode = ''"></i>
+                  </div>
+                </template>
+              </div>
+              <div class="update-materiel-wrapper-list clearfix">
+                <div class="name pull-left"><a class="red" style="opacity: 0">*</a>规格:</div>
+                <div class="input pull-left clearfix">
+                  <input type="text" placeholder="请输入规格" v-model="MaterielItem.spec" @blur="checkSpec" @input="onSpecInput" maxlength="50"/>
+                  <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.spec = ''"></i>
+                </div>
+              </div>
+              <div class="update-materiel-wrapper-list clearfix">
+                <div class="name pull-left"><a class="red" style="opacity: 0">*</a>最小包装数:</div>
+                <div class="input pull-left clearfix" style="width: 4.15rem;">
+                  <input type="number"  placeholder="请输入最小包装数" v-model="MaterielItem.minPackQty" maxlength="6"/>
+                  <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.minPackQty = ''"></i>
+                </div>
+              </div>
+              <div class="update-materiel-wrapper-list clearfix">
+                <div class="name pull-left"><a class="red" style="opacity: 0">*</a>包装方式:</div>
+                <div class="selectInput pull-left" @click.stop="showdropmenu('pack')">
+                  <span>{{MaterielItem.packaging || '无包装信息'}}</span>
+                  <img src="/images/mobile/product/drop_icon.png"/>
+                  <ul :class="{active : showDrop === 'pack' }">
+                    <li v-for="item in packObj" @click.stop="choosePack(item)">{{item}}</li>
+                  </ul>
+                </div>
+              </div>
+              <div class="update-materiel-wrapper-list clearfix">
+                <div class="name pull-left"><a class="red" style="opacity: 0">*</a>规格书:</div>
+              </div>
+              <div class="clearfix">
+                <div class="update-materiel-wrapper-image">
+                  <a v-if="MaterielItem.IsSave" @click="WinOpen(MaterielItem.Regulpic)">
+                   <img src="/images/mobile/openStore/pdf.png"  style='width: 0.49rem; height: 0.49rem;display:block;margin: 0.2rem auto 0'/>
+                  </a>
+                  <img v-else src="/images/mobile/openStore/upload.png"  style='width: 0.49rem; height: 0.49rem;display:block;margin: 0.2rem auto 0'/>
+                  <!--v-if="MaterielItem.standard !== 1"-->
+                  <input type="file" class="com-input" @change="update" accept="*.pdf" v-if="!MaterielItem.IsSave"/>
+                  <span style="position: relative" v-if="MaterielItem.Regulpic === ''">上传规格书</span>
+                </div>
+                <span class="uploadImgInfo pull-left">
+                  <div class="name"><a class="red">*</a>仅支持PDF格式文件,大小不超过20M:</div>
+                  <div class="name"><a class="red">*</a>规格书上传后,将在两个工作日内完成审核</div>
+                  <div class="name"><a class="red">*</a>如审核不通过,将会以消息的形式通知您</div>
+                  <div class="name"><a class="red">*</a>已有原厂规格书的器件暂不开放上传</div>s
+                  <div class="name"><a class="red">*</a>更新规格书需重新审核</div>
+                </span>
+                <div style="clear:both"></div>
+                <div class="uploadImgBtn pull-left">上传规格书<input type="file" class="com-input" @change="update" accept=".pdf" /></div>
+
+              </div>
+
+              <div class="update-materiel-wrapper-list clearfix">
+                <div class="name pull-left"><a class="red" style="opacity: 0">*</a>物料图片:</div>
+              </div>
+              <div class="clearfix">
+                <div class="update-materiel-wrapper-image">
+                  <img  :src="MaterielItem.cmpImg || '/images/mobile/openStore/upload.png'"  style='width: 0.49rem; height: 0.49rem;display:block;margin: 0.2rem auto 0'/>
+                  <input type="file" class="com-input" @change="update2" accept="image/jpeg,image/jpg,image/png" />
+                  <span style="position: relative" v-if="MaterielItem.cmpImg === ''">上传图片</span>
+                </div>
+                <span class="uploadImgInfo pull-left" style="line-height: 1.09rem">
+                  <div class="name"><a class="red">*</a>仅支持JPG、PNG格式文件,大小不超过1M</div>
+                </span>
+                <div style="clear:both"></div>
+                <div class="uploadImgBtn pull-left" style="margin-top: 0.15rem">上传图片<input type="file" class="com-input" @change="update2" accept="image/jpeg,image/jpg,image/png" /></div>
+              </div>
+            </div>
+            <div class="update-materiel-wrapper-controll clearfix">
+              <div class="pull-left" @click.stop="saveMateriel()">保存</div>
+              <div class="pull-right" @click.stop="saveMateriel('a')">取消</div>
+            </div>
+            <div style="height: 1rem;position:relative"></div>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- 物料上下架 -->
+    <div>
+      <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial">
+
+      </upoff-material>
+    </div>
+    <!-- /end 物料上下架 -->
+  </div>
+</template>
+
+<script>
+  // 移动端IOS不支持上传PDF文件
+  import { RemindBox, PullUp } from '~components/mobile/common'
+  import { upoffMaterial } from '~components/mobile/center'
+  export default {
+    layout: 'mobile',
+    middleware: 'authenticated',
+    name: 'mobileProduct',
+    fetch ({store}) {
+      return Promise.all([
+        store.dispatch('loadStoreStatus', {op: 'check'})
+      ])
+    },
+    data() {
+      return {
+        activeType: '',
+        collectResult: '',
+        timeoutCount: 0,
+        isSearchSearchingMore: false, // 是否请求状态
+        EnterprisePage: 0, // 总页数
+        GetEnterpriseListData: [], // 当前数据源
+        seekPage: 1, // 当前页数
+        seekKeyword: '', // 搜索关键字
+        MaterielItem: {}, // 当前选择编辑物料对象 或者 编辑上下架对象
+        showMateriel: false, // 编辑物料弹窗
+        showSimilarCodeList: false, // 型号选择框
+        showSimilarBrandList: false, // 品牌选择框
+        similarBrand: [],
+        similarCode: [],
+        packObj: ['Bulk-散装', 'Reel-卷装', 'Tape/Reel-编带', 'Tray-盘装', 'Tube-管装', '盒装', '袋装', '罐装', '瓶装', '桶装', '箱装', '其他'],
+        showDrop: ''
+      }
+    },
+    created() {
+      this.getResourceProvidor()
+    },
+    computed: {
+      // 是否展示空数据
+      StateNone() {
+        return this.GetEnterpriseListData.length === 0 && this.EnterprisePage === 0
+      }
+    },
+    methods: {
+      // 打开pdf
+      WinOpen(item) {
+        window.open(item, '_blank')
+      },
+      // 获取当前企业产品库
+      GetEnterpriseList: function() {
+        let params = {
+          _status: 'all',
+          count: 20,
+          isStandard: true,
+          keyword: this.seekKeyword || '',
+          page: this.seekPage,
+          sorting: { id: 'DESC' },
+          type: 'nStandard'
+        }
+        return this.$http.get('/trade/products', { params })
+      },
+      // 获取当前个人产品库
+      GetPersonList: function(cb) {
+        let params = {
+          _status: 'all',
+          count: 20,
+          isStandard: true,
+          keyword: this.seekKeyword || '',
+          page: this.seekPage,
+          sorting: { id: 'DESC' },
+          type: 'all'
+        }
+        return this.$http.get('/trade/products/person', { params })
+      },
+      ChangeList(_tp) {
+        this.activeType = _tp
+        this.seekPage = 0
+        this.GetEnterpriseListData = []
+        this.getResourceProvidor()
+      },
+      getResourceProvidor: function() {
+        if (this.activeType === '') {
+          this.GetEnterpriseList().then(res => {
+            this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
+            this.EnterprisePage = res.data.totalPages
+            this.isSearchSearchingMore = false
+          })
+        } else if (this.activeType === 'mine') {
+          this.GetPersonList().then(res => {
+            this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
+            this.EnterprisePage = res.data.totalPages
+            this.isSearchSearchingMore = false
+          })
+        } else if (this.providerType === 'onLine') {
+          this.GetOnlineList().then(res => {
+            this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
+            this.EnterprisePage = res.data.totalPages
+            this.isSearchSearchingMore = false
+          })
+        }
+      },
+      getMoreSearch: function () {
+        this.seekPage++
+        this.isSearchSearchingMore = true
+        this.getResourceProvidor()
+      },
+      searchSeek: function() {
+       this.ChangeList(this.activeType)
+      },
+      addProtoperson: function(item) {
+        if (item.addProductPerson) {
+          this.collectResult = '已在个人产品库'
+          this.timeoutCount++
+          return false
+        }
+        this.$http.post('/trade/products/person', [item.id])
+          .then(response => {
+            this.collectResult = '绑定成功'
+            this.timeoutCount++
+            this.seekPage = 1
+            this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
+            this.GetEnterpriseListData = null
+            this.GetEnterpriseListData = []
+            this.reloadData()
+          }, () => {
+            this.collectResult = '绑定失败'
+            this.timeoutCount++
+          })
+      },
+      // 编辑上架
+      toAddpro(item, index) {
+        this.$item = this.baseUtils.deepCopy(item)
+        this.$index = index
+        this.MaterielItem = item
+        if (!this.MaterielItem.goods) {
+          this.$set(this.MaterielItem, 'goods', {
+            prices: [{end: '',
+              rMBNTPrice: '',
+              rMBPrice: '',
+              start: ''}],
+            selfSale: 1,
+            breakUp: false,
+            autoPublish: false,
+            productid: item.id
+          })
+        }
+        this.$refs.upoffMaterial.show()
+      },
+      update2 (e) {
+        // 上传图片
+        let file = e.target.files[0]
+        if (file.size > 1024 * 1024) {
+          this.setRemindText(`上传文件不得超过1M`)
+          return false
+        }
+        let param = new FormData()
+        param.append('file', file, file.name)
+        param.append('chunk', '0')
+        let config = {
+          headers: {'Content-Type': 'multipart/form-data'}
+        }
+        this.$http.post('/api/images', param, config)
+          .then(response => {
+            this.$set(this.MaterielItem, 'cmpImg', response.data[0].path)
+            // this.MaterielItem.cmpImg = response.data[0].path
+          })
+      },
+      update (e) {
+        // 上传PDF
+        let file = e.target.files[0]
+        if (file.size > 1024 * 1024 * 20) {
+          this.setRemindText(`上传文件不得超过20M`)
+          return false
+        }
+        let param = new FormData()
+        param.append('file', file, file.name)
+        param.append('chunk', '0')
+        let config = {
+          headers: {'Content-Type': file.type}
+        }
+        this.$http.post('/file', param, config)
+          .then(response => {
+            this.MaterielItem.IsSave = true
+            this.MaterielItem.Regulpic = response.data[0].path
+          }, err => {
+            console.log(err)
+          })
+      },
+      // 编辑物料
+      updateMateriel(item) {
+        // Object.assign(this.MaterielItem, item, {Regulpic: '', IsSave: false, cmpImg: ''})
+        this.MaterielItem = item
+        this.$item = this.baseUtils.deepCopy(item)
+        this.MaterielItem.IsSave = (item.productAttachSubmit && item.productAttachSubmit.uploadAttach || item.attach) ? true : false // 规格书是否存在
+        this.$set(this.MaterielItem, 'cmpImg', item.cmpImg || '')
+        this.$set(this.MaterielItem, 'Regulpic', (item.productAttachSubmit && item.productAttachSubmit.uploadAttach) || item.attach || '')
+        this.showMateriel = true
+        // this._initScroll()
+      },
+      // 编辑物料保存按钮
+      saveMateriel(str) {
+        if (str) {
+          let _key1 = Object.keys(this.$item)
+          let _key2 = Object.keys(this.MaterielItem)
+          for (let i = 0; i < _key1.length; i++) {
+            this.MaterielItem[_key2[i]] = this.$item[_key1[i]]
+          }
+          this.showMateriel = false
+          return
+        }
+        if (this.MaterielItem.pbranden === '') {
+          this.setRemindText('品牌不能为空')
+          return
+        } else if (this.MaterielItem.kind === '') {
+          this.setRemindText('物料名称不能为空')
+          return
+        } else if (this.MaterielItem.minPackQty === '') {
+          this.setRemindText('最小包装数不能为空')
+          return
+        } else if (this.MaterielItem.pcmpcode === '') {
+          this.setRemindText('型号不能为空')
+          return
+        }
+        this.MaterielItem.pcmpcode = this.MaterielItem.pcmpcode
+        this.MaterielItem.pbranden = this.MaterielItem.pbranden
+        let item = {
+          id: this.MaterielItem.id,
+          kind : this.MaterielItem.kind,
+          pbranden: this.MaterielItem.pbranden,
+          pcmpcode: this.MaterielItem.pcmpcode,
+          spec: this.MaterielItem.spec,
+          url: this.MaterielItem.Regulpic || '',
+          cmpImg: this.MaterielItem.cmpImg, // 物料图片
+          packaging: this.MaterielItem.packaging, // 包装
+          minPackQty: this.MaterielItem.minPackQty // 最小包装数
+        }
+        this.$http.post(`/trade/products/update/product?attachUrl=${item.url}`, item).then(res => {
+          if (res.data.success) {
+            this.setRemindText('修改成功')
+            this.showMateriel = false
+            this.page = 1
+            this.GetEnterpriseListData = null
+            this.GetEnterpriseListData = []
+            this.getResourceProvidor()
+          } else {
+            this.setRemindText(res.data.message)
+          }
+        })
+      },
+      // 显示包装选择
+      showdropmenu(str) {
+        this.showDrop = str
+      },
+      // 选择包装
+      choosePack(item) {
+        this.showDrop = ''
+        this.MaterielItem.packaging = item
+      },
+      // 关闭包装选项
+      closeAlert() {
+        this.MaterielItem = this.$item
+        this.showDrop = ''
+      },
+      clearInfo() {
+        this.showSimilarCodeList = false
+        this.showSimilarBrandList = false
+      },
+      checkBrand: function () {
+        // this.MaterielItem.brand = this.MaterielItem.brand && this.MaterielItem.brand !== ''
+        if (!this.MaterielItem.pbranden || this.MaterielItem.pbranden === '') {
+          this.setRemindText('品牌不能为空')
+        }
+        return this.MaterielItem.pbranden
+      },
+      checkCode: function () {
+        if (!this.MaterielItem.pcmpcode || this.MaterielItem.pcmpcode === '') {
+          this.setRemindText('型号不能为空')
+        }
+        return this.MaterielItem.pcmpcode
+      },
+      onCodeChange: function () {
+        this.MaterielItem.pcmpcode = this.MaterielItem.pcmpcode.trim()
+        if ((/[^\x00-\xff]/g).test(this.MaterielItem.pcmpcode)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.MaterielItem.pcmpcode.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.MaterielItem.pcmpcode.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          this.MaterielItem.pcmpcode = this.baseUtils.cutOutString(this.MaterielItem.pcmpcode, chineseIndex)
+        } else if (this.MaterielItem.pcmpcode && this.baseUtils.getRealLen(this.MaterielItem.pcmpcode) > 100) {
+          this.MaterielItem.pcmpcode = this.baseUtils.cutOutString(this.MaterielItem.pcmpcode, 100)
+        } else {
+          this.getSimilarCode()
+        }
+      },
+      onBrandChange: function () {
+        this.MaterielItem.pbranden = this.MaterielItem.pbranden.trim()
+        if ((/[^\x00-\xff]/g).test(this.MaterielItem.pbranden)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.MaterielItem.pbranden.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.MaterielItem.pbranden.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.MaterielItem.pbranden.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          if (chineseIndex > -1) {
+            this.MaterielItem.pbranden = this.MaterielItem.pbranden.substring(0, chineseIndex)
+          }
+        } else if (this.MaterielItem.pbranden && this.baseUtils.getRealLen(this.MaterielItem.pbranden) > 50) {
+          this.MaterielItem.pbranden = this.baseUtils.cutOutString(this.MaterielItem.pbranden, 50)
+        } else {
+          this.getSimilarBrand()
+        }
+      },
+      getSimilarBrand: function () {
+        if (this.MaterielItem.pbranden) {
+          this.$http.get('/search/similarBrands', {params: {keyword: this.MaterielItem.pbranden}})
+            .then(response => {
+              this.similarBrand = response.data
+              this.showSimilarBrandList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarBrandList = false
+        }
+      },
+      getSimilarCode: function () {
+        if (this.MaterielItem.pcmpcode) {
+          this.$http.get('/search/similarComponents', {params: {keyword: this.MaterielItem.pcmpcode}})
+            .then(response => {
+              this.similarCode = response.data
+              this.showSimilarCodeList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarCodeList = false
+        }
+      },
+      setCode: function (code) {
+        this.MaterielItem.pcmpcode = code
+        this.showSimilarCodeList = false
+      },
+      setBrand: function (brand) {
+        this.MaterielItem.pbranden = brand
+        this.showSimilarBrandList = false
+      },
+      setRemindText: function (str) {
+        this.collectResult = str
+        this.timeoutCount++
+      },
+      checkSpec: function () {
+        // let nullStrFlag =
+        // this.MaterielItem.spec = nullStrFlag
+        if (!this.baseUtils.checkNullStr(this.MaterielItem.spec)) {
+          this.setRemindText('规格输入不合法')
+        }
+        return this.MaterielItem.spec
+      },
+      onSpecInput: function () {
+        if (this.MaterielItem.spec && this.baseUtils.getRealLen(this.MaterielItem.spec) > 100) {
+          this.MaterielItem.spec = this.baseUtils.cutOutString(this.MaterielItem.spec, 100)
+        }
+      },
+      upoffMaterial(type) {
+        if (!type) {
+          this.showMateriel = false
+          this.page = 1
+          this.GetEnterpriseListData = null
+          this.GetEnterpriseListData = []
+          this.getResourceProvidor()
+        } else {
+          this.GetEnterpriseListData[this.$index] = this.$item
+          console.log(this.GetEnterpriseListData[this.$index])
+          // this.MaterielItem = this.$item
+        }
+      }
+      // _initScroll() {
+      //   this.$nextTick(() => {
+      //     if (!this.scroll) {
+      //       this.scroll = new BScroll(this.$refs.scroll, {
+      //         click: true
+      //       })
+      //     } else {
+      //       this.scroll.refresh()
+      //     }
+      //   })
+      // }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      upoffMaterial
+    }
+  }
+</script>
+
+<style lang="scss">
+  @mixin overFlowHidden {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  @mixin lineHeight($value) {
+    height: $value;
+    line-height: $value;
+  }
+.material-wrapper {
+  background: #f1f3f6;
+  /*margin: 1.26rem 0 0.98rem 0;*/
+  /*height: calc(100vh - 1.26rem - 0.98rem);*/
+  position: fixed;
+  width: 100%;
+  top: 1.26rem;
+  bottom: 0.98rem;
+  overflow-y: auto;
+  z-index: 100;
+  .order-nav {
+    background: #fff;
+    div {
+      height: 0.82rem;
+      line-height: 0.82rem;
+      display: inline-block;
+      width: 50%;
+      text-align: center;
+      font-size: .28rem;
+      color: #666;
+      &.active span{
+        color: #3f84f6;
+        border-bottom: 0.04rem solid #3f84f6;
+        padding-bottom: 0.2rem;
+      }
+    }
+  }
+  .search-content {
+    text-align: center;
+    padding: .25rem 0;
+    input {
+      border: 1px solid #376ff3;
+    }
+    span {
+    }
+  }
+  .scrollContent {
+    height: calc(100vh - 3.19rem - 0.98rem);
+    overflow-y: auto;
+    .providerList {
+      margin-bottom: 0.24rem;
+      .top {
+        position: relative;
+        padding: 0 0.24rem;
+        border-bottom: 1px solid #d3d3d3;
+        height: 0.9rem;
+        line-height: 0.9rem;
+        color: #0067e7;
+        font-size: 0.3rem;
+        background: #fff;
+        &::after {
+          clear: both;
+          display: block;
+          content: ' ';
+          visibility: hidden;
+          zoom: 1;
+        }
+        .text {
+          width: 5.4rem;
+        }
+        .pms {
+          color: #f57710;
+          border: 1px solid #f57710;
+          border-radius: 0.4rem;
+          background: #fff;
+          font-size: 0.24rem;
+          height: 0.4rem;
+          line-height: 0.4rem;
+          width: 0.8rem;
+          text-align: center;
+          float: right;
+          margin-top: 0.25rem;
+        }
+        .store-type {
+          width: .77rem;
+          height: .77rem;
+          position: absolute;
+          right: 0;
+          top: 0;
+        }
+        .icon {
+          width: 0.6rem;
+          height: 0.36rem;
+          line-height: 0.36rem;
+          margin-top: 0.27rem;
+          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')
+          }
+        }
+        .person-flag {
+          width: .75rem;
+          position: absolute;
+          right: 0;
+        }
+        .text {
+          float: left;
+          width: 6.3rem;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+      }
+      .middle {
+        padding: 0.24rem 0.24rem;
+        background: #fff;
+        .pms {
+          color: #f57710;
+          border: 1px solid #f57710;
+          border-radius: 0.4rem;
+          background: #fff;
+          font-size: 0.24rem;
+          height: 0.4rem;
+          line-height: 0.4rem;
+          width: 0.8rem;
+          text-align: center;
+        }
+        .list {
+          /*height: 0.46rem;*/
+          .left {
+            float: left;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+          .textinfo {
+            color: #0067e7;
+            font-size: 0.3rem;
+          }
+          .button {
+            font-size: 0.26rem;
+            color: #fff;
+            width: 0.92rem;
+            text-align: center;
+            border-radius: 5px;
+            /*border:1px solid #1a58dd;*/
+            background: #1a58dd;
+            display: inline-block;
+            margin-right: 0.2rem;
+            line-height: 0.33rem;
+            height: 0.37rem;
+          }
+          margin-bottom: 0.18rem;
+          &::after{
+            clear: both;
+            display: block;
+            content: ' ';
+            visibility: hidden;
+            zoom: 1;
+          }
+          .fl {
+            width: 4.3rem;
+            float: left;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+          .fr {
+            text-align: left;
+            width: 2.6rem;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+          &.list-long {
+            .fl {
+              width: 100% !important;
+            }
+          }
+          .name {
+            color: #666;
+            font-size: 0.3rem;
+            display: inline-block;
+          }
+          .text {
+            display: inline-block;
+            color: #333;
+            font-size: 0.3rem
+          }
+          .table {
+            width: 5.5rem;
+            margin-bottom: 0;
+            margin-top: 0;
+            li {
+              height: 0.43rem;
+              line-height: 0.43rem;
+              border-left: .01rem solid #c5c5c5;
+              font-size: .28rem;
+              &::after {
+                clear: both;
+                display: block;
+                content: ' ';
+                visibility: hidden;
+                zoom: 1;
+              }
+              div {
+                text-align: center;
+                width: 50%;
+                float: left;
+                border-right: .01rem solid #c5c5c5;
+                border-bottom: .01rem solid #c5c5c5;
+              }
+              &:nth-child(odd) {
+                background: #ddd;
+                color: #666;
+                font-size: 0.28rem;
+              }
+              &:nth-child(even) {
+                background: #fcfcfc;
+                color: #666;
+                font-size: 0.28rem;
+              }
+              &:nth-last-of-type(1){
+                color: #f31919;
+              }
+              &.title {
+                font-size: 0.28rem;
+                color: #333;
+              }
+            }
+          }
+        }
+      }
+      div.clearfix {
+        padding: 0.2rem 0.2rem;
+        border-top: 1px solid #d3d3d3;
+        background: #fff;
+        div{
+          width: 2.1rem;
+          height: .6rem;
+          text-align: center;
+          line-height: .6rem;
+          border-radius: 3px;
+          margin-right: .2rem;
+          &.look {
+            color: #008bf7;
+            border: 1px solid #008bf7;
+          }
+          &.add {
+            background: #fff;
+            color: #f57710;
+            border: 1px solid #f57710;
+          }
+          &.noadd{
+            background: #cccbcb;
+            color: #fff;
+            border:1px solid #cccbcb;
+          }
+        }
+      }
+    }
+  }
+}
+.update-materiel {
+  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;
+  }
+  .update-materiel-wrapper {
+    border-radius: 0.07rem;
+    position: fixed;
+    overflow: hidden;
+    bottom: 0;
+    top: 1.46rem;
+    left: 0.2rem;
+    right: 0.2rem;
+    .imgUrl{
+      position: absolute;
+      width: 0.94rem;
+      height: 0.94rem;
+      right: 0;
+      top: 0;
+      z-index: 1;
+    }
+    .update-materiel-wrapper-image {
+      width: 1.09rem;
+      height: 1.09rem;
+      border: 1px solid #dcdcdc;
+      border-radius: 0.07rem;
+      position: relative;
+      margin: 0rem 0 0 0.5rem;
+      text-align: center;
+      position: relative;
+      float: left;
+      span {
+        color: #b2b2b2;
+        font-size: 0.2rem;
+      }
+      .com-input {
+        width: 100%;
+        height: 100%;
+        text-align: center;
+        position: absolute;
+        bottom: 0;
+        left: 0;
+        opacity: 0;
+        display: inline-block !important;
+      }
+    }
+    .uploadImgBtn {
+      color: #fff;
+      font-size: .28rem;
+      width: 1.51rem;
+      @include lineHeight(0.47rem);
+      border-radius: 0.07rem;
+      background: #f9b209;
+      text-align: center;
+      margin: 0rem 0 0 0.3rem;
+      position: relative;
+      .com-input {
+        width: 100%;
+        height: 100%;
+        text-align: center;
+        position: absolute;
+        bottom: 0;
+        left: 0;
+        opacity: 0;
+        display: inline-block !important;
+      }
+    }
+    .uploadImgInfo {
+      font-size: 0.24rem;
+      margin-left: 0.44rem;
+      color: #999;
+      .red {
+        color: red;
+      }
+    }
+    .update-materiel-wrapper-list {
+      margin-left:0.28rem;
+      margin-top: 0.3rem;
+      line-height: 0.7rem;
+      .red {color: #ea0f42}
+      .name {color: #666;font-size: 0.28rem}
+      .input {
+        position: relative;
+        width: 5rem;
+        line-height: 0.7rem;
+        height: 0.7rem;
+        border: 1px solid #dcdcdc;
+        input {
+          text-indent: 5px;
+          border: 0;
+          border-radius: 0.07rem;
+          line-height: 0.64rem;
+          height: 0.64rem;
+          width: 90%;
+          font-size:0.28rem;
+          float: left;
+          color: #333;
+        }
+        i {
+          font-size: 0.16rem;
+          vertical-align: top;
+          color: #666;
+          float: right;
+          margin-right: 0.05rem
+        }
+        .similar {
+          position: absolute;
+          width:100%;
+          max-height: 2.5rem;
+          overflow-y: auto;
+          z-index: 12;
+          border: 1px solid #7e7e7e;
+          border-radius: .05rem;
+          top: .5rem;
+          background: #fff;
+          li {
+            height: .5rem;
+            line-height: .5rem;
+            font-size: .26rem;
+            color: #999;
+            padding-left: .19rem;
+            &:focus, &:active, &:hover {
+              background: #999;
+              color: #fff;
+            }
+          }
+        }
+      }
+    }
+    .update-materiel-wrapper-list2 {
+      margin-left: 0.28rem;
+      margin-top: 0.3rem;
+    }
+    .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;
+        }
+      }
+    }
+  }
+  .selectInput {
+    display: inline-block;
+    position: relative;
+    vertical-align: top;
+    height: 0.7rem;
+    line-height: 0.7rem;
+    border: 1px solid #d2d2d2;
+    border-radius: 2px;
+    width: 4.44rem;
+    text-indent: 0.12rem;
+    img {
+      position: absolute;
+      width: 0.17rem;
+      height: 0.11rem;
+      right:0.1rem;
+      top: 0.28rem;
+    }
+    &.selectInput2 {
+      width: 1.56rem;
+    }
+    span {
+      height: 0.64rem;
+      line-height: 0.64rem;
+      display: block;
+      font-size: 0.28rem;
+    }
+    ul {
+      position: absolute;
+      left: 0;
+      top: .64rem;
+      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;
+      }
+    }
+  }
+}
+</style>

+ 141 - 0
pages/mobile/center/vendor/outOfStorage/_id.vue

@@ -0,0 +1,141 @@
+<template>
+  <div class="storage">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p v-text="storageList.type === 'INBOUND' ? '查看入库记录' : '查看出库记录'"></p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobile-storage-center">
+      <div class="storage-record">
+        <div class="storage-info">
+          <div class="linetext">{{storageList.type === 'INBOUND' ? '入库单' : '出库单'}}: <span v-text="storageList.inOutId"></span></div>
+          <div class="linetext">{{storageList.type === 'INBOUND' ? '卖家名称' : '买家名称'}}: <span v-text="storageList.affiliatedEnterprise">21324</span></div>
+          <div class="linetext">所属订单: <span v-text="storageList.associateOrderid || '-'">21324</span></div>
+          <div class="linetext">类型: <span v-text="setFilterType(storageList.opertatorType)">21324</span></div>
+          <div class="linetext" v-if="storageList.logistics">物流公司: <span v-text="storageList.logistics ? storageList.logistics.companyName : '-'">323425</span></div>
+          <div class="linetext" v-if="storageList.logistics">物流单号:<span v-text="storageList.logistics ? storageList.logistics.number : '-'">34254</span></div>
+          <div class="linetext">录入人: <span v-text="storageList.operaterUserName || '-'">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.inOutboundDetails">
+          <li class="info-list clearfix" v-for="(item, index) in storageList.inOutboundDetails">
+            <span class="super"><em v-text="index + 1">1</em></span>
+            <div class="linetext width50 fl">型号: <span v-text="item.cmpCode || '-'">21324</span></div>
+            <div class="linetext width50 fl">品牌: <span v-text="item.brandEn || '-'">21324</span></div>
+            <div class="linetext width50 fl">物料名称: <span v-text="item.kindName || '-'">21324</span></div>
+            <div class="linetext width50 fl">规格: <span v-text="item.spec || '-'">21324</span></div>
+            <div class="linetext width50 fl">{{storageList.type === 'INBOUND' ? '入库数' : '出库数'}}(PCS): <span v-text="item.qty || '-'">21324</span></div>
+            <div class="linetext width50 fl">单价(¥): <span class="base-color" v-text="item.price || '-'">21324</span></div>
+          </li>
+        </ul>
+      </div>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobile',
+    fetch({route, store}) {
+      return Promise.all([
+        store.dispatch('product/getLoadStorageId', {id:route.params.id})
+      ])
+    },
+    data () {
+      return {
+        remindText: '',
+        timeoutCount: 0
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus
+    },
+    computed: {
+      storageList () {
+        console.log(this.$store.state.product.storage.detail.data)
+        return this.$store.state.product.storage.detail.data
+      }
+    },
+    methods: {
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      setFilterType (type) {
+        let bound = ''
+        if(type === 'OTHER_INBOUND') {
+          bound = '其他入库'
+        } else if(type === 'OTHER_OUTBOUND'){
+          bound = '其他出库'
+        } else if (type === 'PURCHASE_INBOUND') {
+          bound = '采购入库'
+        } else if(type === 'SELL_OUTBOUND') {
+          bound = '销售出库'
+        } else {
+          bound = '全部类型'
+        }
+        return bound
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  $base-color: #3f84f6;
+  $title-color: #ffa200;
+  #mobile-storage-center {
+    padding-bottom: .5rem;
+    margin: 0 auto;
+  }
+  .storage-record{
+    padding: 0.24rem 0.24rem;
+    margin: 0 auto;
+    .storage-info{
+      padding: 0.24rem 0.24rem;
+      background: #fff;
+      margin-bottom:.2rem;
+    }
+    .linetext{
+      color:#666;
+      line-height: .6rem;
+      overflow: hidden;
+      -o-text-overflow: ellipsis;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      span{
+        color:#333;
+        &.base-color{
+          color:$base-color;
+        }
+      }
+    }
+    .info-list{
+      position:relative;
+      padding: 0.3rem 0.24rem;
+      background: #fff;
+      margin-bottom:.2rem;
+      .width50{
+        display:inline-block;
+        width: 48%;
+        margin-left: .1rem;
+      }
+      >span{
+        display:inline-block;
+        position:absolute;
+        left:0;
+        top:0;
+        padding: 0 .1rem;
+        background: $title-color;
+        border-radius: 0 .5rem .5rem 0;
+        line-height: .3rem;
+        height:.3rem;
+        color:#fff;
+        font-size: .24rem;
+      }
+    }
+  }
+</style>
+

+ 303 - 0
pages/mobile/center/vendor/outOfStorage/index.vue

@@ -0,0 +1,303 @@
+<template>
+  <div class="storage">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>产品出入库</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobile-storage-center">
+      <div>
+        <div class="storage-head">
+          <span class="inline-block" :class="{'active': switchType === 'INBOUND'}" @click="setSwitchType('INBOUND')">入库</span>
+          <span class="inline-block" :class="{'active': switchType === 'OUTBOUND'}" @click="setSwitchType('OUTBOUND')">出库</span>
+        </div>
+        <div class="storage-record">
+          <div class="search-content clearfix">
+            <div class="search">
+              <input type="text" v-model="filterParams.keyword" :placeholder="switchType ==='OUTBOUND' ? '发货单/卖家' : '订单号/买家'" class="staff-search" @keyup.13="filterRecord">
+              <span @click="filterRecord"><i class="iconfont icon-sousuo"></i></span>
+            </div>
+          </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>
+          </div>
+          <div class="filters-wrap" v-if="handleItem !== 1">
+            <base-filter
+              v-for="filterOption in filterOptions"
+              :key="filterOption.selectOption"
+              :selectItems="filterOption.selectItems"
+              :defaultVal="filterOption.defaultVal"
+              :selectOption="filterOption.selectOption"
+              @selectAction="onSelectAction"
+              :title="filterOption.title">
+            </base-filter>
+          </div>
+          <div class="list-content">
+            <storage-list :listData="storageList" :switchType="switchType" :handleItem="handleItem" v-show="handleItem !== 1"></storage-list>
+            <other-storage :switchType="switchType" v-show="handleItem === 1"></other-storage>
+          </div>
+          <empty-status  v-if="isEmpty && handleItem !== 1" :type="'collect'" :showLink="true" :text="'抱歉,没有相关信息'"></empty-status>
+          <pull-up :fixId="'mobile-storage-center'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+        </div>
+      </div>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  import { ModalWrapper, BaseFilter } from '~components/mobile/base'
+  import { StorageList, OtherStorage } from '~components/mobile/center/outOfStorage'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobile',
+    data () {
+      return {
+        remindText: '',
+        timeoutCount: 0,
+        switchType: 'INBOUND',
+        handleItem:0,
+        filterOptions: [
+          {
+            title: '交易时间',
+            selectOption: 'date',
+            selectItems: [{
+              key: '30天',
+              val: 1
+            }, {
+              key: '90天',
+              val: 2
+            }, {
+              key: '180天',
+              val: 3
+            }, {
+              key: '自定义',
+              val: 4
+            }],
+            defaultVal: 1
+          }
+        ],
+        page: 0,
+        isChange: false,
+        storageList: [],
+        filterParams:{
+          count: 10
+        },
+        filter:{
+          count: 10,
+          sorting: {"createtime":"DESC"},
+          status: '502-406'
+        }
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus,
+      BaseFilter,
+      StorageList,
+      OtherStorage
+    },
+    created () {
+      let currentTime = this.baseUtils.getClearDay(new Date())
+      let fromDate = currentTime - 29 * 24 * 60 * 60 * 1000
+      let toDate = currentTime + 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 59 * 1000
+      this.$store.dispatch('product/getLoadStorageData', {count: 10, page: 1, fromDate: fromDate, toDate: toDate, type: 'INBOUND'})
+    },
+    watch: {
+      'storageData': {
+        handler: function (val) {
+          if (val && val.content) {
+            this.storageList = val.content
+            this.isChange = false
+          }
+          this.storageList = [...this.storageList, ...val.content]
+        }
+      }
+    },
+    computed: {
+      storageData () {
+        return this.allStorageData.data
+      },
+      allStorageData () {
+        return this.$store.state.product.storage.list
+      },
+      fetching () {
+        return this.allStorageData.fetching
+      },
+      allPage () {
+        return this.allStorageData.totalPages
+      },
+      isEmpty () {
+        return this.storageList.length === 0
+      }
+    },
+    methods: {
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      onPullUpAction () {
+        this.filterParams.page++
+        this.filter.page++
+        this.reloadList()
+      },
+      setSwitchType (type) {
+        if(type !== this.switchType) {
+          this.switchType = type
+          this.filterParams.type = type
+          this.filterParams.page = 1
+          this.filter.page = 1
+          this.isChange = true
+          this.reloadList()
+        }
+      },
+      setHandleItem (type) {
+        if(type !== this.handleItem) {
+          this.handleItem = type
+          if(type !== 1) {
+            this.filterParams.page = 1
+            this.filter.page = 1
+            this.isChange = true
+            this.reloadList()
+          }
+        }
+      },
+      setSelect (type, val) {
+        if (type === 'date') {
+          if (val) {
+            this.filterParams.fromDate = val.fromDate
+            this.filter.startMils = val.fromDate
+            this.filterParams.toDate = val.toDate
+            this.filter.endMils = val.toDate
+          } else {
+            this.filterParams.fromDate = null
+            this.filter.startMils = null
+            this.filterParams.toDate = null
+            this.filter.endMils = null
+          }
+        } else {
+          this.filterParams[type] = val
+          this.filter[type] = val
+        }
+        this.filterRecord()
+      },
+      initFilterParams () {
+        this.filterParams = {
+          keyword: '',
+          fromDate: '',
+          toDate: '',
+          currencyName: '',
+          type: ''
+        },
+          this.filter = {
+            keyword: '',
+            startMils: '',
+            endMils: ''
+          }
+      },
+      onSelectAction (selectObj) {
+        this.setSelect(selectObj.key, selectObj.value)
+      },
+      filterRecord () {
+        this.filterParams.page = 1
+        this.filter.page = 1
+        this.filterParams.type = this.switchType
+        this.isChange = true
+        this.reloadList()
+      },
+      reloadList () {
+        if(this.handleItem === 0) {
+          this.$store.dispatch('product/getLoadStorageData', this.filterParams)
+        } else if(this.handleItem === 2) {
+          this.$store.dispatch('product/getLoadPurchaseData', this.filter)
+        }
+      },
+    }
+  }
+</script>
+<style lang="scss">
+  $base-color: #3f84f6;
+  #mobile-storage-center {
+    padding-bottom: .5rem;
+    margin: 0 auto;
+    .storage-head {
+      height: .82rem;
+      line-height: .82rem;
+      text-align: center;
+      background: #fff;
+      span {
+        font-size: .29rem;
+        &:last-child {
+          margin-left: 2.6rem;
+        }
+        &.active {
+          color: $base-color;
+          border-bottom: 1px solid $base-color;
+        }
+      }
+    }
+    .storage-record {
+      .search-content {
+        padding: .20rem 0;
+        text-align: center;
+        input {
+          margin: 0;
+          width: 7.1rem;
+          border: 1px solid $base-color;
+        }
+      }
+      .tab-content{
+        margin: 0 auto .13rem;
+        width: 7.1rem;
+        overflow: hidden;
+        text-align: center;
+        span{
+          float: left;
+          display: inline-block;
+          width: 2.36rem;
+          height: .62rem;
+          line-height: .62rem;
+          text-align: center;
+          color: #999999;
+          font-size: .26rem;
+          background-color: #ffffff;
+          border: solid 1px #d7d7d7;
+          -webkit-box-sizing: border-box;
+          box-sizing: border-box;
+          &.active{
+            background-color: #3f84f6;
+            border: none;
+            color: #fff;
+          }
+          &:first-child{
+            border-top-left-radius: .05rem;
+            border-bottom-left-radius: .05rem;
+          }
+          &:nth-child(2){
+            border-left: none;
+            border-right: none;
+          }
+          &:last-child{
+            border-top-right-radius: .05rem;
+            border-bottom-right-radius: .05rem;
+          }
+        }
+      }
+      .filters-wrap{
+        background: #fff;
+        margin: 0 auto .13rem;
+        width: 7.1rem;
+        overflow: hidden;
+        padding: .1rem;
+      }
+      .list-content{
+        margin: 0 auto;
+        padding: 0 .20rem;
+        margin-bottom:1.2rem;
+      }
+    }
+  }
+</style>

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

@@ -0,0 +1,293 @@
+<template>
+  <div class="storage">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p v-text="storageList.type === 'INBOUND' ? '采购入库' : '销售出库'"></p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-fix-content mobile-centerfix-content" id="mobile-storage-center">
+      <div class="storage-record">
+        <div class="btn-click">
+          <span class="base-color" @click="saveClick()">保存</span>
+          <span class="clear" @click="saveClick('clear')">取消</span>
+        </div>
+        <div class="storage-info">
+          <div class="logistics-line" v-show="showLogistics && logisticsCode.content">
+            <ul class="similar">
+              <li v-for="sCode in logisticsCode.content" @click.stop="setCode(sCode, index)">
+                <span v-text="sCode.companyName"></span>
+              </li>
+              <li v-if="logisticsCode.content.length <= 0"><span>请去PC端物流管理维护物流信息</span></li>
+            </ul>
+          </div>
+          <div class="linetext">{{storageList.type === 'INBOUND' ? '入库单' : '出库单'}}: <span>系统自动生成</span></div>
+          <div class="linetext">{{storageList.type === 'INBOUND' ? '卖家名称' : '买家名称'}}: <span v-text="storageList.buyentername || storageList.buyername">21324</span></div>
+          <div class="linetext">所属订单: <span v-text="storageList.purchaseid || '-'">21324</span></div>
+          <div class="linetext"><em>*</em>物流公司:<span>
+            <input type="text" readonly v-model="allObj.logisticsInfo.companyName" @click.stop="showLogistics = !showLogistics">
+          </span></div>
+          <div class="linetext"><em>*</em>物流单号:<span>
+            <input 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.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.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>
+            <div class="linetext width50 fl">应出库(PCS): <span v-text="item.number || '-'">21324</span></div>
+            <div class="linetext width50 fl">已出库(PCS): <span v-text="item.shipQty || '-'">21324</span></div>
+            <div class="linetext width50 fl">{{storageList.type === 'INBOUND' ? '入库数' : '出库数'}}(PCS):
+              <span v-if="item.qty === item.number">-</span>
+              <input style="width:1.2rem;" v-else type="text" v-model="item.qty" @blur="ChangeSendCount(item, item.qty)">
+            </div>
+            <div class="linetext width50 fl">单价(¥): <span class="base-color" v-text="item.price || '-'">21324</span></div>
+          </li>
+        </ul>
+      </div>
+    </div>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobile',
+    fetch({route, store}) {
+      return Promise.all([
+        store.dispatch('product/getLoadPurchaseId', {id:route.params.storeid}),
+        store.dispatch('product/getLoadLogistics', {count:30, page: 1})
+      ])
+    },
+    data () {
+      return {
+        remindText: '',
+        timeoutCount: 0,
+        storageList: {},
+        showLogistics: false,
+        allObj:{
+          logisticsInfo: {},
+          map: []
+        }
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus
+    },
+    mounted () {
+      console.log(this.$store.state.product.storage.detail.data)
+      let data = this.$store.state.product.storage.detail.data
+      this.storageList = data ? JSON.parse(JSON.stringify(this.$store.state.product.storage.detail.data)) : {}
+      let _this = this
+      document.body.onclick = function() {
+        _this.showLogistics = false
+      }
+    },
+    computed: {
+      logisticsCode () {
+        console.log('logistics', this.$store.state.product.storage.logistics.data)
+        return this.$store.state.product.storage.logistics.data
+      }
+    },
+    methods: {
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount++
+      },
+      setFilterType (type) {
+        let bound = ''
+        if(type === 'OTHER_INBOUND') {
+          bound = '其他入库'
+        } else if(type === 'OTHER_OUTBOUND'){
+          bound = '其他出库'
+        } else if (type === 'PURCHASE_INBOUND') {
+          bound = '采购入库'
+        } else if(type === 'SELL_OUTBOUND') {
+          bound = '销售出库'
+        } else {
+          bound = '全部类型'
+        }
+        return bound
+      },
+      ChangeSendCount (type, val) {
+        let newShipQty = type.shipQty ? type.shipQty : 0
+        if (val > type.number - newShipQty) {
+          this.onRemind('本次发货数量不能大于已剩数量')
+          val = type.number - newShipQty
+        }
+        type.qty = val
+      },
+      saveClick (type) {
+        if(type === 'clear') {
+          console.log('clear')
+          this.initData()
+        }else {
+          if(!this.allObj.logisticsInfo.companyName) {
+            this.onRemind('请先选择物流公司')
+          } else if(!this.allObj.logisticsInfo.number) {
+              this.onRemind('请先选择物流公司')
+          } else {
+            let arr = []
+            this.storageList.purchaseDetails.forEach(val => {
+              if(val.qty) {
+                arr.push({id: val.id, qty: val.qty})
+              }
+            })
+            if(arr.length <= 0) {
+              this.onRemind('最少填写一个发货数量')
+            } else {
+              this.allObj.map = arr
+              this.allObj.jsonSdAddress = this.storageList.jsonAddress
+              this.$http.post(`/trade/invoice/inFpu/save?id=${this.storageList.id}`, this.allObj)
+                .then(response => {
+                  if(response.data.code === 1){
+                    this.onRemind('保存信息成功')
+                  }
+                })
+            }
+          }
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  $base-color: #3f84f6;
+  $title-color: #ffa200;
+  $red-color: #ff0000;
+  #mobile-storage-center {
+    padding-bottom: .5rem;
+    margin: 0 auto;
+  }
+  .storage-record{
+    padding: 0.24rem 0.24rem;
+    margin: 0 auto;
+    .btn-click{
+      padding: 0.24rem 0.24rem;
+      position: fixed;
+      bottom: 1rem;
+      left: 0;
+      right: 0;
+      text-align: center;
+      span{
+        display:inline-block;
+        width:30%;
+        height: .6rem;
+        line-height: .6rem;
+        margin: 0 .1rem;
+        border-radius:.05rem;
+        &.clear{
+          color:#fafbfc;
+          background: #b5b5b5;
+        }
+        &.base-color{
+          color:#fff;
+          background: $base-color;
+        }
+      }
+    }
+    .storage-info{
+      position:relative;
+      padding: 0.24rem 0.24rem;
+      background: #fff;
+      margin-bottom:.2rem;
+      .logistics-line{
+        position:absolute;
+        top:2rem;
+        left:2rem;
+        z-index:100;
+        background: #fff;
+        input[type='text'] {
+          width: 3.59rem;
+          height: .56rem;
+          font-size: .24rem;
+          border-radius: .04rem;
+          border: 1px solid #d2d2d2;
+          padding: 0 .2rem;
+        }
+        input[readonly] {
+          background: url('/images/mobile/select-arrow.png') no-repeat;
+          background-size: .24rem .15rem;
+          background-position: 3.1rem .2rem;
+        }
+        .similar {
+          position: absolute;
+          left: 2.5rem;
+          border: 1px solid $base-color;
+          border-radius: .04rem;
+          top: .56rem;
+          width: 3.59rem;
+          background: #fff;
+          z-index: 1;
+          max-height: 3.96rem;
+          overflow-y: auto;
+          li {
+            height: .66rem;
+            line-height: .66rem;
+            padding: 0 .19rem;
+            font-size: .24rem;
+            &:active, &:focus {
+              background: #f7f7f7;
+            }
+          }
+        }
+      }
+    }
+    .linetext{
+      color:#666;
+      line-height: .6rem;
+      overflow: hidden;
+      -o-text-overflow: ellipsis;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      em{
+        color:$red-color;
+      }
+      input{
+        height: .5rem;
+        font-size: .24rem;
+        border-radius: .04rem;
+        border: 1px solid #d2d2d2;
+        padding: 0 .1rem;
+      }
+      span{
+        color:#333;
+        &.base-color{
+          color:$base-color;
+        }
+      }
+    }
+    .info-list{
+      position:relative;
+      padding: 0.3rem 0.24rem;
+      background: #fff;
+      margin-bottom:.2rem;
+      .width50{
+        display:inline-block;
+        width: 48%;
+        margin-left: .1rem;
+      }
+      >span{
+        display:inline-block;
+        position:absolute;
+        left:0;
+        top:0;
+        padding: 0 .1rem;
+        background: $title-color;
+        border-radius: 0 .5rem .5rem 0;
+        line-height: .3rem;
+        height:.3rem;
+        color:#fff;
+        font-size: .24rem;
+      }
+    }
+  }
+</style>
+

+ 3 - 1
pages/mobile/center/vendor/productdetails.vue

@@ -113,7 +113,9 @@
               />
               <label v-if="index !== chooseItem.prices.length - 1">-</label>
               <label v-if="index === chooseItem.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.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
+              <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.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
             </div>
             <div class="pull-right">
               <input v-show="chooseItem.currencyName === 'RMB'" class="priceM" type="text" placeholder="单价(¥)" v-model.lazy="item.rMBPrice" @blur="rMBPriceBlur(item)"/>

+ 35 - 21
pages/mobile/order/details.vue

@@ -663,25 +663,28 @@
                 // 选择发货地址
                 if (res.data[0]) {
                   this.sendGoodstype = 'add'
-                  if (item.inid) {
-                    this._id = EncryptionFilter(item.inid)
-                    this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-                      this.sendGoodsInfo = res.data[0]
-                      this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-                      this.showSend = true
-                    })
-                  } else {
-                    this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-                      this._id = EncryptionFilter(res.data.inId)
-                      this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-                        this.sendGoodsInfo = res.data[0]
-                        this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-                        this.showSend = true
-                      })
-                    }, err => {
-                      this.onMind('转出货单失败' + err.response.data)
-                    })
-                  }
+                  this.sendGoodsInfo = this.orderList
+                  this.sendGoodsInfo.area = JSON.parse(this.orderList.jsonAddress)
+                  this.showSend = true
+                  // if (item.inid) {
+                  //   this._id = EncryptionFilter(item.inid)
+                  //   this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                  //     this.sendGoodsInfo = res.data[0]
+                  //     this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                  //     this.showSend = true
+                  //   })
+                  // } else {
+                  //   this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
+                  //     this._id = EncryptionFilter(res.data.inId)
+                  //     this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                  //       this.sendGoodsInfo = res.data[0]
+                  //       this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                  //       this.showSend = true
+                  //     })
+                  //   }, err => {
+                  //     this.onMind('转出货单失败' + err.response.data)
+                  //   })
+                  // }
                 } else {
                   this.onMind('您还未填写设置发货地址 ,请进行完善')
                 }
@@ -731,6 +734,17 @@
               this.onMind('请输入正确的物流单号')
             } else {
               let sendInfo = this.getLogisticsInfo()
+              let _obj = []
+              for (let i = 0; i < this.sendGoodsInfo.purchaseDetails.length; i++) {
+                if (Math.abs(this.sendGoodsInfo.purchaseDetails[i].number) > 0) {
+                  let _id = this.sendGoodsInfo.purchaseDetails[i].id
+                  _obj.push({
+                    id: _id,
+                    qty: this.sendGoodsInfo.purchaseDetails[i].number - this.sendGoodsInfo.purchaseDetails[i].shipQty
+                  })
+                }
+              }
+              sendInfo.map = _obj
               this.$http.post(`/trade/inFpu/save?id=${this.sendGoodsInfo.id}`, sendInfo).then(res => {
                 if (res.data.success) {
                   this.onMind('发货成功')
@@ -924,7 +938,7 @@
         getLogisticsInfo(_type) {
           let sendInfo = {}
           sendInfo.sendType = this.sendGoodsInfo.sendType
-          sendInfo.jsonSdAddress = this.sendGoodsInfo.jsonSpAddress
+          sendInfo.jsonSdAddress = this.sendGoodsInfo.jsonSpAddress || this.sendGoodsInfo.jsonAddress
           sendInfo.logisticsInfo = {}
           if (this.peisongShowName) {
             sendInfo.logisticsInfo.companyName = this.peisongShowName
@@ -941,7 +955,7 @@
         },
         // 买家确认收货
         buyerGetGoods(item) {
-          this.$http.put(`/trade/order/simpleinfo/ones/${item.id}?_status=ensureaccept`).then(res => {
+          this.$http.put(`/trade/order/signReceive?id=${item.id}&_status=ensureaccept`).then(res => {
             this.onMind('确认收货成功')
             location.reload()
           })

+ 32 - 19
pages/mobile/order/index.vue

@@ -511,25 +511,27 @@
               // 选择发货地址
               if (res.data[0]) {
                 this.sendGoodstype = 'add'
-                if (item.inid) {
-                  this._id = EncryptionFilter(item.inid)
-                  this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-                    this.sendGoodsInfo = res.data[0]
-                    this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                // this.showSend = true
+                // if (item.inid) {
+                //   this._id = EncryptionFilter(item.inid)
+                  let _id = EncryptionFilter(item.purchaseid)
+                  this.$http.get(`/trade/purchase/purchaseId/${_id}`).then(res => {
+                    this.sendGoodsInfo = res.data.data
+                    this.sendGoodsInfo.area = JSON.parse(res.data.data.jsonAddress)
                     this.showSend = true
                   })
-                } else {
-                  this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
-                    this._id = EncryptionFilter(res.data.inId)
-                    this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
-                      this.sendGoodsInfo = res.data[0]
-                      this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
-                      this.showSend = true
-                    })
-                  }, err => {
-                    this.onMind('转出货单失败' + err.response.data)
-                  })
-                }
+                // } else {
+                //   this.$http.get(`/trade/purchase/vendor/tobeshiped/${item.id}`).then(res => {
+                //     this._id = EncryptionFilter(res.data.inId)
+                //     this.$http.get(`/trade/inFpu/tobeshipped/${this._id}`).then(res => {
+                //       this.sendGoodsInfo = res.data[0]
+                //       this.sendGoodsInfo.area = JSON.parse(res.data[0].jsonSpAddress)
+                //       this.showSend = true
+                //     })
+                //   }, err => {
+                //     this.onMind('转出货单失败' + err.response.data)
+                //   })
+                // }
               } else {
                 this.onMind('您还未填写设置发货地址 ,请进行完善')
               }
@@ -578,7 +580,18 @@
           } else if (!patt.test(this.sendGoodsInfo.kuaidinumber)) {
             this.onMind('请输入正确的物流单号')
           } else {
+            let _obj = []
             let sendInfo = this.getLogisticsInfo()
+            for (let i = 0; i < this.sendGoodsInfo.purchaseDetails.length; i++) {
+              if (Math.abs(this.sendGoodsInfo.purchaseDetails[i].number) > 0) {
+                let _id = this.sendGoodsInfo.purchaseDetails[i].id
+                _obj.push({
+                  id: _id,
+                  qty: this.sendGoodsInfo.purchaseDetails[i].number - this.sendGoodsInfo.purchaseDetails[i].shipQty
+                })
+              }
+            }
+            sendInfo.map = _obj
             this.$http.post(`/trade/inFpu/save?id=${this.sendGoodsInfo.id}`, sendInfo).then(res => {
               if (res.data.success) {
                 this.onMind('发货成功')
@@ -793,7 +806,7 @@
       getLogisticsInfo(_type) {
         let sendInfo = {}
         sendInfo.sendType = this.sendGoodsInfo.sendType
-        sendInfo.jsonSdAddress = this.sendGoodsInfo.jsonSpAddress
+        sendInfo.jsonSdAddress = this.sendGoodsInfo.jsonSpAddress || this.sendGoodsInfo.jsonAddress
         sendInfo.logisticsInfo = {}
         if (this.peisongShowName) {
           sendInfo.logisticsInfo.companyName = this.peisongShowName
@@ -818,7 +831,7 @@
       },
       // 买家确认收货
       buyerGetGoods(item) {
-        this.$http.put(`/trade/order/simpleinfo/ones/${item.id}?_status=ensureaccept`).then(res => {
+        this.$http.put(`/trade/order/signReceive?id=${item.id}&_status=ensureaccept`).then(res => {
           this.onMind('确认收货成功')
           this.ChangeList(this.activeType)
         })

BIN
static/images/mobile/openStore/pdf.png


+ 50 - 0
store/product.js

@@ -233,6 +233,56 @@ export const actions = {
   // 修改当前选择的对象,是否已关注
   UpdateCollectCode({commit}, params = {}) {
     commit('component/UpdateOne_PRODUCTINFO', {key: params.key, status: params.status})
+  },
+  // 获取出入库所有记录数据
+  getLoadStorageData({commit}, params = {}) {
+    commit('storage/REQUEST_LIST')
+    return axios.get('/CommodityInOutbound/page', {params: params})
+      .then(res => {
+        commit('storage/GET_LIST_SUCCESS', res.data)
+      }, err => {
+        commit('storage/GET_LIST_FAILURE', err)
+      })
+  },
+  // 获取出入库单条记录数据
+  getLoadStorageId({commit}, params = {}) {
+    commit('storage/REQUEST_DETAIL')
+    return axios.get('/CommodityInOutbound/id', {params: params})
+      .then(res => {
+        commit('storage/GET_DETAIL_SUCCESS', res.data.data)
+      }, err => {
+        commit('storage/GET_DETAIL_FAILURE', err)
+      })
+  },
+  // 获取销售出库所有记录数据
+  getLoadPurchaseData({commit}, params = {}) {
+    commit('storage/REQUEST_LIST')
+    return axios.get('/trade/purchase/status/createtime', {params: params})
+      .then(res => {
+        commit('storage/GET_LIST_SUCCESS', res.data)
+      }, err => {
+        commit('storage/GET_LIST_FAILURE', err)
+      })
+  },
+  // 获取出入库单条记录数据
+  getLoadPurchaseId({commit}, params = {}) {
+    commit('storage/REQUEST_DETAIL')
+    return axios.get('/trade/purchase/purchaseId/' + params.id)
+      .then(res => {
+        commit('storage/GET_DETAIL_SUCCESS', res.data.data)
+      }, err => {
+        commit('storage/GET_DETAIL_FAILURE', err)
+      })
+  },
+  // 获取出入库单条记录数据
+  getLoadLogistics({commit}, params = {}) {
+    commit('storage/REQUEST_LOGISTICS')
+    return axios.get('/kdn/logistics/page', { params })
+      .then(res => {
+        commit('storage/GET_LOGISTICS_SUCCESS', res.data)
+      }, err => {
+        commit('storage/GET_LOGISTICS_FAILURE', err)
+      })
   }
 }
 

+ 47 - 0
store/product/storage.js

@@ -0,0 +1,47 @@
+export const state = () => ({
+  list: {
+    fetching: false,
+    data: []
+  },
+  detail: {
+    fetching: false,
+    data:[]
+  },
+  logistics: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_LIST (state) {
+    state.list.fetching = true
+  },
+  GET_LIST_SUCCESS (state, result) {
+    state.list.fetching = false
+    state.list.data = result
+  },
+  GET_LIST_FAILURE (state) {
+    state.list.fetching = false
+  },
+  REQUEST_DETAIL (state) {
+    state.detail.fetching = true
+  },
+  GET_DETAIL_SUCCESS(state, result) {
+    state.detail.data = result
+    state.detail.fetching = false
+  },
+  GET_DETAIL_FAILURE(state) {
+    state.detail.fetching = false
+  },
+  REQUEST_LOGISTICS (state) {
+    state.logistics.fetching = true
+  },
+  GET_LOGISTICS_SUCCESS(state, result) {
+    state.logistics.data = result
+    state.logistics.fetching = false
+  },
+  GET_LOGISTICS_FAILURE(state) {
+    state.logistics.fetching = false
+  }
+}