forked from angelo/web-retail-h5
feat(pickArea): 提货专区放开
This commit is contained in:
parent
5234d19fea
commit
ba8680b392
|
|
@ -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>
|
||||||
|
|
@ -277,6 +277,13 @@ export default {
|
||||||
menuKey: 'wallet',
|
menuKey: 'wallet',
|
||||||
ifshow: false,
|
ifshow: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
url: '/pages/pickupArea/pickupArea',
|
||||||
|
name: '提货专区',
|
||||||
|
imgurl: '../../static/images/my_icon3.png',
|
||||||
|
menuKey: 'pickGoods',
|
||||||
|
ifshow: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
url: '/pages/bonus/index',
|
url: '/pages/bonus/index',
|
||||||
name: '奖金明细',
|
name: '奖金明细',
|
||||||
|
|
|
||||||
|
|
@ -1,223 +1,245 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<u-popup :show="addShow"
|
<u-popup
|
||||||
closeable
|
:show="addShow"
|
||||||
:round="10"
|
closeable
|
||||||
mode="center"
|
:round="10"
|
||||||
@close="closeTap">
|
mode="center"
|
||||||
<view class="height-auto">
|
@close="closeTap"
|
||||||
<view style="padding: 0 40rpx;">
|
>
|
||||||
<view>{{'购买数量'}}</view>
|
<view class="height-auto">
|
||||||
<view class="sum-view">
|
<view style="padding: 0 40rpx">
|
||||||
<input class="inputs" v-model="form.carryNum" placeholder="" />
|
<view>{{ '提货数量' }}</view>
|
||||||
</view>
|
<view class="sum-view">
|
||||||
</view>
|
<input class="inputs" v-model="form.carryNum" placeholder="" />
|
||||||
<view class="buttons">
|
</view>
|
||||||
<view class="btn" @click="closeTap">{{'取消'}}</view>
|
</view>
|
||||||
<view class="btn" style="border-right: none;color: #005BAC;" @click="pickSubmit">{{'确定'}}</view>
|
<view class="buttons">
|
||||||
</view>
|
<view class="btn" @click="closeTap">{{ '取消' }}</view>
|
||||||
</view>
|
<view
|
||||||
</u-popup>
|
class="btn"
|
||||||
<view class="goods">
|
style="border-right: none; color: #005bac"
|
||||||
<view class="pick-up" v-for="item in dataList">
|
@click="pickSubmit"
|
||||||
<view class="banner">
|
>{{ '确定' }}</view
|
||||||
<image :src="item.pickCover">
|
>
|
||||||
|
</view>
|
||||||
</image>
|
</view>
|
||||||
<view class="sum">
|
</u-popup>
|
||||||
{{'数量'}}:{{item.usableQuantity}}
|
<view class="goods">
|
||||||
</view>
|
<view class="pick-up" v-for="item in dataList">
|
||||||
</view>
|
<view class="banner">
|
||||||
<view class="time" v-if="item.receiveTime">{{'截止时间'}}:{{item.receiveTime}}</view>
|
<image :src="item.pickCover"> </image>
|
||||||
<view class="button" v-if="item.pickFlag==0" @click="pickSubmitShow(item)">
|
</view>
|
||||||
{{'申请提货'}}
|
<view class="sum-wrapper">
|
||||||
</view>
|
<view>可提数量:</view>
|
||||||
</view>
|
<view>{{ item.usableQuantity }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="time" v-if="item.receiveTime"
|
||||||
|
>{{ '截止时间' }}:{{ item.receiveTime }}</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: [
|
carryNum: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||||
{required: true, message: '请输入', trigger: "blur"},
|
},
|
||||||
],
|
dataList: [],
|
||||||
},
|
}
|
||||||
dataList:[]
|
},
|
||||||
}
|
mounted() {
|
||||||
},
|
this.getUserPickUpList()
|
||||||
mounted() {
|
},
|
||||||
this.getUserPickUpList()
|
onNavigationBarButtonTap(e) {
|
||||||
},
|
uni.navigateTo({
|
||||||
onNavigationBarButtonTap(e) {
|
url: '/pages/pickupList/index',
|
||||||
uni.navigateTo({
|
})
|
||||||
url:"/pages/pickupList/index"
|
},
|
||||||
})
|
methods: {
|
||||||
},
|
closeTap() {
|
||||||
methods: {
|
this.addShow = false
|
||||||
|
},
|
||||||
|
pickSubmit() {
|
||||||
|
if (this.form.carryNum < 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '提货数量不能小于1',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.carryGoodsItem.baseQuantity > 1) {
|
||||||
|
if (this.form.carryNum % this.carryGoodsItem.baseQuantity !== 0) {
|
||||||
|
uni.showToast({
|
||||||
|
title:
|
||||||
|
'提货数量必须是' + this.carryGoodsItem.baseQuantity + '的基数',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.form.carryNum > this.carryGoodsItem.usableQuantity) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '提货数量大于可提数量',
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.addShow = false
|
||||||
|
|
||||||
closeTap(){
|
uni.navigateTo({
|
||||||
this.addShow = false
|
url:
|
||||||
},
|
'/pages/thOrder/index?pkId=' +
|
||||||
pickSubmit() {
|
this.carryGoodsItem.pkId +
|
||||||
if(this.form.carryNum<1){
|
'&num=' +
|
||||||
uni.showToast({
|
this.form.carryNum,
|
||||||
title:'提货数量不能小于1',
|
})
|
||||||
icon:"none",
|
},
|
||||||
})
|
pickSubmitShow(item) {
|
||||||
return
|
if (item.pickFlag == 1) {
|
||||||
}
|
// 跳转到支付
|
||||||
if(this.carryGoodsItem.baseQuantity>1){
|
uni.navigateTo({
|
||||||
if(this.form.carryNum%this.carryGoodsItem.baseQuantity !== 0){
|
url:
|
||||||
uni.showToast({
|
'/pages/thOrder/index?pkId=' +
|
||||||
title:'提货数量必须是'+this.carryGoodsItem.baseQuantity+'的基数',
|
item.pkId +
|
||||||
icon:"none",
|
'&num=' +
|
||||||
})
|
this.form.carryNum,
|
||||||
return
|
})
|
||||||
}
|
return
|
||||||
}
|
}
|
||||||
if(this.form.carryNum > this.carryGoodsItem.usableQuantity){
|
this.form.carryNum = item.baseQuantity
|
||||||
uni.showToast({
|
this.form.carryNum1 = item.baseQuantity
|
||||||
title:'提货数量大于可提数量',
|
this.form.usableQuantity = item.usableQuantity
|
||||||
icon:"none",
|
this.addShow = true
|
||||||
})
|
this.carryGoodsItem = item
|
||||||
return
|
// this.$refs['form'].validate(valid => {
|
||||||
}
|
// if (!valid) {
|
||||||
this.addShow = false;
|
// return false
|
||||||
|
// }else{
|
||||||
|
// console.error("11")
|
||||||
uni.navigateTo({
|
// }
|
||||||
url: '/pages/thOrder/index?pkId='+ this.carryGoodsItem.pkId
|
// })
|
||||||
+'&num='+this.form.carryNum ,
|
},
|
||||||
})
|
getUserPickUpList() {
|
||||||
},
|
apis.pickList(this.query).then(res => {
|
||||||
pickSubmitShow(item) {
|
this.dataList = res.data
|
||||||
if(item.pickFlag==1){
|
})
|
||||||
// 跳转到支付
|
},
|
||||||
uni.navigateTo({
|
},
|
||||||
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.$refs['form'].validate(valid => {
|
|
||||||
// if (!valid) {
|
|
||||||
// return false
|
|
||||||
// }else{
|
|
||||||
// console.error("11")
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
getUserPickUpList(){
|
|
||||||
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;
|
||||||
padding: 40rpx 0;
|
width: 525rpx;
|
||||||
width: 525rpx;
|
height: 220rpx;
|
||||||
height: 220rpx;
|
background: #ffffff;
|
||||||
background: #FFFFFF;
|
border-radius: 25rpx;
|
||||||
border-radius: 25rpx;
|
}
|
||||||
}
|
.sum-wrapper {
|
||||||
.button{
|
display: flex;
|
||||||
width: 182rpx;
|
justify-content: space-between;
|
||||||
height: 52rpx;
|
align-items: center;
|
||||||
background: #005BAC;
|
margin-top: 10rpx;
|
||||||
border-radius: 26rpx;
|
font-size: 24rpx;
|
||||||
text-align: center;
|
color: #666;
|
||||||
line-height: 52rpx;
|
}
|
||||||
color: #fff;
|
.button {
|
||||||
font-size: 24rpx;
|
width: 100%;
|
||||||
margin: 30rpx auto auto auto;
|
height: 52rpx;
|
||||||
}
|
background: #005bac;
|
||||||
.time{
|
border-radius: 26rpx;
|
||||||
color: #999;
|
text-align: center;
|
||||||
font-size: 24rpx;
|
line-height: 52rpx;
|
||||||
margin-top: 20rpx;
|
color: #fff;
|
||||||
}
|
font-size: 24rpx;
|
||||||
.banner{
|
margin: 30rpx auto auto auto;
|
||||||
position: relative;
|
}
|
||||||
image{
|
.time {
|
||||||
width: 295rpx;
|
color: #999;
|
||||||
height: 180rpx;
|
font-size: 24rpx;
|
||||||
position: relative;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
.banner {
|
||||||
.sum{
|
position: relative;
|
||||||
position: absolute;
|
image {
|
||||||
right: 15rpx;
|
width: 295rpx;
|
||||||
z-index: 1;
|
height: 295rpx;
|
||||||
bottom: 20rpx;
|
position: relative;
|
||||||
color: #fff;
|
}
|
||||||
font-size: 20rpx;
|
}
|
||||||
}
|
.sum {
|
||||||
page{
|
position: absolute;
|
||||||
background-color: #f2f2f2;
|
right: 15rpx;
|
||||||
}
|
z-index: 1;
|
||||||
.goods{
|
bottom: 20rpx;
|
||||||
display: flex;
|
color: #fff;
|
||||||
flex-wrap: wrap;
|
font-size: 20rpx;
|
||||||
padding: 30rpx 0;
|
}
|
||||||
}
|
page {
|
||||||
.pick-up{
|
background-color: #f2f2f2;
|
||||||
// width: 330rpx;
|
}
|
||||||
// height: 413rpx;
|
.goods {
|
||||||
background: #FFFFFF;
|
display: flex;
|
||||||
box-shadow: 0px 5rpx 5rpx 0px rgba(0,0,0,0.05);
|
flex-wrap: wrap;
|
||||||
border-radius: 15rpx;
|
padding: 30rpx 0;
|
||||||
margin-left: 30rpx;
|
}
|
||||||
padding: 20rpx;
|
.pick-up {
|
||||||
margin-bottom: 30rpx;
|
// width: 330rpx;
|
||||||
}
|
// height: 413rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
box-shadow: 0px 5rpx 5rpx 0px rgba(0, 0, 0, 0.05);
|
||||||
|
border-radius: 15rpx;
|
||||||
|
margin-left: 30rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,95 +1,93 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="pickList">
|
<view class="pickList">
|
||||||
<view class="pick" v-for="item in dataList">
|
<view class="pick" v-for="item in dataList">
|
||||||
<view class="pick-content">
|
<view class="pick-content">
|
||||||
<view class="pick-flex">
|
<!-- <view class="pick-flex">
|
||||||
<view class="size">{{'提货卡来源'}}</view>
|
<view class="size">{{'提货卡来源'}}</view>
|
||||||
<view class="right">{{item.pickTypeVal}}</view>
|
<view class="right">{{item.pickTypeVal}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
<view class="pick-flex">
|
<view class="pick-flex">
|
||||||
<view class="size">{{'提货数量'}}</view>
|
<view class="size">{{ '提货数量' }}</view>
|
||||||
<view class="right">{{item.pickQuantity}}</view>
|
<view class="right">{{ item.pickQuantity }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="pick-flex">
|
<view class="pick-flex">
|
||||||
<view class="size">{{'订单编号'}}</view>
|
<view class="size">{{ '订单编号' }}</view>
|
||||||
<view class="right">{{item.pickOrder}}</view>
|
<view class="right">{{ item.pickOrder }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lines">
|
<view class="lines"> </view>
|
||||||
|
<view class="time-right">{{ item.pickTime }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="time-right">{{item.pickTime}}</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</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 {
|
||||||
query:{
|
query: {
|
||||||
pageNum:1,
|
pageNum: 1,
|
||||||
pageSize:50,
|
pageSize: 50,
|
||||||
},
|
},
|
||||||
dataList:[]
|
dataList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getUserPickUpList()
|
this.getUserPickUpList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getUserPickUpList(){
|
getUserPickUpList() {
|
||||||
apis.pickLogList(this.query).then((res)=>{
|
apis.pickLogList(this.query).then(res => {
|
||||||
if (res.total>0) {
|
if (res.total > 0) {
|
||||||
this.dataList.push(...res.rows)
|
this.dataList.push(...res.rows)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.query.pageNum+=1
|
this.query.pageNum += 1
|
||||||
this.getUserPickUpList()
|
this.getUserPickUpList()
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.time-right{
|
.time-right {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
margin: 20rpx 0 0 0;
|
margin: 20rpx 0 0 0;
|
||||||
color: #999;
|
color: #999;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
.lines{
|
.lines {
|
||||||
height: 1rpx;
|
height: 1rpx;
|
||||||
background: #EEEEEE;
|
background: #eeeeee;
|
||||||
}
|
}
|
||||||
.pick-flex{
|
.pick-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
page{
|
page {
|
||||||
background-color: #f2f2f2;
|
background-color: #f2f2f2;
|
||||||
}
|
}
|
||||||
.pickList{
|
.pickList {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
.pick{
|
.pick {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin-bottom: 30rpx;
|
margin-bottom: 30rpx;
|
||||||
/* height: 300rpx; */
|
/* height: 300rpx; */
|
||||||
padding: 30rpx 30rpx 20rpx 30rpx;
|
padding: 30rpx 30rpx 20rpx 30rpx;
|
||||||
}
|
}
|
||||||
.size{
|
.size {
|
||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
.right{
|
.right {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,28 @@
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="main">
|
<view class="main">
|
||||||
<u-popup :show="pswShow"
|
<u-popup
|
||||||
class="pspopup"
|
:show="pswShow"
|
||||||
mode="center"
|
class="pspopup"
|
||||||
closeable
|
mode="center"
|
||||||
@close="pswShow=false">
|
closeable
|
||||||
|
@close="pswShow = false"
|
||||||
|
>
|
||||||
<view class="t_tit">二级密码</view>
|
<view class="t_tit">二级密码</view>
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<u--input border="surround"
|
<u--input
|
||||||
type="password"
|
border="surround"
|
||||||
v-model="password"></u--input>
|
type="password"
|
||||||
<u-button type="success"
|
v-model="password"
|
||||||
class="uBtn"
|
></u--input>
|
||||||
shape="circle"
|
<u-button
|
||||||
loadingText="支付中"
|
type="success"
|
||||||
@tap="surePsw"
|
class="uBtn"
|
||||||
color="linear-gradient(to right, #005BAC, #005BAC )">{{'立即支付'}} </u-button>
|
shape="circle"
|
||||||
|
loadingText="支付中"
|
||||||
|
@tap="surePsw"
|
||||||
|
color="linear-gradient(to right, #005BAC, #005BAC )"
|
||||||
|
>{{ '立即支付' }}
|
||||||
|
</u-button>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<view class="contents">
|
<view class="contents">
|
||||||
|
|
@ -24,128 +30,141 @@
|
||||||
<view class="lines"></view>
|
<view class="lines"></view>
|
||||||
<view class="text">收货信息</view>
|
<view class="text">收货信息</view>
|
||||||
</view>
|
</view>
|
||||||
<u-form :model="addressForm"
|
<u-form :model="addressForm" labelWidth="auto" ref="uForm">
|
||||||
labelWidth="auto"
|
|
||||||
ref="uForm">
|
|
||||||
<view class="view-class">
|
<view class="view-class">
|
||||||
<u-form-item :label="'收货人'"
|
<u-form-item :label="'收货人'" label-width="100px" prop="recName">
|
||||||
label-width="100px"
|
<u-input
|
||||||
prop="recName">
|
v-model="addressForm.recName"
|
||||||
<u-input v-model="addressForm.recName"
|
placeholder-class="place-class"
|
||||||
placeholder-class="place-class"
|
class="border-color"
|
||||||
class="border-color"
|
placeholder="请输入收货人姓名"
|
||||||
placeholder="请输入收货人姓名" />
|
/>
|
||||||
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-class">
|
<view class="view-class">
|
||||||
<u-form-item :label="'联系方式'"
|
<u-form-item :label="'联系方式'" label-width="100px" prop="recPhone">
|
||||||
label-width="100px"
|
<u-input
|
||||||
prop="recPhone">
|
v-model="addressForm.recPhone"
|
||||||
<u-input v-model="addressForm.recPhone"
|
:maxlength="userInfo.pkSettleCountry == 1 ? 11 : 20"
|
||||||
:maxlength="userInfo.pkSettleCountry == 1?11:20"
|
type="number"
|
||||||
type="number"
|
placeholder-class="place-class"
|
||||||
placeholder-class="place-class"
|
class="border-color"
|
||||||
class="border-color"
|
placeholder="请输入联系方式"
|
||||||
placeholder="请输入联系方式" />
|
/>
|
||||||
|
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-class"
|
<view
|
||||||
@click="getDiqu"
|
class="view-class"
|
||||||
style="height: 110rpx;display: flex;align-items: center;">
|
@click="getDiqu"
|
||||||
<u-form-item :label="'收货地址'"
|
style="height: 110rpx; display: flex; align-items: center"
|
||||||
label-width="100px"
|
>
|
||||||
prop="recProvince">
|
<u-form-item
|
||||||
<view v-if="address"
|
:label="'收货地址'"
|
||||||
style="font-size: 28rpx;color: #333;margin-left: 20rpx;">{{address}}</view>
|
label-width="100px"
|
||||||
<view style="margin-left: 20rpx;font-size: 28rpx;color: rgb(192, 196, 204);"
|
prop="recProvince"
|
||||||
v-else>请选择</view>
|
>
|
||||||
|
<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>
|
</u-form-item>
|
||||||
<view class="drop">
|
<view class="drop">
|
||||||
<image src="../../static/images/drop.png"></image>
|
<image src="../../static/images/drop.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-class">
|
<view class="view-class">
|
||||||
<u-form-item :label="'详细地址'"
|
<u-form-item
|
||||||
class="label-style"
|
:label="'详细地址'"
|
||||||
label-width="100px"
|
class="label-style"
|
||||||
prop="recAddress">
|
label-width="100px"
|
||||||
<u-input v-model="addressForm.recAddress"
|
prop="recAddress"
|
||||||
placeholder-class="place-class"
|
>
|
||||||
maxlength="200"
|
<u-input
|
||||||
class="border-color"
|
v-model="addressForm.recAddress"
|
||||||
:placeholder="'请输入详细地址'" />
|
placeholder-class="place-class"
|
||||||
|
maxlength="200"
|
||||||
|
class="border-color"
|
||||||
|
:placeholder="'请输入详细地址'"
|
||||||
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
<view class="view-class">
|
<view class="view-class">
|
||||||
<u-form-item :label="'备注'"
|
<u-form-item :label="'备注'" label-width="100px" prop="address">
|
||||||
label-width="100px"
|
<u-input
|
||||||
prop="address">
|
v-model="addressForm.remark"
|
||||||
<u-input v-model="addressForm.remark"
|
placeholder-class="place-class"
|
||||||
placeholder-class="place-class"
|
class="border-color"
|
||||||
class="border-color"
|
placeholder=""
|
||||||
placeholder="" />
|
/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</view>
|
</view>
|
||||||
</u-form>
|
</u-form>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin-top: 20rpx;">
|
<view style="margin-top: 20rpx">
|
||||||
<view class="height-auto bgcolors">
|
<view class="height-auto bgcolors">
|
||||||
<view class="lines color-styles"></view>
|
<view class="lines color-styles"></view>
|
||||||
<view class="text"
|
<view class="text" style="color: #333">商品信息</view>
|
||||||
style="color: #333;">商品信息</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view style="background-color: #fff;">
|
<view style="background-color: #fff">
|
||||||
<view class="goods-info1"
|
<view class="goods-info1" v-for="item in allData">
|
||||||
v-for="item in allData">
|
|
||||||
<view class="goods-infot">
|
<view class="goods-infot">
|
||||||
<img :src="item.cover"
|
<img :src="item.cover" class="cover" alt="" />
|
||||||
class="cover"
|
|
||||||
alt="">
|
|
||||||
<view class="disFlex">
|
<view class="disFlex">
|
||||||
<view style="color: #333;font-size: 28rpx;">{{ item.productName }}</view>
|
<view style="color: #333; font-size: 28rpx">{{
|
||||||
<view style="color: #999;font-size: 22rpx;">X{{item.quantity}}</view>
|
item.productName
|
||||||
|
}}</view>
|
||||||
|
<view style="color: #999; font-size: 22rpx"
|
||||||
|
>X{{ item.quantity }}</view
|
||||||
|
>
|
||||||
</view>
|
</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>
|
||||||
<view class="goods-info"
|
<view class="goods-info" style="border: none">
|
||||||
style="border: none;">
|
<view style="color: #333; font-size: 28rpx">{{ '邮费' }}</view>
|
||||||
<view style="color: #333;font-size: 28rpx;">{{'邮费'}}</view>
|
<view style="color: #333; font-size: 24rpx">¥{{ postage }}</view>
|
||||||
<view style="color: #333;font-size: 24rpx;">¥{{postage}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 成功 -->
|
<!-- 成功 -->
|
||||||
<u-modal :show="showSucce"
|
<u-modal
|
||||||
showConfirmButton
|
:show="showSucce"
|
||||||
:content='content'
|
showConfirmButton
|
||||||
confirmColor='#DE3932'
|
:content="content"
|
||||||
@confirm="reset"
|
confirmColor="#DE3932"
|
||||||
ref="uModal"
|
@confirm="reset"
|
||||||
:asyncClose="true"></u-modal>
|
ref="uModal"
|
||||||
|
:asyncClose="true"
|
||||||
|
></u-modal>
|
||||||
<!-- 二维码 -->
|
<!-- 二维码 -->
|
||||||
<u-popup :show="wxPopup"
|
<u-popup :show="wxPopup" mode="center" closeable @close="closewxPopup">
|
||||||
mode="center"
|
<view class="t_tits">{{ '微信支付' }}</view>
|
||||||
closeable
|
|
||||||
@close="closewxPopup">
|
|
||||||
<view class="t_tits">{{'微信支付'}}</view>
|
|
||||||
<view class="pay_code">
|
<view class="pay_code">
|
||||||
<div ref="qrCodeUrlWx"
|
<div ref="qrCodeUrlWx" class="qrcode"></div>
|
||||||
class="qrcode"></div>
|
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
<v-address ref="address"
|
<v-address
|
||||||
@getAddressData="AddressData"
|
ref="address"
|
||||||
:defaultCode="defaultCode"
|
@getAddressData="AddressData"
|
||||||
@addressData="addressData"></v-address>
|
:defaultCode="defaultCode"
|
||||||
<u-button type="success"
|
@addressData="addressData"
|
||||||
shape="circle"
|
></v-address>
|
||||||
class="btn"
|
<u-button type="success" shape="circle" class="btn" @click="paySubmit"
|
||||||
@click="paySubmit">购 买</u-button>
|
>购 买</u-button
|
||||||
<view style="height: 20rpx;"></view>
|
>
|
||||||
|
<view style="height: 20rpx"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -217,14 +236,15 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
return this.$u.test.mobile(value);
|
return this.$u.test.mobile(value)
|
||||||
},
|
},
|
||||||
message: "手机号格式不正确",
|
message: '手机号格式不正确',
|
||||||
trigger: ["blur"],
|
trigger: ['blur'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
allData: [],
|
allData: [],
|
||||||
|
orderCode: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
|
|
@ -251,20 +271,19 @@ export default {
|
||||||
quantity: allData[2].split('#')[0],
|
quantity: allData[2].split('#')[0],
|
||||||
pkId: allData[1].split('&')[0],
|
pkId: allData[1].split('&')[0],
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
if (res.code == '200') {
|
if (res.code == '200') {
|
||||||
this.allData = res.data.detailList
|
this.allData = res.data.detailList
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getGenerate() {
|
getGenerate() {
|
||||||
api.generate().then((res) => {
|
api.generate().then(res => {
|
||||||
uni.setStorageSync('mToken', res.msg)
|
uni.setStorageSync('mToken', res.msg)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
paySubmit() {
|
paySubmit() {
|
||||||
this.$refs.uForm.validate().then((res) => {
|
this.$refs.uForm.validate().then(res => {
|
||||||
// this.pswShow = true
|
|
||||||
let allData = decodeURIComponent(window.location.href).split('=')
|
let allData = decodeURIComponent(window.location.href).split('=')
|
||||||
let obj = {
|
let obj = {
|
||||||
quantity: allData[2].split('#')[0],
|
quantity: allData[2].split('#')[0],
|
||||||
|
|
@ -277,24 +296,20 @@ export default {
|
||||||
recAddress: this.addressForm.recAddress,
|
recAddress: this.addressForm.recAddress,
|
||||||
remark: this.addressForm.remark,
|
remark: this.addressForm.remark,
|
||||||
}
|
}
|
||||||
api.payPickOrder(obj).then((res) => {
|
// this.pswShow = true
|
||||||
|
api.payPickOrder(obj).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// this.scanPayBfWx(8)
|
// this.scanPayBfWx(8)
|
||||||
this.pswShow = false
|
|
||||||
let paramsPost = { orderCode: res.data, specialArea: 8 }
|
this.orderCode = res.data
|
||||||
uni.navigateTo({
|
this.pswShow = true
|
||||||
url:
|
|
||||||
'/pages/pay/index?paramsPost=' +
|
|
||||||
JSON.stringify(paramsPost) +
|
|
||||||
'&businessType=1',
|
|
||||||
})
|
|
||||||
// this.paramsPost = { orderCode: res.data, specialArea: 8 }
|
// this.paramsPost = { orderCode: res.data, specialArea: 8 }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.$store.dispatch('GetInfo').then((res) => {
|
this.$store.dispatch('GetInfo').then(res => {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/index/index',
|
url: '/pages/index/index',
|
||||||
})
|
})
|
||||||
|
|
@ -311,7 +326,7 @@ export default {
|
||||||
this.wxPopup = false
|
this.wxPopup = false
|
||||||
this.showSucce = true
|
this.showSucce = true
|
||||||
} else {
|
} else {
|
||||||
api.payStatus(data).then((res) => {
|
api.payStatus(data).then(res => {
|
||||||
that.sucPay = res.data
|
that.sucPay = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -329,7 +344,7 @@ export default {
|
||||||
payChannel: val,
|
payChannel: val,
|
||||||
payType: 2,
|
payType: 2,
|
||||||
}
|
}
|
||||||
api.unifiedorder(params).then((res) => {
|
api.unifiedorder(params).then(res => {
|
||||||
this.wxPopup = true
|
this.wxPopup = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
new QRCode(
|
new QRCode(
|
||||||
|
|
@ -350,7 +365,7 @@ export default {
|
||||||
this.checkPayStatus(params)
|
this.checkPayStatus(params)
|
||||||
},
|
},
|
||||||
getPostAge(data) {
|
getPostAge(data) {
|
||||||
apis.pickPostAge(data).then((res) => {
|
apis.pickPostAge(data).then(res => {
|
||||||
this.postage = res.data
|
this.postage = res.data
|
||||||
// this.totalAmont =
|
// this.totalAmont =
|
||||||
// parseFloat(this.allGoodsData.priceAmount) +
|
// parseFloat(this.allGoodsData.priceAmount) +
|
||||||
|
|
@ -362,37 +377,43 @@ export default {
|
||||||
.checkPwd({
|
.checkPwd({
|
||||||
pwd: this.password,
|
pwd: this.password,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let allData = decodeURIComponent(window.location.href).split('=')
|
let allData = decodeURIComponent(window.location.href).split('=')
|
||||||
let obj = {
|
let obj = {
|
||||||
quantity: allData[2].split('#')[0],
|
orderCode: this.orderCode,
|
||||||
pkId: allData[1].split('&')[0],
|
specialArea: 8,
|
||||||
recName: this.addressForm.recName,
|
payPwd: this.password,
|
||||||
recPhone: this.addressForm.recPhone,
|
pkSettleCountry: this.pkCountry || 1,
|
||||||
recProvince: this.addressForm.recProvince,
|
pkCountry: this.pkCountry || 1,
|
||||||
recCity: this.addressForm.recCity,
|
|
||||||
recCounty: this.addressForm.recCounty,
|
|
||||||
recAddress: this.addressForm.recAddress,
|
|
||||||
remark: this.addressForm.remark,
|
|
||||||
}
|
}
|
||||||
api
|
api
|
||||||
.payPickOrder(obj)
|
.payOthOrder(obj)
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// this.scanPayBfWx(8)
|
|
||||||
this.pswShow = false
|
this.pswShow = false
|
||||||
let paramsPost = { orderCode: res.data, specialArea: 8 }
|
uni.showToast({
|
||||||
uni.navigateTo({
|
title: '提货成功',
|
||||||
url:
|
icon: 'none',
|
||||||
'/pages/pay/index?paramsPost=' +
|
|
||||||
JSON.stringify(paramsPost) +
|
|
||||||
'&businessType=1',
|
|
||||||
})
|
})
|
||||||
|
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 }
|
// this.paramsPost = { orderCode: res.data, specialArea: 8 }
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch(err => {
|
||||||
this.isLoading.close()
|
this.isLoading.close()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -480,10 +501,10 @@ export default {
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
// width: 750rpx;
|
// width: 750rpx;
|
||||||
margin: 0 20rpx;
|
margin: 0 20rpx;
|
||||||
.goods-infot{
|
.goods-infot {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
.goods_infob{
|
.goods_infob {
|
||||||
padding: 10rpx 0;
|
padding: 10rpx 0;
|
||||||
}
|
}
|
||||||
.cover {
|
.cover {
|
||||||
|
|
@ -511,7 +532,7 @@ export default {
|
||||||
}
|
}
|
||||||
.height-auto {
|
.height-auto {
|
||||||
height: 94rpx;
|
height: 94rpx;
|
||||||
background: #005BAC;
|
background: #005bac;
|
||||||
line-height: 94rpx;
|
line-height: 94rpx;
|
||||||
padding: 0 25rpx;
|
padding: 0 25rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -611,7 +632,7 @@ page {
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
background-color: #005BAC;
|
background-color: #005bac;
|
||||||
border: none;
|
border: none;
|
||||||
height: 92rpx;
|
height: 92rpx;
|
||||||
line-height: 92rpx;
|
line-height: 92rpx;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue