This commit is contained in:
zmj 2024-07-10 16:03:34 +08:00
parent 801d2cb413
commit 55e5572005
7 changed files with 973 additions and 849 deletions

View File

@ -75,3 +75,7 @@ export const refundReasonListApi = (data) => {
export const applyRefundApi = (data) => {
return request.post('/order/order/apply_refund', data);
}
export const UserProductStorageLogApi = (data) => {
return request.get('/user_product_storage_log/UserProductStorageLog/lists', data);
}

View File

@ -63,14 +63,7 @@
computed,
nextTick,
ref,
} from "vue"
import {
toast
} from "../uni_modules/uview-plus";
import {
onShow
} from '@dcloudio/uni-app';
const foucs1 = ref(null)
const props = defineProps({
@ -78,20 +71,17 @@
type: Boolean,
default: false
},
priceKey: {
type: Object,
default: () => ({})
}
})
const valChange = () => {
uni.vibrateShort();
}
let priceKey = ref({})
if (uni.getStorageSync('PRICE_KEY')) {
priceKey.value = JSON.parse(uni.getStorageSync('PRICE_KEY'));
} else {
priceKey.value = {};
}
const datas = ref({
cart_num: ''
});
@ -121,7 +111,9 @@
const subtotal = computed(() => {
let num = +datas.value.cart_num || 1;
let sell = +datas.value[priceKey.value.off_activity == 1 ? priceKey.value.price : priceKey.value.op_price];
let sell = +datas.value[props.priceKey.off_activity == 1 ? props.priceKey.price : props
.priceKey
.op_price];
return Number(num * sell * 100 / 100).toFixed(2)
})

137
pageQuota/asset/lists.vue Normal file
View File

@ -0,0 +1,137 @@
<template>
<up-sticky bgColor="#fff" style="padding: 20rpx;">
<up-tabs :list="tabsLst" :itemStyle="{ width: '50vw', paddingBottom: '20rpx' }" lineColor='#50C758'
:current='currentTab' @change="tabsChange"></up-tabs>
</up-sticky>
<view class="content" v-if="lists.length">
<view class="card" v-for="(item,index) in lists" :key="item.id">
<view class="head">
<view class="">
{{item.system_store_name}}
</view>
<view v-if="currentTab==0" style="text-decoration: underline;text-underline-offset: 5rpx;"
@click="hdClick(item)">
提货码
</view>
</view>
<view class="card-li" v-if="currentTab==0">
<text class="lab">预约时间</text>{{item.times}}
</view>
<view class="card-li" v-if="currentTab==1">
<text class="lab">提货时间</text>{{item.update_time}}
</view>
<view class="card-li" style="display: flex;justify-content: space-between;">
<view class="">
<text class="lab">商品信息</text>{{item.store_name}}
</view>
<view class="">
x{{item.nums}}
</view>
</view>
</view>
</view>
<up-empty v-else mode="history" style="margin-top: 20vh;" text='没有更多内容了'>
</up-empty>
<view class="mask" v-if='showVerifyPop' @click="showVerifyPop=false">
<view
style="position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);background-color: white;padding: 20rpx;">
<up-image :src="orderData.verify_img" width="710rpx" height="105rpx"></up-image>
<view style="font-weight: bold;color: #333;font-size: 26;text-align: center;margin-top: 20rpx;">
提货码 {{orderData.verify_code}}
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
reactive
} from "vue"
import {
UserProductStorageLogApi
} from "@/api/order.js"
import useUserStore from "@/store/user";
const userStore = useUserStore().userInfo;
const currentTab = ref(0)
const showVerifyPop = ref(false)
const orderData = reactive({})
const tabsLst = reactive([{
name: '已预约'
},
{
name: '已提货'
},
]);
const tabsChange = (e) => {
currentTab.value = e.index
getLists()
}
const lists = ref([{}])
const getLists = async () => {
let res = await UserProductStorageLogApi({
uid: userStore.id,
status: currentTab.value
})
lists.value = res.data.lists
}
const hdClick = (item) => {
orderData.verify_code = item.verify_code
orderData.verify_img = item.verify_img
showVerifyPop.value = true
}
getLists()
</script>
<style lang="scss">
.content {
padding: 20rpx;
}
.card {
background-color: white;
border-radius: 20rpx;
// padding: 20rpx;
margin-bottom: 20rpx;
padding-bottom: 20rpx;
.head {
background-color: #50C758;
border-radius: 20rpx 20rpx 0 0;
color: white;
padding: 20rpx;
font-size: 30rpx;
display: flex;
justify-content: space-between;
}
.card-li {
padding: 0 20rpx;
margin-top: 10rpx;
.lab {
color: #989898;
}
}
}
.mask {
position: fixed;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, .5);
top: 0;
left: 0;
z-index: 99999 !important;
}
</style>

