3
0
Fork 0

feat(pickArea): 提货专区放开

This commit is contained in:
woody 2025-08-05 10:47:24 +08:00
parent 5234d19fea
commit ba8680b392
5 changed files with 563 additions and 447 deletions

View File

@ -0,0 +1,68 @@
<template>
<u-popup :show="isPw" mode="center" closeable @close="closePw">
<view class="t_tit mt-20">{{ '支付验证' }}</view>
<view class="box">
<view class="mt-20" v-if="isBank">请输入短信验证码</view>
<view class="mt-20" v-else>请输入密码</view>
<u--input v-if="isBank" border="surround" v-model="codeValue"></u--input>
<u--input
v-else
border="surround"
type="password"
v-model="codeValue"
></u--input>
<u-button
type="success"
class="mt-20"
shape="circle"
:loading="isLoading"
loadingText="支付中"
@tap="payPw()"
color="linear-gradient(to right, #005BAC, #005BAC )"
>{{ '立即支付' }}
</u-button>
</view>
</u-popup>
</template>
<script>
export default {
name: 'PayModal',
props: {
isBank: {
type: Boolean,
default: false,
},
},
data() {
return {
isPw: false,
codeValue: '',
isLoading: false,
}
},
}
</script>
<style lang="scss" scoped>
::v-deep .u-popup__content {
width: 80%;
}
.box {
padding: 40px;
text-align: center;
}
.mt-20 {
margin-top: 20px;
}
.t_tit {
text-align: center;
}
.mt-20 {
margin-bottom: 20px;
}
.mt-20 {
margin-top: 20px;
}
</style>

View File

