Compare commits

..

No commits in common. "0bc82f09869a7261b8e80a24d96999fc6b7e4ddc" and "16c2be0ec0d79b4bde4818cbb148fdaddc086c2d" have entirely different histories.

1 changed files with 215 additions and 225 deletions

View File

@ -1,233 +1,223 @@
<template> <template>
<view> <view>
<u-popup <u-popup :show="addShow"
:show="addShow" closeable
closeable :round="10"
:round="10" mode="center"
mode="center" @close="closeTap">
@close="closeTap" <view class="height-auto">
> <view style="padding: 0 40rpx;">
<view class="height-auto"> <view>{{'购买数量'}}</view>
<view style="padding: 0 40rpx"> <view class="sum-view">
<view>{{ '购买数量' }}</view> <input class="inputs" v-model="form.carryNum" placeholder="" />
<view class="sum-view"> </view>
<input class="inputs" v-model="form.carryNum" placeholder="" /> </view>
</view> <view class="buttons">
</view> <view class="btn" @click="closeTap">{{'取消'}}</view>
<view class="buttons"> <view class="btn" style="border-right: none;color: #005BAC;" @click="pickSubmit">{{'确定'}}</view>
<view class="btn" @click="closeTap">{{ '取消' }}</view> </view>
<view </view>
class="btn" </u-popup>
style="border-right: none; color: #005bac" <view class="goods">
@click="pickSubmit" <view class="pick-up" v-for="item in dataList">
>{{ '确定' }}</view <view class="banner">
> <image :src="item.pickCover">
</view>
</view> </image>
</u-popup> <view class="sum">
<view class="goods"> {{'数量'}}:{{item.usableQuantity}}
<view class="pick-up" v-for="item in dataList"> </view>
<view class="banner"> </view>
<image :src="item.pickCover"> </image> <view class="time" v-if="item.receiveTime">{{'截止时间'}}{{item.receiveTime}}</view>
<view class="sum"> {{ '数量' }}:{{ item.usableQuantity }} </view> <view class="button" v-if="item.pickFlag==0" @click="pickSubmitShow(item)">
</view> {{'申请提货'}}
<view class="time" v-if="item.receiveTime" </view>
>{{ '截止时间' }}{{ item.receiveTime }}</view </view>
> </view>
<view </view>
class="button"
v-if="item.pickFlag == 0"
@click="pickSubmitShow(item)"
>
{{ '申请提货' }}
</view>
</view>
</view>
</view>
</template> </template>
<script> <script>
import * as apis from '@/config/index.js' import * as apis from '@/config/index.js'
export default { export default {
data() { data() {
return { return {
addShow: false, addShow:false,
form: { carryNum: '' }, form: {carryNum:''},
query: { query:{
pageNum: 1, pageNum:1,
pageSize: 50, pageSize:50,
}, },
rules: { rules: {
carryNum: [{ required: true, message: '请输入', trigger: 'blur' }], carryNum: [
}, {required: true, message: '请输入', trigger: "blur"},
dataList: [], ],
} },
}, dataList:[]
mounted() { }
this.getUserPickUpList() },
}, mounted() {
onNavigationBarButtonTap(e) { this.getUserPickUpList()
uni.navigateTo({ },
url: '/pages/pickupList/index', onNavigationBarButtonTap(e) {
}) uni.navigateTo({
}, url:"/pages/pickupList/index"
methods: { })
closeTap() { },
this.addShow = false methods: {
},
pickSubmit() { closeTap(){
if (this.form.carryNum < 1) { this.addShow = false
uni.showToast({ },
title: '提货数量不能小于1', pickSubmit() {
icon: 'none', if(this.form.carryNum<1){
}) uni.showToast({
return title:'提货数量不能小于1',
} icon:"none",
if (this.carryGoodsItem.baseQuantity > 1) { })
if (this.form.carryNum < this.carryGoodsItem.baseQuantity) { return
uni.showToast({ }
title: '提货数量必须大于等于' + this.carryGoodsItem.baseQuantity, if(this.carryGoodsItem.baseQuantity>1){
icon: 'none', if(this.form.carryNum%this.carryGoodsItem.baseQuantity !== 0){
}) uni.showToast({
return title:'提货数量必须是'+this.carryGoodsItem.baseQuantity+'的基数',
} icon:"none",
} })
if (this.form.carryNum > this.carryGoodsItem.usableQuantity) { return
uni.showToast({ }
title: '提货数量大于可提数量', }
icon: 'none', if(this.form.carryNum > this.carryGoodsItem.usableQuantity){
}) uni.showToast({
return title:'提货数量大于可提数量',
} icon:"none",
this.addShow = false })
return
uni.navigateTo({ }
url: this.addShow = false;
'/pages/thOrder/index?pkId=' +
this.carryGoodsItem.pkId +
'&num=' + uni.navigateTo({
this.form.carryNum, url: '/pages/thOrder/index?pkId='+ this.carryGoodsItem.pkId
}) +'&num='+this.form.carryNum ,
}, })
pickSubmitShow(item) { },
if (item.pickFlag == 1) { pickSubmitShow(item) {
// if(item.pickFlag==1){
uni.navigateTo({ //
url: uni.navigateTo({
'/pages/thOrder/index?pkId=' + url: '/pages/thOrder/index?pkId='+ item.pkId
item.pkId + +'&num='+this.form.carryNum ,
'&num=' + })
this.form.carryNum, return
}) }
return this.form.carryNum = item.baseQuantity
} this.form.carryNum1 = item.baseQuantity
this.form.carryNum = item.baseQuantity this.form.usableQuantity = item.usableQuantity
this.form.carryNum1 = item.baseQuantity this.addShow = true;
this.form.usableQuantity = item.usableQuantity this.carryGoodsItem = item;
this.addShow = true // this.$refs['form'].validate(valid => {
this.carryGoodsItem = item // if (!valid) {
// this.$refs['form'].validate(valid => { // return false
// if (!valid) { // }else{
// return false // console.error("11")
// }else{ // }
// console.error("11") // })
// } },
// }) getUserPickUpList(){
}, apis.pickList(this.query).then((res)=>{
getUserPickUpList() { this.dataList = res.data
apis.pickList(this.query).then(res => { })
this.dataList = res.data }
}) }
}, }
},
}
</script> </script>
<style lang="scss"> <style lang="scss">
.inputs { .inputs{
padding-left: 30rpx; padding-left: 30rpx ;
padding-top: 8rpx; padding-top: 8rpx;
text-align: center; text-align: center;
width: 360rpx; width: 360rpx;
} }
.buttons { .buttons{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
border-top: 1rpx solid #ddd; border-top: 1rpx solid #ddd;
} }
.btn { .btn{
width: 330rpx; width: 330rpx;
height: 88rpx; height: 88rpx;
// background: #DDDDDD; // background: #DDDDDD;
line-height: 88rpx; line-height: 88rpx;
border-right: 1px solid #ddd; border-right: 1px solid #ddd;
text-align: center; text-align: center;
} }
.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;
width: 525rpx; padding: 40rpx 0;
height: 220rpx; width: 525rpx;
background: #ffffff; height: 220rpx;
border-radius: 25rpx; background: #FFFFFF;
} border-radius: 25rpx;
.button { }
width: 182rpx; .button{
height: 52rpx; width: 182rpx;
background: #005bac; height: 52rpx;
border-radius: 26rpx; background: #005BAC;
text-align: center; border-radius: 26rpx;
line-height: 52rpx; text-align: center;
color: #fff; line-height: 52rpx;
font-size: 24rpx; color: #fff;
margin: 30rpx auto auto auto; font-size: 24rpx;
} margin: 30rpx auto auto auto;
.time { }
color: #999; .time{
font-size: 24rpx; color: #999;
margin-top: 20rpx; font-size: 24rpx;
} margin-top: 20rpx;
.banner { }
position: relative; .banner{
image { position: relative;
width: 295rpx; image{
height: 180rpx; width: 295rpx;
position: relative; height: 180rpx;
} position: relative;
} }
.sum { }
position: absolute; .sum{
right: 15rpx; position: absolute;
z-index: 1; right: 15rpx;
bottom: 20rpx; z-index: 1;
color: #fff; bottom: 20rpx;
font-size: 20rpx; color: #fff;
} font-size: 20rpx;
page { }
background-color: #f2f2f2; page{
} background-color: #f2f2f2;
.goods { }
display: flex; .goods{
flex-wrap: wrap; display: flex;
padding: 30rpx 0; flex-wrap: wrap;
} padding: 30rpx 0;
.pick-up { }
// width: 330rpx; .pick-up{
// height: 413rpx; // width: 330rpx;
background: #ffffff; // height: 413rpx;
box-shadow: 0px 5rpx 5rpx 0px rgba(0, 0, 0, 0.05); background: #FFFFFF;
border-radius: 15rpx; box-shadow: 0px 5rpx 5rpx 0px rgba(0,0,0,0.05);
margin-left: 30rpx; border-radius: 15rpx;
padding: 20rpx; margin-left: 30rpx;
margin-bottom: 30rpx; padding: 20rpx;
} margin-bottom: 30rpx;
}
</style> </style>