瀏覽代碼

Merge remote-tracking branch 'origin/release-201827-wangcz' into release-201827-wangcz

yangc 7 年之前
父節點
當前提交
6b0224b7a6

+ 4 - 4
components/applyPurchase/BatchPublish.vue

@@ -138,10 +138,10 @@
               <table>
                 <thead>
                 <tr>
-                  <th width="214">卖家</th>
+                  <th width="350">卖家</th>
                   <th width="83">交期(天)</th>
                   <th width="104">单价</th>
-                  <th width="137">生产日期</th>
+                  <!--<th width="137">生产日期</th>-->
                   <th width="111">库存</th>
                   <th width="142">购买数量</th>
                   <th width="186">操作</th>
@@ -152,10 +152,10 @@
                 <table>
                   <tbody>
                   <tr v-for="(spotGoods, index) in spotGoodsData">
-                    <td width="214" v-text="spotGoods.storeName"></td>
+                    <td width="350" v-text="spotGoods.storeName"></td>
                     <td width="83" class="red-text" v-text="spotGoods.b2cMinDelivery + '-' + spotGoods.b2cMaxDelivery">4-6</td>
                     <td width="104" class="red-text" v-text="spotGoods.currencyName == 'RMB' ? '¥' + spotGoods.prices[0].rMBPrice: '$' + spotGoods.prices[0].uSDPrice"></td>
-                    <td width="137" v-text="spotGoods.produceDate"></td>
+                    <!--<td width="137" v-text="spotGoods.produceDate"></td>-->
                     <td width="111" v-text="spotGoods.reserve">21412</td>
                     <td width="142" class="input-number">
                       <div>

+ 1 - 0
components/applyPurchase/articleOne.vue

@@ -361,6 +361,7 @@
         return this.validObj.deadline
       },
       setDeadLineValid: function () {
+        if(this.applyObj.deadline === '') {return ''}
         this.applyObj.deadline = this.baseUtils.formatDate(this.baseUtils.getFullDay(new Date(this.applyObj.deadline)), 'yyyy-MM-dd hh:mm:ss')
         this.validObj.deadline = true
       },

+ 3 - 3
components/mobile/center/outOfStorage/StorageList.vue

@@ -2,7 +2,7 @@
   <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.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>
@@ -12,8 +12,8 @@
         </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>系统自动生成</span></div>
+        <div class="linetext">{{switchType === 'INBOUND' ? '发货单' : '订单号'}}: <span v-text="item.orderid || '-'">21324</span></div>
         <div class="linetext">{{switchType === 'INBOUND' ? '卖家名称' : '买家名称'}}: <span v-text="item.buyentername || item.buyerentername || item.buyername || '-'">21324</span></div>
         <div class="linetext">录入人: <span v-text="item.sellername || '-'">21324</span></div>
         <div class="linetext">录入时间: <span v-text="item.createtime ? baseUtils.formatDate(new Date(item.createtime), 'yyyy-MM-dd hh:mm:ss') : '-'">21324</span></div>

+ 61 - 18
components/mobile/center/outOfStorage/otherStorage.vue

@@ -23,11 +23,12 @@
         <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">库存数: <span v-text="item.erpReserve">21324</span></div>
         <div class="linetext width50 fl"><em>*</em>{{switchType === 'INBOUND' ? '入库数' : '出库数'}}(PCS): <span>
-          <input type="text" style="width:1rem;" v-model="item.qty" @input="onAmountInput(item, index)">
+          <input type="text" style="width:1.1rem;" v-model="item.qty" @input="onAmountInput(item, index)">
         </span></div>
-        <div class="linetext width50 fl">单价({{currency === 'RMB' ? '¥': '$'}}):<span>
-          <input type="text" style="width:2rem;" v-model="item.price" @blur="rMBPriceBlur(item, index)">
+        <div class="linetext width50 fl">{{switchType === 'INBOUND' ? '采购单价' : '销售单价'}}({{currency === 'RMB' ? '¥': '$'}}):<span>
+          <input type="text" style="width:1.2rem;" v-model="item.price" @blur="rMBPriceBlur(item, index)">
         </span></div>
         <div class="content-line" v-show="item.showSimilarCodeList && item.cmpCode">
           <ul class="similar">
