fix: 代客下单修复先打折后选会员导致结算价格为负数问题。订单退款增加安全密码校验,代客下单修复选择用户手机号未展示问题
This commit is contained in:
@@ -233,7 +233,11 @@
|
|||||||
<!-- 退款 -->
|
<!-- 退款 -->
|
||||||
<div
|
<div
|
||||||
class="u-p-20 u-flex u-row-right"
|
class="u-p-20 u-flex u-row-right"
|
||||||
v-if="detail.status !== 'refund' && detail.status !== 'unpaid'"
|
v-if="
|
||||||
|
detail.status !== 'refund' &&
|
||||||
|
detail.status !== 'unpaid' &&
|
||||||
|
detail.status !== 'cancelled'
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="allSelected"
|
v-model="allSelected"
|
||||||
|
|||||||
270
src/views/order/index/components/password.vue
Normal file
270
src/views/order/index/components/password.vue
Normal file
@@ -0,0 +1,270 @@
|
|||||||
|
<template>
|
||||||
|
<div class="select_desk">
|
||||||
|
<el-dialog width="410px" title="安全密码" v-model="show" @close="reset">
|
||||||
|
<div class="select_desk_dialog u-p-b-20">
|
||||||
|
<key-board isCanEmpty v-model="number" @clear="clear" :maxLength="6">
|
||||||
|
<template #input>
|
||||||
|
<span class="u-font-32" style="transform: translateY(3px)">
|
||||||
|
{{ returnPwd }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</key-board>
|
||||||
|
|
||||||
|
<div class="confirm_btns u-flex u-m-t-20">
|
||||||
|
<el-button style="width: 100%" type="primary" @click="confirm">确定</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import keyBoard from "@/views/tool/Instead/components/keyboard.vue";
|
||||||
|
|
||||||
|
const state = reactive({
|
||||||
|
number: "",
|
||||||
|
show: false,
|
||||||
|
data: {},
|
||||||
|
});
|
||||||
|
const { number, show } = toRefs(state);
|
||||||
|
const min = ref(1);
|
||||||
|
|
||||||
|
const returnPwd = computed(() => {
|
||||||
|
return number.value.replace(/./g, "*");
|
||||||
|
});
|
||||||
|
function reset() {}
|
||||||
|
function clear(e) {
|
||||||
|
number.value = "";
|
||||||
|
}
|
||||||
|
const emits = defineEmits(["confirm"]);
|
||||||
|
function confirm() {
|
||||||
|
if (`${number.value}`.length <= 0) {
|
||||||
|
return ElMessage.error("请输入密码!");
|
||||||
|
}
|
||||||
|
emits("confirm", number.value);
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
function open() {
|
||||||
|
show.value = true;
|
||||||
|
}
|
||||||
|
function close() {
|
||||||
|
show.value = false;
|
||||||
|
number.value = "";
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
close,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.keybord-box .box_status) {
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
}
|
||||||
|
:deep(.el-button) {
|
||||||
|
padding: 12px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.carts .box_status) {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__inner::-webkit-inner-spin-button) {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input__inner::-webkit-outer-spin-button) {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-button--success) {
|
||||||
|
border-color: #22bf64;
|
||||||
|
background-color: #22bf64;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .btn {
|
||||||
|
height: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
&.using {
|
||||||
|
color: rgb(234, 64, 37);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.wait {
|
||||||
|
color: rgb(252, 236, 79);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.idle {
|
||||||
|
color: rgb(137, 234, 71);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.closed {
|
||||||
|
color: rgb(221, 221, 221);
|
||||||
|
filter: grayscale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.inputs .el-input__inner) {
|
||||||
|
border-color: transparent !important;
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
letter-spacing: 1.25px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .nav {
|
||||||
|
width: 286px;
|
||||||
|
height: 38px;
|
||||||
|
background: #dcf0e8;
|
||||||
|
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .nav .li,
|
||||||
|
.select_desk .select_desk_dialog .nav {
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .nav .li {
|
||||||
|
width: 140px;
|
||||||
|
height: 34px;
|
||||||
|
color: #0fc161;
|
||||||
|
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 14px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .nav .lion {
|
||||||
|
background: #0fc161;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .inputs {
|
||||||
|
width: 370px;
|
||||||
|
line-height: 54px;
|
||||||
|
margin-top: 24px;
|
||||||
|
height: 54px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: rgba(0, 0, 0, 0.8);
|
||||||
|
letter-spacing: 1.25px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 20px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: left;
|
||||||
|
color: rgb(255, 81, 82);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .inputs .close {
|
||||||
|
color: #aaa;
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
height: 30px;
|
||||||
|
width: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
top: 50%;
|
||||||
|
margin-top: -15px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guazhangren {
|
||||||
|
padding: 12px 10px;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-top: 20px;
|
||||||
|
min-height: 58px;
|
||||||
|
color: #999;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.name {
|
||||||
|
color: #3f9eff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .keyboard {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
flex-wrap: wrap;
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
border-right: 1px solid #dcdfe6;
|
||||||
|
border-bottom: 1px solid #dcdfe6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .keyboard .li {
|
||||||
|
height: 60px;
|
||||||
|
width: 33.333%;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
align-items: center;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #212121;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
user-select: none;
|
||||||
|
border-left: 1px solid #dcdfe6;
|
||||||
|
border-top: 1px solid #dcdfe6;
|
||||||
|
|
||||||
|
transition: all 0.1s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .keyboard .li:hover {
|
||||||
|
background: #dcdfe6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .keyboard .li .icon {
|
||||||
|
font-size: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .keyboard .confirm {
|
||||||
|
height: 140px;
|
||||||
|
background: #ff9f2e;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
border-right: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.select_desk .select_desk_dialog .keyboard .confirm:hover {
|
||||||
|
background: #f88502;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm_btns {
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.confirm_btns .el-button {
|
||||||
|
width: 175px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
<el-dialog title="修改退款金额" width="410px" v-model="show" @close="reset" :modal="modal">
|
<el-dialog title="修改退款金额" width="410px" v-model="show" @close="reset" :modal="modal">
|
||||||
<div class="u-flex u-col-top" v-if="goodsList && goodsList.length">
|
<div class="u-flex u-col-top" v-if="goodsList && goodsList.length">
|
||||||
<span class="u-m-0">退款商品</span>
|
<span class="u-m-0">退款商品</span>
|
||||||
@@ -92,11 +93,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<safe-password ref="refPassword" @confirm="pwdConfirm"></safe-password>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
import safePassword from "./password.vue";
|
||||||
|
import { useUserStore } from "@/store/modules/user";
|
||||||
|
const shopUser = useUserStore();
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
safePassword,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
modal: {
|
modal: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -178,16 +186,16 @@ export default {
|
|||||||
this.show = false;
|
this.show = false;
|
||||||
this.number = 1;
|
this.number = 1;
|
||||||
},
|
},
|
||||||
confirm() {
|
pwdConfirm(pwd) {
|
||||||
|
this.emitTuikuan({ pwd });
|
||||||
|
},
|
||||||
|
emitTuikuan(e) {
|
||||||
const selTag = this.tags
|
const selTag = this.tags
|
||||||
.filter((item) => item.checked)
|
.filter((item) => item.checked)
|
||||||
.map((item) => item.label)
|
.map((item) => item.label)
|
||||||
.join(",");
|
.join(",");
|
||||||
const note = selTag + (this.note.length > 0 ? "," + this.note : "");
|
const note = selTag + (this.note.length > 0 ? "," + this.note : "");
|
||||||
console.log(note);
|
console.log(note);
|
||||||
if (!note) {
|
|
||||||
return ElMessage.error("请输入退款原因");
|
|
||||||
}
|
|
||||||
this.$emit("confirm", {
|
this.$emit("confirm", {
|
||||||
refundAmount: this.number,
|
refundAmount: this.number,
|
||||||
cash: this.cash,
|
cash: this.cash,
|
||||||
@@ -195,9 +203,25 @@ export default {
|
|||||||
refundDetails: this.goodsList.map((v) => {
|
refundDetails: this.goodsList.map((v) => {
|
||||||
return { id: v.id, num: v.num };
|
return { id: v.id, num: v.num };
|
||||||
}),
|
}),
|
||||||
|
...e,
|
||||||
});
|
});
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
|
confirm() {
|
||||||
|
const selTag = this.tags
|
||||||
|
.filter((item) => item.checked)
|
||||||
|
.map((item) => item.label)
|
||||||
|
.join(",");
|
||||||
|
const note = selTag + (this.note.length > 0 ? "," + this.note : "");
|
||||||
|
if (!note) {
|
||||||
|
return ElMessage.error("请输入退款原因");
|
||||||
|
}
|
||||||
|
if (shopUser.userInfo.isReturnPwd) {
|
||||||
|
this.$refs.refPassword.open();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.emitTuikuan();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
<el-table-column label="用户" prop="headImg" width="200px">
|
<el-table-column label="用户" prop="headImg" width="200px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<div class="user_info">
|
<div class="user_info">
|
||||||
<el-image :src="scope.row.headImg" style="width: 40px; height: 40px; flex-shrink: 0">
|
<el-image
|
||||||
|
:src="scope.row.headImg"
|
||||||
|
style="width: 40px; height: 40px; flex-shrink: 0"
|
||||||
|
>
|
||||||
<template #error>
|
<template #error>
|
||||||
<div class="image-slot">
|
<div class="image-slot">
|
||||||
<i class="el-icon-user"></i>
|
<i class="el-icon-user"></i>
|
||||||
@@ -33,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="手机号" prop="telephone" width="160"></el-table-column>
|
<el-table-column label="手机号" prop="phone" width="160"></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="会员" prop="isVip">
|
<el-table-column label="会员" prop="isVip">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
@@ -52,9 +55,14 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
<el-pagination
|
||||||
@size-change="sizeChange" @current-change="paginationChange"
|
:total="tableData.total"
|
||||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
:current-page="tableData.page"
|
||||||
|
:page-size="tableData.size"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@current-change="paginationChange"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -119,7 +127,7 @@ function toPage(type) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function sizeChange() {
|
function sizeChange() {
|
||||||
tableData.value.page = 0;
|
tableData.value.page = 1;
|
||||||
getTableData();
|
getTableData();
|
||||||
}
|
}
|
||||||
// 切换状态
|
// 切换状态
|
||||||
@@ -142,7 +150,7 @@ function resetHandle() {
|
|||||||
}
|
}
|
||||||
// 分页回调
|
// 分页回调
|
||||||
function paginationChange(e) {
|
function paginationChange(e) {
|
||||||
tableData.value.page = e - 1;
|
tableData.value.page = e;
|
||||||
getTableData();
|
getTableData();
|
||||||
}
|
}
|
||||||
async function getTableData() {
|
async function getTableData() {
|
||||||
@@ -151,7 +159,7 @@ async function getTableData() {
|
|||||||
const res = await shopUserApi.getList({
|
const res = await shopUserApi.getList({
|
||||||
...query.value,
|
...query.value,
|
||||||
size: tableData.value.size,
|
size: tableData.value.size,
|
||||||
page: tableData.value.page + 1,
|
page: tableData.value.page,
|
||||||
});
|
});
|
||||||
tableData.value.loading = false;
|
tableData.value.loading = false;
|
||||||
tableData.value.data = res.records;
|
tableData.value.data = res.records;
|
||||||
|
|||||||
@@ -92,6 +92,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
maxLength: {
|
||||||
|
type: Number,
|
||||||
|
default: 14,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const number = defineModel({
|
const number = defineModel({
|
||||||
@@ -109,6 +113,9 @@ function clearFunction() {
|
|||||||
const regex = /^\d+(\.\d{1,2})?$/;
|
const regex = /^\d+(\.\d{1,2})?$/;
|
||||||
|
|
||||||
function keyboradAdd(n) {
|
function keyboradAdd(n) {
|
||||||
|
if (`${number.value}`.length >= props.maxLength) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (n == "." && `${number.value}`.includes(".")) {
|
if (n == "." && `${number.value}`.includes(".")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -315,7 +322,7 @@ function keyboradConfirm() {
|
|||||||
height: 58px;
|
height: 58px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|||||||
@@ -347,6 +347,10 @@ watch(
|
|||||||
() => props.user.id,
|
() => props.user.id,
|
||||||
(newval) => {
|
(newval) => {
|
||||||
quansSelArr.value = [];
|
quansSelArr.value = [];
|
||||||
|
checkOrderPay.discountAmount = 0;
|
||||||
|
checkOrderPay.discount = 0;
|
||||||
|
score.sel = -1;
|
||||||
|
usePointsNumber.value = 0;
|
||||||
if (newval !== "") {
|
if (newval !== "") {
|
||||||
pointsInit();
|
pointsInit();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user