wangcz 7 rokov pred
rodič
commit
b703b5cc3c

+ 2 - 92
pages/mobile/center/user/seek_btob_details.vue

@@ -15,11 +15,7 @@
         </div>
         <div class="item clearfix">
           <span class="name fl">收货地址:</span>
-          <span class="fl" style="width: 5.2rem">{{listInfo.inquiry.ship}}</span>
-        </div>
-        <div class="item clearfix">
-          <span class="name fl">联系电话:</span>
-          <span class="fl" style="width: 5.2rem">{{listInfo.inquiry.enterprise && listInfo.inquiry.enterprise.enTel}}</span>
+          <span class="fl" style="width: 5.2rem">{{listInfo.inquiry.enterprise && listInfo.inquiry.enterprise.enAddress}}</span>
         </div>
         <div class="item">
           <span class="name">单据:</span>
@@ -45,10 +41,6 @@
           <span class="name">询价类型:</span>
           {{listInfo.inquiry.inquirytype || '无'}}
         </div>
-        <!--<div class="item">-->
-          <!--<span class="name">金额:</span>-->
-          <!--{{listInfo.sum}}-->
-        <!--</div>-->
       </div>
       <div class="orderbtob_details_middle">
         <div class="list">
@@ -84,25 +76,16 @@
                   <input type="number" v-model="item.price" readonly/>
                 </div>
               </li>
-              <!--<div class="posixicon"  v-if="active === 'todo'">-->
-                <!--<i class="iconfont icon-add" @click="addItem()"></i>-->
-                <!--<i class="iconfont icon-minus" @click="deleteItem()"></i>-->
-              <!--</div>-->
             </ul>
             <div style="clear:both"></div>
-            <!--<div class="replayBtn" @click="Replay(item)" v-if="active === 'todo'">-->
-              <!--报价-->
-            <!--</div>-->
           </div>
         </div>
       </div>
     </div>
-    <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 
 <script>
-  import { RemindBox } from '~components/mobile/common'
   export default {
     name: 'user_seek_btob_details',
     layout: 'mobileActivity',
@@ -117,78 +100,13 @@
             price: ''
           }],
           product: {}
-        },
-        token: '',
-        collectResult: '',
-        timeoutCount: 0
+        }
       }
     },
     created() {
       this.getInitInfo()
-      this._getToken()
     },
     methods: {
-      addItem() {
-        this.listInfo.replies.push({
-          lapQty: '',
-          price: ''
-        })
-      },
-      deleteItem() {
-        if (this.listInfo.replies.length === 1) {
-          return
-        }
-        this.listInfo.replies.splice(this.listInfo.replies.length - 1, 1)
-      },
-      Replay() {
-        if (this.listInfo.leadtime === '') {
-          this._iniFo('交货周期不能为空')
-          return
-        } else if (this.listInfo.minOrderQty === '') {
-          this._iniFo('最小起订量不能为空')
-          return
-        } else if (this.listInfo.minPackQty === '') {
-          this._iniFo('最小包装不能为空')
-          return
-        }
-        let replies = []
-        // 判断分段数是否合法
-        let valid = true
-        let validLapQty = 0
-        let _listInfo = this.listInfo
-        this.listInfo.replies.forEach(function (r, i) {
-          if ((i > 0 ? r.lapQty : 1) || r.price) {
-            replies.push(r)
-          }
-          // 直接比较是字符串比较,需要先转换再比较  2017年9月7日 15:05:51
-          if (i > 0 && parseInt(r.lapQty) <= parseInt(_listInfo.replies[i - 1].lapQty) || r.lapQty == null) {
-            valid = false
-            validLapQty = r.lapQty
-          }
-        })
-        if (!valid) {
-          if (validLapQty) {
-            this._iniFo('分段' + validLapQty + '小于等于了上一分段数,不能保存!')
-          } else {
-            this._iniFo('分段数量不合法,不能保存!')
-          }
-          return
-        }
-        this.listInfo.replies = replies
-        this.$http.post(`/sale/inquiry/items/${this.$route.query.id}/reply?token=${this.token}`, this.listInfo).then(res => {
-          this._iniFo('报价成功')
-          // this.getInitInfo()
-          let _this = this
-          setTimeout(function () {
-            // _this.$router.push(`/mobile/center/vendor/seek_btob_details?id=${this.$route.query.id}&active=done`)
-            _this.$router.go(-1)
-          }, 500)
-        })
-      },
-      _iniFo(str) {
-        this.collectResult = str
-        this.timeoutCount++
-      },
       getInitInfo() {
         this.$http.get(`/sale/inquiry/${this.$route.query.id}/info/mobile`).then(res => {
           if (!res.data.replies[0].price || res.data.replies[0].price === '') {
@@ -196,16 +114,8 @@
           }
           this.listInfo = res.data
         })
-      },
-      _getToken() {
-        this.$http.get('/token?userType=sale').then(res => {
-          this.token = res.data.token
-        })
       }
     },
-    components: {
-      RemindBox
-    },
     filters: {
       time: function(time) {
         if (typeof time === 'number') {

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

@@ -15,7 +15,7 @@
         </div>
         <div class="item clearfix">
           <span class="name fl">收货地址:</span>
-          <span class="fl" style="width: 5.2rem">{{listInfo.inquiry.ship}}</span>
+          <span class="fl" style="width: 5.2rem">{{listInfo.inquiry.enterprise && listInfo.inquiry.enterprise.enAddress}}</span>
         </div>
         <div class="item clearfix">
           <span class="name fl">联系电话:</span>