@@ -145,12 +146,23 @@
               if(response.data.length > 0){
                 this.similarCode = response.data
               } else {
-                this.onRemind('没有找到产品信息')
+                this.similarCode = []
+                this.allObj[type].cmpCode = ''
+                this.allObj[type].brand = ''
+                this.allObj[type].pcmpcode = ''
+                this.allObj[type].spec = ''
+                this.allObj[type].productId = ''
+                this.onRemind('产品库中没有找到相应产品信息')
               }
               this.allObj[type].showSimilarCodeList = response.data.length > 0
             }).catch((err) => {
               this.similarCode = []
-              this.onRemind('没有找到产品信息')
+              this.allObj[type].cmpCode = ''
+              this.allObj[type].brand = ''
+              this.allObj[type].pcmpcode = ''
+              this.allObj[type].spec = ''
+              this.allObj[type].productId = ''
+              this.onRemind('产品库中没有找到相应产品信息')
             })
         } else {
           this.allObj[type].showSimilarCodeList = false
@@ -162,7 +174,11 @@
         this.allObj[type].pcmpcode = data.kind
         this.allObj[type].spec = data.spec
         this.allObj[type].productId = data.id
+        this.allObj[type].erpReserve = data.erpReserve
         this.allObj[type].showSimilarCodeList = false
+        if(data.erpReserve <= 0 && this.switchType === 'OUTBOUND') {
+          this.onRemind('当前产品库存为0,不能出库!')
+        }
       },
       addClick (type) {
         if(type) {
@@ -191,7 +207,7 @@
           }
           this.allObj[index].qty = this.baseUtils.cutOutString(item.qty, chineseIndex)
         } else if (item.qty.length > 9) {
-          this.onRemind ('数量不能高于1亿')
+          this.onRemind ('数量不能高于10亿')
           this.allObj[index].qty = this.baseUtils.cutOutString(item.qty, 9)
         }
       },
@@ -230,24 +246,50 @@
           this.initData()
         }else {
           let arr = []
-          let falg = false;
+          let flag = 0;
           this.allObj.forEach(val => {
             if(val.productId) {
-              if(!val.price && !val.qty) {
-                this.onRemind('请将数据补充完整')
+              if((val.erpReserve <= 0) && this.switchType === 'OUTBOUND'){
+                flag = 1
+              } else if((val.erpReserve < val.qty) && this.switchType === 'OUTBOUND') {
+                flag = 2
+              } else if(val.qty) {
+                val.price ?
+                  arr.push({price: Number(val.price), productId: val.productId, qty:Number(val.qty)}) :
+                  arr.push({productId: val.productId, qty:Number(val.qty)})
+              } else {
+                flag = 3
               }
-              falg = true;
-              arr.push({price: val.price, productId: val.productId, qty:val.qty})
             }
           })
-          if(falg) {
-            this.$http.post(`/CommodityInOutbound/${this.switchType === 'INBOUND'? 'inBound': 'outBound'}/other?enName=${this.enName}`, arr)
-              .then(response => {
-                if(response.data.code === 1){
-                  this.onRemind('保存信息成功')
-                }
-              })
+          if(flag === 1) {
+            this.onRemind('产品库中库存数量为0将不能出库!')
+            return;
+          }
+          if(flag === 2) {
+            this.onRemind('出库量数量不能大于库存数!')
+            return;
+          }
+          if(flag === 3) {
+            this.onRemind('请填写数量!')
+            return;
+          }
+          if(arr.length <= 0) {
+            this.onRemind('至少填写一条数据!')
+            return;
           }
+          this.$http.post(`/CommodityInOutbound/${this.switchType === 'INBOUND'? 'inBound': 'outBound'}/other?enName=${this.enName}`, arr)
+            .then(response => {
+              if(response.data.code === 1){
+                this.onRemind('保存信息成功')
+                this.initData()
+              } else {
+                this.onRemind(response.data)
+              }
+            })
+            .catch(err => {
+              this.onRemind('保存信息失败')
+            })
         }
       }
     }
@@ -266,6 +308,7 @@
       bottom: 1rem;
       left: 0;
       right: 0;
