瀏覽代碼

手机求购

yangc 7 年之前
父節點
當前提交
48efebb928

+ 1 - 0
components/mobile/applyPurchase/PublishSeek.vue

@@ -292,6 +292,7 @@
             border: .02rem solid #7e7e7e;
             font-size: .26rem;
             vertical-align: middle;
+            background: #fff;
           }
           > span {
             display: inline-block;

+ 132 - 132
components/mobile/applyPurchase/SayPrice.vue

@@ -1,29 +1,32 @@
 <template>
-  <div class="say-price">
-    <div class="base-info">
-      <div class="content-line">
-        型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
-      </div>
-      <div class="content-line">
-        品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
-      </div>
-      <div class="content-line">
-        规格:<span>{{purchaseDetail.spec || '-'}}</span>
-      </div>
-      <div class="content-line">
-        采购数量:<span>{{purchaseDetail.offerAmount || '-'}}</span>
-      </div>
-      <div class="content-line">
-        币种:<span>{{purchaseDetail.currency || '不限'}}</span>
-      </div>
-      <div class="content-line">
-        截止日期:<span>{{purchaseDetail.endDate | date}}</span>
-      </div>
-    </div>
-    <div class="form-list">
-      <div class="form-title">
-        <span class="fl">价格梯度<span>(PCS)</span></span>
-        <span class="fr">
+  <div class="mobile-modal">
+    <div class="mobile-modal-box">
+      <div class="mobile-modal-header">编辑报价<i class="icon-guanbi iconfont" @click="cancel"></i></div>
+      <div class="say-price">
+        <div class="base-info">
+          <div class="content-line">
+            型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+          </div>
+          <div class="content-line">
+            品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
+          </div>
+          <div class="content-line">
+            规格:<span>{{purchaseDetail.spec || '-'}}</span>
+          </div>
+          <div class="content-line">
+            采购数量:<span>{{purchaseDetail.offerAmount || '-'}}</span>
+          </div>
+          <div class="content-line">
+            币种:<span>{{purchaseDetail.currency || '不限'}}</span>
+          </div>
+          <div class="content-line">
+            截止日期:<span>{{purchaseDetail.endDate | date}}</span>
+          </div>
+        </div>
+        <div class="form-list">
+          <div class="form-title">
+            <span class="fl">价格梯度<span>(PCS)</span></span>
+            <span class="fr">
           <!--<span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>-->
           <span v-if="!purchaseDetail.currency" v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
           <span v-if="purchaseDetail.currency" v-text="purchaseDetail.currency"></span>
@@ -34,20 +37,22 @@
             <li @click="setCurrency('USD')">USD</li>
           </ul>
         </span>
+          </div>
+          <div class="form-item" v-for="(reply, index) in sayPriceObj.replies">
+            <input type="number" placeholder="梯度" class="fl" @blur="onReplyLapQtyBlur(index)" @input="onReplyLapQtyInput(index)" v-model="reply.lapQty">
+            <input type="number" placeholder="单价" class="fr" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" v-model="reply.price">
+            <i class="iconfont icon-minus" v-if="index > 0" @click="setReplies('sub', index)"></i>
+            <i class="iconfont icon-add" v-if="index == 0 && sayPriceObj.replies.length < 5" @click="setReplies('add', index)"></i>
+          </div>
+          <div class="date">
+            <span>交期(天)</span>
+            <input type="number" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
+          </div>
+          <a class="say-price-btn" @click="commitSayPrice">确定</a>
+        </div>
+        <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
       </div>
-      <div class="form-item" v-for="(reply, index) in sayPriceObj.replies">
-        <input type="number" placeholder="梯度" class="fl" @blur="onReplyLapQtyBlur(index)" @input="onReplyLapQtyInput(index)" v-model="reply.lapQty">
-        <input type="number" placeholder="单价" class="fr" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" v-model="reply.price">
-        <i class="iconfont icon-minus" v-if="index > 0" @click="setReplies('sub', index)"></i>
-        <i class="iconfont icon-add" v-if="index == 0 && sayPriceObj.replies.length < 5" @click="setReplies('add', index)"></i>
-      </div>
-      <div class="date">
-        <span>交期(天)</span>
-        <input type="number" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
-      </div>
-      <a class="say-price-btn" @click="commitSayPrice">确定</a>
     </div>
-    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 <script>
@@ -106,6 +111,9 @@
       }
     },
     methods: {
+      cancel: function () {
+        this.$emit('cancelSayPriceAction', false)
+      },
       checkCurrencySelect: function () {
         this.showCurrencyList = false
       },
@@ -128,7 +136,6 @@
             }
           ]
         }
