用户积分修改,修改分销员筛选,修改超级会员订单列表检索

This commit is contained in:
2026-01-13 14:52:10 +08:00
parent 63896046a8
commit 0990e08201
11 changed files with 2416 additions and 2014 deletions

View File

@@ -0,0 +1,222 @@
<template>
<view>
<view class="box" @click.stop="openPopup">
<text class="u-font-28 color-999 u-p-r-16" v-if="!modelValue||list.length==0">请选择用户</text>
<text class="u-font-28 color-333 u-p-r-16 u-line-1" v-else :style="{
maxWidth: maxWidth+'rpx'
}">{{returnLabel()}}</text>
<view class="icon ">
<up-icon name="arrow-down" size="14" color="#999"></up-icon>
</view>
</view>
<up-popup :show="show" placement="bottom" round="18rpx" closeOnClickOverlay @close="close">
<view class="u-p-30">
<view class="font-bold color-333 u-font-32">选择用户</view>
<view class="u-m-t-24">
<up-search v-model="query.key" @clear="search" @custom="search" @search="search"></up-search>
</view>
<scroll-view scroll-with-animation :scroll-into-view="selId" class="scroll-view u-m-t-30"
scroll-y="true" style="max-height :60vh;" @scrolltolower="scrolltolower">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.id" @click="itemClick(item)"
:id="'item_'+item.id" :class="{active:selItem&&selItem.id==item.id}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.nickName}}/{{item.phone}}</view>
</view>
<template v-if="search.key!==''">
<up-empty v-if="list.length==0" text="未搜到相关用户"></up-empty>
<up-loadmore v-else :status="isEnd?'nomore':'loading'"></up-loadmore>
</template>
<template v-else>
<up-empty v-if="list.length==0" text="暂无用户"></up-empty>
<up-loadmore v-else :status="isEnd?'nomore':'loading'"></up-loadmore>
</template>
</scroll-view>
<view class="u-flex gap-20 u-m-t-30">
<view class="u-flex-1">
<my-button type="default" @click="close">取消</my-button>
</view>
<view class="u-flex-1">
<my-button type="primary" @click="submit">确定</my-button>
</view>
</view>
</view>
</up-popup>
</view>
</template>
<script setup>
import {
computed,
onMounted,
reactive,
ref,
watch
} from 'vue';
import {
getShopUser
} from '@/http/api/market/index.js';
const customStyle = ref({
marginRight: '20px'
});
const show = ref(false);
let modelValue = defineModel('modelValue', {
default: '',
});
const props = defineProps({
maxWidth: {
default: 240
}
})
const selId = ref('')
function returnLabel() {
const findItem = list.value.find(v => v.id == modelValue.value)
if (findItem) {
return findItem.nickName + (findItem.phone ? ('/' + findItem.phone) : '')
}
return ''
}
const selItem = ref(null)
function itemClick(item) {
selItem.value = item
}
function returnShopName(id) {
const item = list.value.find((v) => v.id == id);
return item?.shopName || '';
}
function close() {
show.value = false;
}
const emits = defineEmits(['change'])
function submit() {
if (!selItem.value) {
return uni.showToast({
title: '请选择用户'
})
}
if (modelValue.value != selItem.value.id) {
modelValue.value=selItem.value.id
emits('change')
}else{
modelValue.value=selItem.value.id
}
show.value = false;
}
const list = ref([]);
function openPopup() {
selId.value = 'item_' + modelValue.value
init()
show.value = true;
}
const isEnd = ref(false)
const query = reactive({
page: 1,
size: 10,
key: ''
})
function search() {
isEnd.value = false
query.page = 1
selItem.value = null
init()
}
async function init() {
const res = await getShopUser(query);
if (res) {
isEnd.value = query.page >= res.totalPage * 1
if (query.page == 1) {
list.value = res.records
} else {
list.value.push(...res.records)
}
}
}
function scrolltolower() {
if (!isEnd.value) {
query.page++
init()
}
}
</script>
<style lang="scss">
.box {
border-radius: 8upx;
display: flex;
flex-direction: row;
align-items: top;
flex-wrap: wrap;
padding: 10rpx 24rpx;
border: 2rpx solid #e5e5e5;
position: relative;
.icon {
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
}
}
.shop-item {
padding: 4rpx 8rpx 4rpx 16rpx;
border-radius: 4rpx;
border: 2rpx solid #f0f0f0;
background-color: #f5f5f5;
margin-bottom: 16rpx;
margin-left: 16rpx;
}
.scroll-view {
.item {
border: 1px solid #eee;
padding: 20rpx;
border-radius: 12rpx;
&.active {
border-color: $my-main-color;
}
}
}
.checkbox {
margin-right: 10rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 6rpx;
border: 1px solid #999;
}
.item {
&.active {
.checkbox {
background-color: $my-main-color;
border-color: $my-main-color;
}
}
}
</style>

View File

@@ -189,3 +189,12 @@ export function shopUserFlow(data) {
data data
}); });
} }
export function getShopUser(data) {
return request({
url: `account/admin/shopUser`,
method: 'get',
data
});
}

17
http/api/market/points.js Normal file
View File

@@ -0,0 +1,17 @@
import http from '@/http/http.js'
const request = http.request
const MARKET_URL = 'market'
const ORDER_URL = 'order'
/**
* 积分:配置:新增/更新
* @param {Object} data
*/
export function pointsConfig(data) {
return request({
url: MARKET_URL+`/admin/points/config`,
method: "GET",
data
})
}

View File