+      z-index:100;
       text-align: center;
       span{
         display:inline-block;

+ 51 - 21
components/mobile/center/upoff-material.vue

@@ -96,7 +96,7 @@
                       <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"
+                             v-model.lazy.trim="item.start"
                              :disabled="index === 0" :readonly="index === 0"
                              @blur="startpriceBlur(item, index)" maxlength="9"
                       />
@@ -115,14 +115,14 @@
                              class="priceM" type="text"
                              placeholder="单价(¥)"
                              v-model.lazy="item.rMBPrice"
-                             @blur="rMBPriceBlur(item)"/>
+                             @blur="rMBPriceBlur(item, 'rMBPrice')"/>
                       <input v-show="chooseItem.currencyName !== 'RMB'"
                              class="priceM" type="text"
                              placeholder="单价($)"
-                             v-model.lazy="item.rMBPrice"
-                             @blur="rMBPriceBlur(item)"/>
+                             v-model.lazy="item.uSDPrice"
+                             @blur="rMBPriceBlur(item, 'uSDPrice')"/>
                       <span @click="miuPrice(index)" class="clearfix"><img class="pull-left" src="/images/mobile/product/mui_icon.png"/></span>
-                      <span @click="addPrice()" class="clearfix"><img  class="pull-left"src="/images/mobile/product/add_icon.png"/></span>
+                      <span @click="addPrice()" class="clearfix"><img class="pull-left" src="/images/mobile/product/add_icon.png"/></span>
                     </div>
                   </div>
                 </li>
@@ -147,6 +147,10 @@
         chooseItem: {
           type: Object,
           default: {}
+        },
+        firstPrice: {
+          type: String,
+          default: ''
         }
       },
       computed: {
@@ -161,7 +165,7 @@
           ShowShopshelfOff: false,
           showDrop: false,
           storeObj: ['寄售', '自营'],
-          showUpoff: false
+          showUpoff: false,
         }
       },
       methods: {
@@ -203,7 +207,12 @@
                 this.collectResult = '分段数量必须填写'
                 isHas = true
                 break
-              }  else if (Math.abs(this.chooseItem.goods.prices[i].rMBPrice) <= 0) {
+              } else if (Math.abs(this.chooseItem.goods.prices[i].rMBPrice) <= 0 && this.storeInfoStore.enType !== 'HK') {
+                this.timeoutCount++
+                this.collectResult = '单价必须是大于0的数字'
+                isHas = true
+                break
+              } else if (Math.abs(this.chooseItem.goods.prices[i].uSDPrice) <= 0 && this.storeInfoStore.enType === 'HK') {
                 this.timeoutCount++
                 this.collectResult = '单价必须是大于0的数字'
                 isHas = true
@@ -213,7 +222,12 @@
                 this.collectResult = '分段数量必须是正整数'
                 isHas = true
                 break
-              } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.goods.prices[i].rMBPrice)) {
+              } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.goods.prices[i].rMBPrice) && this.storeInfoStore.enType !== 'HK') {
+                this.timeoutCount++
+                this.collectResult = '单价只能输入数字'
+                isHas = true
+                break
+              } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.goods.prices[i].uSDPrice) && this.storeInfoStore.enType === 'HK') {
                 this.timeoutCount++
                 this.collectResult = '单价只能输入数字'
                 isHas = true
@@ -236,6 +250,12 @@
             }
           }
           this.chooseItem.goods.prices[this.chooseItem.goods.prices.length - 1].end = '9999999999'
+          // if (this.storeInfoStore.enType === 'HK') {
+          //   for (let i = 0; i < this.chooseItem.goods.prices.length; i++) {
+          //     this.chooseItem.goods.prices[i].uSDPrice = this.chooseItem.goods.prices[i].rMBPrice
+          //     this.chooseItem.goods.prices[i].uSDNTPrice = ''
+          //   }
+          // }
           this.$http.put('/trade/goods', this.chooseItem.goods).then(res => {
             if (res.data.success) {
               this.timeoutCount++
@@ -262,7 +282,7 @@
             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) {
+          } else if ((!this.chooseItem.goods.breakUp && this.chooseItem.goods.minBuyQty) && this.chooseItem.goods.minBuyQty % this.chooseItem.minPackQty !== 0) {
             this.timeoutCount++
             this.collectResult = '不可拆卖时,起订量必须是包装数量的倍数'
             if (!this.chooseItem.minPackQty) {
@@ -275,7 +295,11 @@
               }
             }
           }
-          this.chooseItem.goods.prices[0].start = this.chooseItem.goods.minBuyQty
+          if (Number(this.firstPrice) <= Number(this.chooseItem.goods.minBuyQty)) {
+            this.chooseItem.goods.prices[0].start = this.firstPrice
+          } else {
+            this.chooseItem.goods.prices[0].start = this.chooseItem.goods.minBuyQty
+          }
         },
         changeautoPublish() {
           this.chooseItem.goods.autoPublish = !this.chooseItem.goods.autoPublish
@@ -327,27 +351,27 @@
           }
         },
         // 单价失去焦点
