Compare commits
2 Commits
16c2be0ec0
...
0bc82f0986
Author | SHA1 | Date |
---|---|---|
|
0bc82f0986 | |
|
8767788959 |
|
@ -1,12 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<u-popup :show="addShow"
|
<u-popup
|
||||||
|
:show="addShow"
|
||||||
closeable
|
closeable
|
||||||
:round="10"
|
:round="10"
|
||||||
mode="center"
|
mode="center"
|
||||||
@close="closeTap">
|
@close="closeTap"
|
||||||
|
>
|
||||||
<view class="height-auto">
|
<view class="height-auto">
|
||||||
<view style="padding: 0 40rpx;">
|
<view style="padding: 0 40rpx">
|
||||||
<view>{{ '购买数量' }}</view>
|
<view>{{ '购买数量' }}</view>
|
||||||
<view class="sum-view">
|
<view class="sum-view">
|
||||||
<input class="inputs" v-model="form.carryNum" placeholder="" />
|
<input class="inputs" v-model="form.carryNum" placeholder="" />
|
||||||
|
@ -14,22 +16,29 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="buttons">
|
<view class="buttons">
|
||||||
<view class="btn" @click="closeTap">{{ '取消' }}</view>
|
<view class="btn" @click="closeTap">{{ '取消' }}</view>
|
||||||
<view class="btn" style="border-right: none;color: #005BAC;" @click="pickSubmit">{{'确定'}}</view>
|
<view
|
||||||
|
class="btn"
|
||||||
|
style="border-right: none; color: #005bac"
|
||||||
|
@click="pickSubmit"
|
||||||
|
>{{ '确定' }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<view class="goods">
|
<view class="goods">
|
||||||
<view class="pick-up" v-for="item in dataList">
|
<view class="pick-up" v-for="item in dataList">
|
||||||
<view class="banner">
|
<view class="banner">
|
||||||
<image :src="item.pickCover">
|
<image :src="item.pickCover"> </image>
|
||||||
|
<view class="sum"> {{ '数量' }}:{{ item.usableQuantity }} </view>
|
||||||
</image>
|
|
||||||
<view class="sum">
|
|
||||||
{{'数量'}}:{{item.usableQuantity}}
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="time" v-if="item.receiveTime"
|
||||||
<view class="time" v-if="item.receiveTime">{{'截止时间'}}:{{item.receiveTime}}</view>
|
>{{ '截止时间' }}:{{ item.receiveTime }}</view
|
||||||
<view class="button" v-if="item.pickFlag==0" @click="pickSubmitShow(item)">
|
>
|
||||||
|
<view
|
||||||
|
class="button"
|
||||||
|
v-if="item.pickFlag == 0"
|
||||||
|
@click="pickSubmitShow(item)"
|
||||||
|
>
|
||||||
{{ '申请提货' }}
|
{{ '申请提货' }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -49,11 +58,9 @@
|
||||||
pageSize: 50,
|
pageSize: 50,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
carryNum: [
|
carryNum: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
{required: true, message: '请输入', trigger: "blur"},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
dataList:[]
|
dataList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -61,11 +68,10 @@
|
||||||
},
|
},
|
||||||
onNavigationBarButtonTap(e) {
|
onNavigationBarButtonTap(e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/pickupList/index"
|
url: '/pages/pickupList/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
closeTap() {
|
closeTap() {
|
||||||
this.addShow = false
|
this.addShow = false
|
||||||
},
|
},
|
||||||
|
@ -73,15 +79,15 @@
|
||||||
if (this.form.carryNum < 1) {
|
if (this.form.carryNum < 1) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提货数量不能小于1',
|
title: '提货数量不能小于1',
|
||||||
icon:"none",
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.carryGoodsItem.baseQuantity > 1) {
|
if (this.carryGoodsItem.baseQuantity > 1) {
|
||||||
if(this.form.carryNum%this.carryGoodsItem.baseQuantity !== 0){
|
if (this.form.carryNum < this.carryGoodsItem.baseQuantity) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:'提货数量必须是'+this.carryGoodsItem.baseQuantity+'的基数',
|
title: '提货数量必须大于等于' + this.carryGoodsItem.baseQuantity,
|
||||||
icon:"none",
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -89,32 +95,37 @@
|
||||||
if (this.form.carryNum > this.carryGoodsItem.usableQuantity) {
|
if (this.form.carryNum > this.carryGoodsItem.usableQuantity) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '提货数量大于可提数量',
|
title: '提货数量大于可提数量',
|
||||||
icon:"none",
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.addShow = false;
|
this.addShow = false
|
||||||
|
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/thOrder/index?pkId='+ this.carryGoodsItem.pkId
|
url:
|
||||||
+'&num='+this.form.carryNum ,
|
'/pages/thOrder/index?pkId=' +
|
||||||
|
this.carryGoodsItem.pkId +
|
||||||
|
'&num=' +
|
||||||
|
this.form.carryNum,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
pickSubmitShow(item) {
|
pickSubmitShow(item) {
|
||||||
if (item.pickFlag == 1) {
|
if (item.pickFlag == 1) {
|
||||||
// 跳转到支付
|
// 跳转到支付
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/thOrder/index?pkId='+ item.pkId
|
url:
|
||||||
+'&num='+this.form.carryNum ,
|
'/pages/thOrder/index?pkId=' +
|
||||||
|
item.pkId +
|
||||||
|
'&num=' +
|
||||||
|
this.form.carryNum,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.form.carryNum = item.baseQuantity
|
this.form.carryNum = item.baseQuantity
|
||||||
this.form.carryNum1 = item.baseQuantity
|
this.form.carryNum1 = item.baseQuantity
|
||||||
this.form.usableQuantity = item.usableQuantity
|
this.form.usableQuantity = item.usableQuantity
|
||||||
this.addShow = true;
|
this.addShow = true
|
||||||
this.carryGoodsItem = item;
|
this.carryGoodsItem = item
|
||||||
// this.$refs['form'].validate(valid => {
|
// this.$refs['form'].validate(valid => {
|
||||||
// if (!valid) {
|
// if (!valid) {
|
||||||
// return false
|
// return false
|
||||||
|
@ -124,11 +135,11 @@
|
||||||
// })
|
// })
|
||||||
},
|
},
|
||||||
getUserPickUpList() {
|
getUserPickUpList() {
|
||||||
apis.pickList(this.query).then((res)=>{
|
apis.pickList(this.query).then(res => {
|
||||||
this.dataList = res.data
|
this.dataList = res.data
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -156,24 +167,23 @@
|
||||||
.sum-view {
|
.sum-view {
|
||||||
width: 440rpx;
|
width: 440rpx;
|
||||||
height: 64rpx;
|
height: 64rpx;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
border: 1rpx solid #DDDDDD;
|
border: 1rpx solid #dddddd;
|
||||||
border-radius: 32rpx;
|
border-radius: 32rpx;
|
||||||
line-height: 64rpx;
|
line-height: 64rpx;
|
||||||
margin: 30rpx auto;
|
margin: 30rpx auto;
|
||||||
}
|
}
|
||||||
.height-auto {
|
.height-auto {
|
||||||
|
|
||||||
padding: 40rpx 0;
|
padding: 40rpx 0;
|
||||||
width: 525rpx;
|
width: 525rpx;
|
||||||
height: 220rpx;
|
height: 220rpx;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
border-radius: 25rpx;
|
border-radius: 25rpx;
|
||||||
}
|
}
|
||||||
.button {
|
.button {
|
||||||
width: 182rpx;
|
width: 182rpx;
|
||||||
height: 52rpx;
|
height: 52rpx;
|
||||||
background: #005BAC;
|
background: #005bac;
|
||||||
border-radius: 26rpx;
|
border-radius: 26rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 52rpx;
|
line-height: 52rpx;
|
||||||
|
@ -213,7 +223,7 @@
|
||||||
.pick-up {
|
.pick-up {
|
||||||
// width: 330rpx;
|
// width: 330rpx;
|
||||||
// height: 413rpx;
|
// height: 413rpx;
|
||||||
background: #FFFFFF;
|
background: #ffffff;
|
||||||
box-shadow: 0px 5rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
box-shadow: 0px 5rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
|
|
Loading…
Reference in New Issue