@@ -14,7 +14,7 @@ import storageManage from '@/commons/utils/storageManage.js'
import infoBox from "@/commons/utils/infoBox.js" import infoBox from "@/commons/utils/infoBox.js"
import go from '@/commons/utils/go.js'; import go from '@/commons/utils/go.js';
import { reject } from 'lodash'; import { reject } from 'lodash';
let baseUrl = appConfig.returnBaseUrl({apiType:'php'}); let baseUrl = appConfig.returnBaseUrl({apiType:'java'});
const loadingShowTime = 200 const loadingShowTime = 200
function getHeader(){ function getHeader(){

View File

@@ -0,0 +1,219 @@
<template>
<view>
<view class="box" @click.stop="openPopup">
<text class="u-font-28 color-999 u-p-r-16" v-if="!modelValue||list.length==0">请选择用户</text>
<text class="u-font-28 color-333 u-p-r-16 u-line-1" v-else :style="{
maxWidth: maxWidth+'rpx'
}">{{returnLabel()}}</text>
<view class="icon ">
<up-icon name="arrow-down" size="14" color="#999"></up-icon>
</view>
</view>
<up-popup :show="show" placement="bottom" round="18rpx" closeOnClickOverlay @close="close">
<view class="u-p-30">
<view class="font-bold color-333 u-font-32">选择用户</view>
<view class="u-m-t-24">
<up-search v-model="query.key" @clear="search" @custom="search" @search="search"></up-search>
</view>
<scroll-view scroll-with-animation :scroll-into-view="selId" class="scroll-view u-m-t-30"
scroll-y="true" style="max-height :60vh;" @scrolltolower="scrolltolower">
<view class="u-m-b-10 u-flex item" v-for="item in list" :key="item.id" @click="itemClick(item)"
:id="'item_'+item.id" :class="{active:selItem&&selItem.id==item.id}">
<view class="checkbox">
<up-icon name="checkbox-mark" color="#fff"></up-icon>
</view>
<view class="u-flex-1">{{item.nickName}}/{{item.phone}}</view>
</view>
<template v-if="search.key!==''">
<up-empty v-if="list.length==0" text="未搜到相关用户"></up-empty>
<up-loadmore v-else :status="isEnd?'nomore':'loading'"></up-loadmore>
</template>
<template v-else>
<up-empty v-if="list.length==0" text="暂无用户"></up-empty>
<up-loadmore v-else :status="isEnd?'nomore':'loading'"></up-loadmore>
</template>
</scroll-view>
<view class="u-flex gap-20 u-m-t-30">
<view class="u-flex-1">
<my-button type="default" @click="close">取消</my-button>
</view>
<view class="u-flex-1">
<my-button type="primary" @click="submit">确定</my-button>
</view>
</view>
</view>
</up-popup>
</view>
</template>
<script setup>
import {
computed,
onMounted,
reactive,
ref,
watch
} from 'vue';
import {
getShopUser
} from '@/http/api/market/index.js';
const customStyle = ref({
marginRight: '20px'
});
const show = ref(false);
let modelValue = defineModel('modelValue', {
default: '',
});
const props=defineProps({
maxWidth:{
default:240
}
})
const selId = ref('')
function returnLabel() {
const findItem = list.value.find(v => v.id == modelValue.value)
if(findItem){
return findItem.nickName+(findItem.phone?('/'+findItem.phone):'')
}
return ''
}
const selItem=ref(null)
function itemClick(item) {
selItem.value=item
}
function returnShopName(id) {
const item = list.value.find((v) => v.id == id);
return item?.shopName || '';
}
function close() {
show.value = false;
}
const emits=defineEmits(['change'])
function submit() {
if(!selItem.value){
return uni.showToast({
title:'请选择用户'
})
}
modelValue.value = selItem.value.id
if(modelValue.value!=selItem.value.id){
emits('change')
}
show.value = false;
}
const list = ref([]);
function openPopup() {
selId.value = 'item_' + modelValue.value
init()
show.value = true;
}
const isEnd = ref(false)
const query = reactive({
page: 1,
size: 10,
key: ''
})
function search() {
isEnd.value = false
query.page = 1
selItem.value=null
init()
}
async function init() {
const res = await getShopUser(query);
if (res) {
isEnd.value = query.page >= res.totalPage * 1
if (query.page == 1) {
list.value = res.records
} else {
list.value.push(...res.records)
}
}
}
function scrolltolower() {
if (!isEnd.value) {
query.page++
init()
}
}
</script>
<style lang="scss">
.box {
border-radius: 8upx;
display: flex;
flex-direction: row;
align-items: top;
flex-wrap: wrap;
padding: 10rpx 24rpx;
border: 2rpx solid #e5e5e5;
position: relative;
.icon {
position: absolute;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
}
}
.shop-item {
padding: 4rpx 8rpx 4rpx 16rpx;
border-radius: 4rpx;
border: 2rpx solid #f0f0f0;
background-color: #f5f5f5;
margin-bottom: 16rpx;
margin-left: 16rpx;
}
.scroll-view {
.item {
border: 1px solid #eee;
padding: 20rpx;
border-radius: 12rpx;
&.active {
border-color: $my-main-color;
}
}
}
.checkbox {
margin-right: 10rpx;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
border-radius: 6rpx;
border: 1px solid #999;
}
.item {
&.active {
.checkbox {
background-color: $my-main-color;
border-color: $my-main-color;
}
}
}
</style>

View File

@@ -3,32 +3,23 @@
<up-sticky> <up-sticky>
<view class="bg-fff top"> <view class="bg-fff top">
<view class="bg-fff container u-flex u-m-b-48"> <view class="bg-fff container u-flex u-m-b-48">
<image <image style="width: 60rpx; height: 60rpx" src="/pageMarket/static/images/distribution.png"></image>
style="width: 60rpx; height: 60rpx"
src="/pageMarket/static/images/distribution.png"
></image>
<view class="u-flex-1 u-flex u-p-l-24"> <view class="u-flex-1 u-flex u-p-l-24">
<view class="u-font-28 u-flex-1 u-p-r-4"> <view class="u-font-28 u-flex-1 u-p-r-4">
<view class="color-333 font-bold">分销</view> <view class="color-333 font-bold">分销</view>
<view class="color-666 u-m-t-4 u-font-24" <view class="color-666 u-m-t-4 u-font-24">用户成为业务员可促进消费
>用户成为业务员可促进消费
</view> </view>
</view> </view>
<up-switch <up-switch v-model="distributionStore.config.isEnable" size="18" :active-value="1"
v-model="distributionStore.config.isEnable" :inactive-value="0"></up-switch>
size="18"
:active-value="1"
:inactive-value="0"
></up-switch>
</view> </view>
</view> </view>
<my-tabs v-model="active" :list="tabs" textKey="label"></my-tabs> <my-tabs v-model="active" :list="tabs" textKey="label"></my-tabs>
<view <view v-if="active == 1 || active == 2" class="u-flex u-row-between u-m-t-32" style="gap: 58rpx">
v-if="active == 1 || active == 2" <view class="u-flex-1">
class="u-flex u-row-between u-m-t-32" <fenXiaoUserSelect v-model="userId" @change="getList()" />
style="gap: 58rpx" </view>
> <!-- <view class="u-flex-1 filter-box" style="border-radius: 100rpx">
<view class="u-flex-1 filter-box" style="border-radius: 100rpx">
<up-icon name="search" size="18"></up-icon> <up-icon name="search" size="18"></up-icon>
<input <input
class="u-m-l-10 u-font-28" class="u-m-l-10 u-font-28"
@@ -39,14 +30,9 @@
@blur="keyWordBlur" @blur="keyWordBlur"
/> />
<up-icon v-if="keyWord" name="close" size="14" @click="clearKeyWord"></up-icon> <up-icon v-if="keyWord" name="close" size="14" @click="clearKeyWord"></up-icon>
</view> </view> -->
<view <view class="u-flex-1 u-font-28 filter-box u-flex u-row-between" @click="showTimeArea = true">
class="u-flex-1 u-font-28 filter-box u-flex u-row-between" <template v-if="userComponentQuery.startTime && userComponentQuery.endTime">
@click="showTimeArea = true"
>
<template
v-if="userComponentQuery.startTime && userComponentQuery.endTime"
>
<text class="u-font-20"> <text class="u-font-20">
{{ userComponentQuery.startTime }} - {{ userComponentQuery.startTime }} -
{{ userComponentQuery.endTime }} {{ userComponentQuery.endTime }}
@@ -61,15 +47,8 @@
</template> </template>
</view> </view>
</view> </view>
<view <view v-if="active == 3" class="u-flex u-row-between u-m-t-32" style="gap: 30rpx">
v-if="active == 3" <view class="u-font-28 filter-box u-flex u-row-between" @click="showActions = true">
class="u-flex u-row-between u-m-t-32"
style="gap: 30rpx"
>
<view
class="u-font-28 filter-box u-flex u-row-between"
@click="showActions = true"
>
<template v-if="selActions && selActions.value"> <template v-if="selActions && selActions.value">
<text class="u-font-28 u-m-r-10">{{ selActions.name }} </text> <text class="u-font-28 u-m-r-10">{{ selActions.name }} </text>
</template> </template>
@@ -78,24 +57,16 @@
</template> </template>
<up-icon name="arrow-down" size="12"></up-icon> <up-icon name="arrow-down" size="12"></up-icon>
</view> </view>
<view class="u-flex-1 filter-box" style="border-radius: 100rpx"> <view class="u-flex-1">
<up-icon name="search" size="18"></up-icon> <fenXiaoUserSelect v-model="userId" :maxWidth="200" @change="getList()" />
<input
class="u-m-l-10 u-font-28"
type="text"
placeholder-class="color-999 u-font-28"
placeholder="分销员昵称/手机号"
v-model="keyWord"
@blur="keyWordBlur"
/>
</view> </view>
<view <!-- <view class="u-flex-1 filter-box" style="border-radius: 100rpx">
class="u-flex-1 u-font-28 filter-box u-flex u-row-between" <up-icon name="search" size="18"></up-icon>
@click="showTimeArea = true" <input class="u-m-l-10 u-font-28" type="text" placeholder-class="color-999 u-font-28"
> placeholder="分销员昵称/手机号" v-model="keyWord" @blur="keyWordBlur" />
<template </view> -->
v-if="userComponentQuery.startTime && userComponentQuery.endTime" <view class="u-flex-1 u-font-28 filter-box u-flex u-row-between" @click="showTimeArea = true">
> <template v-if="userComponentQuery.startTime && userComponentQuery.endTime">
<text class="u-font-20"> <text class="u-font-20">
{{ userComponentQuery.startTime }} - {{ userComponentQuery.startTime }} -
{{ userComponentQuery.endTime }} {{ userComponentQuery.endTime }}
@@ -143,84 +114,63 @@
}}</view> }}</view>
<view class="u-font-24 color-666 u-m-t-16"> <view class="u-font-24 color-666 u-m-t-16">
<text>运营余额</text> <text>运营余额</text>
<text class="color-main" @click="go.to('PAGES_PAY')" <text class="color-main" @click="go.to('PAGES_PAY')">充值{{ ">" }}</text>
>充值{{ ">" }}</text
>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</up-sticky> </up-sticky>
<configVue v-if="active == 0"></configVue> <configVue v-if="active == 0"></configVue>
<fenxiaoUserListVue <fenxiaoUserListVue v-if="active == 1" :list="list" :isEnd="isEnd" @refresh="refresh"></fenxiaoUserListVue>
v-if="active == 1"
:list="list"
:isEnd="isEnd"
@refresh="refresh"
></fenxiaoUserListVue>
<openListVue <openListVue v-if="active == 2" :list="list" :isEnd="isEnd" @refresh="refresh"></openListVue>
v-if="active == 2" <fenxiaoMingxiVue v-if="active == 3" :list="list" :isEnd="isEnd" @refresh="refresh"></fenxiaoMingxiVue>
:list="list"
:isEnd="isEnd"
@refresh="refresh"
></openListVue>
<fenxiaoMingxiVue
v-if="active == 3"
:list="list"
:isEnd="isEnd"
@refresh="refresh"
></fenxiaoMingxiVue>
<!-- 选择门店 --> <!-- 选择门店 -->
<shopSelActionSheetVue <shopSelActionSheetVue @choose="chooseShop" v-model="showShopSelActionSheet" title="选择门店">
@choose="chooseShop"
v-model="showShopSelActionSheet"
title="选择门店"
>
</shopSelActionSheetVue> </shopSelActionSheetVue>
<dateAreaSel <dateAreaSel :show="showTimeArea" :minYear="2022" @close="showTimeArea = false" @confirm="confirmTimeArea">
:show="showTimeArea" </dateAreaSel>
:minYear="2022"
@close="showTimeArea = false"
@confirm="confirmTimeArea"
></dateAreaSel>
<!-- 分销明细状态 --> <!-- 分销明细状态 -->
<up-action-sheet <up-action-sheet :show="showActions" :actions="actions" @select="handleSelect" @close="showActions = false"
:show="showActions" cancel-text="取消"></up-action-sheet>
:actions="actions"
@select="handleSelect"
@close="showActions = false"
cancel-text="取消"
></up-action-sheet>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import {
onLoad, onLoad,
onReady, onReady,
onShow, onShow,
onPageScroll, onPageScroll,
onReachBottom, onReachBottom,
onBackPress, onBackPress,
} from "@dcloudio/uni-app"; } from "@dcloudio/uni-app";
import go from "@/commons/utils/go.js"; import go from "@/commons/utils/go.js";
import { ref, onMounted, watch, provide } from "vue"; import {
import * as consumeCashbackApi from "@/http/api/market/consumeCashback.js"; ref,
import * as distributionApi from "@/http/api/market/distribution.js"; onMounted,
import configVue from "./components/config.vue"; watch,
import shopSelActionSheetVue from "@/pageMarket/components/shop-sel-action-sheet.vue"; provide
import dateAreaSel from "@/components/date-range-picker/date-range-picker.vue"; } from "vue";
import fenxiaoUserListVue from "./components/fenxiao-user-list.vue"; import * as consumeCashbackApi from "@/http/api/market/consumeCashback.js";
import openListVue from "./components/open-list.vue"; import * as distributionApi from "@/http/api/market/distribution.js";
import fenxiaoMingxiVue from "./components/fenxiao-mingxi.vue"; import fenXiaoUserSelect from './components/fenxiao-user-select.vue'
import configVue from "./components/config.vue";
import shopSelActionSheetVue from "@/pageMarket/components/shop-sel-action-sheet.vue";
import dateAreaSel from "@/components/date-range-picker/date-range-picker.vue";
import fenxiaoUserListVue from "./components/fenxiao-user-list.vue";
import openListVue from "./components/open-list.vue";
import fenxiaoMingxiVue from "./components/fenxiao-mingxi.vue";
import { useDistributionStore } from "@/store/market.js"; import {
import { reactive } from "vue"; useDistributionStore
} from "@/store/market.js";
import {
reactive
} from "vue";
const actions = [ const actions = [{
{
name: "全部", name: "全部",
value: "", value: "",
}, },
@@ -236,33 +186,39 @@ const actions = [
name: "已退款", name: "已退款",
value: "refund", value: "refund",
}, },
]; ];
function clearKeyWord() {
const userId = ref('')
function clearKeyWord() {
keyWord.value = ""; keyWord.value = "";
userComponentQuery.user = ""; userComponentQuery.user = "";
} }
function clearTime() {
function clearTime() {
userComponentQuery.startTime = ""; userComponentQuery.startTime = "";
userComponentQuery.endTime = ""; userComponentQuery.endTime = "";
} }
const selActions = ref(""); const selActions = ref("");
const showActions = ref(false); const showActions = ref(false);
function handleSelect(e) {
selActions.value = e;
}
const distributionStore = useDistributionStore(); function handleSelect(e) {
distributionStore.getConfig(); selActions.value = e;
provide("distributionStore", distributionStore); }
provide("distributionApi", distributionApi);
const showTimeArea = ref(false); const distributionStore = useDistributionStore();
function confirmTimeArea(e) { distributionStore.getConfig();
provide("distributionStore", distributionStore);
provide("distributionApi", distributionApi);
const showTimeArea = ref(false);
function confirmTimeArea(e) {
console.log(e); console.log(e);
userComponentQuery.startTime = e[0]; userComponentQuery.startTime = e[0];
userComponentQuery.endTime = e[1]; userComponentQuery.endTime = e[1];
} }
const tabs = [ const tabs = [{
{
label: "基础设置", label: "基础设置",
value: "basic", value: "basic",
}, },
@@ -278,69 +234,69 @@ const tabs = [
label: "分销明细", label: "分销明细",
value: "details", value: "details",
}, },
]; ];
const keyWord = ref(""); const keyWord = ref("");
function keyWordBlur() {
function keyWordBlur() {
userComponentQuery.user = keyWord.value; userComponentQuery.user = keyWord.value;
} }
const userComponentQuery = reactive({ const userComponentQuery = reactive({
user: "", user: "",
startTime: "", startTime: "",
endTime: "", endTime: "",
}); });
const form = ref({ const form = ref({
isEnable: 0, isEnable: 0,
}); });
const list = ref([]); const list = ref([]);
const pageNum = ref(1); const pageNum = ref(1);
const isEnd = ref(false); const isEnd = ref(false);
const selShop = ref({ const selShop = ref({
shopId: "", shopId: "",
shopName: "", shopName: "",
}); });
const searchText = ref(""); const searchText = ref("");
function search() { function search() {
pageNum.value = 1; pageNum.value = 1;
getList(); getList();
} }
function chooseShop(e) { function chooseShop(e) {
selShop.value = e; selShop.value = e;
} }
watch( watch(
() => selShop.value.shopId, () => selShop.value.shopId,
(newval) => { (newval) => {
pageNum.value = 1; pageNum.value = 1;
getList(); getList();
} }
); );
watch( watch(
() => userComponentQuery, () => userComponentQuery,
(newval) => { (newval) => {
isEnd.value = false; isEnd.value = false;
pageNum.value = 1; pageNum.value = 1;
getList(); getList();
}, }, {
{
deep: true, deep: true,
} }
); );
function refresh() { function refresh() {
isEnd.value = false; isEnd.value = false;
pageNum.value = 1; pageNum.value = 1;
getList(); getList();
} }
const listRes = ref({}); const listRes = ref({});
async function getList() { async function getList() {
let res = null; let res = null;
if (active.value == 1) { if (active.value == 1) {
//分销员列表 //分销员列表
@@ -348,12 +304,11 @@ async function getList() {
page: pageNum.value, page: pageNum.value,
size: 10, size: 10,
user: userComponentQuery.user, user: userComponentQuery.user,
startTime: userComponentQuery.startTime id:userId.value,
? userComponentQuery.startTime + " 00:00:00" startTime: userComponentQuery.startTime ?
: "", userComponentQuery.startTime + " 00:00:00" : "",
endTime: userComponentQuery.endTime endTime: userComponentQuery.endTime ?
? userComponentQuery.endTime + " 23:59:59" userComponentQuery.endTime + " 23:59:59" : "",
: "",
}); });
} }
if (active.value == 2) { if (active.value == 2) {
@@ -361,13 +316,12 @@ async function getList() {
res = await distributionApi.openFlow({ res = await distributionApi.openFlow({
page: pageNum.value, page: pageNum.value,
size: 10, size: 10,
id:userId.value,
key: userComponentQuery.user, key: userComponentQuery.user,
startTime: userComponentQuery.startTime startTime: userComponentQuery.startTime ?
? userComponentQuery.startTime + " 00:00:00" userComponentQuery.startTime + " 00:00:00" : "",
: "", endTime: userComponentQuery.endTime ?
endTime: userComponentQuery.endTime userComponentQuery.endTime + " 23:59:59" : "",
? userComponentQuery.endTime + " 23:59:59"
: "",
}); });
} }
if (active.value == 3) { if (active.value == 3) {
@@ -375,14 +329,13 @@ async function getList() {
res = await distributionApi.distributionFlow({ res = await distributionApi.distributionFlow({
page: pageNum.value, page: pageNum.value,
size: 10, size: 10,
id:userId.value,
key: userComponentQuery.user, key: userComponentQuery.user,
status: selActions.value?.value || "", status: selActions.value?.value || "",
startTime: userComponentQuery.startTime startTime: userComponentQuery.startTime ?
? userComponentQuery.startTime + " 00:00:00" userComponentQuery.startTime + " 00:00:00" : "",
: "", endTime: userComponentQuery.endTime ?
endTime: userComponentQuery.endTime userComponentQuery.endTime + " 23:59:59" : "",
? userComponentQuery.endTime + " 23:59:59"
: "",
}); });
} }
if (res) { if (res) {
@@ -395,69 +348,69 @@ async function getList() {
isEnd.value = pageNum.value >= res.totalPage * 1 ? true : false; isEnd.value = pageNum.value >= res.totalPage * 1 ? true : false;
console.log(isEnd.value); console.log(isEnd.value);
} }
} }
// 显示选择门店弹窗 // 显示选择门店弹窗
const showShopSelActionSheet = ref(false); const showShopSelActionSheet = ref(false);
function showShopSelActionSheetFun() { function showShopSelActionSheetFun() {
showShopSelActionSheet.value = true; showShopSelActionSheet.value = true;
} }
const active = ref(0); const active = ref(0);
watch( watch(
() => active.value, () => active.value,
(newval) => { (newval) => {
userComponentQuery.startTime = ""; userComponentQuery.startTime = "";
userComponentQuery.endTime = ""; userComponentQuery.endTime = "";
keyWord.value = ""; keyWord.value = "";
userId.value="";
console.log(newval); console.log(newval);
pageNum.value = 1; pageNum.value = 1;
getList(); getList();
} }
); );
watch( watch(
() => active.value, () => active.value,
(newval) => { (newval) => {
refresh(); refresh();
} }
); );
watch( watch(
() => selActions.value, () => selActions.value,
() => { () => {
refresh(); refresh();
} }
); );
onReachBottom(() => { onReachBottom(() => {
if (!isEnd.value) { if (!isEnd.value) {
pageNum.value++; pageNum.value++;
getList(); getList();
} }
}); });
watch( watch(
() => distributionStore.config.isEnable, () => distributionStore.config.isEnable,
() => { () => {
distributionStore.editConfig(); distributionStore.editConfig();
} }
); );
onShow(() => { onShow(() => {
pageNum.value = 1; pageNum.value = 1;
getList(); getList();
}); });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.min-page { .min-page {
background: #f7f7f7; background: #f7f7f7;
} }
.box { .box {}
}
.top { .top {
padding: 32rpx 24rpx; padding: 32rpx 24rpx;
} }
.list { .list {
padding: 0 30rpx; padding: 0 30rpx;
.item { .item {
@@ -466,9 +419,9 @@ onShow(() => {
background-color: #fff; background-color: #fff;
overflow: hidden; overflow: hidden;
} }
} }
.tag { .tag {
border-radius: 12rpx; border-radius: 12rpx;
padding: 8rpx 22rpx; padding: 8rpx 22rpx;
font-size: 28rpx; font-size: 28rpx;
@@ -482,26 +435,27 @@ onShow(() => {
background-color: #f7f7f7; background-color: #f7f7f7;
color: #999; color: #999;
} }
} }
.my-btn { .my-btn {
font-size: 28rpx; font-size: 28rpx;
line-height: 36rpx; line-height: 36rpx;
padding: 8rpx 32rpx; padding: 8rpx 32rpx;
border-radius: 12rpx; border-radius: 12rpx;
margin: 0; margin: 0;
} }
.edit-btn { .edit-btn {
background: #e6f0ff; background: #e6f0ff;
color: $my-main-color; color: $my-main-color;
} }
.delete-btn { .delete-btn {
background: #ffe7e6; background: #ffe7e6;
color: #ff1c1c; color: #ff1c1c;
} }
.filter-box {
.filter-box {
display: flex; display: flex;
padding: 8rpx 24rpx; padding: 8rpx 24rpx;
align-items: center; align-items: center;
@@ -510,5 +464,5 @@ onShow(() => {
background: #f7f7f7; background: #f7f7f7;
min-height: 62rpx; min-height: 62rpx;
box-sizing: border-box; box-sizing: border-box;
} }
</style> </style>

View File

@@ -14,10 +14,13 @@
</view> </view>
<my-tabs v-model="active" :list="tabs" textKey="label"></my-tabs> <my-tabs v-model="active" :list="tabs" textKey="label"></my-tabs>
<view v-if="active == 2" class="u-flex u-row-between u-m-t-32" style="gap: 58rpx"> <view v-if="active == 2" class="u-flex u-row-between u-m-t-32" style="gap: 58rpx">
<view class="u-flex-1 filter-box" style="border-radius: 100rpx"> <!-- <view class="u-flex-1 filter-box" style="border-radius: 100rpx">
<up-icon name="search" size="18"></up-icon> <up-icon name="search" size="18"></up-icon>
<input class="u-m-l-10 u-font-28" type="text" placeholder-class="color-999 u-font-28" placeholder="搜索关键词" v-model="keyWord" @blur="keyWordBlur" /> <input class="u-m-l-10 u-font-28" type="text" placeholder-class="color-999 u-font-28" placeholder="搜索关键词" v-model="keyWord" @blur="keyWordBlur" />
<up-icon v-if="keyWord" name="close" size="14" @click="clearKeyWord"></up-icon> <up-icon v-if="keyWord" name="close" size="14" @click="clearKeyWord"></up-icon>
</view> -->
<view class="u-flex-1">
<my-user-select v-model="userId" @change="search()" ></my-user-select>
</view> </view>
<view class="u-flex-1 u-font-28 filter-box u-flex u-row-between" @click="showTimeArea = true"> <view class="u-flex-1 u-font-28 filter-box u-flex u-row-between" @click="showTimeArea = true">
<template v-if="userComponentQuery.startTime && userComponentQuery.endTime"> <template v-if="userComponentQuery.startTime && userComponentQuery.endTime">
@@ -215,6 +218,7 @@ function refresh() {
} }
const listRes = ref({}); const listRes = ref({});
const userId=ref('')
async function getList() { async function getList() {
let res = null; let res = null;
if (active.value == 1) { if (active.value == 1) {
@@ -232,7 +236,8 @@ async function getList() {
res = await memberApi.orderList({ res = await memberApi.orderList({
page: pageNum.value, page: pageNum.value,
size: 10, size: 10,
key: userComponentQuery.user, // key: userComponentQuery.user,
key: userId.value,
startTime: userComponentQuery.startTime ? userComponentQuery.startTime + ' 00:00:00' : '', startTime: userComponentQuery.startTime ? userComponentQuery.startTime + ' 00:00:00' : '',
endTime: userComponentQuery.endTime ? userComponentQuery.endTime + ' 23:59:59' : '' endTime: userComponentQuery.endTime ? userComponentQuery.endTime + ' 23:59:59' : ''
}); });
@@ -264,6 +269,7 @@ watch(
userComponentQuery.startTime = ''; userComponentQuery.startTime = '';
userComponentQuery.endTime = ''; userComponentQuery.endTime = '';
keyWord.value = ''; keyWord.value = '';
userId.value=''
refresh(); refresh();
} }
); );

View File

@@ -37,7 +37,7 @@
</view> </view>
<view class="u-m-l-30 u-flex"> <view class="u-m-l-30 u-flex">
<text class="">积分</text> <text class="">积分</text>
<text class="color-main">{{item.accountPoints}}</text> <text class="color-main">{{item.pointBalance||0}}</text>
</view> </view>
</view> </view>
</view> </view>
@@ -113,7 +113,7 @@
headImg: '', headImg: '',
telephone: '', telephone: '',
amount: '0.00', amount: '0.00',
accountPoints: '0.00' pointBalance: '0.00'
}) })
} else { } else {
list[index].checked = true list[index].checked = true

View File

@@ -32,7 +32,7 @@
<view class="u-font-24 u-m-l-30 u-text-center"> <view class="u-font-24 u-m-l-30 u-text-center">
<text>积分</text> <text>积分</text>
<text class="color-main">{{ <text class="color-main">{{
pageData.user.accountPoints pageData.user.pointBalance||0
}}</text> }}</text>
</view> </view>
</view> </view>
@@ -88,7 +88,7 @@
<view class="u-flex"> <view class="u-flex">
<view>积分</view> <view>积分</view>
<view class="color-333 u-m-l-10">{{ <view class="color-333 u-m-l-10">{{
pageData.user.accountPoints pageData.user.pointBalance||0
}}</view> }}</view>
</view> </view>
<view class="u-flex"> <view class="u-flex">
@@ -935,14 +935,15 @@ function watchChooseuser() {
if (pageData.user.id == data.id) { if (pageData.user.id == data.id) {
return; return;
} }
if (data.id) {
const res = await shopUserDetail({
userId: data.userId,
});
pageData.user = res;
} else {
pageData.user = data; pageData.user = data;
} // if (data.id) {
// const res = await shopUserDetail({
// userId: data.userId,
// });
// pageData.user = res;
// } else {
// pageData.user = data;
// }
// 更新购物车和历史订单数据 // 更新购物车和历史订单数据
uodateCartAndHistory(); uodateCartAndHistory();
}); });