-        rMBPriceBlur(item) {
-          if (item.rMBPrice === '' || !item.rMBPrice) { return false }
-          if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(item.rMBPrice)) {
+        rMBPriceBlur(item, key) {
+          if (item[key] === '' || !item[key]) { return false }
+          if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(item[key])) {
             this.timeoutCount++
             this.collectResult = '单价只能输入数字带6位小数'
-          } else if (Math.abs(item.rMBPrice) === 0) {
+          } else if (Math.abs(item[key]) === 0) {
             return false
-          } else if (Math.abs(item.rMBPrice) >= 10000) {
+          } else if (Math.abs(item[key]) >= 10000) {
             this.timeoutCount++
-            item.rMBPrice = 9999
+            item[key] = 9999
             this.collectResult = '单价不能高于10000'
             return false
           }
-          item.rMBPrice = item.rMBPrice.toString()
-          let splits = item.rMBPrice.split('.')
+          item[key] = item[key].toString()
+          let splits = item[key].split('.')
           if (splits[0].length >= 4) {
             splits[0] = splits[0].substr(0, 4)
-            item.rMBPrice = splits[0]
+            item[key] = splits[0]
           }
           if (splits[1]) {
-            item.rMBPrice = splits[0] + '.' + splits[1]
+            item[key] = splits[0] + '.' + splits[1]
           }
           if (splits[1] && splits[1].length > 6) {
             splits[1] = splits[1].substr(0, 7)
@@ -356,7 +380,7 @@
               str = splits[1].substr(0, 6)
               str = Math.abs(str) + 1
             }
-            item.rMBPrice = splits[0] + '.' + Math.ceil(str)
+            item[key] = splits[0] + '.' + Math.ceil(str)
           }
         },
         addPrice() {
@@ -373,6 +397,8 @@
             end: '',
             rMBNTPrice: '',
             rMBPrice: '',
+            uSDNTPrice: '',
+            uSDPrice: '',
             start: ''
           })
         },
