add
This commit is contained in:
parent
001fdd05d8
commit
f15573e557
|
@ -161,4 +161,8 @@ export const checkInventoryApi = (data) => {
|
||||||
|
|
||||||
export const isUserShipApi = (data) => {
|
export const isUserShipApi = (data) => {
|
||||||
return request.post('/user_ship/UserShip/is_user_ship', data);
|
return request.post('/user_ship/UserShip/is_user_ship', data);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getRechargeListApi = (data) => {
|
||||||
|
return request.get('/user/UserRecharge/recharge_list', data);
|
||||||
}
|
}
|
|
@ -32,7 +32,7 @@
|
||||||
<view class="content" v-if='type==4'>
|
<view class="content" v-if='type==4'>
|
||||||
<view class="li" v-for="(item,index) in lists" :key="index">
|
<view class="li" v-for="(item,index) in lists" :key="index">
|
||||||
<view class="li-top">
|
<view class="li-top">
|
||||||
<text>{{item.order_sn}}</text>
|
<text>{{item.title}}</text>
|
||||||
<text style="font-weight: bold;" :style="{color:!item.status?'#50C758':'red'
|
<text style="font-weight: bold;" :style="{color:!item.status?'#50C758':'red'
|
||||||
}">{{ !item.status?'+':'-' }}{{item.number}}</text>
|
}">{{ !item.status?'+':'-' }}{{item.number}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<template>
|
||||||
|
<image style="width: 100vw" mode='widthFix'
|
||||||
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/8d49820240705171635925.png">
|
||||||
|
</image>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
|
@ -31,8 +31,10 @@
|
||||||
<block v-if='currentTab == 0'>
|
<block v-if='currentTab == 0'>
|
||||||
<view class="card card1">
|
<view class="card card1">
|
||||||
<view class="card1-tit">
|
<view class="card1-tit">
|
||||||
行业会员开通报备
|
购买采购包
|
||||||
<up-input v-model='formData.auth_code'> </up-input>
|
</view>
|
||||||
|
<view class="store-info">
|
||||||
|
报备人:{{ STORE_INFO.name }}
|
||||||
</view>
|
</view>
|
||||||
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
<up-form labelPosition="left" :model="formData" :borderBottom='false'>
|
||||||
<up-form-item label="">
|
<up-form-item label="">
|
||||||
|
@ -82,23 +84,20 @@
|
||||||
</view>
|
</view>
|
||||||
</up-form-item>
|
</up-form-item>
|
||||||
</up-form>
|
</up-form>
|
||||||
<view class="store-info">
|
<view class="link" @click="navgo('/pageQuota/vipUser/activePage')">
|
||||||
报备人:{{ STORE_INFO.name }}
|
点击查看礼品包内容
|
||||||
</view>
|
</view>
|
||||||
|
<view class="gift-pack">
|
||||||
<view class="store-info" v-if="Role==1">
|
<view class="gift-pack-li" :class="index==giftIndex&&'act-gift'"
|
||||||
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
|
v-for="(item,index) in rechargeList" :key="index" @click="choseGift(index)">
|
||||||
<up-input inputAlign='center' type='digit' placeholder="请输入金额" @focus="formData.price=''"
|
<view class="gift-pack-li-top" :class="index==giftIndex &&'act-gift-top'">
|
||||||
color='#FF6B00' :placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
|
<text style="font-size: 40rpx;">{{item.money}}</text><text>元采购包</text>
|
||||||
v-model="formData.price" @blur='tofixedPrice'></up-input>
|
</view>
|
||||||
|
<view class="">
|
||||||
|
送{{item.send}}{{item.send_string}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
|
|
||||||
v-if="formData.label_limit&&formData.price<formData.label_limit">
|
|
||||||
{{formData.label_name}}角色最低金额不能低于{{formData.label_limit}}元且最高金额不能超过10000.00元
|
|
||||||
</view>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="submit-btn" @click="submit">
|
<view class="submit-btn" @click="submit">
|
||||||
<view
|
<view
|
||||||
|
@ -160,9 +159,9 @@
|
||||||
<view class="">
|
<view class="">
|
||||||
{{formData2.label_name}}会员最低金额不能低于{{formData2.label_limit}}元
|
{{formData2.label_name}}会员最低金额不能低于{{formData2.label_limit}}元
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<!-- <view class="">
|
||||||
最高金额不能超过10000.00元
|
最高金额不能超过10000.00元
|
||||||
</view>
|
</view> -->
|
||||||
<view class="">
|
<view class="">
|
||||||
可单次多笔累计操作
|
可单次多笔累计操作
|
||||||
</view>
|
</view>
|
||||||
|
@ -180,6 +179,8 @@
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</block>
|
</block>
|
||||||
|
|
||||||
|
|
||||||
<!-- tabs2 -->
|
<!-- tabs2 -->
|
||||||
<block v-if="currentTab == 2 &&Role==1">
|
<block v-if="currentTab == 2 &&Role==1">
|
||||||
<view class="vip-card">
|
<view class="vip-card">
|
||||||
|
@ -311,8 +312,6 @@
|
||||||
</up-popup>
|
</up-popup>
|
||||||
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
|
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
|
||||||
@close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
|
@close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
|
||||||
|
|
||||||
|
|
||||||
<up-modal :show="showModal" title="电话号码" content='15884967539' :closeOnClickOverlay="true" :zoom="true"
|
<up-modal :show="showModal" title="电话号码" content='15884967539' :closeOnClickOverlay="true" :zoom="true"
|
||||||
confirmColor='#33B83A' @confirm='showModal=false' @close="showModal=false">
|
confirmColor='#33B83A' @confirm='showModal=false' @close="showModal=false">
|
||||||
<view class="slot-content">
|
<view class="slot-content">
|
||||||
|
@ -337,6 +336,7 @@
|
||||||
} from "@/api/address.js"
|
} from "@/api/address.js"
|
||||||
import {
|
import {
|
||||||
vipRechargeApi,
|
vipRechargeApi,
|
||||||
|
getRechargeListApi,
|
||||||
isUserShipApi,
|
isUserShipApi,
|
||||||
rechargeCountApi,
|
rechargeCountApi,
|
||||||
reVipRechargeApi,
|
reVipRechargeApi,
|
||||||
|
@ -443,6 +443,7 @@
|
||||||
// 手机保留一天结束
|
// 手机保留一天结束
|
||||||
|
|
||||||
// 验证码
|
// 验证码
|
||||||
|
const vipList = reactive([1, 2, 3, 5, 6, 7, 8])
|
||||||
const cutDown = ref(0)
|
const cutDown = ref(0)
|
||||||
const flag = ref(true)
|
const flag = ref(true)
|
||||||
const code = ref('')
|
const code = ref('')
|
||||||
|
@ -579,10 +580,10 @@
|
||||||
} = await getVipInfoByPhone({
|
} = await getVipInfoByPhone({
|
||||||
mobile: formData2.mobile
|
mobile: formData2.mobile
|
||||||
})
|
})
|
||||||
// if (data.user_ship != 4) {
|
if (!vipList.includes(data.user_ship)) {
|
||||||
// uni.hideLoading()
|
uni.hideLoading()
|
||||||
// return uni.$u.toast('查询失败');
|
return uni.$u.toast('查询失败');
|
||||||
// }
|
}
|
||||||
if (formData.mobile) {
|
if (formData.mobile) {
|
||||||
formData2.mobile = formData.mobile
|
formData2.mobile = formData.mobile
|
||||||
}
|
}
|
||||||
|
@ -597,14 +598,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const tofixedPrice = (type = 1) => {
|
|
||||||
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
|
|
||||||
formData.price = (+formData.price).toFixed(2)
|
|
||||||
}
|
|
||||||
|
|
||||||
const resetFormData = () => {
|
const resetFormData = () => {
|
||||||
for (let key in formData) {
|
for (let key in formData) {
|
||||||
formData[key] = ''
|
(key != 'price') && (formData[key] = '')
|
||||||
}
|
}
|
||||||
for (let key in formData2) {
|
for (let key in formData2) {
|
||||||
formData2[key] = ''
|
formData2[key] = ''
|
||||||
|
@ -621,8 +617,6 @@
|
||||||
const conformRole = (e) => {
|
const conformRole = (e) => {
|
||||||
formData.label_name = e.value[0].title
|
formData.label_name = e.value[0].title
|
||||||
formData.label_id = e.value[0].id
|
formData.label_id = e.value[0].id
|
||||||
formData.price = (+e.value[0].limit).toFixed(2)
|
|
||||||
formData.label_limit = e.value[0].limit
|
|
||||||
showPop1.value = false
|
showPop1.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -724,6 +718,7 @@
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let timerInvol = null
|
let timerInvol = null
|
||||||
|
let paySuccess;
|
||||||
// 开起一个scoket监听用户知否支付成功
|
// 开起一个scoket监听用户知否支付成功
|
||||||
const userInfo = useUserStore().userInfo;
|
const userInfo = useUserStore().userInfo;
|
||||||
const connection = new Push({
|
const connection = new Push({
|
||||||
|
@ -733,13 +728,34 @@
|
||||||
const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`);
|
const user_channel = connection.subscribe(`wechat_mmp_${userInfo.id}`);
|
||||||
user_channel.on('message', function(data) {
|
user_channel.on('message', function(data) {
|
||||||
try {
|
try {
|
||||||
uni.hideLoading({});
|
paySuccess = true
|
||||||
|
uni.hideLoading();
|
||||||
clearTimeout(timerInvol);
|
clearTimeout(timerInvol);
|
||||||
paySuccessToTabs2()
|
paySuccessToTabs2()
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
});
|
});
|
||||||
// 结束
|
// 结束
|
||||||
|
|
||||||
|
const navgo = (url) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选择采购包
|
||||||
|
const giftIndex = ref(0)
|
||||||
|
const rechargeList = ref([])
|
||||||
|
const getRechargeList = async () => {
|
||||||
|
let res = await getRechargeListApi()
|
||||||
|
rechargeList.value = res.data
|
||||||
|
formData.price = rechargeList.value[0].money
|
||||||
|
}
|
||||||
|
|
||||||
|
const choseGift = (index) => {
|
||||||
|
giftIndex.value = index
|
||||||
|
formData.price = rechargeList.value[index].money
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submit = async (type = 1) => {
|
const submit = async (type = 1) => {
|
||||||
|
@ -787,10 +803,12 @@
|
||||||
formData2.recharge_type = 'INDUSTRYMEMBERS'
|
formData2.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
formData2.user_ship = formData2.label_id
|
formData2.user_ship = formData2.label_id
|
||||||
vipRechargeApi(formData2).then(res => {
|
vipRechargeApi(formData2).then(res => {
|
||||||
|
paySuccess = false;
|
||||||
timerInvol = setTimeout(() => {
|
timerInvol = setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (currentTab.value == 2) return;
|
if (!paySuccess) {
|
||||||
uni.$u.toast('支付超时');
|
uni.$u.toast('支付超时');
|
||||||
|
}
|
||||||
}, 30000)
|
}, 30000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -801,9 +819,9 @@
|
||||||
if (!formData.code) return uni.$u.toast('请输入短信验证码');
|
if (!formData.code) return uni.$u.toast('请输入短信验证码');
|
||||||
if (!formData.address) return uni.$u.toast('请选择地址');
|
if (!formData.address) return uni.$u.toast('请选择地址');
|
||||||
if (!formData.label_id) return uni.$u.toast('请选择用户身份');
|
if (!formData.label_id) return uni.$u.toast('请选择用户身份');
|
||||||
if (Number(formData.price) < Number(formData.label_limit)) return uni.$u.toast(
|
|
||||||
`${formData.label_name}角色最低金额不能低于${formData.label_limit}元`);
|
|
||||||
formData.store_id = STORE_INFO.id
|
formData.store_id = STORE_INFO.id
|
||||||
|
formData.user_ship = formData.label_id
|
||||||
|
formData.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
if (Role.value == 1) {
|
if (Role.value == 1) {
|
||||||
// formData.recharge_type = 'INDUSTRYMEMBERS'
|
// formData.recharge_type = 'INDUSTRYMEMBERS'
|
||||||
// formData.user_ship = formData.label_id
|
// formData.user_ship = formData.label_id
|
||||||
|
@ -830,14 +848,14 @@
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '支付中...'
|
title: '支付中...'
|
||||||
});
|
});
|
||||||
formData.user_ship = formData.label_id
|
|
||||||
formData.auth_code = res.result
|
formData.auth_code = res.result
|
||||||
formData.recharge_type = 'INDUSTRYMEMBERS'
|
|
||||||
vipRechargeApi(formData).then(res => {
|
vipRechargeApi(formData).then(res => {
|
||||||
|
paySuccess = false;
|
||||||
timerInvol = setTimeout(() => {
|
timerInvol = setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
if (currentTab.value == 2) return;
|
if (!paySuccess) {
|
||||||
uni.$u.toast('支付超时');
|
uni.$u.toast('支付超时');
|
||||||
|
}
|
||||||
}, 30000)
|
}, 30000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -859,13 +877,19 @@
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
timerInvol = setTimeout(() => {
|
timerInvol = setTimeout(() => {
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
uni.$u.toast('支付超时');
|
if (!paySuccess) {
|
||||||
|
uni.$u.toast('支付超时');
|
||||||
|
}
|
||||||
}, 30000)
|
}, 30000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tofixedPrice = (type = 1) => {
|
||||||
|
if (type == 2) return formData2.price = (+formData2.price).toFixed(2)
|
||||||
|
}
|
||||||
|
|
||||||
// 支付成功后清除formData并且切换tabs2
|
// 支付成功后清除formData并且切换tabs2
|
||||||
const paySuccessToTabs2 = () => {
|
const paySuccessToTabs2 = () => {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
|
@ -936,19 +960,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// getUserShip().then(res => {
|
|
||||||
// range.value = res.data.lists.map(item => {
|
|
||||||
// return {
|
|
||||||
// value: item.id,
|
|
||||||
// text: item.title
|
|
||||||
// }
|
|
||||||
// })f
|
|
||||||
// })
|
|
||||||
getUserShip().then(res => {
|
getUserShip().then(res => {
|
||||||
columns.value = [res.data.lists]
|
columns.value = [res.data.lists]
|
||||||
})
|
})
|
||||||
getPhoneOneDay()
|
getPhoneOneDay()
|
||||||
getCityList()
|
getCityList()
|
||||||
|
getRechargeList()
|
||||||
})
|
})
|
||||||
|
|
||||||
onPullDownRefresh(() => {
|
onPullDownRefresh(() => {
|
||||||
|
@ -1028,20 +1045,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.card1 {
|
.card1 {
|
||||||
padding: 52rpx 30rpx;
|
padding: 30rpx;
|
||||||
|
|
||||||
.card1-tit {
|
.card1-tit {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #444444;
|
color: #444444;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 90rpx;
|
margin-bottom: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.store-info {
|
.store-info {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #20B128;
|
color: #20B128;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 30rpx;
|
margin-top: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1087,7 +1104,7 @@
|
||||||
|
|
||||||
.address-content {
|
.address-content {
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
height: 50vh;
|
height: 60vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
.address-li {
|
.address-li {
|
||||||
|
@ -1123,5 +1140,65 @@
|
||||||
|
|
||||||
.btn-text {
|
.btn-text {
|
||||||
color: #20B128;
|
color: #20B128;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link {
|
||||||
|
padding-left: 20rpx;
|
||||||
|
color: #2F6BF2;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
position: relative;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-underline-offset: 10rpx;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link::after {
|
||||||
|
content: '';
|
||||||
|
width: 12rpx;
|
||||||
|
height: 12rpx;
|
||||||
|
background-color: #2F6BF2;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
border-radius: 12rpx;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gift-pack {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.gift-pack-li {
|
||||||
|
padding: 20rpx 40rpx;
|
||||||
|
border: #20B128 1px solid;
|
||||||
|
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||||
|
background-color: #F6F6F6;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #777777;
|
||||||
|
width: 310rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.gift-pack-li-top {
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
color: #20B128;
|
||||||
|
}
|
||||||
|
|
||||||
|
.act-gift-top {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.act-gift {
|
||||||
|
background-color: #38BE41;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -235,6 +235,13 @@
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "vipUser/activePage",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "采购礼包",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "asset/index",
|
"path": "asset/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|
|
@ -162,8 +162,8 @@
|
||||||
{{ item.store_name }}
|
{{ item.store_name }}
|
||||||
</view>
|
</view>
|
||||||
<view class="shop-content-li" v-if="priceKey.off_activity==1">
|
<view class="shop-content-li" v-if="priceKey.off_activity==1">
|
||||||
<view class="shop-content-li-l" style="color: #FC452F;">
|
<view class="shop-content-li-l">
|
||||||
活动价
|
售价
|
||||||
</view>
|
</view>
|
||||||
<view class="shop-content-li-r" style="color:#FC452F ;">¥<text
|
<view class="shop-content-li-r" style="color:#FC452F ;">¥<text
|
||||||
style="font-size: 30rpx;">{{item[priceKey.price]}}</text>/{{ item.unit_name }}
|
style="font-size: 30rpx;">{{item[priceKey.price]}}</text>/{{ item.unit_name }}
|
||||||
|
@ -173,10 +173,10 @@
|
||||||
赠10%品牌礼品券
|
赠10%品牌礼品券
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1">
|
<!-- <view class="shop-content-li" style="color: #999999;" v-if="priceKey.off_activity==1">
|
||||||
<view class="shop-content-li-l">原价</view>
|
<view class="shop-content-li-l">原价</view>
|
||||||
<view class="shop-content-li-r line-through">¥{{item[priceKey.op_price]}}</view>
|
<view class="shop-content-li-r line-through">¥{{item[priceKey.op_price]}}</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<view class="shop-content-li" v-else>
|
<view class="shop-content-li" v-else>
|
||||||
<view class="shop-content-li-l">售价</view>
|
<view class="shop-content-li-l">售价</view>
|
||||||
|
|
Loading…
Reference in New Issue