|
|
@@ -1,75 +1,84 @@
|
|
|
<template>
|
|
|
- <div class="purchase">
|
|
|
- <div class="purchase-top">
|
|
|
- <div class="purchase-top-bg">
|
|
|
- <div class="clearfix">
|
|
|
- <div class="title fl">{{purchaseDetail.inquiry.enName}}</div>
|
|
|
- <div class="time fr">{{purchaseDetail.endDate | date}}</div>
|
|
|
- </div>
|
|
|
- <div class="desc">{{purchaseDetail.prodTitle}}</div>
|
|
|
- <div class="brand">品牌:
|
|
|
- <span>{{purchaseDetail.inbrand || '-'}}</span>
|
|
|
- </div>
|
|
|
- <div class="size">规格:
|
|
|
- <span>{{purchaseDetail.spec || '-'}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="purchase-top-control clearfix">
|
|
|
- <div class="time fl">
|
|
|
- <span class="icon"></span>
|
|
|
- <template v-if="purchaseDetail.remainingTime > 0">剩余:
|
|
|
- <span class="timetext" v-if="getDay(purchaseDetail.remainingTime) > 0">
|
|
|
- <a class="number">{{getDay(purchaseDetail.remainingTime)}}</a>
|
|
|
- <a>天</a>
|
|
|
- </span>
|
|
|
- <span class="timetext" v-if="getDay(purchaseDetail.remainingTime) <= 0">
|
|
|
- <a class="number">{{getHours(purchaseDetail.remainingTime)}}</a>
|
|
|
- <a>小时</a>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <span class="timetext" v-else>已截止</span>
|
|
|
- <!-- <span class="timetext">剩余时间:<a class="number">8</a><a>小时</a></span> -->
|
|
|
- </div>
|
|
|
- <div v-if="!userType && purchaseDetail.remainingTime > 0 && (!purchaseDetail.quoted || purchaseDetail.quoted != 1) && (user.logged && ((purchaseDetail.inquiry.enterprise && user.data.enterprise && (purchaseDetail.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseDetail.userUU == user.data.userUU && !purchaseDetail.inquiry.enterprise)))" class="goprice fr" @click="onRemind('此为贵公司的求购')">我要报价</div>
|
|
|
- <div class="goprice fr" v-if="!(userType == 'saler' && seekType && seekType != 'wait') && (purchaseDetail.remainingTime > 0 && (!purchaseDetail.quoted || purchaseDetail.quoted != 1) && !(user.logged && ((purchaseDetail.inquiry.enterprise && user.data.enterprise && (purchaseDetail.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseDetail.userUU == user.data.userUU && !purchaseDetail.inquiry.enterprise))))" @click="goSayPrice(purchaseDetail.id)">我要报价</div>
|
|
|
- <div class="goprice fr" v-if="((!userType || userType == 'buyer') && (seekType && seekType != 'wait')) || (userType == 'saler' && seekType && seekType != 'wait') || purchaseDetail.quoted == 1" @click="goSayPriceInfo(purchaseDetail.quteId || purchaseDetail.id, purchaseDetail.agreed)">查看报价</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="purcharse_banner">
|
|
|
- <div class="banner"></div>
|
|
|
- </div>
|
|
|
- <div class="seek-title">
|
|
|
- <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
|
|
|
- <span>最新求购信息</span>
|
|
|
- </div>
|
|
|
- <div class="purcharseListContent">
|
|
|
- <seek-list :purchaseManList="purchaseManListData" :isDataChange="true"></seek-list>
|
|
|
+ <div class="purchase">
|
|
|
+ <div class="purchase-top">
|
|
|
+ <div class="purchase-top-bg">
|
|
|
+ <div class="clearfix">
|
|
|
+ <div class="title fl">{{purchaseDetail.inquiry.enName}}</div>
|
|
|
+ <div class="time fr">{{purchaseDetail.endDate | date}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="desc">{{purchaseDetail.prodTitle}}</div>
|
|
|
+ <div class="brand">品牌:
|
|
|
+ <span>{{purchaseDetail.inbrand || '-'}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="size">规格:
|
|
|
+ <span>{{purchaseDetail.spec || '-'}}</span>
|
|
|
+ </div>
|
|
|
|
|
|
- <nuxt-link to="/mobile/applyPurchase/list" class="purchase_btn_look" tag="div">查看更多</nuxt-link>
|
|
|
- <div class="purchse_btn_more_title">
|
|
|
- <a href="https://www.usoftmall.com">优软商城首页</a>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="pmg-icon">
|
|
|
+ <div class="Isend" v-if="purchaseDetail.remainingTime < 0">
|
|
|
+ <img src="/images/mobile/@2x/purChase/Isend.png" />
|
|
|
+ </div>
|
|
|
+ <div class="Issend" v-if="((!userType || userType == 'buyer') && (seekType && seekType != 'wait')) || (userType == 'saler' && seekType && seekType != 'wait') || purchaseDetail.quoted == 1">
|
|
|
+ <img src="/images/mobile/@2x/purChase/Issend.png" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="purchase-top-control clearfix" v-if="purchaseDetail.remainingTime > 0 || (((!userType || userType == 'buyer') && (seekType && seekType != 'wait')) || (userType == 'saler' && seekType && seekType != 'wait') || purchaseDetail.quoted == 1)">
|
|
|
+ <div class="time fl">
|
|
|
+ <template v-if="purchaseDetail.remainingTime > 0">
|
|
|
+ <span class="icon"></span>剩余时间:
|
|
|
+ <span class="timetext" v-if="getDay(purchaseDetail.remainingTime) > 0">
|
|
|
+ <a class="number">{{getDay(purchaseDetail.remainingTime)}}</a>
|
|
|
+ <a>天</a>
|
|
|
+ </span>
|
|
|
+ <span class="timetext" v-if="getDay(purchaseDetail.remainingTime) <= 0">
|
|
|
+ <a class="number">{{getHours(purchaseDetail.remainingTime)}}</a>
|
|
|
+ <a>小时</a>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <!-- <span class="timetext" v-else>已截止</span> -->
|
|
|
+ <!-- <span class="timetext">剩余时间:<a class="number">8</a><a>小时</a></span> -->
|
|
|
+ </div>
|
|
|
+ <div v-if="!userType && purchaseDetail.remainingTime > 0 && (!purchaseDetail.quoted || purchaseDetail.quoted != 1) && (user.logged && ((purchaseDetail.inquiry.enterprise && user.data.enterprise && (purchaseDetail.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseDetail.userUU == user.data.userUU && !purchaseDetail.inquiry.enterprise)))" class="goprice fr" @click="onRemind('此为贵公司的求购')">我要报价</div>
|
|
|
+ <div class="goprice fr" v-if="!(userType == 'saler' && seekType && seekType != 'wait') && (purchaseDetail.remainingTime > 0 && (!purchaseDetail.quoted || purchaseDetail.quoted != 1) && !(user.logged && ((purchaseDetail.inquiry.enterprise && user.data.enterprise && (purchaseDetail.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseDetail.userUU == user.data.userUU && !purchaseDetail.inquiry.enterprise))))" @click="goSayPrice(purchaseDetail.id)">我要报价</div>
|
|
|
+ <div class="goprice fr" v-if="((!userType || userType == 'buyer') && (seekType && seekType != 'wait')) || (userType == 'saler' && seekType && seekType != 'wait') || purchaseDetail.quoted == 1" @click="goSayPriceInfo(purchaseDetail.quteId || purchaseDetail.id, purchaseDetail.agreed)">查看报价</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="purcharse_banner">
|
|
|
+ <div class="banner"></div>
|
|
|
+ </div>
|
|
|
+ <div class="seek-title">
|
|
|
+ <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
|
|
|
+ <span>最新求购信息</span>
|
|
|
+ </div>
|
|
|
+ <div class="purcharseListContent">
|
|
|
+ <seek-list :purchaseManList="purchaseManListData" :isDataChange="true"></seek-list>
|
|
|
|
|
|
- <div class="mobile_footer company">
|
|
|
- <div class="hr"></div>
|
|
|
- <img src="/images/mobile/@2x/shareStore/logo.png" alt="">
|
|
|
- <div class="hr right"></div>
|
|
|
- <p>此页面由深圳市优软商城科技有限公司提供</p>
|
|
|
- <a href="https://www.usoftmall.com">www.usoftmall.com</a>
|
|
|
- </div>
|
|
|
+ <nuxt-link to="/mobile/applyPurchase/list" class="purchase_btn_look" tag="div">查看更多</nuxt-link>
|
|
|
+ <div class="purchse_btn_more_title">
|
|
|
+ <a href="https://www.usoftmall.com">优软商城首页</a>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
- <div class="purcharse_kong"></div>
|
|
|
- <div class="purcharse_fixed clearfix" @click="sendApplyPurchase()">
|
|
|
- <div class="money_icon fl"></div>
|
|
|
- <span class="fl">发布求购</span>
|
|
|
- </div>
|
|
|
- <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
|
|
|
- <say-price :showSayPriceBox="showSayPriceBox" @cancelSayPriceAction="onSayPriceCancel"></say-price>
|
|
|
- <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
|
|
|
- <say-price-info v-if="showSayPriceInfoBox" :agreed="agreed" @cancelSayPriceInfoAction="onSayPriceInfoCancel"></say-price-info>
|
|
|
- <publish-seek :showSayPriceBox="showsendApplyBox" @cancelAction="showsendApplyBox = false" @reloadAction="onReload" @remindAction="onRemind"></publish-seek>
|
|
|
- </div>
|
|
|
+ <div class="mobile_footer company">
|
|
|
+ <div class="hr"></div>
|
|
|
+ <img src="/images/mobile/@2x/shareStore/logo.png" alt="">
|
|
|
+ <div class="hr right"></div>
|
|
|
+ <p>此页面由深圳市优软商城科技有限公司提供</p>
|
|
|
+ <a href="https://www.usoftmall.com">www.usoftmall.com</a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="purcharse_kong"></div>
|
|
|
+ <div class="purcharse_fixed clearfix" @click="sendApplyPurchase()">
|
|
|
+ <div class="money_icon fl"></div>
|
|
|
+ <span class="fl">发布求购</span>
|
|
|
+ </div>
|
|
|
+ <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
|
|
|
+ <say-price :showSayPriceBox="showSayPriceBox" @cancelSayPriceAction="onSayPriceCancel"></say-price>
|
|
|
+ <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
|
|
|
+ <say-price-info v-if="showSayPriceInfoBox" :agreed="agreed" @cancelSayPriceInfoAction="onSayPriceInfoCancel"></say-price-info>
|
|
|
+ <publish-seek :showSayPriceBox="showsendApplyBox" @cancelAction="showsendApplyBox = false" @reloadAction="onReload" @remindAction="onRemind"></publish-seek>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -126,22 +135,22 @@ export default {
|
|
|
return this.$store.state.applyPurchase.purchaseManList.purchaseManDetail
|
|
|
.data
|
|
|
},
|
|
|
- user() {
|
|
|
- return this.$store.state.option.user
|
|
|
- },
|
|
|
+ // user() {
|
|
|
+ // return this.$store.state.option.user
|
|
|
+ // },
|
|
|
purchaseManListData() {
|
|
|
return this.$store.state.applyPurchase.purchaseManList.purchaseManList
|
|
|
.data.content
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- getDay: function(timeStamp) {
|
|
|
+ getDay(timeStamp) {
|
|
|
return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
|
|
|
},
|
|
|
- getHours: function(timeStamp) {
|
|
|
+ getHours(timeStamp) {
|
|
|
return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
|
|
|
},
|
|
|
- onSayPriceCancel: function(flag, quteId) {
|
|
|
+ onSayPriceCancel(flag, quteId) {
|
|
|
if (flag) {
|
|
|
this.purchaseDetail.quoted = 1
|
|
|
this.purchaseDetail.quteId = quteId
|
|
|
@@ -149,15 +158,15 @@ export default {
|
|
|
}
|
|
|
this.showSayPriceBox = false
|
|
|
},
|
|
|
- onRemind: function(str) {
|
|
|
+ onRemind(str) {
|
|
|
this.remindText = str
|
|
|
this.timeoutCount++
|
|
|
},
|
|
|
- onSayPriceInfoCancel: flag => {
|
|
|
+ onSayPriceInfoCancel(flag) {
|
|
|
flag && ((this.purchaseDetail.agreed = 1), this.onRemind('采纳成功'))
|
|
|
this.showSayPriceInfoBox = false
|
|
|
},
|
|
|
- goSayPriceInfo: (id, agreed) => {
|
|
|
+ goSayPriceInfo(id, agreed) {
|
|
|
this.userType === 'buyer'
|
|
|
? this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {
|
|
|
id: id
|
|
|
@@ -168,7 +177,7 @@ export default {
|
|
|
this.agreed = agreed
|
|
|
this.showSayPriceInfoBox = true
|
|
|
},
|
|
|
- goSayPrice: function(id) {
|
|
|
+ goSayPrice(id) {
|
|
|
if (this.user.logged) {
|
|
|
this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
|
|
|
itemId: id,
|
|
|
@@ -182,13 +191,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
sendApplyPurchase() {
|
|
|
- if (this.user.logged) {
|
|
|
+ console.log(this)
|
|
|
+ if (this.options.user.logged) {
|
|
|
this.showsendApplyBox = true
|
|
|
} else {
|
|
|
this.showLoginBox = true
|
|
|
}
|
|
|
},
|
|
|
- onReload: function() {
|
|
|
+ onReload() {
|
|
|
const path = this.$route.path
|
|
|
if (path === '/') {
|
|
|
this.$store.dispatch('applyPurchase/loadMobileHomeList', {
|
|
|
@@ -222,7 +232,7 @@ export default {
|
|
|
background: rgb(246, 245, 248);
|
|
|
.purchase-top {
|
|
|
background: #fff;
|
|
|
- padding: 0.28rem 0.32rem 0.18rem 0.32rem;
|
|
|
+ padding: 0.28rem 0.32rem 0.28rem 0.32rem;
|
|
|
margin-bottom: 0.18rem;
|
|
|
.purchase-top-bg {
|
|
|
background: url('/images/mobile/@2x/purChase/purChase_bg.png');
|
|
|
@@ -234,21 +244,43 @@ export default {
|
|
|
color: #fff;
|
|
|
padding-left: 0.35rem;
|
|
|
padding-top: 0.32rem;
|
|
|
+ padding-bottom: 0.32rem;
|
|
|
.title {
|
|
|
- font-size: 0.28rem;
|
|
|
+ font-size: 0.3rem;
|
|
|
+ max-width: 4.6rem;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
.time {
|
|
|
- font-size: 0.24rem;
|
|
|
+ font-size: 0.26rem;
|
|
|
margin-right: 0.2rem;
|
|
|
+ margin-top: 0.05rem;
|
|
|
}
|
|
|
.desc {
|
|
|
- font-size: 0.38rem;
|
|
|
- margin: 0.38rem 0;
|
|
|
+ font-size: 0.4rem;
|
|
|
+ margin: 0.35rem 0;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
.brand,
|
|
|
.size {
|
|
|
- font-size: 0.28rem;
|
|
|
- margin-bottom: 0.38rem;
|
|
|
+ font-size: 0.3rem;
|
|
|
+ margin-bottom: 0.14rem;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ width: 4.5rem;
|
|
|
+ }
|
|
|
+ .pmg-icon {
|
|
|
+ position: absolute;
|
|
|
+ right: 0.36rem;
|
|
|
+ bottom: 0.17rem;
|
|
|
+ img {
|
|
|
+ width: 1.28rem;
|
|
|
+ height: 1.33rem;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.purchase-top-control {
|
|
|
@@ -282,7 +314,7 @@ export default {
|
|
|
font-size: 0.28rem;
|
|
|
width: 1.78rem;
|
|
|
height: 0.68rem;
|
|
|
- background: linear-gradient(to right, #fb6d03, #fb9400);
|
|
|
+ background: linear-gradient(to right, #fb9400, #fb6d03);
|
|
|
color: #fff;
|
|
|
line-height: 0.68rem;
|
|
|
text-align: center;
|
|
|
@@ -310,7 +342,11 @@ export default {
|
|
|
position: relative;
|
|
|
}
|
|
|
.purcharse_fixed {
|
|
|
- background: linear-gradient(to right, #4f44fd, #7188ff);
|
|
|
+ background: linear-gradient(
|
|
|
+ to right,
|
|
|
+ rgba(113, 136, 255, 0.97),
|
|
|
+ rgba(79, 68, 253, 0.97)
|
|
|
+ );
|
|
|
width: 100%;
|
|
|
height: 0.88rem;
|
|
|
line-height: 0.88rem;
|
|
|
@@ -324,13 +360,13 @@ export default {
|
|
|
width: 0.39rem;
|
|
|
height: 0.39rem;
|
|
|
background-size: 100%;
|
|
|
- margin-top: 0.22rem;
|
|
|
+ margin-top: 0.26rem;
|
|
|
margin-right: 0.2rem;
|
|
|
margin-left: 2.8rem;
|
|
|
}
|
|
|
}
|
|
|
.purcharseListContent {
|
|
|
- padding-top: 0.3rem;
|
|
|
+ padding-top: 0.3rem;
|
|
|
padding-bottom: 0.37rem;
|
|
|
background: #fff;
|
|
|
.seek-title {
|