@@ -380,21 +406,25 @@
           if (index === 0) {
             if (this.chooseItem.goods.prices.length === 3) {
               this.chooseItem.goods.prices[0].rMBPrice = this.chooseItem.goods.prices[1].rMBPrice
+              this.chooseItem.goods.prices[0].uSDPrice = this.chooseItem.goods.prices[1].uSDPrice
               this.chooseItem.goods.prices[0].end = this.chooseItem.goods.prices[1].end
               this.chooseItem.goods.prices[1].start = this.chooseItem.goods.prices[2].start
               this.chooseItem.goods.prices[1].rMBPrice = this.chooseItem.goods.prices[2].rMBPrice
+              this.chooseItem.goods.prices[1].uSDPrice = this.chooseItem.goods.prices[2].uSDPrice
               this.chooseItem.goods.prices[1].end = '9999999999'
               this.chooseItem.goods.prices.splice(2, 1)
             } else {
               index++
               if (this.chooseItem.goods.prices.length === 1) return
               this.chooseItem.goods.prices[0].rMBPrice = this.chooseItem.goods.prices[1].rMBPrice
+              this.chooseItem.goods.prices[0].uSDPrice = this.chooseItem.goods.prices[1].uSDPrice
               this.chooseItem.goods.prices[0].end = '9999999999'
               this.chooseItem.goods.prices.splice(index, 1)
             }
           } else if (index === 1) {
             if (this.chooseItem.prices.goods.length === 3) {
               this.chooseItem.goods.prices[1].rMBPrice = this.chooseItem.goods.prices[2].rMBPrice
+              this.chooseItem.goods.prices[1].uSDPrice = this.chooseItem.goods.prices[2].uSDPrice
               this.chooseItem.goods.prices[1].end = '9999999999'
               this.chooseItem.goods.prices.splice(2, 1)
             } else {

+ 23 - 1
components/mobile/register-saler/register/StepThird.vue

@@ -247,6 +247,22 @@
               </div>
             </div>
             <!--经销商 end-->
+            <!--主营产品 begin-->
+            <div role="tabpanel" class="tab-pane">
+              <div class="row com_row">
+                <div class="custom_col">
+                  <div class="wrap-title"><span class="line"></span>主营产品</div>
+                  <div class="" style="margin: 0 0.25rem">
+                    <textarea v-model="description"
+                              rows="5"
+                              maxlength="500"
+                              class="form-control"
+                              placeholder="例:本店主营Panasonic、IT、三星等知名品牌的触控IC、显示驱动IC、液晶屏、功率模块类、电源芯片、高压熔断、被动器件等产品。"></textarea>
+                  </div>
+                </div>
+              </div>
+            </div>
+            <!--主营产品 end-->
           </div>
           <!-- Submit button -->
          <!-- <div style="padding: 28px 40px;">
@@ -339,7 +355,8 @@
         isSelfRegisterSuccess: true,
         selectFlag: 'open',
         showLoading: false,
-        btnDisabled: false
+        btnDisabled: false,
+        description: ''
       }
     },
     props: [
@@ -530,6 +547,10 @@
           this.collectResult = '请上传营业执照'
           this.timeoutCount++
           this.showLoading = false
+        } else if (this.description === '') {
+          this.collectResult = '请填写主营产品信息'
+          this.timeoutCount++
+          this.showLoading = false
         } else {
           if (this.brands[0].name === '') {
             validCode = 1
@@ -566,6 +587,7 @@
             })
             // 申请开店
             this.$http.post('/store-service/applications', {
+              applyDescription: this.description,
               brands: tmpBrands,
               qualifications: qualifications,
               type: this.tab

+ 1 - 1
components/search/ForwardGoodsList.vue

@@ -5,7 +5,7 @@
         <tr>
           <th width="25%">型号/品牌</th>
           <th width="25%">卖家名称</th>
-          <th width="25%">物料名称/单位</th>
+          <th width="25%">物料名称/库存(PCS)</th>
           <th width="15%">规格</th>
           <th width="15%"></th>
         </tr>

+ 14 - 12
pages/mobile/center/user/invoice/index.vue

@@ -20,12 +20,12 @@
             <div class="mi-list-bottom clearfix">
               <div class="list clearfix">
                 <div class="pull-left">发票抬头:</div>
-                <div class="pull-left overhidden" style="width: 1.85rem">{{item.head}}</div>
+                <div class="pull-left overhidden">{{item.head}}</div>
               </div>
               <div class="list clearfix">
                 <div class="clearfix">
                   <div class="pull-left">收票人:</div>
-                  <div class="pull-left overhidden" style="width:2.1rem">{{item.name}}</div>
+                  <div class="pull-left overhidden">{{item.name}}</div>
                 </div>
               </div>
               <div class="list clearfix">
@@ -38,7 +38,7 @@
               <div class="list ">
                 <div class="clearfix">
                   <div class="pull-left">收票地址:</div>
-                  <div class="pull-left" style="width: 5rem;">
+                  <div class="pull-left overhidden">
                     {{item.detailAddress}}
                   </div>
                 </div>
@@ -57,12 +57,12 @@
               <div class="mi-list-bottom clearfix">
                 <div class="list clearfix">
                   <div class="pull-left">发票抬头:</div>
-                  <div class="pull-left overhidden" style="width: 1.85rem">{{item.head}}</div>
+                  <div class="pull-left overhidden">{{item.head}}</div>
                 </div>
                 <div class="list" >
                   <div class="clearfix">
                     <div class="pull-left">单位电话:</div>
-                    <div class="pull-left overhidden" style="width: 4.6rem;">
+                    <div class="pull-left overhidden">
                       {{item.companyPhone || '-'}}
                     </div>
                   </div>
@@ -71,7 +71,7 @@
                 <div class="list">
                   <div class="clearfix">
                     <div class="pull-left">单位地址:</div>
-                    <div class="pull-left overhidden" style="width: 4.6rem;">
+                    <div class="pull-left overhidden">
                       {{item.companyAddress || '-'}}
                     </div>
                   </div>
@@ -80,7 +80,7 @@
                 <div class="list">
                   <div class="clearfix">
                     <div class="pull-left">税务登记号:</div>
-                    <div class="pull-left overhidden" style="width: 4.8rem;">
+                    <div class="pull-left overhidden" style="width: 4.5rem;">
                       {{item.companyTaxNumber || '-'}}
                     </div>
                   </div>
@@ -89,7 +89,7 @@
                 <div class="list">
                   <div class="clearfix">
                     <div class="pull-left">开户银行名称:</div>
-                    <div class="pull-left overhidden" style="width: 4.6rem;">
+                    <div class="pull-left overhidden" style="width: 4.4rem;">
                       {{item.bankName || '-'}}
                     </div>
                   </div>
@@ -98,7 +98,7 @@
                 <div class="list">
                   <div class="clearfix">
                     <div class="pull-left">开户银行账户:</div>
-                    <div class="pull-left overhidden" style="width: 4.6rem;">
+                    <div class="pull-left overhidden" style="width: 4.4rem;">
                       {{item.bankAccount || '-'}}
                     </div>
                   </div>
@@ -106,7 +106,7 @@
                 <div class="list clearfix">
                   <div class="clearfix">
                     <div class="pull-left">收票人:</div>
-                    <div class="pull-left overhidden" style="width:2.1rem">{{item.name}}</div>
+                    <div class="pull-left overhidden">{{item.name}}</div>
                   </div>
                 </div>
                 <div class="list">
@@ -119,7 +119,7 @@
                 <div class="list ">
                   <div class="clearfix">
                     <div class="pull-left">收票地址:</div>
-                    <div class="pull-left" style="width: 5rem;">
+                    <div class="pull-left overhidden">
                       {{item.detailAddress}}
                     </div>
                   </div>
@@ -594,7 +594,9 @@
             line-height: 0.55rem;
           }
           .overhidden {
-            @include overFlowHidden()
+            width:75%;
+            word-wrap: break-word;
+            word-break: break-all;
           }
           .w50 {
             width: 50%;

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

@@ -595,7 +595,7 @@
           this.validBankAccountObj.number = false
         }
         if (this.validBankAccountObj.number) {
-          this.$http.get('/trade/bankInfo/number/count', {params: {type: 1061, number: this.bankAccountObj.number}}).then(res => {
+          this.$http.get('/trade/bankInfo/number/count', {params: {accountType: 'PAY_TYPE', number: this.bankAccountObj.number,type:1061}}).then(res => {
             if (res.data.success) {
               this.validBankAccountObj.number = res.data.data === 0
             } else {

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

@@ -20,10 +20,10 @@
             <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>
-          </nuxt-link>
+          <!--<nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=onLine">-->
+            <!--<img src="/images/mobile/center/vendor/onsale.png" alt="">-->
+            <!--<p>在售产品</p>-->
+          <!--</nuxt-link>-->
         </ul>
       </div>
       <div class="block-wrap seek-operation">

+ 28 - 13
pages/mobile/center/vendor/material.vue

@@ -106,7 +106,7 @@
                     <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>
+                      <div v-else>${{price.uSDPrice}}</div>
                     </li>
                   </template>
                   <template v-else>
@@ -134,7 +134,7 @@
     <div class="update-materiel" v-show="showMateriel">
       <div class="mobile-nav">
         <div class="mobile-header mobile-center-header">
-          <a @click="showMateriel = false"><i class="iconfont icon-fanhui"></i></a>
+          <a @click="showMateriel = false; showdropmenu(' ')"><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}}
@@ -205,7 +205,7 @@
               <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"/>
+                  <input type="number" placeholder="请输入最小包装数" v-model="MaterielItem.minPackQty" maxlength="6" oninput="if(value.length>6)value=value.slice(0,6)"/>
                   <i class="iconfont icon-guanbi1" @click.stop="MaterielItem.minPackQty = ''"></i>
                 </div>
               </div>
@@ -240,8 +240,8 @@
                   <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.stop="update" accept=".pdf" /></div>
-
+                <div class="uploadImgBtn pull-left" v-if="MaterielItem.standard !== 1">上传规格书<input type="file" class="com-input" @change.stop="update" accept=".pdf" /></div>
+                <div style="color: #ea0f42;font-size: 0.2rem;line-height: 0.47rem;margin-left: 0.2rem" class="pull-left" v-if="MaterielItem.standard !== 1 && MaterielItem.Regulpic !== ''" >该规格书正在审核中</div>
               </div>
 
               <div class="update-materiel-wrapper-list clearfix">
@@ -272,7 +272,7 @@
 
     <!-- 物料上下架 -->
     <div>
-      <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial">
+      <upoff-material ref="upoffMaterial" :chooseItem="MaterielItem" @upoffMaterial="upoffMaterial" :firstPrice="firstPrice">
 
       </upoff-material>
     </div>
@@ -310,7 +310,8 @@
         similarBrand: [],
         similarCode: [],
         packObj: ['Bulk-散装', 'Reel-卷装', 'Tape/Reel-编带', 'Tray-盘装', 'Tube-管装', '盒装', '袋装', '罐装', '瓶装', '桶装', '箱装', '其他'],
-        showDrop: ''
+        showDrop: '',
+        firstPrice: ''
       }
     },
     created() {
@@ -413,11 +414,11 @@
       },
       // 编辑上架
       toAddpro(item, index) {
-        if (item.erpReserve === '' || item.erpReserve === 0 || !item.erpReserve) {
-          this.setRemindText(`当前物料库存为0,请先入库`)
-          return false
-        }
-        if (item.minPackQty === '' || item.minPackQty === 0 || !item.erpReserve) {
+        // if (item.erpReserve === '' || item.erpReserve === 0 || !item.erpReserve) {
+        //   this.setRemindText(`当前物料库存为0,请先入库`)
+        //   return false
+        // }
+        if (item.minPackQty === '' || item.minPackQty === 0 || !item.minPackQty) {
           this.setRemindText(`请先编辑物料,最小包装数选项`)
           return false
         }
@@ -441,6 +442,7 @@
             minBuyQty: 1
           })
         }
+        this.firstPrice =  this.MaterielItem.goods.prices[0].start.toString()
         let rf = document.body.offsetHeight // 触发浏览器重绘
         // console.log(item)
         this.$refs.upoffMaterial.show()
@@ -452,6 +454,10 @@
           this.setRemindText(`上传文件不得超过1M`)
           return false
         }
+        if (file.type.indexOf('gif') > -1) {
+          this.setRemindText(`不允许上传gif`)
+          return false
+        }
         let param = new FormData()
         param.append('file', file, file.name)
         param.append('chunk', '0')
@@ -471,6 +477,10 @@
           this.setRemindText(`上传文件不得超过20M`)
           return false
         }