View File

@@ -2,20 +2,18 @@
<my-model ref="model" :title="title" iconColor="#000" @close="resetForm"> <my-model ref="model" :title="title" iconColor="#000" @close="resetForm">
<template #desc> <template #desc>
<view class="u-text-left u-p-30 color-666 u-font-28"> <view class="u-text-left u-p-30 color-666 u-font-28">
<view class="u-m-t-32 u-flex "> <view class="u-m-t-32 u-flex">
<view class="" v-if="accountPoints.calcRes.usable"> <view class="" v-if="pointDeductionRule.enableRewards">
<text class="color-red">*</text> <text class="color-red">*</text>
<text class="" <text class=""
v-if="accountPoints.calcRes.equivalentPoints">100积分等于{{to2(accountPoints.calcRes.equivalentPoints*100)}},</text> v-if="pointDeductionRule.equivalentPoints">{{ pointDeductionRule.equivalentPoints }}积分等于1,</text>
<text> <text>
最大抵扣积分{{accountPoints.calcRes.maxUsablePoints}} 最大抵扣积分{{ maxCanUsePoints }}
</text>
<text>,
最小抵扣积分0
</text> </text>
<text>, 最小抵扣积分0 </text>
</view> </view>
</view> </view>
<view class="u-m-t-40 u-flex "> <view class="u-m-t-40 u-flex">
<view>积分</view> <view>积分</view>
<view class="u-m-l-32 border u-p-l-10 u-p-r-10 u-flex-1"> <view class="u-m-l-32 border u-p-l-10 u-p-r-10 u-flex-1">
<uni-easyinput type="number" @input="pointsInput" @change="pointsChange" paddingNone <uni-easyinput type="number" @input="pointsInput" @change="pointsChange" paddingNone
@@ -38,93 +36,103 @@
</template> </template>
<script setup> <script setup>
import { reactive, nextTick, ref, watch } from 'vue'; import {
import myModel from '@/components/my-components/my-model.vue' reactive,
import myButton from '@/components/my-components/my-button.vue' nextTick,
import myTabs from '@/components/my-components/my-tabs.vue' ref,
import infoBox from '@/commons/utils/infoBox.js' watch
} from "vue";
import myModel from "@/components/my-components/my-model.vue";
import myButton from "@/components/my-components/my-button.vue";
import myTabs from "@/components/my-components/my-tabs.vue";
import infoBox from "@/commons/utils/infoBox.js";
const props = defineProps({ const props = defineProps({
title: { title: {
type: String, type: String,
default: '积分抵扣' default: "积分抵扣",
}, },
accountPoints:{ maxCanUsePoints: {
type:Object, type: Number,
default:()=>{ default: 0
},
pointDeductionRule: {
type: Object,
default: () => {
return { return {
calcRes:{ enableRewards: false,
usable: false, unusableReason: "",
unusableReason: '',
minDeductionPoints: 0, minDeductionPoints: 0,
maxUsablePoints: 0 maxUsablePoints: 0,
} };
} },
}
}, },
price: { price: {
type: [Number, String], type: [Number, String],
default: 0 default: 0,
} },
}) });
function to2(n) { function to2(n) {
if (!n) { if (!n) {
return '' return "";
} }
return n.toFixed(2) return n.toFixed(2);
} }
function pointsInput(e){ function pointsInput(e) {
setTimeout(()=>{ setTimeout(() => {
form.points=Math.floor(e) form.points = Math.floor(e);
},100) }, 100);
} }
function pointsChange(newval) { function pointsChange(newval) {
form.points=Math.floor(newval) form.points = Math.floor(newval);
if (newval < 0) { if (newval < 0) {
form.points = 0 form.points = 0;
return infoBox.showToast('积分抵扣不能小于0') return infoBox.showToast("积分抵扣不能小于0");
} }
if (newval > props.accountPoints.calcRes.maxUsablePoints) { if (newval > props.maxCanUsePoints) {
form.points = props.price form.points = props.price;
return infoBox.showToast('积分抵扣不能大于'+props.accountPoints.calcRes.maxUsablePoints) return infoBox.showToast(
"积分抵扣不能大于" + props.maxCanUsePoints
);
} }
} }
const form = reactive({ const form = reactive({
points: props.price, points: props.price,
}) });
watch(() => props.price, (newval) => { watch(
form.points = newval () => props.price,
}) (newval) => {
form.points = newval;
}
);
function resetForm() { function resetForm() {
form.points=0 form.points = 0;
} }
const model = ref(null) const model = ref(null);
function open() { function open() {
model.value.open() model.value.open();
form.points = props.price form.points = props.price;
} }
function close() { function close() {
model.value.close() model.value.close();
} }
const emits = defineEmits(['confirm']) const emits = defineEmits(["confirm"]);
function confirm() { function confirm() {
emits('confirm',Math.floor(form.points) ) emits("confirm", Math.floor(form.points));
close() close();
} }
defineExpose({ defineExpose({
open, open,
close close,
}) });
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -140,7 +148,7 @@
.tag { .tag {
background-color: #fff; background-color: #fff;
border: 1px solid #E5E5E5; border: 1px solid #e5e5e5;
line-height: inherit; line-height: inherit;
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
@@ -148,13 +156,13 @@
border-radius: 8rpx; border-radius: 8rpx;
&.active { &.active {
border-color: #E6F0FF; border-color: #e6f0ff;
color: $my-main-color; color: $my-main-color;
} }
} }
.hover-class { .hover-class {
background-color: #E5E5E5; background-color: #e5e5e5;
} }
.discount { .discount {
@@ -166,7 +174,7 @@
} }
.bg1 { .bg1 {
background: #F7F7FA; background: #f7f7fa;
} }
.tab { .tab {
@@ -174,7 +182,7 @@
} }
.border { .border {
border: 1px solid #E5E5E5; border: 1px solid #e5e5e5;
border-radius: 4rpx; border-radius: 4rpx;
} }

