Merge branch 'gyq' of https://newgitea.sxczgkj.cn/czg_team/cashier-web into ymf
This commit is contained in:
commit
16b106e475
|
|
@ -44,11 +44,11 @@ const Api = {
|
|||
});
|
||||
},
|
||||
// 获取店铺订单支付URL
|
||||
orderPayUrl(params: any) {
|
||||
orderPayUrl(data: any) {
|
||||
return request<any>({
|
||||
url: `${baseURL}/shopPayApi/orderPayUrl`,
|
||||
method: "get",
|
||||
params
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
},
|
||||
//挂账支付
|
||||
|
|
|
|||
|
|
@ -80,7 +80,8 @@ export const useCartsStore = defineStore("carts", () => {
|
|||
: undefined,
|
||||
skuData,
|
||||
is_time_discount: item.isTimeDiscount,
|
||||
isTimeDiscount: item.isTimeDiscount
|
||||
isTimeDiscount: item.isTimeDiscount,
|
||||
salePrice: item.limitDiscountPrice
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -311,7 +312,7 @@ export const useCartsStore = defineStore("carts", () => {
|
|||
userPoints: userPoints.value,
|
||||
isMember: useVipPrice.value,
|
||||
memberDiscountRate: shopUser.userInfo.memberDiscountRate || 1,
|
||||
fullReductionActivities: fullReductionActivities.value,
|
||||
fullReductionActivities: [fullReductionActivities.value],
|
||||
currentDinnerType: dinnerType.value,
|
||||
limitTimeDiscount: limitDiscountRes.value,
|
||||
shopUserInfo: vipUser.value,
|
||||
|
|
@ -915,7 +916,8 @@ export const useCartsStore = defineStore("carts", () => {
|
|||
coupons,
|
||||
setCoupons,
|
||||
payParamsInit,
|
||||
limitDiscountRes
|
||||
limitDiscountRes,
|
||||
getAllGoodsList
|
||||
};
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ const accountList = reactive([
|
|||
{ username: "19107220837", type: 'danger', label: '快乐时光店铺' },
|
||||
{ username: "18199991111", type: 'success', label: '草莓加盟主店可直接管理' },
|
||||
{ username: "18821670757", type: 'primary', label: '强盛集团' },
|
||||
{ username: "19107220837", type: 'warning', label: '万维时光' },
|
||||
]);
|
||||
|
||||
// 快捷模拟登录
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@
|
|||
<el-form-item label="会员折扣" required>
|
||||
<el-input-number v-model="level.discount" :style="inputStyle" :step="1" step-strictly :min="1"
|
||||
:max="100" type="number" placeholder="请输入会员折扣" />
|
||||
<span style="margin-left: 4px;color: #666;">%</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="等级标识">
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import DeptAPI from "@/api/product/specificationsconfig";
|
|||
import UserAPI from "@/api/onlineShop/goodsGroupconfig";
|
||||
|
||||
import type { ISearchConfig } from "@/components/CURD/types";
|
||||
import { getCategoryList } from '@/api/coupon'
|
||||
|
||||
const searchConfig: ISearchConfig = {
|
||||
pageName: "sys:user",
|
||||
|
|
@ -31,10 +32,9 @@ const searchConfig: ISearchConfig = {
|
|||
},
|
||||
options: [],
|
||||
async initFn(formItem) {
|
||||
formItem.options = await UserAPI.getList();
|
||||
formItem.options = await getCategoryList();
|
||||
},
|
||||
},
|
||||
|
||||
],
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@
|
|||
<el-form-item label="库存开关">
|
||||
<div style="display: block;">
|
||||
<el-switch v-model="ruleForm.isStock" :active-value="1" :inactive-value="0" :disabled="isSyncStatus()" />
|
||||
<div style="color: #999;">注:关闭则不计算出入库数据</div>
|
||||
<div style="color: #999;">注:关闭则不计算出库数据</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="设为推荐" prop="delivery">
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<single-image-upload style="width: 80px; height: 80px" v-model="form.shopQrcode"></single-image-upload>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺小程序码">
|
||||
<!-- <el-form-item label="店铺小程序码">
|
||||
<div class="img_box">
|
||||
<el-image :src="form.smallQrcode || img_download_error" fit="contain"
|
||||
style="width: 80px; height: 80px"></el-image>
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
下载
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="经营模式「单选」">
|
||||
<el-radio-group v-model="form.registerType">
|
||||
<el-radio value="before">快餐版(先支付后下单)</el-radio>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
</div>
|
||||
<div class="flex u-col-top">
|
||||
<div class="img">
|
||||
<div class="xszk" v-if="item.isLimitDiscount || item.is_time_discount">限时折扣</div>
|
||||
<div class="isSeatFee img u-line-1 u-flex u-col-center u-row-center" v-if="isSeatFee">
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
|
|
@ -461,6 +462,17 @@ onMounted(() => {
|
|||
position: relative;
|
||||
margin-right: 10px;
|
||||
|
||||
.xszk {
|
||||
padding: 2px 4px 2px 6px;
|
||||
background-color: var(--el-color-danger);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
color: #fff;
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 59px;
|
||||
height: 59px;
|
||||
|
|
|
|||
|
|
@ -4,38 +4,22 @@
|
|||
<template v-if="carts.list && carts.list.length >= 1">
|
||||
<!-- 当前购物车 -->
|
||||
<div v-for="(item, index) in carts.list" :key="index">
|
||||
<carts-item
|
||||
:item="item"
|
||||
:useVipPrice="carts.useVipPrice"
|
||||
@changeNumber="changeNumber"
|
||||
:selCart="carts.selCart"
|
||||
@itemClick="itemClick(item)"
|
||||
@editNote="editNote"
|
||||
></carts-item>
|
||||
<carts-item :item="item" :useVipPrice="carts.useVipPrice" @changeNumber="changeNumber"
|
||||
:selCart="carts.selCart" @itemClick="itemClick(item)" @editNote="editNote"></carts-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 赠菜 -->
|
||||
<div class="cart-title" v-if="carts.giftList.length > 0"><span>以下是优惠菜品</span></div>
|
||||
<div v-for="(item, index) in carts.giftList" :key="index">
|
||||
<carts-item
|
||||
:item="item"
|
||||
@changeNumber="changeNumber"
|
||||
:useVipPrice="carts.useVipPrice"
|
||||
:selCart="carts.selCart"
|
||||
@itemClick="itemClick(item)"
|
||||
@editNote="editNote"
|
||||
></carts-item>
|
||||
<carts-item :item="item" @changeNumber="changeNumber" :useVipPrice="carts.useVipPrice" :selCart="carts.selCart"
|
||||
@itemClick="itemClick(item)" @editNote="editNote"></carts-item>
|
||||
</div>
|
||||
<el-empty :image-size="60" v-if="carts.isEmpty" description="点餐列表为空" />
|
||||
<!-- 打包费 -->
|
||||
<template v-if="carts.packNum > 0">
|
||||
<div class="cart-title"><span>打包费</span></div>
|
||||
<extra-fee
|
||||
name="打包费"
|
||||
:number="carts.packNum"
|
||||
:price="carts.orderCostSummary.packFee"
|
||||
></extra-fee>
|
||||
<extra-fee name="打包费" :number="carts.packNum" :price="carts.orderCostSummary.packFee"></extra-fee>
|
||||
</template>
|
||||
<!-- 餐位费 -->
|
||||
<template v-if="perpole >= 1 && carts.dinnerType == 'dine-in'">
|
||||
|
|
@ -56,17 +40,9 @@
|
|||
</div>
|
||||
|
||||
<div v-for="(detaiItem, index) in item" :key="index">
|
||||
<carts-item
|
||||
:useVipPrice="carts.useVipPrice"
|
||||
:canChangeNumber="false"
|
||||
isOld
|
||||
:dinerType="dinerType"
|
||||
:item="detaiItem"
|
||||
@changeNumber="changeNumber"
|
||||
:selCart="carts.selCart"
|
||||
@itemClick="itemClick(detaiItem)"
|
||||
@editNote="editNote"
|
||||
></carts-item>
|
||||
<carts-item :useVipPrice="carts.useVipPrice" :canChangeNumber="false" isOld :dinerType="dinerType"
|
||||
:item="detaiItem" @changeNumber="changeNumber" :selCart="carts.selCart" @itemClick="itemClick(detaiItem)"
|
||||
@editNote="editNote"></carts-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -74,14 +50,9 @@
|
|||
</div>
|
||||
<div class="bottom">
|
||||
<div class="u-flex u-row-right">
|
||||
<el-tooltip
|
||||
placement="top"
|
||||
effect="light"
|
||||
popper-class="youhui-tips"
|
||||
:popper-options="{
|
||||
'background-color': '#fff',
|
||||
}"
|
||||
>
|
||||
<el-tooltip placement="top" effect="light" popper-class="youhui-tips" :popper-options="{
|
||||
'background-color': '#fff',
|
||||
}">
|
||||
<template #content>
|
||||
<div class="u-flex color-000 u-font-14 u-row-between">
|
||||
<span class="font-bold">会员优惠</span>
|
||||
|
|
@ -110,58 +81,39 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="btn-group" v-if="isXianFuKuan">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="!carts.isLinkFinshed"
|
||||
@click="createOrder('wx-aiplay')"
|
||||
>
|
||||
<el-button type="primary" size="large" :disabled="!carts.isLinkFinshed" @click="createOrder('wx-aiplay')">
|
||||
微信/支付宝
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="!carts.isLinkFinshed"
|
||||
@click="createOrder('cash')"
|
||||
>
|
||||
<el-button type="primary" size="large" :disabled="!carts.isLinkFinshed" @click="createOrder('cash')">
|
||||
现金
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="disabledMorePay"
|
||||
@click="createOrder('more-pay')"
|
||||
>
|
||||
<el-button type="primary" size="large" :disabled="disabledMorePay" @click="createOrder('more-pay')">
|
||||
更多支付
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="btn-group" v-else>
|
||||
<template v-if="!showOrder">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="!carts.isLinkFinshed || carts.isEmpty"
|
||||
@click="createOrder('only-create')"
|
||||
>
|
||||
<!-- <el-button type="primary" size="large" :disabled="!carts.isLinkFinshed || carts.isEmpty"
|
||||
@click="createOrder('only-create')">
|
||||
仅下单
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="disabledMorePay"
|
||||
@click="createOrder('to-pay')"
|
||||
>
|
||||
<el-button type="primary" size="large" :disabled="disabledMorePay" @click="createOrder('to-pay')">
|
||||
去结账
|
||||
</el-button> -->
|
||||
<el-button type="primary" size="large"
|
||||
:disabled="carts.list.length == 0 || carts.oldOrder.detailMap.length == 0"
|
||||
@click="createOrder('only-create')">
|
||||
仅下单
|
||||
</el-button>
|
||||
<el-button type="primary" size="large"
|
||||
:disabled="carts.list.length == 0 && isEmptyObject(carts.oldOrder.detailMap)"
|
||||
@click="createOrder('to-pay')">
|
||||
去结账
|
||||
</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button type="default" size="large" @click="hideOrder()">加菜/返回</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="!carts.isLinkFinshed"
|
||||
@click="createOrder('to-pay')"
|
||||
>
|
||||
<el-button type="primary" size="large" :disabled="!carts.isLinkFinshed" @click="createOrder('to-pay')">
|
||||
立即支付
|
||||
</el-button>
|
||||
</template>
|
||||
|
|
@ -177,6 +129,19 @@ import { customTruncateToTwoDecimals } from "@/views/tool/Instead/util";
|
|||
import { useCartsStore } from "@/store/modules/carts";
|
||||
import { useUserStore } from "@/store/modules/user";
|
||||
|
||||
function isEmptyObject(obj) {
|
||||
// 步骤1:排除null和非对象类型
|
||||
if (obj === null || typeof obj !== 'object') {
|
||||
return false;
|
||||
}
|
||||
// 步骤2:排除数组(数组也是对象,需单独判断)
|
||||
if (Array.isArray(obj)) {
|
||||
return false;
|
||||
}
|
||||
// 步骤3:判断自身可枚举属性是否为空
|
||||
return Object.keys(obj).length === 0;
|
||||
}
|
||||
|
||||
const shopUser = useUserStore();
|
||||
const carts = useCartsStore();
|
||||
|
||||
|
|
@ -288,18 +253,22 @@ defineExpose({
|
|||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.totalNumber {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.totalPrice {
|
||||
font-size: 18px;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
position: relative;
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid #ebebeb;
|
||||
|
||||
.yiyouhui {
|
||||
text-align: right;
|
||||
color: #c12a2a;
|
||||
|
|
@ -308,13 +277,16 @@ defineExpose({
|
|||
top: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.btn-group) {
|
||||
display: flex;
|
||||
margin-top: 10px;
|
||||
|
||||
.el-button {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.carts {
|
||||
height: calc(100% - 120px);
|
||||
overflow-y: scroll;
|
||||
|
|
@ -324,18 +296,21 @@ defineExpose({
|
|||
|
||||
/* 修改垂直滚动条 */
|
||||
.carts::-webkit-scrollbar {
|
||||
width: 0; /* 修改宽度 */
|
||||
width: 0;
|
||||
/* 修改宽度 */
|
||||
}
|
||||
|
||||
/* 修改滚动条轨道背景色 */
|
||||
.carts::-webkit-scrollbar-track {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
|
||||
.cart-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
color: rgba(0, 0, 0, 0.4);
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
flex: 1;
|
||||
|
|
|
|||
|
|
@ -22,10 +22,7 @@
|
|||
<el-table-column label="用户" prop="headImg" width="200px">
|
||||
<template v-slot="scope">
|
||||
<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>
|
||||
<div class="image-slot">
|
||||
<i class="el-icon-user"></i>
|
||||
|
|
@ -33,6 +30,7 @@
|
|||
</template>
|
||||
</el-image>
|
||||
<span class="name">{{ scope.row.nickName }}</span>
|
||||
<el-tag disable-transitions type="primary" style="margin-left: 10px;" v-if="scope.row.new">新</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -44,9 +42,16 @@
|
|||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="余额" prop="amount"></el-table-column>
|
||||
<el-table-column label="积分" prop="accountPoints"></el-table-column>
|
||||
|
||||
<el-table-column label="余额" prop="amount">
|
||||
<template #default="scope">
|
||||
{{ multiplyAndFormat(scope.row.amount || 0) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="积分" prop="accountPoints">
|
||||
<template #default="scope">
|
||||
{{ scope.row.accountPoints || 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="90" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="small" @click="choose(scope.row)">选择</el-button>
|
||||
|
|
@ -55,14 +60,9 @@
|
|||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination
|
||||
:total="tableData.total"
|
||||
:current-page="tableData.page"
|
||||
:page-size="tableData.size"
|
||||
@size-change="sizeChange"
|
||||
@current-change="paginationChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
<el-pagination :total="tableData.total" :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>
|
||||
</el-dialog>
|
||||
|
|
@ -71,6 +71,7 @@
|
|||
<script setup>
|
||||
import shopUserApi from "@/api/account/shopUser";
|
||||
import dayjs from "dayjs";
|
||||
import { multiplyAndFormat } from '@/utils'
|
||||
let cacheData = {};
|
||||
|
||||
const state = reactive({
|
||||
|
|
|
|||
|
|
@ -2,21 +2,19 @@
|
|||
<div class="controls">
|
||||
<div class="input-number" :class="{ disabled: canEdit }">
|
||||
<div class="reduce" @click="changeCartNumber(-1)">
|
||||
<el-icon><Minus /></el-icon>
|
||||
<el-icon>
|
||||
<Minus />
|
||||
</el-icon>
|
||||
</div>
|
||||
<span class="text" @click="changeCartNumberShow()">{{ carts.selCart.number || 1 }}</span>
|
||||
<div class="add" @click="changeCartNumber(1)">
|
||||
<el-icon><Plus /></el-icon>
|
||||
<el-icon>
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-button
|
||||
v-for="(item, index) in controls"
|
||||
:key="index"
|
||||
size="large"
|
||||
:disabled="btnDisabled(item)"
|
||||
@click="controlsClick(item)"
|
||||
>
|
||||
<el-button v-for="(item, index) in controls" :key="index" size="large" :disabled="btnDisabled(item)"
|
||||
@click="controlsClick(item)">
|
||||
{{ returnLabel(item) }}
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -39,7 +37,7 @@ const controls = ref([
|
|||
{ label: "整单备注", key: "all-note", disabled: false, per: "all-note" },
|
||||
{ label: "退菜", key: "return", disabled: false, per: "return" },
|
||||
{ label: "免厨打", key: "is_print", disabled: false, per: "print" },
|
||||
{ label: "单品改价", key: "changePriceClick", disabled: false, per: "cart" },
|
||||
{ label: "单品改价", key: "changePriceClick", disabled: false, per: "changePriceClick" },
|
||||
{ label: "等叫", key: "is_wait_call", disabled: false, per: "cart" },
|
||||
// { label: "整单等叫", key: "", disabled: false, per: "all-wating" },
|
||||
]);
|
||||
|
|
@ -59,6 +57,10 @@ function changeCartNumberShow() {
|
|||
emits("changeCartNumberShow");
|
||||
}
|
||||
function controlsClick(item) {
|
||||
// console.log(item);
|
||||
// const originGoodsItem = carts.goods.find(val => val.id == carts.selCart.product_id)
|
||||
// console.log('originGoodsItem===', originGoodsItem);
|
||||
|
||||
switch (item.key) {
|
||||
case "is_gift":
|
||||
carts.updateTag("is_gift", carts.selCart.is_gift ? 0 : 1);
|
||||
|
|
@ -108,12 +110,13 @@ function controlsClick(item) {
|
|||
}
|
||||
}
|
||||
const perList = computed(() => {
|
||||
const originGoodsItem = carts.goods.find(val => val.id == carts.selCart.product_id)
|
||||
// if (!carts.oldOrder.id) {
|
||||
// return ["all-wating", "all-note", "rottable"];
|
||||
// }
|
||||
let arr = [];
|
||||
if (!carts.selCart.id) {
|
||||
arr = ["all-wating", "all-note"];
|
||||
arr = ["all-wating"];
|
||||
}
|
||||
if (carts.isCanSelectGroup) {
|
||||
arr = ["all-wating", "all-note", "del", "pack", "gift", "print", "one-note"];
|
||||
|
|
@ -128,9 +131,16 @@ const perList = computed(() => {
|
|||
if (carts.oldOrder.id) {
|
||||
arr.push("rottable");
|
||||
}
|
||||
if (originGoodsItem && originGoodsItem.id) {
|
||||
if (originGoodsItem.isAllowTempModifyPrice == 1 || carts.selCart.is_temporary) {
|
||||
arr.push('changePriceClick');
|
||||
}
|
||||
}
|
||||
// if (!carts.isEmpty) {
|
||||
// arr.push("saveCart");
|
||||
// }
|
||||
console.log('carts.selCart===', carts.selCart);
|
||||
console.log('perList=======', arr);
|
||||
return arr;
|
||||
});
|
||||
const canEdit = computed(() => {
|
||||
|
|
@ -139,6 +149,9 @@ const canEdit = computed(() => {
|
|||
|
||||
function btnDisabled(item) {
|
||||
const canClick = perList.value.includes(item.per);
|
||||
|
||||
console.log('canClick===', canClick);
|
||||
|
||||
if (item.key == "return") {
|
||||
return !canClick || carts.selCart.returnNum >= carts.selCart.number;
|
||||
} else {
|
||||
|
|
@ -169,6 +182,7 @@ function changeCartNumber(step) {
|
|||
|
||||
<style scoped lang="scss">
|
||||
$gap: 10px;
|
||||
|
||||
.controls {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
|
|
@ -177,10 +191,12 @@ $gap: 10px;
|
|||
padding: 14px 10px;
|
||||
background-color: #f7f7fa;
|
||||
}
|
||||
.el-button + .el-button {
|
||||
|
||||
.el-button+.el-button {
|
||||
margin-top: $gap;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.input-number {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
@ -188,6 +204,7 @@ $gap: 10px;
|
|||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: $gap;
|
||||
cursor: pointer;
|
||||
|
||||
.reduce,
|
||||
.text,
|
||||
.add {
|
||||
|
|
@ -196,17 +213,19 @@ $gap: 10px;
|
|||
align-items: center;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.text {
|
||||
height: 48px;
|
||||
font-size: 30px;
|
||||
border-top: 1px solid #dcdfe6;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
.reduce {
|
||||
}
|
||||
.add {
|
||||
}
|
||||
|
||||
.reduce {}
|
||||
|
||||
.add {}
|
||||
}
|
||||
|
||||
.disabled {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,15 +3,18 @@
|
|||
<el-image v-if="item.coverImg" class="goods-image"
|
||||
:src="item.coverImg + '?x-oss-process=image/resize,m_lfit,w_100,h_100'" fit="cover"></el-image>
|
||||
<div class="info" @click="itemClick">
|
||||
<div class="name u-flex u-flex-wrap">
|
||||
<span class="weight" v-if="item.type == 'weight'">称重</span>
|
||||
<span class="u-line-3">{{ item.name }}</span>
|
||||
<div class="dot" v-if="item.isLimitDiscount">限时折扣</div>
|
||||
<div class="btm">
|
||||
<div class="name u-flex u-flex-wrap">
|
||||
<span class="weight" v-if="item.type == 'weight'">称重</span>
|
||||
<span class="u-line-3">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="limit_wrap" v-if="item.isLimitDiscount">
|
||||
<span class="o_price">¥{{ item.lowPrice }}</span>
|
||||
<span class="sale_price">¥{{ item.limitDiscountPrice }}</span>
|
||||
</div>
|
||||
<div v-else>¥{{ item.lowPrice }}</div>
|
||||
</div>
|
||||
<div class="" v-if="item.isLimitDiscount">
|
||||
<span class="o_price">¥{{ item.lowPrice }}</span>
|
||||
<span>¥{{ item.limitDiscountPrice }}</span>
|
||||
</div>
|
||||
<div v-else>¥{{ item.lowPrice }}</div>
|
||||
</div>
|
||||
<div class="status" v-if="
|
||||
item.isSoldStock ||
|
||||
|
|
@ -97,20 +100,42 @@ function isProductAvailable(sellDaysStr, startTimeStr, endTimeStr) {
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
background-color: rgba(46, 46, 46, 0.38);
|
||||
// background-color: rgba(46, 46, 46, 0.3);
|
||||
z-index: 1;
|
||||
|
||||
.btm {
|
||||
width: 100%;
|
||||
padding: 20px 6px 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 2;
|
||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
|
||||
}
|
||||
|
||||
.dot {
|
||||
padding: 2px 4px 2px 6px;
|
||||
border-radius: 0 0 0 8px;
|
||||
font-size: 10px;
|
||||
background-color: var(--el-color-danger);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -0;
|
||||
}
|
||||
}
|
||||
|
||||
.status {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
padding: 8px;
|
||||
z-index: 2;
|
||||
z-index: 99;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: rgba($color: #000000, $alpha: 0.5);
|
||||
background-color: rgba($color: #000000, $alpha: 0.6);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -129,9 +154,20 @@ function isProductAvailable(sellDaysStr, startTimeStr, endTimeStr) {
|
|||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.o_price {
|
||||
font-size: 10px;
|
||||
text-decoration: line-through;
|
||||
opacity: .8;
|
||||
.limit_wrap {
|
||||
display: flex;
|
||||
|
||||
.o_price {
|
||||
font-size: 12px;
|
||||
text-decoration: line-through;
|
||||
opacity: .8;
|
||||
margin-right: 4px;
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
|
||||
.sale_price {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -129,10 +129,10 @@
|
|||
</div>
|
||||
<div class="right">
|
||||
<h3>账单明细</h3>
|
||||
<p class="u-font-12 u-m-b-20">
|
||||
<!-- <p class="u-font-12 u-m-b-20">
|
||||
<span class="color-red">*</span>
|
||||
<span class="color-red">餐位费和打包费不参与折扣和满减</span>
|
||||
</p>
|
||||
</p> -->
|
||||
<div class="order-info">
|
||||
<div class="u-flex u-m-b-10 u-row-between">
|
||||
<span class="title">订单号:</span>
|
||||
|
|
@ -162,6 +162,12 @@
|
|||
-¥{{ carts.orderCostSummary.fullReduction.actualAmount }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="u-flex u-m-b-10 u-row-between">
|
||||
<span class="title">新客立减</span>
|
||||
<span class="u-m-l-10 value">
|
||||
-¥{{ carts.orderCostSummary.newUserDiscount }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="u-flex u-m-b-10 u-row-between">
|
||||
<span class="title">商品优惠券</span>
|
||||
<span class="u-m-l-10 value">-¥{{ productCouponDiscountAmount }}</span>
|
||||
|
|
@ -509,6 +515,8 @@ function returnPayParams() {
|
|||
roundAmount: props.orderInfo.roundAmount,
|
||||
pointsDiscountAmount: carts.orderCostSummary.pointDeductionAmount, //积分抵扣金额
|
||||
pointsNum: carts.orderCostSummary.pointUsed,
|
||||
discountActAmount: carts.orderCostSummary.fullReduction.actualAmount, // 满减活动金额
|
||||
discountActId: carts.orderCostSummary.fullReduction.usedThreshold !== undefined ? carts.orderCostSummary.fullReduction.usedThreshold.activityId : '', // 满减活动id
|
||||
couponList: carts.coupons.map((v) => v.id),
|
||||
userId: props.user.userId || "",
|
||||
allPack: carts.dinnerType == "take-out" ? 1 : 0,
|
||||
|
|
|
|||
|
|
@ -401,22 +401,26 @@ async function createOrder(key) {
|
|||
|
||||
// 清空历史订单回调
|
||||
async function clearOldOrderCallback() {
|
||||
// 获取历史订单数据
|
||||
const res = await orderApi.getHistoryList({
|
||||
orderId: carts.oldOrder.id,
|
||||
});
|
||||
const noPayStatus = {
|
||||
cancelled: "订单已取消",
|
||||
done: "订单已关闭",
|
||||
};
|
||||
if (noPayStatus[res.status]) {
|
||||
// ElMessage.error(noPayStatus[res.status]);
|
||||
resetOldOrder();
|
||||
showOrder.value = false;
|
||||
return;
|
||||
}
|
||||
if (res) {
|
||||
carts.setOldOrder(res);
|
||||
try {
|
||||
// 获取历史订单数据
|
||||
const res = await orderApi.getHistoryList({
|
||||
orderId: carts.oldOrder.id,
|
||||
});
|
||||
const noPayStatus = {
|
||||
cancelled: "订单已取消",
|
||||
done: "订单已关闭",
|
||||
};
|
||||
if (noPayStatus[res.status]) {
|
||||
// ElMessage.error(noPayStatus[res.status]);
|
||||
resetOldOrder();
|
||||
showOrder.value = false;
|
||||
return;
|
||||
}
|
||||
if (res) {
|
||||
carts.setOldOrder(res);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
// 取消历史订单
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@
|
|||
<el-button type="primary" icon="download" @click="showDownloadTableCode">
|
||||
下载桌台码
|
||||
</el-button>
|
||||
<el-button type="primary" icon="download" @click="downloadShopCpde">
|
||||
<!-- <el-button type="primary" icon="download" @click="downloadShopCpde">
|
||||
下载店铺码
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
|
||||
<div class="u-flex u-p-b-15 u-font-14 u-m-t-16">
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||
},
|
||||
beforeSubmit(data) {
|
||||
console.log("提交之前处理", data);
|
||||
data.birthDay = dayjs(data.birthDay).format("YYYY-MM-DD");
|
||||
data.birthDay = data.birthDay ? dayjs(data.birthDay).format("YYYY-MM-DD") : '';
|
||||
},
|
||||
formItems: [
|
||||
// {
|
||||
|
|
@ -34,7 +34,7 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||
{
|
||||
label: "用户昵称",
|
||||
prop: "nickName",
|
||||
rules: [{ required: false, message: "请输入用户昵称", trigger: "blur" }],
|
||||
rules: [{ required: true, message: "请输入用户昵称", trigger: "blur" }],
|
||||
type: "input",
|
||||
attrs: {
|
||||
placeholder: "请输入用户昵称",
|
||||
|
|
@ -68,7 +68,7 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||
{
|
||||
label: "会员生日",
|
||||
prop: "birthDay",
|
||||
rules: [{ required: false, message: "请选择会员生日", trigger: "blur" }],
|
||||
rules: [{ required: true, message: "请选择会员生日", trigger: "blur" }],
|
||||
type: "date-picker",
|
||||
attrs: {
|
||||
placeholder: "请选择会员生日",
|
||||
|
|
@ -82,7 +82,7 @@ const modalConfig: IModalConfig<editRequest> = {
|
|||
type: "radio",
|
||||
label: "性别",
|
||||
prop: "sex",
|
||||
rules: [{ required: false, message: "请选择性别", trigger: "blur" }],
|
||||
rules: [{ required: true, message: "请选择性别", trigger: "blur" }],
|
||||
attrs: {
|
||||
placeholder: "请选择性别",
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue