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,14 +1,12 @@
<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 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="" />
@ -16,29 +14,22 @@
</view> </view>
<view class="buttons"> <view class="buttons">
<view class="btn" @click="closeTap">{{'取消'}}</view> <view class="btn" @click="closeTap">{{'取消'}}</view>
<view <view class="btn" style="border-right: none;color: #005BAC;" @click="pickSubmit">{{'确定'}}</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> <image :src="item.pickCover">
<view class="sum"> {{ '数量' }}:{{ item.usableQuantity }} </view>
</image>
<view class="sum">
{{'数量'}}:{{item.usableQuantity}}
</view> </view>
<view class="time" v-if="item.receiveTime" </view>
>{{ '截止时间' }}{{ item.receiveTime }}</view <view class="time" v-if="item.receiveTime">{{'截止时间'}}{{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>
@ -58,9 +49,11 @@ export default {
pageSize:50, pageSize:50,
}, },
rules: { rules: {
carryNum: [{ required: true, message: '请输入', trigger: 'blur' }], carryNum: [
{required: true, message: '请输入', trigger: "blur"},
],
}, },
dataList: [], dataList:[]
} }
}, },
mounted() { mounted() {
@ -68,10 +61,11 @@ export default {
}, },
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
}, },
@ -79,15 +73,15 @@ export default {
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) { if(this.form.carryNum%this.carryGoodsItem.baseQuantity !== 0){
uni.showToast({ uni.showToast({
title: '提货数量必须大于等于' + this.carryGoodsItem.baseQuantity, title:'提货数量必须是'+this.carryGoodsItem.baseQuantity+'的基数',
icon: 'none', icon:"none",
}) })
return return
} }
@ -95,37 +89,32 @@ export default {
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: url: '/pages/thOrder/index?pkId='+ this.carryGoodsItem.pkId
'/pages/thOrder/index?pkId=' + +'&num='+this.form.carryNum ,
this.carryGoodsItem.pkId +
'&num=' +
this.form.carryNum,
}) })
}, },
pickSubmitShow(item) { pickSubmitShow(item) {
if(item.pickFlag==1){ if(item.pickFlag==1){
// //
uni.navigateTo({ uni.navigateTo({
url: url: '/pages/thOrder/index?pkId='+ item.pkId
'/pages/thOrder/index?pkId=' + +'&num='+this.form.carryNum ,
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
@ -135,11 +124,11 @@ export default {
// }) // })
}, },
getUserPickUpList(){ getUserPickUpList(){
apis.pickList(this.query).then(res => { apis.pickList(this.query).then((res)=>{
this.dataList = res.data this.dataList = res.data
}) })
}, }
}, }
} }
</script> </script>
@ -167,23 +156,24 @@ export default {
.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;
@ -223,7 +213,7 @@ page {
.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;