View File

@@ -7,10 +7,7 @@
orderCostSummary.finalPayAmount orderCostSummary.finalPayAmount
}}</text> }}</text>
</view> </view>
<view <view class="u-m-t-10 color-999 old-price" v-if="orderCostSummary.merchantReduction.actualAmount">
class="u-m-t-10 color-999 old-price"
v-if="orderCostSummary.merchantReduction.actualAmount"
>
<text class=""></text> <text class=""></text>
<text class=" ">{{ returnMerchantReductionBeforeMoney }}</text> <text class=" ">{{ returnMerchantReductionBeforeMoney }}</text>
</view> </view>
@@ -23,10 +20,7 @@
</view> </view>
<view class="content bg-fff border-r-12"> <view class="content bg-fff border-r-12">
<view class="u-p-l-26 u-p-r-26 card top u-m-t-30"> <view class="u-p-l-26 u-p-r-26 card top u-m-t-30">
<view <view class="border-bottom-dashed u-p-b-30 u-p-t-30" v-if="orderCostSummary.newUserDiscount">
class="border-bottom-dashed u-p-b-30 u-p-t-30"
v-if="orderCostSummary.newUserDiscount"
>
<view class="u-flex u-p-l-24 u-p-r-24 u-row-between"> <view class="u-flex u-p-l-24 u-p-r-24 u-row-between">
<view>新客立减</view> <view>新客立减</view>
<view class="color-red"> <view class="color-red">
@@ -34,10 +28,7 @@
</view> </view>
</view> </view>
</view> </view>
<view <view class="border-bottom-dashed u-p-b-30 u-p-t-30" v-if="orderCostSummary.vipDiscountAmount">
class="border-bottom-dashed u-p-b-30 u-p-t-30"
v-if="orderCostSummary.vipDiscountAmount"
>
<view class="u-flex u-p-l-24 u-p-r-24 u-row-between"> <view class="u-flex u-p-l-24 u-p-r-24 u-row-between">
<view>会员折扣</view> <view>会员折扣</view>
<view class="color-red"> <view class="color-red">
@@ -45,10 +36,8 @@
</view> </view>
</view> </view>
</view> </view>
<view <view class="border-bottom-dashed u-p-b-30 u-p-t-30"
class="border-bottom-dashed u-p-b-30 u-p-t-30" v-if="orderCostSummary.merchantReduction.actualAmount">
v-if="orderCostSummary.merchantReduction.actualAmount"
>
<view class="u-flex u-p-l-24 u-p-r-24 u-row-between"> <view class="u-flex u-p-l-24 u-p-r-24 u-row-between">
<view>商家减免</view> <view>商家减免</view>
<view class="color-red"> <view class="color-red">
@@ -56,13 +45,10 @@
</view> </view>
</view> </view>
</view> </view>
<view <view class="border-bottom-dashed u-p-b-30 u-p-t-30" v-if="
class="border-bottom-dashed u-p-b-30 u-p-t-30"
v-if="
orderCostSummary.fullReduction.actualAmount && orderCostSummary.fullReduction.actualAmount &&
orderCostSummary.fullReduction.usedThreshold orderCostSummary.fullReduction.usedThreshold
" ">
>
<view class="u-flex u-p-l-24 u-p-r-24 u-row-between"> <view class="u-flex u-p-l-24 u-p-r-24 u-row-between">
<view>满减活动</view> <view>满减活动</view>
<view class="color-red"> <view class="color-red">
@@ -75,52 +61,32 @@
<view class="u-flex u-p-l-24 u-p-r-24 u-row-between" @click="toQuan"> <view class="u-flex u-p-l-24 u-p-r-24 u-row-between" @click="toQuan">
<view>优惠券</view> <view>优惠券</view>
<view class="color-999 u-flex u-col-center"> <view class="color-999 u-flex u-col-center">
<text <text class="color-red"
class="color-red" v-if="orderCostSummary.fullReduction.usedThreshold">满减活动不可与优惠券同享</text>
v-if="orderCostSummary.fullReduction.usedThreshold" <text v-else-if="orderCostSummary.couponDeductionAmount <= 0">选择优惠券</text>
>满减活动不可与优惠券同享</text
>
<text v-else-if="orderCostSummary.couponDeductionAmount <= 0"
>选择优惠券</text
>
<text class="color-red" v-else> <text class="color-red" v-else>
-¥{{ orderCostSummary.couponDeductionAmount }} -¥{{ orderCostSummary.couponDeductionAmount }}
</text> </text>
<view <view class="u-flex u-col-center" v-if="!orderCostSummary.fullReduction.usedThreshold">
class="u-flex u-col-center"
v-if="!orderCostSummary.fullReduction.usedThreshold"
>
<uni-icons type="right" color="#999"></uni-icons> <uni-icons type="right" color="#999"></uni-icons>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view <view class="border-bottom u-p-b-30" v-if="discount.value || accountPoints.sel">
class="border-bottom u-p-b-30" <view class="u-flex u-p-l-24 u-p-r-24 u-row-between u-p-t-30" v-if="discount.value">
v-if="discount.value || accountPoints.sel"
>
<view
class="u-flex u-p-l-24 u-p-r-24 u-row-between u-p-t-30"
v-if="discount.value"
>
<view>服务员改价</view> <view>服务员改价</view>
<view class="u-flex u-col-center"> <view class="u-flex u-col-center">
<text style="color: rgb(255, 95, 46)" <text style="color: rgb(255, 95, 46)">-¥{{ to2(discount.value) }}</text>
>-¥{{ to2(discount.value) }}</text
>
</view> </view>
</view> </view>
<view <view class="u-flex u-p-l-24 u-p-r-24 u-row-between u-p-t-30"
class="u-flex u-p-l-24 u-p-r-24 u-row-between u-p-t-30" v-if="orderCostSummary.pointDeductionAmount && accountPoints.sel">
v-if="orderCostSummary.pointDeductionAmount && accountPoints.sel"
>
<view>积分抵扣</view> <view>积分抵扣</view>
<view class="u-flex u-col-center"> <view class="u-flex u-col-center">
<text style="color: rgb(255, 95, 46)" <text style="color: rgb(255, 95, 46)">-¥{{ orderCostSummary.pointDeductionAmount }}</text>
>-¥{{ orderCostSummary.pointDeductionAmount }}</text
>
</view> </view>
</view> </view>
</view> </view>
@@ -130,44 +96,28 @@
<my-tabs :list="pays.list" v-model="pays.selIndex"></my-tabs> <my-tabs :list="pays.list" v-model="pays.selIndex"></my-tabs>
<template v-if="pays.selIndex == 0"> <template v-if="pays.selIndex == 0">
<view class="list"> <view class="list">
<view <view class="item" @click="changePayType(index, item)" :class="{ disabled: item.disabled }"
class="item" v-for="(item, index) in pays.payTypes.list" :key="index">
@click="changePayType(index, item)" <view class="u-flex u-row-between u-p-t-30 u-p-b-30 border-bottom">
:class="{ disabled: item.disabled }"
v-for="(item, index) in pays.payTypes.list"
:key="index"
>
<view
class="u-flex u-row-between u-p-t-30 u-p-b-30 border-bottom"
>
<view class="u-flex"> <view class="u-flex">
<image class="icon" :src="item.icon" mode=""></image> <image class="icon" :src="item.icon" mode=""></image>
<text class="u-m-l-10 no-wrap">{{ item.payName }}</text> <text class="u-m-l-10 no-wrap">{{ item.payName }}</text>
</view> </view>
<view class="u-flex color-999 u-font-24"> <view class="u-flex color-999 u-font-24">
<view <view class="u-m-r-20" v-if="item.payType == 'arrears' && pageData.buyer.id"
class="u-m-r-20" @click.stop="chooseBuyer">
v-if="item.payType == 'arrears' && pageData.buyer.id"
@click.stop="chooseBuyer"
>
<view> <view>
<text>挂账人:</text> <text>挂账人:</text>
<text class="u-m-r-4">{{ pageData.buyer.debtor }}</text> <text class="u-m-r-4">{{ pageData.buyer.debtor }}</text>
</view> </view>
<view> <view>
<text>挂账额度:</text> <text>挂账额度:</text>
<text <text>¥{{ pageData.buyer.remainingAmount || "0" }}</text>
>¥{{ pageData.buyer.remainingAmount || "0" }}</text
>
</view> </view>
</view> </view>
<view <view class="u-m-r-20" v-if="
class="u-m-r-20"
v-if="
item.payType == 'member-account' && pageData.user.id item.payType == 'member-account' && pageData.user.id
" " @click.stop="chooseUser">
@click.stop="chooseUser"
>
<view> <view>
<text>会员:</text> <text>会员:</text>
<text class="u-m-r-4">{{ <text class="u-m-r-4">{{
@@ -184,10 +134,8 @@
</view> --> </view> -->
</view> </view>
<view :class="{ op3: item.disabled }"> <view :class="{ op3: item.disabled }">
<my-radio <my-radio @click="changePayType(index, item)"
@click="changePayType(index, item)" :modelValue="index == pays.payTypes.selIndex">
:modelValue="index == pays.payTypes.selIndex"
>
</my-radio> </my-radio>
</view> </view>
</view> </view>
@@ -195,58 +143,43 @@
</view> </view>
</view> </view>
<view class="border-bottom-dashed"></view> <view class="border-bottom-dashed"></view>
<view <view class="u-flex u-row-between u-p-t-24" v-if="pageData.user.id"
class="u-flex u-row-between u-p-t-24" @click="changeAccountPoints">
v-if="pageData.user.id"
@click="changeAccountPoints"
>
<view class="u-flex"> <view class="u-flex">
<view class="">积分抵扣</view> <view class="">积分抵扣</view>
<view class="color-999 u-m-l-10"> <view class="color-999 u-m-l-10">
<text>(</text> <text>(</text>
<text>{{ pageData.user.accountPoints || "0" }}</text> <text>{{ pageData.user.pointBalance || "0" }}</text>
<text>)</text> <text>)</text>
</view> </view>
<!-- <view><text class="color-red font-bold">{{accountPoints.price}}</text>元</view> --> <!-- <view><text class="color-red font-bold">{{accountPoints.price}}</text>元</view> -->
</view> </view>
<view class="u-flex"> <view class="u-flex">
<view class="u-flex"> <view class="u-flex">
<view <view><text>{{ userPoints }}</text></view>
><text>{{ accountPoints.num }}</text></view <view v-if="pointDeductionRule.enableRewards&&accountPoints.sel"
> @click.stop="refPointsOpen">
<view
v-if="accountPoints.calcRes.usable"
@click.stop="refPointsOpen"
>
<up-icon name="edit-pen" size="16" color="#999"></up-icon> <up-icon name="edit-pen" size="16" color="#999"></up-icon>
</view> </view>
</view> </view>
<view class="u-m-l-32 u-relative" v-if="pointDeductionRule.enableRewards">
<view
class="u-m-l-32 u-relative"
v-if="accountPoints.calcRes.usable"
>
<view class="u-absolute position-all"></view> <view class="u-absolute position-all"></view>
<my-radio :modelValue="accountPoints.sel"> </my-radio> <my-radio :modelValue="accountPoints.sel"> </my-radio>
</view> </view>
</view> </view>
</view> </view>
<view class="color-999 u-font-24 u-m-t-16"> <view class="color-999 u-font-24 u-m-t-16">
<view class="" v-if="accountPoints.calcRes.unusableReason"> <view class="" v-if="!pointDeductionRule.enableRewards">
<text class="color-red">*</text> <text class="color-red">*</text>
<text>{{ accountPoints.calcRes.unusableReason }}</text> <text>积分不可用</text>
</view> </view>
<view class="" v-if="accountPoints.calcRes.usable"> <view class="" v-if="pointDeductionRule.enableRewards">
<text class="color-red">*</text> <text class="color-red">*</text>
<text class="" v-if="accountPoints.calcRes.equivalentPoints" <text class=""
>{{ v-if="pointDeductionRule.enableRewards">「可用积分{{ pageData.user.id?pageData.user.pointBalance:0}},最大可抵扣{{
accountPoints.calcRes.equivalentPoints maxPointDiscount
}}积分等于1元,</text }}元」</text>
>
<text>
最大抵扣积分{{ accountPoints.calcRes.maxUsablePoints }}
</text>
<text>, 最小抵扣积分0 </text>
</view> </view>
</view> </view>
<view class="u-m-t-60 u-p-b-30"> <view class="u-m-t-60 u-p-b-30">
@@ -254,9 +187,7 @@
</view> </view>
</template> </template>
<template v-if="pays.selIndex == 1"> <template v-if="pays.selIndex == 1">
<view class="u-font-32 u-m-t-40 u-text-center" <view class="u-font-32 u-m-t-40 u-text-center">请让顾客使用微信/支付宝扫码</view>
>请让顾客使用微信/支付宝扫码</view
>
<view class="u-flex u-row-center u-m-t-40"> <view class="u-flex u-row-center u-m-t-40">
<up-qrcode cid="code" :size="140" :val="payCodeUrl"></up-qrcode> <up-qrcode cid="code" :size="140" :val="payCodeUrl"></up-qrcode>
</view> </view>
@@ -268,18 +199,14 @@
<view class="card border-bottom top u-m-t-32"> </view> <view class="card border-bottom top u-m-t-32"> </view>
<view class="bg-fff card bottom border-r-12 u-p-32"> <view class="bg-fff card bottom border-r-12 u-p-32">
<view class="font-bold u-font-32 u-text-center"> <view class="font-bold u-font-32 u-text-center">
¥{{ payPrice }}</view ¥{{ payPrice }}</view>
>
<view class="u-flex u-row-center u-m-t-24"> <view class="u-flex u-row-center u-m-t-24">
<template v-if="order.status == 'unpaid'"> <template v-if="order.status == 'unpaid'">
<up-loading-icon size="14" text="等待支付"></up-loading-icon> <up-loading-icon size="14" text="等待支付"></up-loading-icon>
</template> </template>
<template v-if="order.status == 'done'"> <template v-if="order.status == 'done'">
<view class="u-flex pay-success"> <view class="u-flex pay-success">
<up-icon <up-icon color="#5CBB6F" name="checkmark-circle-fill"></up-icon>
color="#5CBB6F"
name="checkmark-circle-fill"
></up-icon>
<view class="u-m-l-6">支付成功</view> <view class="u-m-l-6">支付成功</view>
</view> </view>
</template> </template>
@@ -289,39 +216,19 @@
</view> </view>
</view> </view>
<edit-discount <edit-discount @confirm="editDiscountConfirm" title="优惠金额" :ref="setModel" name="editMoney"
@confirm="editDiscountConfirm" :price="returnMerchantReductionBeforeMoney" :discount="discount.discount"></edit-discount>
title="优惠金额"
:ref="setModel"
name="editMoney"
:price="returnMerchantReductionBeforeMoney"
:discount="discount.discount"
></edit-discount>
<up-modal <up-modal :title="modal.title" :content="modal.content" :show="modal.show" :confirmText="modal.confirmText"
:title="modal.title" :cancelText="modal.cancelText" showCancelButton closeOnClickOverlay @confirm="confirmModelConfirm"
:content="modal.content" @cancel="confirmModelCancel" @close="confirmModelCancel" width="300px" />
:show="modal.show"
:confirmText="modal.confirmText"
:cancelText="modal.cancelText"
showCancelButton
closeOnClickOverlay
@confirm="confirmModelConfirm"
@cancel="confirmModelCancel"
@close="confirmModelCancel"
width="300px"
/>
<edit-accountPoints <edit-accountPoints @confirm="pointsConfirm" :price="userPoints" :pointDeductionRule="pointDeductionRule"
@confirm="pointsConfirm" :maxCanUsePoints="maxCanUsePoints" ref="refPoints"></edit-accountPoints>
:price="accountPoints.num"
:accountPoints="accountPoints"
ref="refPoints"
></edit-accountPoints>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import {
reactive, reactive,
onMounted, onMounted,
@@ -332,11 +239,17 @@
computed, computed,
inject, inject,
} from "vue"; } from "vue";
import { onLoad, onBackPress, onShow } from "@dcloudio/uni-app"; import {
onLoad,
onBackPress,
onShow
} from "@dcloudio/uni-app";
import BigNumber from "bignumber.js"; import BigNumber from "bignumber.js";
import go from "@/commons/utils/go.js"; import go from "@/commons/utils/go.js";
import infoBox from "@/commons/utils/infoBox.js"; import infoBox from "@/commons/utils/infoBox.js";
import { hasPermission } from "@/commons/utils/hasPermission.js"; import {
hasPermission
} from "@/commons/utils/hasPermission.js";
import editDiscount from "@/components/my-components/edit-discount.vue"; import editDiscount from "@/components/my-components/edit-discount.vue";
import editAccountPoints from "./components/edit-accountPoints.vue"; import editAccountPoints from "./components/edit-accountPoints.vue";
import { import {
@@ -345,14 +258,28 @@
returnProductCoupAllPrice, returnProductCoupAllPrice,
returnProductCanUseNum, returnProductCanUseNum,
} from "../quan_util.js"; } from "../quan_util.js";
import { mathFloorPrice } from "@/commons/utils/goodsUtil.js"; import {
import { getDiscountByUserId } from "@/http/yskApi/market/consumeDiscount.js"; mathFloorPrice
} from "@/commons/utils/goodsUtil.js";
import {
getDiscountByUserId
} from "@/http/yskApi/market/consumeDiscount.js";
import {
pointsConfig
} from "@/http/api/market/points.js";
// import { getCouponList } from '@/http/api/coupon.js' // import { getCouponList } from '@/http/api/coupon.js'
import { getHistoryOrder } from "@/http/api/order.js"; import {
import { getPayTypeList } from "@/http/api/payType.js"; getHistoryOrder
import { shopUserDetail } from "@/http/api/shopUser.js"; } from "@/http/api/order.js";
import { discountActivity } from "@/http/yskApi/market/discountActivity.js"; import {
getPayTypeList
} from "@/http/api/payType.js";
import {
shopUserDetail
} from "@/http/api/shopUser.js";
import {
discountActivity
} from "@/http/yskApi/market/discountActivity.js";
import { import {
scanPay, scanPay,
@@ -371,7 +298,7 @@
} from "@/http/api/points.js"; } from "@/http/api/points.js";
import yskUtils from "ysk-utils"; import yskUtils from "ysk-utils";
// import yskUtils from "@/lib/index"; // import yskUtils from "@/lib/index";
const websocketUtil = inject("websocketUtil"); // 注入 WebSocket 工具类实例 const websocketUtil = inject("websocketUtil"); // 注入 WebSocket 工具类实例
const modal = reactive({ const modal = reactive({
@@ -439,17 +366,37 @@
const options = reactive({}); const options = reactive({});
async function getDiscountActivity() { async function getDiscountActivity() {
let res = await discountActivity({ let res = await discountActivity({
shopId: uni.getStorageSync("shopInfo").id||'', shopId: uni.getStorageSync("shopInfo").id || '',
}); });
if (res) { if (res) {
fullReductionActivities.value = res ? [res] : []; fullReductionActivities.value = res ? [res] : [];
} }
} }
async function getPointsConfig() {
let res = await pointsConfig();
if (res) {
const {
equivalentPoints,
maxDeductionAmount,
enableRewards,
minPaymentAmount,
maxDeductionRatio
} = res
pointDeductionRule.pointsPerYuan = equivalentPoints || 0;
pointDeductionRule.maxDeductionAmount = maxDeductionAmount || 0;
pointDeductionRule.maxDeductionRatio = maxDeductionRatio || 0;
pointDeductionRule.enableRewards = enableRewards || 0;
pointDeductionRule.minPaymentAmount = minPaymentAmount || 0;
console.log('pointDeductionRule', pointDeductionRule);
}
}
onLoad(async (opt) => { onLoad(async (opt) => {
Object.assign(order, opt); Object.assign(order, opt);
Object.assign(options, opt); Object.assign(options, opt);
await getPayType(); await getPayType();
await getDiscountActivity(); await getDiscountActivity();
await getPointsConfig()
console.log("pays.payTypes.list"); console.log("pays.payTypes.list");
init(); init();
}); });
@@ -476,7 +423,9 @@
onMessage(); onMessage();
}); });
// 获取订单详情 // 获取订单详情
const orderRes = await getHistoryOrder({ orderId: order.orderId }); const orderRes = await getHistoryOrder({
orderId: order.orderId
});
if (orderRes.status == "cancelled") { if (orderRes.status == "cancelled") {
uni.showToast({ uni.showToast({
title: "订单已取消", title: "订单已取消",
@@ -564,8 +513,11 @@
}); });
//积分规则 //积分规则
const pointDeductionRule = reactive({ const pointDeductionRule = reactive({
enableRewards: 0, //是否开启
pointsPerYuan: 0, pointsPerYuan: 0,
maxDeductionAmount: Infinity, maxDeductionAmount: Infinity,
maxDeductionRatio: 0, //积分抵扣比例
minPaymentAmount: 0, //门槛
}); });
//餐费费 //餐费费
const seatFeeConfig = reactive({ const seatFeeConfig = reactive({
@@ -638,8 +590,7 @@
options.dinnerType, options.dinnerType,
selCoupon.value, selCoupon.value,
activityList.value, activityList.value,
orderExtraConfig.value, orderExtraConfig.value, {},
{},
new Date() new Date()
); );
console.log(" 订单费用汇总", costSummary); console.log(" 订单费用汇总", costSummary);
@@ -666,20 +617,13 @@
() => accountPoints.sel, () => accountPoints.sel,
(newval) => { (newval) => {
if (newval) { if (newval) {
userPoints.value = accountPoints.num; userPoints.value = maxCanUsePoints.value
} else { } else {
userPoints.value = 0; userPoints.value = 0;
} }
} }
); );
watch(
() => accountPoints.num,
(newval) => {
if (accountPoints.sel) {
userPoints.value = newval;
}
}
);
watch( watch(
() => pointsCanDicountMaxMoney.value, () => pointsCanDicountMaxMoney.value,
(newval) => { (newval) => {
@@ -720,8 +664,7 @@
v.disabled = false; v.disabled = false;
}); });
} }
}, }, {
{
immediate: true, immediate: true,
} }
); );
@@ -732,7 +675,9 @@
clearInterval(timer); clearInterval(timer);
if (newval) { if (newval) {
timer = setInterval(() => { timer = setInterval(() => {
getHistoryOrder({ orderId: order.orderId }).then((res) => { getHistoryOrder({
orderId: order.orderId
}).then((res) => {
order.status = res.status; order.status = res.status;
if (res.status == "done") { if (res.status == "done") {
paySuccess(); paySuccess();
@@ -748,7 +693,7 @@
function getPayParam() { function getPayParam() {
let params = { let params = {
shopId: uni.getStorageSync("shopInfo").id||'', shopId: uni.getStorageSync("shopInfo").id || '',
orderId: order.id, orderId: order.id,
originAmount: orderCostSummary.value.goodsRealAmount, //订单原金额(不包含打包费+餐位费) originAmount: orderCostSummary.value.goodsRealAmount, //订单原金额(不包含打包费+餐位费)
discountRatio: 1, discountRatio: 1,
@@ -762,28 +707,21 @@
pointsNum: orderCostSummary.value.pointUsed, //(扣除各类折扣 enable_deduction后使用) pointsNum: orderCostSummary.value.pointUsed, //(扣除各类折扣 enable_deduction后使用)
seatNum: options.dinnerType == "dine-in" ? seatFeeConfig.personCount : 0, //用餐人数 seatNum: options.dinnerType == "dine-in" ? seatFeeConfig.personCount : 0, //用餐人数
newCustomerDiscountAmount: orderCostSummary.value.newUserDiscount, //新客立减 newCustomerDiscountAmount: orderCostSummary.value.newUserDiscount, //新客立减
newCustomerDiscountId: newCustomerDiscountId: orderCostSummary.value.newUserDiscount > 0 ?
orderCostSummary.value.newUserDiscount > 0 newUserDiscountRes.value.id : "",
? newUserDiscountRes.value.id
: "",
discountActAmount: orderCostSummary.value.fullReduction.actualAmount, //满减抵扣金额 discountActAmount: orderCostSummary.value.fullReduction.actualAmount, //满减抵扣金额
discountActId: discountActId: orderCostSummary.value.fullReduction.usedActivity &&
orderCostSummary.value.fullReduction.usedActivity && orderCostSummary.value.fullReduction.usedThreshold ?
orderCostSummary.value.fullReduction.usedThreshold orderCostSummary.value.fullReduction.usedActivity.id : null,
? orderCostSummary.value.fullReduction.usedActivity.id
: null,
vipPrice: isVip.value ? 1 : 0, // 是否使用会员价 vipPrice: isVip.value ? 1 : 0, // 是否使用会员价
limitRate: limitRate: order.limitRate && order.limitRate.id ? {
order.limitRate && order.limitRate.id
? {
id: order.limitRate.id, id: order.limitRate.id,
discountRate: order.limitRate.discountRate, discountRate: order.limitRate.discountRate,
discountPriority: order.limitRate.discountPriority, discountPriority: order.limitRate.discountPriority,
foodType: order.limitRate.foodType, foodType: order.limitRate.foodType,
foods: order.limitRate.foods, foods: order.limitRate.foods,
} } : null,
: null,
vipDiscountAmount: orderCostSummary.value.vipDiscountAmount, //会员折扣减免金额 vipDiscountAmount: orderCostSummary.value.vipDiscountAmount, //会员折扣减免金额
}; };
if (pays.quan.length > 0) { if (pays.quan.length > 0) {
@@ -803,7 +741,7 @@
console.log("支付参数 ===", getPayParam()); console.log("支付参数 ===", getPayParam());
let par = getPayParam(); let par = getPayParam();
let params = { let params = {
shopId: uni.getStorageSync("shopInfo").id||'', shopId: uni.getStorageSync("shopInfo").id || '',
...par, ...par,
}; };
if (order.userId || pageData.user.userId) { if (order.userId || pageData.user.userId) {
@@ -854,20 +792,24 @@
* 积分选择 * 积分选择
*/ */
function refPointsOpen() { function refPointsOpen() {
if (!accountPoints.calcRes.usable && accountPoints.sel) { if (!pointDeductionRule.enableRewards && accountPoints.sel) {
return; return;
} }
refPoints.value.open(); refPoints.value.open();
} }
/** /**
* 积分确认 * 积分确认
* @param {Object} e * @param {Object} e
*/ */
function pointsConfirm(e) { function pointsConfirm(e) {
accountPoints.num = e; userPoints.value = e
} }
const maxPointDiscount = ref(0)
const maxCanUsePoints = ref(0)
/** /**
* 获取积分信息 * 获取积分信息
* @param {Object} orderAmount * @param {Object} orderAmount
@@ -876,23 +818,42 @@
if (!pageData.user.userId) { if (!pageData.user.userId) {
return; return;
} }
const res = await calcUsablePoints({
shopUserId: pageData.user.id,
orderAmount: pointsCanDicountMaxMoney.value, let userAccountPoints = pageData.user ? pageData.user.pointBalance * 1 : 0;
});
console.log("getCalcUsablePoints", res); //1积分等于多少钱
if(res){ const onePointsMoney = pointDeductionRule.pointsPerYuan ? ((1 || 0) / pointDeductionRule.pointsPerYuan) : 0
pointDeductionRule.pointsPerYuan = res.equivalentPoints;
pointDeductionRule.maxDeductionAmount = res.maxDeductionAmount;
accountPoints.calcRes = res; const calcMaxDiscount = Math.floor(pointsCanDicountMaxMoney.value * (pointDeductionRule.maxDeductionRatio /
accountPoints.num = res.maxUsablePoints; 100))
const userMaxDiscount = BigNumber(userAccountPoints).times(onePointsMoney).decimalPlaces(2, BigNumber
.ROUND_DOWN)
.toNumber()
maxPointDiscount.value = Math.min(calcMaxDiscount, userMaxDiscount)
console.log('积分最大可抵扣金额', maxPointDiscount.value)
pointDeductionRule.maxDeductionAmount = maxPointDiscount.value || 0
if (pointDeductionRule.enableRewards) {
let num = (maxPointDiscount.value || 0) * pointDeductionRule.pointsPerYuan
if (num > userAccountPoints) {
num = userAccountPoints
}
maxCanUsePoints.value = num
if (accountPoints.sel) {
userPoints.value = num
}
} }
return res; if (!pointDeductionRule.enableRewards) {
userPoints.value = 0
}
console.log('maxCanUsePoints.value', maxCanUsePoints.value)
} }
function changeAccountPoints() { function changeAccountPoints() {
if (!accountPoints.calcRes.usable) { if (!pointDeductionRule.enableRewards) {
return; return;
} }
accountPoints.sel = !accountPoints.sel; accountPoints.sel = !accountPoints.sel;
@@ -918,7 +879,8 @@
go.to("PAGES_ORDER_QUAN", { go.to("PAGES_ORDER_QUAN", {
orderId: order.id, orderId: order.id,
shopUserId: pageData.user.id, shopUserId: pageData.user.id,
orderPrice: BigNumber(payPrice.value).plus(BigNumber(orderCostSummary.value.couponDeductionAmount)).decimalPlaces(2, BigNumber.ROUND_DOWN) orderPrice: BigNumber(payPrice.value).plus(BigNumber(orderCostSummary.value.couponDeductionAmount))
.decimalPlaces(2, BigNumber.ROUND_DOWN)
}); });
} }
@@ -948,7 +910,7 @@
*/ */
function watchChooseQuan() { function watchChooseQuan() {
uni.$off("selCoupon"); uni.$off("selCoupon");
uni.$on("selCoupon", function (data) { uni.$on("selCoupon", function(data) {
setQuan(data); setQuan(data);
}); });
} }
@@ -1010,9 +972,9 @@
pageData.shopInfo, pageData.shopInfo,
pageData.user, pageData.user,
"productId" "productId"
) ) ?
? 1 1 :
: 0; 0;
if (canUseLimitTimeDiscount != cart.isTimeDiscount) { if (canUseLimitTimeDiscount != cart.isTimeDiscount) {
newData.history.push({ newData.history.push({
id: cart.id, id: cart.id,
@@ -1131,6 +1093,7 @@
paying: "支付中", paying: "支付中",
success: "已支付成功", success: "已支付成功",
}; };
function payOrderClick() { function payOrderClick() {
const payType = pays.payTypes.list[pays.payTypes.selIndex].payType; const payType = pays.payTypes.list[pays.payTypes.selIndex].payType;
if (payType == "scanCode" || payType == "deposit") { if (payType == "scanCode" || payType == "deposit") {
@@ -1171,7 +1134,7 @@
let pars = getPayParam(); let pars = getPayParam();
payStatus = "paying"; payStatus = "paying";
let params = { let params = {
shopId: uni.getStorageSync("shopInfo").id||'', shopId: uni.getStorageSync("shopInfo").id || '',
checkOrderPay: { checkOrderPay: {
...pars, ...pars,
}, },
@@ -1213,7 +1176,9 @@
title: "支付中...", title: "支付中...",
}); });
timer = setInterval(async () => { timer = setInterval(async () => {
res = await queryOrderStatus({ orderId: pars.orderId }); res = await queryOrderStatus({
orderId: pars.orderId
});
if (res == "done") { if (res == "done") {
clearInterval(timer); clearInterval(timer);
uni.hideLoading(); uni.hideLoading();
@@ -1251,7 +1216,7 @@
JSON.stringify({ JSON.stringify({
type: "onboc", type: "onboc",
account: uni.getStorageSync("iToken").loginId, account: uni.getStorageSync("iToken").loginId,
shop_id: uni.getStorageSync("shopInfo").id||'', shop_id: uni.getStorageSync("shopInfo").id || '',
operate_type: "cleanup", operate_type: "cleanup",
table_code: order.tableCode, table_code: order.tableCode,
}) })
@@ -1289,6 +1254,7 @@
return; return;
} }
} }
function objToArrary(obj) { function objToArrary(obj) {
if (Object.values(obj) && Array.isArray(Object.values(obj)[0])) { if (Object.values(obj) && Array.isArray(Object.values(obj)[0])) {
// 是数组 // 是数组
@@ -1317,7 +1283,7 @@
const item = pays.payTypes.list[pays.payTypes.selIndex]; const item = pays.payTypes.list[pays.payTypes.selIndex];
uni.scanCode({ uni.scanCode({
onlyFromCamera: true, onlyFromCamera: true,
success: function (res) { success: function(res) {
console.log("条码类型:" + res.scanType); console.log("条码类型:" + res.scanType);
console.log("条码内容:" + res.result); console.log("条码内容:" + res.result);
@@ -1342,7 +1308,9 @@
*/ */
async function getHistoryAndUpdateGoodsList() { async function getHistoryAndUpdateGoodsList() {
// 获取订单详情 // 获取订单详情
const orderRes = await getHistoryOrder({ orderId: order.orderId }); const orderRes = await getHistoryOrder({
orderId: order.orderId
});
if (orderRes.status == "cancelled") { if (orderRes.status == "cancelled") {
uni.showToast({ uni.showToast({
title: "订单已取消", title: "订单已取消",
@@ -1397,9 +1365,9 @@
} }
}); });
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
$quan-color: #318afe; $quan-color: #318afe;
.op3 { .op3 {
@@ -1408,11 +1376,9 @@
.hui { .hui {
// background-color: $quan-color; // background-color: $quan-color;
background-image: linear-gradient( background-image: linear-gradient(to right bottom,
to right bottom,
rgb(254, 103, 4), rgb(254, 103, 4),
rgb(241, 50, 42) rgb(241, 50, 42));
);
padding: 4rpx 10rpx; padding: 4rpx 10rpx;
border-radius: 10rpx; border-radius: 10rpx;
font-size: 24rpx; font-size: 24rpx;
@@ -1507,4 +1473,4 @@
} }
} }
} }
</style> </style>