-//        window.history.back(-1)
       },
       setReplies: function (type, index) {
         if (type === 'add' && this.sayPriceObj.replies.length < 5) {
@@ -155,16 +162,14 @@
           this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
             this.showLoading = false
             if (response.data.success === false) {
-//              this.$message.error(response.data.message)
               this.onRemind('response.data.message')
             } else {
-//              this.$message.success('报价成功')
-              this.onRemind('报价成功')
-              this.resetSayPrice()
+//              this.onRemind('报价成功')
+//              this.resetSayPrice()
+              this.$emit('cancelSayPriceAction', true, JSON.parse(response.data).quteId)
             }
           }, error => {
             console.log(error)
-//            this.$message.error('请勿重复报价或报价自己的求购')
             this.onRemind('请勿重复报价或报价自己的求购')
 //            this.showLoading = false
           })
@@ -172,16 +177,6 @@
           this.onRemind('请输入正确的报价信息')
         }
       },
-//      checkValid: function () {
-//        for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
-//          if (!this.sayPriceObj.replies[i].lapQty || this.sayPriceObj.replies[i].lapQty <= 0 || !this.sayPriceObj.replies[i].price || this.sayPriceObj.replies[i].price <= 0) {
-//            return false
-//          } else if (i > 0 && ((this.sayPriceObj.replies[i].lapQty <= this.sayPriceObj.replies[i - 1].lapQty) || (this.sayPriceObj.replies[i].price <= this.sayPriceObj.replies[i - 1].price))) {
-//            return false
-//          }
-//        }
-//        return this.sayPriceObj.leadtime && this.sayPriceObj.leadtime > 0
-//      },
       onLeadtimeInput: function () {
         if (this.sayPriceObj.leadtime.length > 3) {
           this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
@@ -274,93 +269,98 @@
   }
 </script>
 <style lang="scss" scoped>
-  .say-price {
-    background: #f3f3f3;
-    padding: .18rem 0;
-    position: absolute;
-    top: .88rem;
-    bottom: 1rem;
-    width: 100%;
-    overflow-y: auto;
-    .form-list {
-      height: 7.53rem;
-      background: #fff;
-      padding-top: .2rem;
-      > div {
-        height: .7rem;
-        line-height: .7rem;
-        width: 6.12rem;
-        font-size: .28rem;
-        margin: 0 auto .2rem;
-        input {
-          height: .7rem;
-          text-align: center;
-          border: .02rem solid #666;
-          border-radius: .05rem;
-        }
-        &.form-title {
-          border: .02rem solid #666;
-          border-radius: .05rem;
-          padding: 0 .07rem 0 .17rem;
-          .fl {
-            span {
-              color: #666;
-            }
-          }
-          .fr {
-            position: relative;
-            img {
-              width: .12rem;
-              height: .06rem;
-              margin-left: .04rem;
-            }
-            > ul {
-              position: absolute;
-              top: .6rem;
-              right: -.4rem;
-              z-index: 1;
-              width: 1.75rem;
-              background: #fff;
+  .mobile-modal {
+    .mobile-modal-box {
+      top: 5%;
+      left: 3%;
+      right: 3%;
+      width: auto;
+      .say-price {
+        background: #f3f3f3;
+        padding: .18rem 0;
+        width: 100%;
+        overflow-y: auto;
+        .form-list {
+          height: 7.53rem;
+          background: #fff;
+          padding-top: .2rem;
+          > div {
+            height: .7rem;
+            line-height: .7rem;
+            width: 6.12rem;
+            font-size: .28rem;
+            margin: 0 auto .2rem;
+            input {
+              height: .7rem;
               text-align: center;
-              border-radius: .1rem;
-              border: .02rem solid #dfdfdf;
-              -webkit-box-shadow: 0 0 .12rem .02rem #e2d9d975;
-              -moz-box-shadow:  0 0 .12rem .02rem #e2d9d975;
-              box-shadow:  0 0 .12rem .02rem #e2d9d975;
-              li {
-                height: .52rem;
-                line-height: .52rem;
-                border-bottom: .02rem solid #dfdfdf;
-                &:hover, &:active {
-                  background: #dedede;
+              border: .02rem solid #666;
+              border-radius: .05rem;
+            }
+            &.form-title {
+              border: .02rem solid #666;
+              border-radius: .05rem;
+              padding: 0 .07rem 0 .17rem;
+              .fl {
+                span {
+                  color: #666;
+                }
+              }
+              .fr {
+                position: relative;
+                img {
+                  width: .12rem;
+                  height: .06rem;
+                  margin-left: .04rem;
+                }
+                > ul {
+                  position: absolute;
+                  top: .6rem;
+                  right: -.4rem;
+                  z-index: 1;
+                  width: 1.75rem;
+                  background: #fff;
+                  text-align: center;
+                  border-radius: .1rem;
+                  border: .02rem solid #dfdfdf;
+                  -webkit-box-shadow: 0 0 .12rem .02rem #e2d9d975;
+                  -moz-box-shadow:  0 0 .12rem .02rem #e2d9d975;
+                  box-shadow:  0 0 .12rem .02rem #e2d9d975;
+                  li {
+                    height: .52rem;
+                    line-height: .52rem;
+                    border-bottom: .02rem solid #dfdfdf;
+                    &:hover, &:active {
+                      background: #dedede;
+                    }
+                  }
                 }
               }
             }
-          }
-        }
-        &.form-item {
-          position: relative;
-          input {
-            width: 2.93rem;
-          }
-          i {
-            position: absolute;
-            right: -.48rem;
-            top: 0;
-            font-size: .36rem;
-            &.icon-add {
-              color: #4768f3;
+            &.form-item {
+              position: relative;
+              input {
+                width: 2.93rem;
+              }
+              i {
+                position: absolute;
+                right: -.48rem;
+                top: 0;
+                font-size: .36rem;
+                &.icon-add {
+                  color: #4768f3;
+                }
+                &.icon-minus {
+                  color: #8d8d8d;
+                }
+              }
             }
-            &.icon-minus {
-              color: #8d8d8d;
+            &.date {
+              input {
+                width: 4.8rem;
+              }
             }
           }
         }
-        &.date {
-          input {
-            width: 4.8rem;
-          }
-        }
       }
     }
   }

+ 199 - 184
components/mobile/applyPurchase/SayPriceInfo.vue

@@ -1,117 +1,122 @@
 <template>
-  <div class="say-price-info">
-    <div v-if="isBuyer">
-      <div class="base-info">
-        <div class="content-line">
-          型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+  <div class="mobile-modal">
+    <div class="mobile-modal-box">
+      <div class="mobile-modal-header">{{agreed == 1 ? '已采纳' : '已报价'}}<i class="icon-guanbi iconfont" @click="cancel"></i></div>
+      <div class="say-price-info">
+        <div v-if="isBuyer">
+          <div class="base-info">
+            <div class="content-line">
+              型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+            </div>
+            <div class="content-line">
+              品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
+            </div>
+            <div class="content-line">
+              规格:<span>{{purchaseDetail.spec || '-'}}</span>
+            </div>
+            <div class="content-line">
+              采购数量:<span>{{purchaseDetail.offerAmount || '-'}}</span>
+            </div>
+            <div class="content-line">
+              币种:<span>{{purchaseDetail.currency || '不限'}}</span>
+            </div>
+            <div class="content-line">
+              截止日期:<span>{{purchaseDetail.endDate | date}}</span>
+            </div>
+          </div>
+          <div class="base-info">
+            <div class="content-line">
+              买家:<span>{{purchaseDetail.inquiry.enterprise.enName || purchaseDetail.userName}}</span>
+            </div>
+            <div class="content-line">
+              联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
+            </div>
+          </div>
+          <div class="base-info say-info" v-for="(item, index) in purchaseDetail.qutations" @click="selectQutation(index)">
+            <img v-if="(!item.agreed || item.agreed !== 1) && activeIndex == index" src="/images/mobile/@2x/applyPurchase/say-price-check.png" alt="">
+            <img v-if="(!item.agreed || item.agreed !== 1) && activeIndex != index" src="/images/mobile/@2x/applyPurchase/say-price-default.png" alt="">
+            <img v-if="item.agreed == 1" src="/images/mobile/@2x/applyPurchase/say-price-accept.png" alt="">
+            <div class="content-line">
+              {{item.vendName}}
+            </div>
+            <div class="content-line">
+              报价人:<span v-if="item.user">{{item.user.userName | userNameFilter}}</span>
+              <span v-else>-</span>
+            </div>
+            <div class="content-line">
+              电话:<span v-if="item.user">{{item.user.userTel}}</span>
+              <span v-else>-</span>
+            </div>
+            <div class="content-line date">
+              交期(天):<span>{{item.leadtime}}</span>
+            </div>
+            <p>{{item.offerTime | date}}</p>
+            <div class="price-level">
+              <p>价格梯度:<span>(pcs)</span></p>
+              <ul>
+                <li v-for="replie in item.replies">
+                  <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
+                  <span>{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
+                </li>
+              </ul>
+            </div>
+          </div>
+          <a class="say-price-btn" v-if="purchaseDetail.agreed != 1" @click="acceptQutation">采纳报价</a>
         </div>
-        <div class="content-line">
-          品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
-        </div>
-        <div class="content-line">
-          规格:<span>{{purchaseDetail.spec || '-'}}</span>
-        </div>
-        <div class="content-line">
-          采购数量:<span>{{purchaseDetail.offerAmount || '-'}}</span>
-        </div>
-        <div class="content-line">
-          币种:<span>{{purchaseDetail.currency || '不限'}}</span>
-        </div>
-        <div class="content-line">
-          截止日期:<span>{{purchaseDetail.endDate | date}}</span>
-        </div>
-      </div>
-      <div class="base-info">
-        <div class="content-line">
-          买家:<span>{{purchaseDetail.inquiry.enterprise.enName || purchaseDetail.userName}}</span>
-        </div>
-        <div class="content-line">
-          联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
-        </div>
-      </div>
-      <div class="base-info say-info" v-for="(item, index) in purchaseDetail.qutations" @click="selectQutation(index)">
-        <img v-if="(!item.agreed || item.agreed !== 1) && activeIndex == index" src="/images/mobile/@2x/applyPurchase/say-price-check.png" alt="">
-        <img v-if="(!item.agreed || item.agreed !== 1) && activeIndex != index" src="/images/mobile/@2x/applyPurchase/say-price-default.png" alt="">
-        <img v-if="item.agreed == 1" src="/images/mobile/@2x/applyPurchase/say-price-accept.png" alt="">
-        <div class="content-line">
-          {{item.vendName}}
-        </div>
-        <div class="content-line">
-          报价人:<span v-if="item.user">{{item.user.userName | userNameFilter}}</span>
-          <span v-else>-</span>
-        </div>
-        <div class="content-line">
-          电话:<span v-if="item.user">{{item.user.userTel}}</span>
-          <span v-else>-</span>
-        </div>
-        <div class="content-line date">
-          交期(天):<span>{{item.leadtime}}</span>
-        </div>
-        <p>{{item.offerTime | date}}</p>
-        <div class="price-level">
-          <p>价格梯度:<span>(pcs)</span></p>
-          <ul>
-            <li v-for="replie in item.replies">
-              <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
-              <span>{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
-            </li>
-          </ul>
-        </div>
-      </div>
-      <a class="say-price-btn" v-if="purchaseDetail.agreed != 1" @click="acceptQutation">采纳报价</a>
-    </div>
-    <div v-if="!isBuyer">
-      <div class="base-info">
-        <div class="content-line">
-          型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
-        </div>
-        <div class="content-line">
-          品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
-        </div>
-        <div class="content-line">
-          规格:<span>{{purchaseDetail.spec || '-'}}</span>
-        </div>
-        <div class="content-line">
-          采购数量:<span>{{purchaseDetail.offerAmount || '-'}}</span>
-        </div>
-        <div class="content-line">
-          币种:<span>{{purchaseDetail.currency || '不限'}}</span>
-        </div>
-        <div class="content-line">
-          截止日期:<span>{{purchaseDetail.endDate | date}}</span>
-        </div>
-        <div class="content-line">
-          买家:<span>{{purchaseDetail.inquiry.enterprise.enName || purchaseDetail.userName}}</span>
-        </div>
-        <div class="content-line">
-          联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
-        </div>
-      </div>
-      <div class="base-info">
-        <div class="content-line">
-          报价人:<span>{{purchaseDetail.vendName || purchaseDetail.enterprise.enName}}</span>
-        </div>
-        <div class="content-line">
-          联系电话:<span>{{purchaseDetail.enterprise.enTel || '-'}}</span>
-        </div>
-      </div>
-      <div class="base-info say-info">
-        <div class="content-line date">
-          交期(天):<span>{{purchaseDetail.leadtime}}</span>
-        </div>
-        <p>{{purchaseDetail.offerTime | date}}</p>
-        <div class="price-level vendor">
-          <p>价格梯度:<span>(pcs)</span></p>
-          <ul>
-            <li v-for="replie in purchaseDetail.replies">
-              <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
-              <span>{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
-            </li>
-          </ul>
+        <div v-if="!isBuyer">
+          <div class="base-info">
+            <div class="content-line">
+              型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+            </div>
+            <div class="content-line">
+              品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
+            </div>
+            <div class="content-line">
+              规格:<span>{{purchaseDetail.spec || '-'}}</span>
+            </div>
+            <div class="content-line">
+              采购数量:<span>{{purchaseDetail.offerAmount || '-'}}</span>
+            </div>
+            <div class="content-line">
+              币种:<span>{{purchaseDetail.currency || '不限'}}</span>
+            </div>
+            <div class="content-line">
+              截止日期:<span>{{purchaseDetail.endDate | date}}</span>
+            </div>
+            <div class="content-line">
+              买家:<span>{{purchaseDetail.inquiry.enterprise.enName || purchaseDetail.userName}}</span>
+            </div>
+            <div class="content-line">
+              联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
+            </div>
+          </div>
+          <div class="base-info">
+            <div class="content-line">
+              报价人:<span>{{purchaseDetail.vendName || purchaseDetail.enterprise.enName}}</span>
+            </div>
+            <div class="content-line">
+              联系电话:<span>{{purchaseDetail.enterprise.enTel || '-'}}</span>
+            </div>
+          </div>
+          <div class="base-info say-info">
+            <div class="content-line date">
+              交期(天):<span>{{purchaseDetail.leadtime}}</span>
+            </div>
+            <p>{{purchaseDetail.offerTime | date}}</p>
+            <div class="price-level vendor">
+              <p>价格梯度:<span>(pcs)</span></p>
+              <ul>
+                <li v-for="replie in purchaseDetail.replies">
+                  <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
+                  <span>{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
+                </li>
+              </ul>
+            </div>
+          </div>
         </div>
+        <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
       </div>
     </div>
-    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 <script>
@@ -127,6 +132,7 @@
     components: {
       RemindBox
     },
+    props: ['agreed'],
     filters: {
       date: function (date) {
         if (date) {
@@ -156,6 +162,9 @@
       }
     },
     methods: {
+      cancel: function () {
+        this.$emit('cancelSayPriceInfoAction', false)
+      },
       selectQutation: function (index) {
         this.activeIndex = this.activeIndex === index ? -1 : index
       },
@@ -165,8 +174,9 @@
           this.$http.post('/inquiry/buyer/decide?id=' + obj.id + '&status=1')
             .then(response => {
 //              this.$message.success('采纳成功')
-              this.onRemind('采纳成功')
-              this.$route.query.type === 'saler' ? this.$store.dispatch('applyPurchase/loadVendorInquiryDetail', {id: this.$route.params.id}) : this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {id: this.$route.params.id})
+//              this.onRemind('采纳成功')
+              this.$emit('cancelSayPriceInfoAction', true)
+//              this.$route.query.type === 'saler' ? this.$store.dispatch('applyPurchase/loadVendorInquiryDetail', {id: this.$route.params.id}) : this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {id: this.$route.params.id})
             }, err => {
               console.log(err)
 //              this.$message.success('系统错误')
@@ -185,89 +195,94 @@
   }
 </script>
 <style lang="scss" scoped>
-  .say-price-info {
-    background: #f3f3f3;
-    padding: .18rem 0;
-    position: absolute;
-    top: .88rem;
-    bottom: 1rem;
-    width: 100%;
-    overflow-y: auto;
-    .base-info {
-      &.say-info {
-        height: 4.54rem;
-        position: relative;
-        > img {
-          position: absolute;
-          right: 0;
-          top: 0;
-          width: 1rem;
-          height: 1rem;
-        }
-        .content-line {
-          width: 4.55rem;
-          span {
-            color: #333;
-          }
-          &.date {
-            span {
-              color: #ef5042;
+  .mobile-modal {
+    .mobile-modal-box {
+      top: 5%;
+      left: 3%;
+      right: 3%;
+      width: auto;
+      .say-price-info {
+        background: #f3f3f3;
+        padding: .18rem 0;
+        width: 100%;
+        overflow-y: auto;
+        .base-info {
+          &.say-info {
+            height: 4.54rem;
+            position: relative;
+            > img {
+              position: absolute;
+              right: 0;
+              top: 0;
+              width: 1rem;
+              height: 1rem;
             }
-          }
-        }
-        > p {
-          font-size: .24rem;
-          color: #999;
-        }
-        .price-level {
-          font-size: .26rem;
-          position: absolute;
-          top: 1.3rem;
-          right: .3rem;
-          width: 4rem;
-          text-align: center;
-          p {
-            margin-bottom: .1rem;
-            span {
-              color: #666;
-            }
-          }
-          ul {
-            li {
-              height: .52rem;
+            .content-line {
+              width: 4.55rem;
               span {
-                height: .52rem;
-                line-height: .52rem;
-                padding-left: .22rem;
-                text-align: left;
-                display: inline-block;
-                border-top: .02rem solid #7e7e7e;
-                border-left: .02rem solid #7e7e7e;
-                overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
-                &:first-child {
-                  width: 45%;
+                color: #333;
+              }
+              &.date {
+                span {
+                  color: #ef5042;
                 }
-                &:last-child {
-                  width: 55%;
-                  border-right: .02rem solid #7e7e7e;
+              }
+            }
+            > p {
+              font-size: .24rem;
+              color: #999;
+            }
+            .price-level {
+              font-size: .26rem;
+              position: absolute;
+              top: 1.3rem;
+              right: .3rem;
+              width: 4rem;
+              text-align: center;
+              p {
+                margin-bottom: .1rem;
+                span {
+                  color: #666;
                 }
               }
-              &:last-child {
-                border-bottom: .02rem solid #7e7e7e;
+              ul {
+                li {
+                  height: .52rem;
+                  span {
+                    height: .52rem;
+                    line-height: .52rem;
+                    padding-left: .22rem;
+                    text-align: left;
+                    display: inline-block;
+                    border-top: .02rem solid #7e7e7e;
+                    border-left: .02rem solid #7e7e7e;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                    &:first-child {
+                      width: 45%;
+                    }
+                    &:last-child {
+                      width: 55%;
+                      border-right: .02rem solid #7e7e7e;
+                    }
+                  }
+                  &:last-child {
+                    border-bottom: .02rem solid #7e7e7e;
+                  }
+                }
+              }
+              &.vendor {
+                position: unset;
+                margin: .15rem auto 0;
               }
             }
           }
-          &.vendor {
-            position: unset;
-            margin: .15rem auto 0;
-          }
+        }
+        .say-price-btn {
+          margin: .37rem auto .7rem;
         }
       }
     }
-    .say-price-btn {
-      margin: .37rem auto .7rem;
-    }
   }
 </style>

+ 47 - 7
components/mobile/applyPurchase/SeekList.vue

@@ -31,8 +31,8 @@
             <p v-else>已截止</p>
             <!--<a v-if="!userType && item.quoted == 1">已报价</a>-->
             <!--<a v-if="!userType && item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && (user.logged && ((item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU  && !item.inquiry.enterprise)))">自己发布的</a>-->
-            <a v-if="!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU  && !item.inquiry.enterprise))))"  @click="goSayPrice(item.id)">我要报价</a>
-            <nuxt-link v-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || item.quoted == 1" :to="'/mobile/applyPurchase/list/' + (userType ? (item.quteId || item.id) + '?type=' + userType : (item.quteId || item.id)) + (userType ? '&' : '?') + 'status=' + item.agreed">查看报价</nuxt-link>
+            <a v-if="!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU  && !item.inquiry.enterprise))))"  @click="goSayPrice(item.id, index)">我要报价</a>
+            <a v-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || item.quoted == 1" @click="goSayPriceInfo(item.quteId || item.id, item.agreed)">查看报价</a>
           </div>
         </div>
       </li>
@@ -42,17 +42,30 @@
       <p v-text="'抱歉,暂无求购信息'"></p>
     </div>
     <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
+    <say-price v-if="showSayPriceBox" @cancelSayPriceAction="onSayPriceCancel"></say-price>
+    <say-price-info v-if="showSayPriceInfoBox" :agreed="agreed" @cancelSayPriceInfoAction="onSayPriceInfoCancel"></say-price-info>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 <script>
-  import {LoginBox} from '~components/mobile/common'
+  import {LoginBox, RemindBox} from '~components/mobile/common'
+  import {SayPrice, SayPriceInfo} from '~components/mobile'
   export default {
     components: {
-      LoginBox
+      LoginBox,
+      SayPrice,
+      RemindBox,
+      SayPriceInfo
     },
     data () {
       return {
-        showLoginBox: false
+        showLoginBox: false,
+        showSayPriceBox: false,
+        showSayPriceInfoBox: false,
+        activeIndex: -1,
+        remindText: '',
+        timeoutCount: 0,
+        agreed: 0
       }
     },
     props: ['userType', 'seekType', 'purchaseManList', 'isDataChange'],
@@ -91,12 +104,39 @@
       getHours: function (timeStamp) {
         return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
       },
-      goSayPrice: function (path) {
+      goSayPrice: function (id, index) {
         if (this.user.logged) {
-          this.$router.push('/mobile/applyPurchase/sayPrice/' + path)
+//          this.$router.push('/mobile/applyPurchase/sayPrice/' + path)
+          this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {itemId: id, enuu: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null})
+          this.showSayPriceBox = true
+          this.activeIndex = index
         } else {
           this.showLoginBox = true
         }
+      },
+      goSayPriceInfo: function (id, agreed) {
+        this.userType === 'buyer' ? this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {id: id}) : this.$store.dispatch('applyPurchase/loadVendorInquiryDetail', {id: id})
+        this.agreed = agreed
+        this.showSayPriceInfoBox = true
+//        '/mobile/applyPurchase/list/' + (userType ? (item.quteId || item.id) + '?type=' + userType : (item.quteId || item.id)) + (userType ? '&' : '?') + 'status=' + item.agreed
+      },
+      onSayPriceCancel: function (flag, quteId) {
+        if (flag) {
+          this.purchaseManList[this.activeIndex].quoted = 1
+          this.purchaseManList[this.activeIndex].quteId = quteId
+          this.onRemind('报价成功')
+        }
+        this.showSayPriceBox = false
+      },
+      onSayPriceInfoCancel: function (flag) {
+        if (flag) {
+          this.onRemind('采纳成功')
+        }
+        this.showSayPriceInfoBox = false
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount ++
       }
     }
   }