+        if (file.type.indexOf('pdf') < 0) {
+          this.setRemindText(`规格书只允许上传pdf文件`)
+          return false
+        }
         let param = new FormData()
         param.append('file', file, file.name)
         param.append('chunk', '0')
@@ -507,6 +517,7 @@
             this.MaterielItem[_key2[i]] = this.$item[_key1[i]]
           }
           this.showMateriel = false
+          this.showDrop = ''
           return
         }
         if (this.MaterielItem.pbranden === '') {
@@ -535,7 +546,11 @@
           packaging: this.MaterielItem.packaging, // 包装
           minPackQty: this.MaterielItem.minPackQty // 最小包装数
         }
-        this.$http.post(`/trade/products/update/product?attachUrl=${item.url}`, item).then(res => {
+        let _url = item.url
+        if (this.MaterielItem.standard === 1) {
+          _url = ''
+        }
+        this.$http.post(`/trade/products/update/product?attachUrl=${_url}`, item).then(res => {
           if (res.data.success) {
             this.setRemindText('修改成功')
             this.showMateriel = false

+ 10 - 44
pages/mobile/center/vendor/outOfStorage/index.vue

@@ -14,7 +14,7 @@
         <div class="storage-record">
           <div class="search-content clearfix">
             <div class="search">
-              <input type="text" v-model="filterParams.keyword" :placeholder="switchType ==='OUTBOUND' ? '订单号/买家名称' : (handleItem === 0 ? '入库单/卖家名称':'发货单/卖家名称')" class="staff-search" @keyup.13="filterRecord">
+              <input type="text" v-model="filterParams.keyword" :placeholder="switchType ==='OUTBOUND' ? (handleItem === 0 ? '出库单号/买家名称':'订单号/买家名称') : (handleItem === 0 ? '入库单/卖家名称':'发货单/卖家名称')" class="staff-search" @keyup.13="filterRecord">
               <span @click="filterRecord"><i class="iconfont icon-sousuo"></i></span>
             </div>
           </div>
@@ -23,7 +23,7 @@
             <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">
+          <div class="filters-wrap" v-show="handleItem !== 1">
             <base-filter
               v-for="filterOption in filterOptions"
               :key="filterOption.selectOption"
@@ -35,8 +35,8 @@
             </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>
+            <storage-list :listData="storageList" :switchType="switchType" :handleItem="handleItem" v-if="handleItem !== 1"></storage-list>
+            <other-storage :switchType="switchType" v-else></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>
@@ -103,51 +103,17 @@
     created () {
       this.switchType = this.$route.query.type ? this.$route.query.type : 'INBOUND'
       this.handleItem = this.$route.query.handleItem ? Number(this.$route.query.handleItem) : 0
-      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
-      if(this.handleItem === 0) {
-        this.$store.dispatch('product/getLoadStorageData', {
-          count: 10,
-          page: 1,
-          fromDate: fromDate,
-          toDate: toDate,
-          type: this.switchType
-        })
-      } else if(this.handleItem === 2) {
-        if(this.switchType === 'INBOUND') {
-          this.filterParams.type = null
-          this.$store.dispatch('product/getLoadEnterpriseData', {
-            count: 10,
-            page: 1,
-            fromDate: fromDate,
-            toDate: toDate
-          })
-        } else if(this.switchType === 'OUTBOUND'){
-          this.$store.dispatch('product/getLoadPurchaseData', {
-            count: 10,
-            page: 1,
-            startMils: fromDate,
-            endMils: toDate,
-            type: this.switchType,
-            sorting: {"createtime":"DESC"},
-            status: '502-406'
-          })
-        } else {
-          this.$router.push('/mobile/center/vendor/outOfStorage?providerType=person')
-        }
-      } else {
-        this.$router.push('/mobile/center/vendor/outOfStorage?providerType=person')
-      }
     },
     watch: {
       'storageData': {
         handler: function (val) {
           if (val && val.content) {
-            this.storageList = val.content
-            this.isChange = false
+            if(this.isChange){
+              this.storageList = val.content
+              this.isChange = false
+            }
+            this.storageList = [...this.storageList, ...val.content]
           }
-          this.storageList = [...this.storageList, ...val.content]
         }
       }
     },
@@ -162,7 +128,7 @@
         return this.allStorageData.fetching
       },
       allPage () {
-        return this.allStorageData.totalPages
+        return this.storageData.totalPages
       },
       isEmpty () {
         return this.storageList.length === 0

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

@@ -71,7 +71,7 @@
               <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>
+            <div class="linetext width50 fl">单价(¥): <span class="base-color" v-text="item.taxUnitprice || '-'">21324</span></div>
           </li>
         </ul>
       </div>
@@ -175,14 +175,23 @@
             if(arr.length <= 0) {
               this.onRemind('最少填写一个发货数量')
             } else {
+              console.log(type)
+              this.allObj.sendType = this.storageList.sendType
               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('保存信息成功')
+                    setTimeout(() => {
+                      this.$router.push(`/mobile/center/vendor/outOfStorage?providerType=person&handleItem=2&type=${this.$route.query.type}`)
+                    }, 1000)
+                  } else {
+                    this.onRemind('保存信息失败')
                   }
-                })
+                }).catch(err => {
+                  this.onRemind('保存信息失败')
+              })
             }
           }
         } else if(type === 'INBOUND') {
@@ -190,7 +199,14 @@
             .then(response => {
               if(response.data.code === 1){
                 this.onRemind('保存信息成功')
+                setTimeout(() => {
+                  this.$router.push(`/mobile/center/vendor/outOfStorage?providerType=person&handleItem=2&type=${this.$route.query.type}`)
+                }, 1000)
+              } else {
+                this.onRemind('保存信息失败')
               }
+            }).catch(err => {
+              this.onRemind('保存信息失败')
             })
         }
       }

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

