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

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

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