View File

@ -1,4 +1,5 @@
<template>
<!-- 门店及身份选择 -->
<view class="" v-if="!STORE_INFO.id">
<up-modal :show="showModa" title="登录门店" @confirm="confirmStore" confirmColor='#20B128'>
<view class="slot-content">
@ -10,7 +11,8 @@
<up-form labelPosition="left" label-width="100rpx">
<up-form-item label="身份" borderBottom>
<up-radio-group v-model="Role" placement="row">
<up-radio activeColor="#20b128" label="行业会员" :name="1" style="margin-right: 10rpx;"></up-radio>
<up-radio activeColor="#20b128" label="行业会员" :name="1"
style="margin-right: 10rpx;"></up-radio>
<up-radio activeColor="#20b128" label="商户" :name="4"></up-radio>
</up-radio-group>
</up-form-item>
@ -18,15 +20,17 @@
</view>
</up-modal>
</view>
<!-- 门店及身份选择结束 -->
<view v-else>
<up-sticky bgColor="#fff" style="padding: 20rpx;">
<up-tabs v-if="Role == 1" :list="tabsLst" :itemStyle="{ width: '33vw', paddingBottom: '20rpx' }" lineColor='#50C758'
:current='currentTab' @change="tabsChange"></up-tabs>
<up-tabs v-if="Role == 1" :list="tabsLst" :itemStyle="{ width: '33vw', paddingBottom: '20rpx' }"
lineColor='#50C758' :current='currentTab' @change="tabsChange"></up-tabs>
<up-tabs v-else :list="tabsLst2" :itemStyle="{ width: '50vw', paddingBottom: '20rpx' }" lineColor='#50C758'
:current='currentTab' @change="tabsChange1"></up-tabs>
</up-sticky>
<!-- tabs0 -->
<!-- 开通行业会员 -->
<block v-if='currentTab == 0'>
<view class="card card1">
<view class="card1-tit">
@ -51,8 +55,8 @@
</up-form-item>
<up-form-item label="">
<view @click="showPop = true" style="width: 100%;">
<up-input style="pointer-events: none" v-model="formData.address" border="none" prefixIcon="map"
readonly placeholder="点击选择地址" :customStyle="{
<up-input style="pointer-events: none" v-model="formData.address" border="none"
prefixIcon="map" readonly placeholder="点击选择地址" :customStyle="{
background: '#F3F3F3', padding: '20rpx',
'border-radius': '30rpx'
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"
@ -87,8 +91,8 @@
点击查看礼品包内容
</view>
<view class="gift-pack">
<view class="gift-pack-li" :class="index == giftIndex && 'act-gift'" v-for="(item, index) in rechargeList"
:key="index" @click="choseGift(index)">
<view class="gift-pack-li" :class="index == giftIndex && 'act-gift'"
v-for="(item, index) in rechargeList" :key="index" @click="choseGift(index)">
<view class="gift-pack-li-top" :class="index == giftIndex && 'act-gift-top'">
<text style="font-size: 40rpx;">{{ item.money }}</text><text>元采购包</text>
</view>
@ -106,7 +110,9 @@
</view>
</block>
<!-- 开通行业会员结束 -->
<!-- 追加经营资金 -->
<block v-if="currentTab == 1 && Role == 1">
<view class="card card1">
<view class="card1-tit">
@ -125,11 +131,12 @@
<up-input v-model="formData2.real_name" disabled border="none" prefixIcon="account"
placeholder="系统自动获取" color='grey'
:customStyle="{ background: '#F3F3F3', padding: '20rpx', 'border-radius': '30rpx' }"
:placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
:placeholderStyle="{ color: 'grey' }"
:prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
</up-form-item>
<up-form-item label="">
<up-input style="pointer-events: none" v-model="formData2.address" border="none" prefixIcon="map"
readonly color='grey' placeholder="系统自动获取" :customStyle="{
<up-input style="pointer-events: none" v-model="formData2.address" border="none"
prefixIcon="map" readonly color='grey' placeholder="系统自动获取" :customStyle="{
background: '#F3F3F3', padding: '20rpx',
'border-radius': '30rpx'
}" :placeholderStyle="{ color: 'grey' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
@ -149,8 +156,8 @@
<view class="store-info">
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
<up-input inputAlign='center' placeholder="请输入金额" @focus="formData2.price = ''" color='#FF6B00'
:placeholderStyle="{ fontSize: '28rpx' }" fontSize='20px' border="none" v-model="formData2.price"
type='digit' @blur='tofixedPrice(2)'></up-input>
:placeholderStyle="{ fontSize: '28rpx' }" fontSize='20px' border="none"
v-model="formData2.price" type='digit' @blur='tofixedPrice(2)'></up-input>
</view>
<view style="color: red;margin-top: 20rpx;font-size: 24rpx;"
v-if="formData2.label_limit && formData2.price < formData2.label_limit">
@ -177,30 +184,26 @@
</view>
</block>
<!-- 追加经营资金结束 -->
<!-- tabs2 -->
<!-- 开通列表-会员 -->
<block v-if="currentTab == 2 && Role == 1">
<view class="vip-card">
<text>当前已开通</text>
<up-count-to :startVal="0" :endVal="count"></up-count-to>
<text>{{ Role == 1 ? '行业会员' : '商户' }}</text>
<text>行业会员 </text>
</view>
<view class="table">
<uni-table stripe emptyText="暂无更多数据" width="100%">
<!-- 表头行 -->
<uni-tr>
<!-- <uni-th width="20" align="center">序号</uni-th> -->
<uni-th width="50" align="center">行业会员</uni-th>
<uni-th width="50" align="center">经营资金</uni-th>
<uni-th width="50" align="center">开通时间</uni-th>
<uni-th width="50" align="center">角色</uni-th>
<uni-th width="50" align="center">状态</uni-th>
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
<!-- <uni-td align="center">{{index+1}}</uni-td> -->
<uni-td style="font-size: 20rpx;" align="center">
<view>
{{ item.real_name }}
@ -227,21 +230,19 @@
</uni-table>
</view>
</block>
<!-- 开通列表-会员结束 -->
<!-- 开通列表-商户 -->
<block v-if="currentTab == 1 && Role == 4">
<view class="vip-card">
<text>当前已开通</text>
<up-count-to :startVal="0" :endVal="count"></up-count-to>
<text>{{ Role == 1 ? '行业会员' : '商户' }}</text>
<text>商户</text>
</view>
<view class="table">
<uni-table stripe emptyText="暂无更多数据" width="100%">
<!-- 表头行 -->
<uni-tr>
<!-- <uni-th width="20" align="center">序号</uni-th> -->
<uni-th width="50" align="center">商户</uni-th>
<uni-th width="50" align="center">查看号码</uni-th>
<uni-th width="50" align="center">开通时间</uni-th>
@ -249,21 +250,20 @@
</uni-tr>
<!-- 表格数据行 -->
<uni-tr v-for="(item, index) in lists" :key="item.order_id">
<!-- <uni-td align="center">{{index+1}}</uni-td> -->
<uni-td style="font-size: 20rpx;" align="center">{{ item.nickname }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{ item.mobile }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">{{ item.create_time }}</uni-td>
<uni-td style="font-size: 20rpx;" align="center">
<view>已开通</view>
</uni-td>
</uni-tr>
</uni-table>
</view>
</block>
<!-- 开通列表-商户结束 -->
</view>
<view style="height: 50rpx;" />
<!-- 地址选择器 -->
<up-popup :show="showPop" @close="showPop = false" @open="showPop = true" :round="10">
<view style="padding: 20rpx;">
@ -271,8 +271,8 @@
:activeStyle="{ color: '#20B128' }"></up-tabs>
<up-line style="margin-top:20rpx "></up-line>
<view class="address-content" v-if='currentAddressIndex == 0'>
<view class="address-li" :class='{ act: item.city_code == formData.city }' v-for="item in addressList.city"
:key="item.city_code" @click="addressLiClick(0, item)">
<view class="address-li" :class='{ act: item.city_code == formData.city }'
v-for="item in addressList.city" :key="item.city_code" @click="addressLiClick(0, item)">
<text>{{ item.city_name }}</text>
<up-icon name="arrow-right" :color="item.city_code == formData.city ? '#20B128' : '#777777'" />
</view>
@ -295,20 +295,23 @@
<view class="address-li" v-for="item in addressList.village" @click="addressLiClick(3, item)"
:key="item.village_code" :class='{ act: item.village_code == formData.village }'>
<text>{{ item.village_name }}</text>
<up-icon name="arrow-right" :color="item.village_code == formData.village ? '#20B128' : '#777777'" />
<up-icon name="arrow-right"
:color="item.village_code == formData.village ? '#20B128' : '#777777'" />
</view>
</view>
<view class="address-content" v-else-if='currentAddressIndex == 4'>
<view class="address-li" :class='{ act: item.id == formData.brigade }' v-for="item in addressList.brigade"
:key="item.id" @click="addressLiClick(4, item)">
<view class="address-li" :class='{ act: item.id == formData.brigade }'
v-for="item in addressList.brigade" :key="item.id" @click="addressLiClick(4, item)">
<text>{{ item.brigade_name }}</text>
<up-icon name="arrow-right" :color="item.id == formData.brigade ? '#20B128' : '#777777'" />
</view>
</view>
</view>
</up-popup>
<!-- 会员类型选择器 -->
<up-picker :show="showPop1" :columns="columns" @confirm='conformRole' @cancel='showPop1 = false'
@close="showPop1 = false" @open="showPop1 = true" keyName='title' confirmColor='#33B83A'></up-picker>
<!-- 会员号码查看modal -->
<up-modal :show="showModal" title="电话号码" content='15884967539' :closeOnClickOverlay="true" :zoom="true"
confirmColor='#33B83A' @confirm='showModal = false' @close="showModal = false">
<view class="slot-content">
@ -355,14 +358,13 @@ import {
config
} from "@/config/app.js"
const currentTab = ref(0)
const showModal = ref(false)
const showPop1 = ref(false)
const Role = ref(1)
const popPhone = ref('')
// const range = ref({})
const columns = ref([])
const showModa = ref(true)
const storePhone = ref('')
const tabsLst = reactive([{
name: '开通行业会员'
},
@ -373,7 +375,6 @@ const tabsLst = reactive([{
name: '已开通列表'
},
]);
const tabsLst2 = reactive([{
name: '开通商户'
},
@ -381,8 +382,7 @@ const tabsLst2 = reactive([{
name: '已开通列表'
},
]);
const vipList = reactive([1, 2, 3, 5, 6, 7, 8])
const tabsChange = (e) => {
currentTab.value = e.index
@ -390,13 +390,18 @@ const tabsChange = (e) => {
getCount()
getLists()
}
// getLists()
}
const tabsChange1 = (e) => {
currentTab.value = (e.index)
getLists()
}
//
const storePhone = ref('')
let STORE_INFO = reactive({
id: "",
})
const confirmStore = () => {
getStoreByPhone({
phone: storePhone.value
@ -409,11 +414,6 @@ const confirmStore = () => {
uni.$u.toast('未查到店铺信息,请检查手机号码')
})
}
//
let STORE_INFO = reactive({
id: ""
})
//
const setPhoneOneDay = () => {
@ -427,7 +427,7 @@ const setPhoneOneDay = () => {
}));
}
const getPhoneOneDay = () => {
if (uni.getStorageSync('VIP_PHONE')) {
if (!uni.getStorageSync('VIP_PHONE')) return;
let data = JSON.parse(uni.getStorageSync('VIP_PHONE'))
if (new Date() > data.time) {
uni.removeStorageSync('VIP_PHONE');
@ -435,11 +435,9 @@ const getPhoneOneDay = () => {
storePhone.value = data.phone
}
}
}
//
//
const vipList = reactive([1, 2, 3, 5, 6, 7, 8])
const cutDown = ref(0)
const flag = ref(true)
const code = ref('')
@ -464,9 +462,6 @@ const getCode = async () => {
}, 1000)
}
//
const currentTab = ref(0)
const formData = reactive({
store_id: STORE_INFO.id,
mobile: "",
@ -485,21 +480,6 @@ const formData = reactive({
code: '',
brigade: "",
price: "",
// store_id: STORE_INFO.id,
// mobile: "19130550023",
// province: 510000,
// city: '510500',
// area: "510503",
// street: "510503102",
// village: "510503102201",
// real_name: "",
// auth_code: "131197337173621549",
// address: "",
// label_name: "",
// label_id: "4",
// user_ship: '1',
// price: 0.02,
// code: '12'
})
@ -616,7 +596,6 @@ const conformRole = (e) => {
showPop1.value = false
}
//
const showPop = ref(false)
const currentAddressIndex = ref(0)
@ -798,7 +777,10 @@ const submit = async (type = 1) => {
formData2.auth_code = res.result
formData2.recharge_type = 'INDUSTRYMEMBERS'
formData2.user_ship = formData2.label_id
vipRechargeApi(formData2).then(res => {
vipRechargeApi({
...formData2,
type: 2
}).then(res => {
paySuccess = false;
timerInvol = setTimeout(() => {
uni.hideLoading();

View File

@ -245,10 +245,17 @@
{
"path": "asset/index",
"style": {
"navigationBarTitleText": "会员资产",
"navigationBarTitleText": "用户资产",
"enablePullDownRefresh": true
}
},
{
"path": "asset/lists",
"style": {
"navigationBarTitleText": "预约记录",
"enablePullDownRefresh": false
}
},
{
"path": "Gifts/index",
"style": {

View File

@ -168,15 +168,15 @@
<view class="shop-content-li-r" style="color:#FC452F ;"><text
style="font-size: 30rpx;">{{item[priceKey.price]}}</text>/{{ item.unit_name }}
</view>
<view class="tag">
<view class="tag" v-if="item.tag">
<view class="icon" />
赠10%品牌礼品券
{{item.tag}}
</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-r line-through">{{item[priceKey.op_price]}}</view>
</view> -->
</view>
<view class="shop-content-li" v-else>
<view class="shop-content-li-l">售价</view>
@ -231,7 +231,8 @@
</view>
</view>
<goodPopup ref="goodRef" :show="showGoodPopup" @close="showGoodPopup = false" @change="changeGood" />
<goodPopup ref="goodRef" :priceKey='priceKey' :show="showGoodPopup" @close="showGoodPopup = false"
@change="changeGood" />
<u-overlay :show="showOverlay" @click="showOverlay = false">
<view class="warp">

View File

@ -118,6 +118,7 @@
<up-cell-group>
<!-- <up-cell v-if="userInfo.user_ship==1" title="赠品区" :isLink="true" url="/pageQuota/Gifts/index"></up-cell> -->
<up-cell title="我的资产" :isLink="true" url="/pageQuota/asset/index"></up-cell>
<up-cell title="预约记录" :isLink="true" url="/pageQuota/asset/lists"></up-cell>
<up-cell title="我的地址" :isLink="true" url="/pagesOrder/addressList/addressList"></up-cell>
<up-cell title="支付密码" :isLink="true" url="/pagesOrder/setPayPassword/index"></up-cell>
</up-cell-group>