This commit is contained in:
zmj 2024-06-27 17:39:25 +08:00
parent b1b3f659b5
commit db89348f2a
8 changed files with 110 additions and 60 deletions

View File

@ -43,7 +43,7 @@
<view v-else class="row" style="height: 100rpx;"> <view v-else class="row" style="height: 100rpx;">
<view>购买数量<text style="color: #F55726;">*</text></view> <view>购买数量<text style="color: #F55726;">*</text></view>
<view style="justify-content: end;"> <view style="justify-content: end;">
<up-number-box v-model="datas.cart_num"></up-number-box> <up-number-box v-model="datas.cart_num" @change="valChange"></up-number-box>
</view> </view>
</view> </view>
<view class="row" style="padding-top: 30px;padding-bottom: 30rpx;"> <view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
@ -80,6 +80,10 @@
}, },
}) })
const valChange = () => {
console.log(4545)
uni.vibrateShort();
}
let priceKey = ref({}) let priceKey = ref({})
if (uni.getStorageSync('PRICE_KEY')) { if (uni.getStorageSync('PRICE_KEY')) {

View File

@ -4,17 +4,22 @@ import store from "@/store/user.js"
// 环境 // 环境
let env = "dev" let env = "dev"
// let env = "prod" // let env = "prod"
// let env = "liu"; // let env = "release";
// let env = "local";
switch (env) { switch (env) {
case 'dev': case 'dev':
BASE_URL = 'https://test-multi-store.lihaink.cn'; BASE_URL = 'https://test-multi-store.lihaink.cn';
WSS_URL = 'wss://test-multi-store.lihaink.cn/pull' WSS_URL = 'wss://test-multi-store.lihaink.cn/pull'
break; break;
case 'liu': case 'release':
BASE_URL = 'https://ceshi-multi-store.lihaink.cn'; BASE_URL = 'https://ceshi-multi-store.lihaink.cn';
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull' WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break; break;
case 'local':
BASE_URL = 'http://192.168.1.201:8545';
WSS_URL = 'wss://ceshi-multi-store.lihaink.cn/pull'
break;
default: default:
BASE_URL = 'https://multi-store.lihaink.cn'; BASE_URL = 'https://multi-store.lihaink.cn';
WSS_URL = 'wss://multi-store.lihaink.cn/pull' WSS_URL = 'wss://multi-store.lihaink.cn/pull'

View File

@ -1,15 +1,14 @@
<template> <template>
<view class="" v-if="!STORE_INFO.id"> <view class="" v-if="!STORE_INFO.id">
<up-modal :show="showModa" title="门店信息" @confirm="confirmStore" confirmColor='#20B128'> <up-modal :show="showModa" title="登录门店" @confirm="confirmStore" confirmColor='#20B128'>
<view class="slot-content"> <view class="slot-content">
<up-form labelPosition="left" label-width="100rpx"> <up-form labelPosition="left" label-width="100rpx">
<up-form-item label="手机号" borderBottom> <up-form-item label="手机号" borderBottom>
<up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input> <up-input v-model="storePhone" placeholder="请输入门店手机号"></up-input>
</up-form-item> </up-form-item>
<up-form-item label="角色" borderBottom> <!-- <up-form-item label="角色" borderBottom>
<uni-data-select v-model="Role" :localdata="range" :clear='false'></uni-data-select> <uni-data-select v-model="Role" :localdata="range" :clear='false'></uni-data-select>
</up-form-item> </up-form-item> -->
</up-form> </up-form>
</view> </view>
</up-modal> </up-modal>
@ -27,6 +26,7 @@
<view class="card card1"> <view class="card card1">
<view class="card1-tit"> <view class="card1-tit">
{{ Role == 1 ? '行业会员' : '商户' }}开通报备 {{ Role == 1 ? '行业会员' : '商户' }}开通报备
<!-- <up-input v-model='formData.auth_code'> </up-input> -->
</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="">
@ -61,7 +61,7 @@
suffixIcon='arrow-down'></up-input> suffixIcon='arrow-down'></up-input>
</view> </view>
</up-form-item> </up-form-item>
<up-form-item label="" v-if='Role == 1'> <!-- <up-form-item label="" v-if='Role == 1'>
<view style="width: 100%;"> <view style="width: 100%;">
<up-input v-model="formData.price" border="none" prefixIcon="rmb-circle" placeholder="请输入金额" <up-input v-model="formData.price" border="none" prefixIcon="rmb-circle" placeholder="请输入金额"
:customStyle="{ :customStyle="{
@ -69,7 +69,7 @@
'border-radius': '30rpx' 'border-radius': '30rpx'
}" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input> }" :placeholderStyle="{ color: '#444444' }" :prefixIconStyle="{ 'margin-right': '40rpx' }"></up-input>
</view> </view>
</up-form-item> </up-form-item> -->
<up-form-item label=""> <up-form-item label="">
<view style="width: 100%;display: flex;align-items: center;justify-content: space-between;"> <view style="width: 100%;display: flex;align-items: center;justify-content: space-between;">
<view class=""> <view class="">
@ -83,16 +83,24 @@
<text @click="getCode" class='btn-text' v-else> {{ flag ? '获取验证码' : '重新获取' }} </text> <text @click="getCode" class='btn-text' v-else> {{ flag ? '获取验证码' : '重新获取' }} </text>
</view> </view>
</up-form-item> </up-form-item>
<!-- <view style="font-size: 40rpx;" v-if="Role==1">
¥500.00
</view> -->
</up-form> </up-form>
<view class="store-info"> <view class="store-info">
报备人:{{ STORE_INFO.name }} 报备人:{{ STORE_INFO.name }}
</view> </view>
<view class="store-info" v-if="Role==1">
<view class="" style="width: 300rpx;margin: 0 auto;border-bottom: 1px solid #F3F3F3;">
<up-input inputAlign='center' placeholder="请输入金额" color='#FF6B00'
:placeholderStyle="{fontSize:'28rpx'}" fontSize='20px' border="none"
v-model="formData.price" @blur='tofixedPrice'></up-input>
</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}}
</view>
</view>
</view> </view>
<view class="submit-btn" @click="submit"> <view class="submit-btn" @click="submit">
<view <view
@ -226,14 +234,15 @@
import Push from "@/utils/push.js" import Push from "@/utils/push.js"
import { import {
onPullDownRefresh, onPullDownRefresh,
onLoad onLoad,
onReachBottom
} from "@dcloudio/uni-app" } from "@dcloudio/uni-app"
import { import {
config config
} from "@/config/app.js" } from "@/config/app.js"
const showPop1 = ref(false) const showPop1 = ref(false)
const Role = ref('') const Role = ref(1)
const range = ref({}) const range = ref({})
const columns = ref([]) const columns = ref([])
const showModa = ref(true) const showModa = ref(true)
@ -320,6 +329,7 @@
address: "", address: "",
label_name: "", label_name: "",
label_id: "", label_id: "",
label_limit: "",
user_ship: '', user_ship: '',
code: '', code: '',
brigade: "", brigade: "",
@ -339,6 +349,11 @@
// user_ship: '1', // user_ship: '1',
// code: '' // code: ''
}) })
const tofixedPrice = () => {
formData.price = (+formData.price).toFixed(2)
}
const resetFormData = () => { const resetFormData = () => {
for (let key in formData) { for (let key in formData) {
formData[key] = '' formData[key] = ''
@ -354,8 +369,8 @@
const conformRole = (e) => { const conformRole = (e) => {
formData.label_name = e.value[0].label_name formData.label_name = e.value[0].label_name
formData.label_id = e.value[0].label_id formData.label_id = e.value[0].label_id
console.log(e) formData.price = (+e.value[0].limit).toFixed(2)
formData.label_limit = e.value[0].limit
showPop1.value = false showPop1.value = false
} }
@ -480,13 +495,15 @@
if (!formData.mobile) return uni.$u.toast('请填写电话号码'); if (!formData.mobile) return uni.$u.toast('请填写电话号码');
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.price < 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
if (Role.value == 1) { if (Role.value == 1) {
// formData.recharge_type = 'INDUSTRYMEMBERS' // formData.recharge_type = 'INDUSTRYMEMBERS'
// formData.user_ship = 1 // formData.user_ship = 1
// vipRechargeApi(formData).then(res => {}) // vipRechargeApi(formData).then(res => {})
// return // return
if (!formData.label_id) return uni.$u.toast('请选择用户身份');
uni.scanCode({ uni.scanCode({
success: function(res) { success: function(res) {
if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整'); if (String(res.result.length) != 18) return uni.$u.toast('二维码未扫描完整');
@ -505,17 +522,6 @@
} }
}); });
} else {
delete formData.recharge_type
delete formData.auth_code
formData.user_ship = 4
vipRechargeApi(formData).then(res => {
uni.$u.toast('操作成功');
currentTab.value = 2
resetFormData()
getLists()
getCount()
})
} }
} }
@ -557,6 +563,12 @@
} }
// //
let where = {
page_no: 1,
page_size: 25,
loadingOver: false
}
const count = ref(0) const count = ref(0)
const getCount = async () => { const getCount = async () => {
if (Role.value == 4) return; if (Role.value == 4) return;
@ -569,19 +581,16 @@
// //
const lists = ref([]) const lists = ref([])
const getLists = async () => { const getLists = async () => {
if (Role.value == 1) { where.loadingOver = false
where.page_no = 1
where.page_size = 25
let res = await rechargeListsApi({ let res = await rechargeListsApi({
store_id: STORE_INFO.id, store_id: STORE_INFO.id,
recharge_type: "INDUSTRYMEMBERS" recharge_type: "INDUSTRYMEMBERS",
page_no: 1,
page_size: 25
}) })
lists.value = res.data.lists lists.value = res.data.lists
} else {
let res = await getCreateLists({
store_id: STORE_INFO.id,
})
lists.value = res.data.lists
count.value = res.data.count
}
} }
@ -622,6 +631,32 @@
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}, 1000) }, 1000)
}) })
onReachBottom(async () => {
if (where.loadingOver) return;
where.page_no++;
if (Role.value == 1) {
let res = await rechargeListsApi({
store_id: STORE_INFO.id,
recharge_type: "INDUSTRYMEMBERS",
...where
})
if (res.data.lists.length <= 0) {
return where.loadingOver = true
}
lists.value.push(...res.data.lists)
} else {
let res = await getCreateLists({
store_id: STORE_INFO.id,
...where
})
if (res.data.lists.length <= 0) {
return where.loadingOver = true
}
lists.value.push(...res.data.lists)
}
})
</script> </script>
<style lang='scss'> <style lang='scss'>
@ -751,7 +786,7 @@
} }
.slot-content { .slot-content {
padding-bottom: 50rpx; /* padding-bottom: 50rpx; */
} }
.code-btn { .code-btn {

View File

@ -19,7 +19,7 @@
<view class="page-box1"> <view class="page-box1">
<view class="total" @click='isAdmin=!isAdmin'> <view class="total" @click='isAdmin=!isAdmin'>
<view>共计<text style="color: #20B128;">{{cartList.length}}</text></view> <view>共计<text style="color: #20B128;">{{cartList.length}}</text></view>
<view v-if="!isAdmin">管理</view> <view v-if="!isAdmin">删除商品</view>
<view v-else>完成</view> <view v-else>完成</view>
</view> </view>
<view v-if="cartList.length>0" class="list"> <view v-if="cartList.length>0" class="list">

View File

@ -167,7 +167,7 @@
</view> </view>
<view class="tag"> <view class="tag">
<view class="icon" /> <view class="icon" />
赠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">
@ -212,8 +212,7 @@
<view class="price-info"> <view class="price-info">
<view class="row"> <view class="row">
<view>合计</view> <view>合计</view>
<view class="price" v-if='cartInfo.pay_price<=0||userStore?.userInfo?.user_ship !=4'>¥<text <view class="price">¥<text style="font-size: 36rpx;">{{ cartInfo.pay_price }}</text></view>
style="font-size: 36rpx;">{{ cartInfo.pay_price }}</text></view>
</view> </view>
<view style="font-size: 22rpx;text-indent: 3em;color: #F55726;" <view style="font-size: 22rpx;text-indent: 3em;color: #F55726;"
v-if="cartInfo.msg&&cartInfo.total_price>0 "> v-if="cartInfo.msg&&cartInfo.total_price>0 ">
@ -364,6 +363,8 @@
const show = ref(0); const show = ref(0);
const topActive = ref(0); const topActive = ref(0);
const changeOne = async (item, index) => { const changeOne = async (item, index) => {
where.value.top_cate_id = item.id
delete where.value.two_cate_id // id, , id,
topActive.value = item.id; topActive.value = item.id;
show.value = 0; show.value = 0;
goodClassTow.value = item?.children || []; goodClassTow.value = item?.children || [];
@ -376,6 +377,8 @@
const leftActive = ref(0); const leftActive = ref(0);
const changeTwo = (item, index) => { const changeTwo = (item, index) => {
console.log(item)
where.value.two_cate_id = item.id
isScroll.value = false; isScroll.value = false;
getWXDom(instance) getWXDom(instance)
leftActive.value = item.id; leftActive.value = item.id;
@ -457,17 +460,19 @@
if (class_all) class_id = ""; // if (class_all) class_id = ""; //
if (loadmore) where.value.page_no++; if (loadmore) where.value.page_no++;
else where.value.page_no = 1; else where.value.page_no = 1;
goodListApi({ let data = {
...where.value, ...where.value,
class_all: class_all, class_all: class_all,
class: class_id, class: class_id,
cate_id: class_id, cate_id: class_id,
}).then(res => { // top_cate_id: "",
// two_cate_id: ""
}
goodListApi(data).then(res => {
for (let key in res.data.extend) { for (let key in res.data.extend) {
priceKey[key] = res.data.extend[key] priceKey[key] = res.data.extend[key]
} }
uni.setStorageSync("PRICE_KEY", JSON.stringify(priceKey)) uni.setStorageSync("PRICE_KEY", JSON.stringify(priceKey))
console.log(priceKey)
if (loadmore) goodList.value.push(...res.data.lists); if (loadmore) goodList.value.push(...res.data.lists);
else goodList.value = res.data.lists; else goodList.value = res.data.lists;
}) })
@ -694,7 +699,6 @@
} }
// id // id
if (opt.id && opt.id != 'undefined') { if (opt.id && opt.id != 'undefined') {
console.log(opt.id, opt.id != 'undefined', "进来了这里")
where.value.store_id = opt.id; where.value.store_id = opt.id;
const info = await shopDetailApi({ const info = await shopDetailApi({
store_id: where.value.store_id store_id: where.value.store_id

View File

@ -81,7 +81,7 @@
const type = ref(1) // 1 2 const type = ref(1) // 1 2
const onKetDown = (e) => { const onKetDown = (e) => {
uni.vibrateShort(); uni.vibrateLong();
if (type.value == 1) { if (type.value == 1) {
form.password.length < 6 ? form.password.length < 6 ?
form.password += e : form.password += e :

View File

@ -79,13 +79,13 @@
</view> </view>
<view class="m-card order-remark"> <view class="m-card order-remark">
<view style="display: flex;align-items: center;"> <!-- <view style="display: flex;align-items: center;">
<text style="margin-right: 20rpx;">是否存货</text> <text style="margin-right: 20rpx;">是否存货</text>
<up-radio-group v-model="isCh" placement="row"> <up-radio-group v-model="isCh" 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="0"></up-radio> <up-radio activeColor="#20b128" label="否" name="0"></up-radio>
</up-radio-group> </up-radio-group>
</view> </view> -->
<view class="head-title" style="margin-top: 20rpx;"> <view class="head-title" style="margin-top: 20rpx;">
<text>订单备注</text> <text>订单备注</text>
<text>{{formData.remark.length}}/140</text> <text>{{formData.remark.length}}/140</text>
@ -110,8 +110,9 @@
</view> </view>
</view> </view>
<view class="row" <!-- <view class="row"
v-if="userInfo.user_ship == 4 || userInfo.user_ship == 5 || userInfo.user_ship == 6 || userInfo.user_ship == 1"> v-if="userInfo.user_ship == 4 || userInfo.user_ship == 5 || userInfo.user_ship == 6 || userInfo.user_ship == 1"> -->
<view class="row">
<!-- <view class="row"> --> <!-- <view class="row"> -->
<view class="icon-text"> <view class="icon-text">
<image src="@/static/icon/YEZF.png" style="width:40rpx;height: 40rpx;" /> <image src="@/static/icon/YEZF.png" style="width:40rpx;height: 40rpx;" />
@ -127,7 +128,8 @@
</view> </view>
</view> </view>
<view class="row" v-if="userInfo.user_ship == 1"> <!-- <view class="row" v-if="userInfo.user_ship == 1"> -->
<view class="row">
<view class="icon-text"> <view class="icon-text">
<image src="@/static/icon/cgkzf.png" style="width:40rpx;height: 40rpx;" /> <image src="@/static/icon/cgkzf.png" style="width:40rpx;height: 40rpx;" />
<text style="margin-left: 20rpx;font-size: 26rpx;">采购款支付</text> <text style="margin-left: 20rpx;font-size: 26rpx;">采购款支付</text>

View File

@ -43,7 +43,7 @@
} }
break; break;
} }
uni.vibrateShort(); uni.vibrateLong();
if (refValue.value.length === props.num) { if (refValue.value.length === props.num) {
emits('complete', refValue.value.join('')); emits('complete', refValue.value.join(''));
} }