@ -277,6 +277,13 @@ export default {
menuKey: 'wallet',
ifshow: false,
},
{
url: '/pages/pickupArea/pickupArea',
name: '提货专区',
imgurl: '../../static/images/my_icon3.png',
menuKey: 'pickGoods',
ifshow: true,
},
{
url: '/pages/bonus/index',
name: '奖金明细',

View File

@ -1,35 +1,47 @@
<template>
<view>
<u-popup :show="addShow"
<u-popup
:show="addShow"
closeable
:round="10"
mode="center"
@close="closeTap">
@close="closeTap"
>
<view class="height-auto">
<view style="padding: 0 40rpx;">
<view>{{'购买数量'}}</view>
<view style="padding: 0 40rpx">
<view>{{ '提货数量' }}</view>
<view class="sum-view">
<input class="inputs" v-model="form.carryNum" placeholder="" />
</view>
</view>
<view class="buttons">
<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>
</u-popup>
<view class="goods">
<view class="pick-up" v-for="item in dataList">
<view class="banner">
<image :src="item.pickCover">
</image>
<view class="sum">
{{'数量'}}:{{item.usableQuantity}}
<image :src="item.pickCover"> </image>
</view>
<view class="sum-wrapper">
<view>可提数量:</view>
<view>{{ item.usableQuantity }}</view>
</view>
<view class="time" v-if="item.receiveTime">{{'截止时间'}}{{item.receiveTime}}</view>
<view class="button" v-if="item.pickFlag==0" @click="pickSubmitShow(item)">
<view class="time" v-if="item.receiveTime"
>{{ '截止时间' }}{{ item.receiveTime }}</view
>
<view
class="button"
v-if="item.pickFlag == 0"
@click="pickSubmitShow(item)"
>
{{ '申请提货' }}
</view>
</view>
@ -49,11 +61,9 @@
pageSize: 50,
},
rules: {
carryNum: [
{required: true, message: '请输入', trigger: "blur"},
],
carryNum: [{ required: true, message: '请输入', trigger: 'blur' }],
},
dataList:[]
dataList: [],
}
},
mounted() {
@ -61,11 +71,10 @@
},
onNavigationBarButtonTap(e) {
uni.navigateTo({
url:"/pages/pickupList/index"
url: '/pages/pickupList/index',
})
},
methods: {
closeTap() {
this.addShow = false
},
@ -73,15 +82,16 @@
if (this.form.carryNum < 1) {
uni.showToast({
title: '提货数量不能小于1',
icon:"none",
icon: 'none',
})
return
}
if (this.carryGoodsItem.baseQuantity > 1) {
if (this.form.carryNum % this.carryGoodsItem.baseQuantity !== 0) {
uni.showToast({
title:'提货数量必须是'+this.carryGoodsItem.baseQuantity+'的基数',
icon:"none",
title:
'提货数量必须是' + this.carryGoodsItem.baseQuantity + '的基数',
icon: 'none',
})
return
}
@ -89,32 +99,37 @@
if (this.form.carryNum > this.carryGoodsItem.usableQuantity) {
uni.showToast({
title: '提货数量大于可提数量',
icon:"none",
icon: 'none',
})
return
}
this.addShow = false;
this.addShow = false
uni.navigateTo({
url: '/pages/thOrder/index?pkId='+ this.carryGoodsItem.pkId
+'&num='+this.form.carryNum ,
url:
'/pages/thOrder/index?pkId=' +
this.carryGoodsItem.pkId +
'&num=' +
this.form.carryNum,
})
},
pickSubmitShow(item) {
if (item.pickFlag == 1) {
//
uni.navigateTo({
url: '/pages/thOrder/index?pkId='+ item.pkId
+'&num='+this.form.carryNum ,
url:
'/pages/thOrder/index?pkId=' +
item.pkId +
'&num=' +
this.form.carryNum,
})
return
}
this.form.carryNum = item.baseQuantity
this.form.carryNum1 = item.baseQuantity
this.form.usableQuantity = item.usableQuantity
this.addShow = true;
this.carryGoodsItem = item;
this.addShow = true
this.carryGoodsItem = item
// this.$refs['form'].validate(valid => {
// if (!valid) {
// return false
@ -124,11 +139,11 @@
// })
},
getUserPickUpList() {
apis.pickList(this.query).then((res)=>{
apis.pickList(this.query).then(res => {
this.dataList = res.data
})
}
}
},
},
}
</script>
@ -156,24 +171,31 @@
.sum-view {
width: 440rpx;
height: 64rpx;
background: #FFFFFF;
border: 1rpx solid #DDDDDD;
background: #ffffff;
border: 1rpx solid #dddddd;
border-radius: 32rpx;
line-height: 64rpx;
margin: 30rpx auto;
}
.height-auto {
padding: 40rpx 0;
width: 525rpx;
height: 220rpx;
background: #FFFFFF;
background: #ffffff;
border-radius: 25rpx;
}
.sum-wrapper {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
font-size: 24rpx;
color: #666;
}
.button {
width: 182rpx;
width: 100%;
height: 52rpx;
background: #005BAC;
background: #005bac;
border-radius: 26rpx;
text-align: center;
line-height: 52rpx;
@ -190,7 +212,7 @@
position: relative;
image {
width: 295rpx;
height: 180rpx;
height: 295rpx;
position: relative;
}
}
@ -213,7 +235,7 @@
.pick-up {
// width: 330rpx;
// height: 413rpx;
background: #FFFFFF;
background: #ffffff;
box-shadow: 0px 5rpx 5rpx 0px rgba(0, 0, 0, 0.05);
border-radius: 15rpx;
margin-left: 30rpx;

View File

@ -3,10 +3,10 @@
<view class="pickList">
<view class="pick" v-for="item in dataList">
<view class="pick-content">
<view class="pick-flex">
<!-- <view class="pick-flex">
<view class="size">{{'提货卡来源'}}</view>
<view class="right">{{item.pickTypeVal}}</view>
</view>
</view> -->
<view class="pick-flex">
<view class="size">{{ '提货数量' }}</view>
<view class="right">{{ item.pickQuantity }}</view>
@ -15,9 +15,7 @@
<view class="size">{{ '订单编号' }}</view>
<view class="right">{{ item.pickOrder }}</view>
</view>
<view class="lines">
</view>
<view class="lines"> </view>
<view class="time-right">{{ item.pickTime }}</view>
</view>
</view>
@ -34,7 +32,7 @@
pageNum: 1,
pageSize: 50,
},
dataList:[]
dataList: [],
}
},
mounted() {
@ -42,17 +40,17 @@
},
methods: {
getUserPickUpList() {
apis.pickLogList(this.query).then((res)=>{
apis.pickLogList(this.query).then(res => {
if (res.total > 0) {
this.dataList.push(...res.rows)
}
})
}
},
},
onReachBottom() {
this.query.pageNum += 1
this.getUserPickUpList()
}
},
}
</script>
@ -65,7 +63,7 @@
}
.lines {
height: 1rpx;
background: #EEEEEE;
background: #eeeeee;
}
.pick-flex {
display: flex;

View File

@ -1,22 +1,28 @@
<template>
<view class="main">
<u-popup :show="pswShow"
<u-popup
:show="pswShow"
class="pspopup"
mode="center"
closeable
@close="pswShow=false">
@close="pswShow = false"
>
<view class="t_tit">二级密码</view>
<view class="box">
<u--input border="surround"
<u--input
border="surround"
type="password"
v-model="password"></u--input>
<u-button type="success"
v-model="password"
></u--input>
<u-button
type="success"
class="uBtn"
shape="circle"
loadingText="支付中"
@tap="surePsw"
color="linear-gradient(to right, #005BAC, #005BAC )">{{'立即支付'}} </u-button>
color="linear-gradient(to right, #005BAC, #005BAC )"
>{{ '立即支付' }}
</u-button>
</view>
</u-popup>
<view class="contents">
@ -24,128 +30,141 @@
<view class="lines"></view>
<view class="text">收货信息</view>
</view>
<u-form :model="addressForm"
labelWidth="auto"
ref="uForm">
<u-form :model="addressForm" labelWidth="auto" ref="uForm">
<view class="view-class">
<u-form-item :label="'收货人'"
label-width="100px"
prop="recName">
<u-input v-model="addressForm.recName"
<u-form-item :label="'收货人'" label-width="100px" prop="recName">
<u-input
v-model="addressForm.recName"
placeholder-class="place-class"
class="border-color"
placeholder="请输入收货人姓名" />
placeholder="请输入收货人姓名"
/>
</u-form-item>
</view>
<view class="view-class">
<u-form-item :label="'联系方式'"
label-width="100px"
prop="recPhone">
<u-input v-model="addressForm.recPhone"
<u-form-item :label="'联系方式'" label-width="100px" prop="recPhone">
<u-input
v-model="addressForm.recPhone"
:maxlength="userInfo.pkSettleCountry == 1 ? 11 : 20"
type="number"
placeholder-class="place-class"
class="border-color"
placeholder="请输入联系方式" />
placeholder="请输入联系方式"
/>
</u-form-item>
</view>
<view class="view-class"
<view
class="view-class"
@click="getDiqu"
style="height: 110rpx;display: flex;align-items: center;">
<u-form-item :label="'收货地址'"
style="height: 110rpx; display: flex; align-items: center"
>
<u-form-item
:label="'收货地址'"
label-width="100px"
prop="recProvince">
<view v-if="address"
style="font-size: 28rpx;color: #333;margin-left: 20rpx;">{{address}}</view>
<view style="margin-left: 20rpx;font-size: 28rpx;color: rgb(192, 196, 204);"
v-else>请选择</view>
prop="recProvince"
>
<view
v-if="address"
style="font-size: 28rpx; color: #333; margin-left: 20rpx"
>{{ address }}</view
>
<view
style="
margin-left: 20rpx;
font-size: 28rpx;
color: rgb(192, 196, 204);
"
v-else
>请选择</view
>
</u-form-item>
<view class="drop">
<image src="../../static/images/drop.png"></image>
</view>
</view>
<view class="view-class">
<u-form-item :label="'详细地址'"
<u-form-item
:label="'详细地址'"
class="label-style"
label-width="100px"
prop="recAddress">
<u-input v-model="addressForm.recAddress"
prop="recAddress"
>
<u-input
v-model="addressForm.recAddress"
placeholder-class="place-class"
maxlength="200"
class="border-color"
:placeholder="'请输入详细地址'" />
:placeholder="'请输入详细地址'"
/>
</u-form-item>
</view>
<view class="view-class">
<u-form-item :label="'备注'"
label-width="100px"
prop="address">
<u-input v-model="addressForm.remark"
<u-form-item :label="'备注'" label-width="100px" prop="address">
<u-input
v-model="addressForm.remark"
placeholder-class="place-class"
class="border-color"
placeholder="" />
placeholder=""
/>
</u-form-item>
</view>
</u-form>
</view>
<view style="margin-top: 20rpx;">
<view style="margin-top: 20rpx">
<view class="height-auto bgcolors">
<view class="lines color-styles"></view>
<view class="text"
style="color: #333;">商品信息</view>
<view class="text" style="color: #333">商品信息</view>
</view>
<view style="background-color: #fff;">
<view class="goods-info1"
v-for="item in allData">
<view style="background-color: #fff">
<view class="goods-info1" v-for="item in allData">
<view class="goods-infot">
<img :src="item.cover"
class="cover"
alt="">
<img :src="item.cover" class="cover" alt="" />
<view class="disFlex">
<view style="color: #333;font-size: 28rpx;">{{ item.productName }}</view>
<view style="color: #999;font-size: 22rpx;">X{{item.quantity}}</view>
<view style="color: #333; font-size: 28rpx">{{
item.productName
}}</view>
<view style="color: #999; font-size: 22rpx"
>X{{ item.quantity }}</view
>
</view>
</view>
<view class="goods_infob" style="color: #999;font-size: 28rpx;">产品规格:{{ item.specsName }}</view>
<view class="goods_infob" style="color: #999; font-size: 28rpx"
>产品规格:{{ item.specsName }}</view
>
</view>
<view class="goods-info"
style="border: none;">
<view style="color: #333;font-size: 28rpx;">{{'邮费'}}</view>
<view style="color: #333;font-size: 24rpx;">{{postage}}</view>
<view class="goods-info" style="border: none">
<view style="color: #333; font-size: 28rpx">{{ '邮费' }}</view>
<view style="color: #333; font-size: 24rpx">{{ postage }}</view>
</view>
</view>
</view>
<!-- 成功 -->
<u-modal :show="showSucce"
<u-modal
:show="showSucce"
showConfirmButton
:content='content'
confirmColor='#DE3932'
:content="content"
confirmColor="#DE3932"
@confirm="reset"
ref="uModal"
:asyncClose="true"></u-modal>
:asyncClose="true"
></u-modal>
<!-- 二维码 -->
<u-popup :show="wxPopup"
mode="center"
closeable
@close="closewxPopup">
<u-popup :show="wxPopup" mode="center" closeable @close="closewxPopup">
<view class="t_tits">{{ '微信支付' }}</view>
<view class="pay_code">
<div ref="qrCodeUrlWx"
class="qrcode"></div>
<div ref="qrCodeUrlWx" class="qrcode"></div>
</view>
</u-popup>
<v-address ref="address"
<v-address
ref="address"
@getAddressData="AddressData"
:defaultCode="defaultCode"
@addressData="addressData"></v-address>
<u-button type="success"
shape="circle"
class="btn"
@click="paySubmit"> </u-button>
<view style="height: 20rpx;"></view>
@addressData="addressData"
></v-address>
<u-button type="success" shape="circle" class="btn" @click="paySubmit"
> </u-button
>
<view style="height: 20rpx"></view>
</view>
</template>
@ -217,14 +236,15 @@ export default {
},
{
validator: (rule, value, callback) => {
return this.$u.test.mobile(value);
return this.$u.test.mobile(value)
},
message: "手机号格式不正确",
trigger: ["blur"],
message: '手机号格式不正确',
trigger: ['blur'],
},
],
},
allData: [],
orderCode: '',
}
},
onLoad(option) {
@ -251,20 +271,19 @@ export default {
quantity: allData[2].split('#')[0],
pkId: allData[1].split('&')[0],
})
.then((res) => {
.then(res => {
if (res.code == '200') {
this.allData = res.data.detailList
}
})
},
getGenerate() {
api.generate().then((res) => {
api.generate().then(res => {
uni.setStorageSync('mToken', res.msg)
})
},
paySubmit() {
this.$refs.uForm.validate().then((res) => {
// this.pswShow = true
this.$refs.uForm.validate().then(res => {
let allData = decodeURIComponent(window.location.href).split('=')
let obj = {
quantity: allData[2].split('#')[0],
@ -277,24 +296,20 @@ export default {
recAddress: this.addressForm.recAddress,
remark: this.addressForm.remark,
}
api.payPickOrder(obj).then((res) => {
// this.pswShow = true
api.payPickOrder(obj).then(res => {
if (res.code == 200) {
// this.scanPayBfWx(8)
this.pswShow = false
let paramsPost = { orderCode: res.data, specialArea: 8 }
uni.navigateTo({
url:
'/pages/pay/index?paramsPost=' +
JSON.stringify(paramsPost) +
'&businessType=1',
})
this.orderCode = res.data
this.pswShow = true
// this.paramsPost = { orderCode: res.data, specialArea: 8 }
}
})
})
},
reset() {
this.$store.dispatch('GetInfo').then((res) => {
this.$store.dispatch('GetInfo').then(res => {
uni.reLaunch({
url: '/pages/index/index',
})
@ -311,7 +326,7 @@ export default {
this.wxPopup = false
this.showSucce = true
} else {
api.payStatus(data).then((res) => {
api.payStatus(data).then(res => {
that.sucPay = res.data
})
}
@ -329,7 +344,7 @@ export default {
payChannel: val,
payType: 2,
}
api.unifiedorder(params).then((res) => {
api.unifiedorder(params).then(res => {
this.wxPopup = true
this.$nextTick(() => {
new QRCode(
@ -350,7 +365,7 @@ export default {
this.checkPayStatus(params)
},
getPostAge(data) {
apis.pickPostAge(data).then((res) => {
apis.pickPostAge(data).then(res => {
this.postage = res.data
// this.totalAmont =
// parseFloat(this.allGoodsData.priceAmount) +
@ -362,37 +377,43 @@ export default {
.checkPwd({
pwd: this.password,
})
.then((res) => {
.then(res => {
if (res.code == 200) {
let allData = decodeURIComponent(window.location.href).split('=')
let obj = {
quantity: allData[2].split('#')[0],
pkId: allData[1].split('&')[0],
recName: this.addressForm.recName,
recPhone: this.addressForm.recPhone,
recProvince: this.addressForm.recProvince,
recCity: this.addressForm.recCity,
recCounty: this.addressForm.recCounty,
recAddress: this.addressForm.recAddress,
remark: this.addressForm.remark,
orderCode: this.orderCode,
specialArea: 8,
payPwd: this.password,
pkSettleCountry: this.pkCountry || 1,
pkCountry: this.pkCountry || 1,
}
api
.payPickOrder(obj)
.then((res) => {
.payOthOrder(obj)
.then(res => {
if (res.code == 200) {
// this.scanPayBfWx(8)
this.pswShow = false
let paramsPost = { orderCode: res.data, specialArea: 8 }
uni.navigateTo({
url:
'/pages/pay/index?paramsPost=' +
JSON.stringify(paramsPost) +
'&businessType=1',
uni.showToast({
title: '提货成功',
icon: 'none',
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/mine/order/index',
})
}, 500)
// this.scanPayBfWx(8)
// this.pswShow = false
// let paramsPost = { orderCode: res.data, specialArea: 8 }
// uni.navigateTo({
// url:
// '/pages/pay/index?paramsPost=' +
// JSON.stringify(paramsPost) +
// '&businessType=1',
// })
// this.paramsPost = { orderCode: res.data, specialArea: 8 }
}
})
.catch((err) => {
.catch(err => {
this.isLoading.close()
})
}
@ -511,7 +532,7 @@ export default {
}
.height-auto {
height: 94rpx;
background: #005BAC;
background: #005bac;
line-height: 94rpx;
padding: 0 25rpx;
display: flex;
@ -611,7 +632,7 @@ page {
background-color: #fff;
}
.btn {
background-color: #005BAC;
background-color: #005bac;
border: none;
height: 92rpx;
line-height: 92rpx;