@@ -607,7 +607,7 @@
           this.validBankAccountObj.number = false
         }
         if (this.validBankAccountObj.number) {
-          this.$http.get('/trade/bankInfo/number/count', {params: {type: 1061, number: this.bankAccountObj.number}}).then(res => {
+          this.$http.get('/trade/bankInfo/number/count', {params: {accountType: 'RECEIVE_TYPE', number: this.bankAccountObj.number, type:1063}}).then(res => {
             if (res.data.success) {
               if (res.data.data === 0) {
                 this.validBankAccountObj.number = true

+ 1 - 1
pages/mobile/order/index.vue

@@ -587,7 +587,7 @@
                 let _id = this.sendGoodsInfo.purchaseDetails[i].id
                 _obj.push({
                   id: _id,
-                  qty: this.sendGoodsInfo.purchaseDetails[i].number - this.sendGoodsInfo.purchaseDetails[i].shipQty
+                  qty: this.sendGoodsInfo.purchaseDetails[i].number - (this.sendGoodsInfo.purchaseDetails[i].shipQty || 0)
                 })
               }
             }

+ 1 - 1
store/index.js

@@ -110,7 +110,7 @@ export const actions = {
   },
   // 获取币别信息
   loadCurrencyData ({commit}) {
-    return axios.get('basic/enterprise/currency')
+    return axios.get('/basic/enterprise/currency')
       .then(res => {
         commit('option/SET_CURRENCY', res.data)
       })

+ 1 - 1
store/option.js

@@ -137,7 +137,7 @@ export const mutations = {
     state.wechatInfo.fetching = false
   },
   SET_CURRENCY (state, result) {
-    state.currency = result.data ? result.data.data : 'RMB'
+    state.currency = result.data || 'RMB'
   },
   GET_MESSAGETYPE (state, result) {
     state.messageType = result || ''