|
|
@@ -10,12 +10,16 @@
|
|
|
<view class="accumulative"></view>
|
|
|
</view>
|
|
|
<view class="cg-button" @click="enterShop(ghsInfo)">进店</view>
|
|
|
- <view class="book-button" @click="bookItem(ghsInfo)">预订</view>
|
|
|
+ <view :class="[ghsInfo.kiloFee && Number(ghsInfo.kiloFee)>0 ? 'could-book' : 'not-book', 'book-button']" @click="bookItem(ghsInfo)">预订</view>
|
|
|
+ <view :class="[ghsInfo.kiloFee && Number(ghsInfo.kiloFee)>0 ? 'could-book-text' : 'not-book-text', 'book-button-text']">
|
|
|
+ <text>提前订货更便宜,</text>
|
|
|
+ <text class="explain" @click="getBookItemExplain(ghsInfo)">预订说明</text>
|
|
|
+ </view>
|
|
|
<view class="store_btn">
|
|
|
<view class="btn_entrance" @click="pageTo({ url: '/admin/clear/list',query: {ghsId: ghsInfo.id}})">结账记录</view>
|
|
|
- <view class="btn_entrance" @click="settleAccounts(ghsInfo)" > 欠款订单 </view>
|
|
|
<view class="btn_entrance" @click="pageTo({url:'/pagesPurchase/shopping'})" > 采购记录 </view>
|
|
|
- <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange',query: {ghsId: ghsInfo.id}})" style="text-decoration:none;color:red;font-size:25upx;"> 欠款 ¥{{parseFloat(ghsInfo.debtAmount)}} </view>
|
|
|
+ <view class="btn_entrance" @click="settleAccounts(ghsInfo)"> 欠款 ¥{{parseFloat(ghsInfo.debtAmount)}} </view>
|
|
|
+ <view class="btn_entrance" @click="pageTo({ url: '/admin/ghs/debtChange',query: {ghsId: ghsInfo.id}})">欠款变动明细 </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
@@ -24,7 +28,6 @@
|
|
|
</block>
|
|
|
</block>
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -65,41 +68,43 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
inviteGhs(){
|
|
|
- this.pageTo({
|
|
|
- url: '/pagesInvite/inviteShop'
|
|
|
- })
|
|
|
+ this.pageTo({ url: '/pagesInvite/inviteShop' })
|
|
|
},
|
|
|
enterShop(item) {
|
|
|
const { id } = item
|
|
|
this.pageTo({url: '/pagesPurchase/ghsProduct',query:{id:id}})
|
|
|
},
|
|
|
bookItem(item){
|
|
|
+ //没有设置每公斤运费则不能进入预订页面
|
|
|
+ if(item.kiloFee && Number(item.kiloFee)<=0){
|
|
|
+ this.$msg("即将开通,敬请期待");
|
|
|
+ return false
|
|
|
+ }
|
|
|
const { id } = item
|
|
|
this.pageTo({url: '/pagesPurchase/bookProduct',query:{id:id}})
|
|
|
},
|
|
|
+ getBookItemExplain(item){
|
|
|
+ if(item.kiloFee && Number(item.kiloFee)<=0){
|
|
|
+ this.$msg("即将开通,敬请期待");
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.pageTo('/pagesPurchase/bookExplain?id='+item.id)
|
|
|
+ },
|
|
|
init() {
|
|
|
this.getGHSList()
|
|
|
},
|
|
|
getGHSList () {
|
|
|
return ghsList().then(res => {
|
|
|
this.supplierList = res.data.list
|
|
|
- console.log(this.supplierList, 111)
|
|
|
- }).catch(err => { console.log(err) })
|
|
|
+ })
|
|
|
},
|
|
|
// 结账
|
|
|
settleAccounts (item) {
|
|
|
- console.log('999999')
|
|
|
- console.log(item)
|
|
|
- console.log(item.id)
|
|
|
this.pageTo({ url: '/pagesPurchase/gathering',query:{id:item.id}})
|
|
|
},
|
|
|
// 采购记录详情
|
|
|
gotoDetails (val) {
|
|
|
- console.log(val)
|
|
|
- this.pageTo({
|
|
|
- url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id,
|
|
|
- type:2
|
|
|
- })
|
|
|
+ this.pageTo({ url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id, type:2 })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -116,7 +121,7 @@ export default {
|
|
|
.list_item {
|
|
|
margin: 20upx 0 0;
|
|
|
position: relative;
|
|
|
- height: 210upx;
|
|
|
+ height: 380upx;
|
|
|
width: 100vw;
|
|
|
background: #fff;
|
|
|
display: flex;
|
|
|
@@ -141,28 +146,52 @@ export default {
|
|
|
padding: 20upx 35upx;
|
|
|
position: absolute;
|
|
|
top:40upx;
|
|
|
- right:220upx;
|
|
|
+ right:30upx;
|
|
|
background: #3385FF;
|
|
|
}
|
|
|
.book-button{
|
|
|
display: inline-block;
|
|
|
- font-size: 28upx;
|
|
|
+ font-size: 25upx;
|
|
|
+ border-radius: 120upx;
|
|
|
+ padding: 15upx 30upx;
|
|
|
+ position: absolute;
|
|
|
+ top:250upx;
|
|
|
+ right:300upx;
|
|
|
+ }
|
|
|
+ .could-book{
|
|
|
color: white;
|
|
|
- border: 1px solid #3385FF;
|
|
|
- border-radius: 110upx;
|
|
|
- padding: 20upx 35upx;
|
|
|
- background: #3385FF;
|
|
|
+ border: 1px solid #657cac;
|
|
|
+ background: #657cac;
|
|
|
+ }
|
|
|
+ .not-book{
|
|
|
+ color: white;
|
|
|
+ border: 1px solid #CCCCCC;
|
|
|
+ background: #CCCCCC;
|
|
|
+ }
|
|
|
+ .book-button-text{
|
|
|
position: absolute;
|
|
|
- top:40upx;
|
|
|
- right:30upx;
|
|
|
+ top:330upx;
|
|
|
+ right:210upx;
|
|
|
+ .explain{
|
|
|
+ text-decoration: underline;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .could-book-text{
|
|
|
+ color:#666666;
|
|
|
+ }
|
|
|
+ .not-book-text{
|
|
|
+ color:#CCCCCC;
|
|
|
}
|
|
|
& > .store_name {
|
|
|
margin-left: 30upx;
|
|
|
width: 700upx;
|
|
|
display: block;
|
|
|
+ position: absolute;
|
|
|
+ top:50upx;
|
|
|
+ left: 0upx;
|
|
|
image{
|
|
|
- width:48upx;
|
|
|
- height:48upx;
|
|
|
+ width:50upx;
|
|
|
+ height:50upx;
|
|
|
border-radius:60upx;
|
|
|
float:left;
|
|
|
}
|
|
|
@@ -186,15 +215,16 @@ export default {
|
|
|
}
|
|
|
& > .store_btn {
|
|
|
position: absolute;
|
|
|
- top:140upx;
|
|
|
+ top:150upx;
|
|
|
left: 0upx;
|
|
|
& > .btn_entrance {
|
|
|
display: inline-block;
|
|
|
- font-size: 26upx;
|
|
|
- color: #666666;
|
|
|
- padding: 10upx 20upx;
|
|
|
- margin-left: 10upx;
|
|
|
- text-decoration:underline;
|
|
|
+ font-size: 28upx;
|
|
|
+ color: #BBBBBB;
|
|
|
+ padding: 10upx 10upx;
|
|
|
+ margin-left: 22upx;
|
|
|
+ text-decoration: underline;
|
|
|
+ color:#666666;
|
|
|
}
|
|
|
}
|
|
|
.fl_line {
|