-
+
@@ -30,8 +56,13 @@
-
+
登 录
登 录 中...
@@ -61,8 +92,8 @@ const state = reactive({
codeUrl: "",
cookiePass: "",
loginForm: {
- username: "",
- password: "",
+ username: "admin",
+ password: "12345",
// rememberMe: false,
code: "",
uuid: "",
@@ -152,7 +183,7 @@ function handleLogin() {
.then(async (res) => {
// await userStore.getUserInfo();
const { path, queryParams } = parseRedirect();
- console.log(res, 'Denglv返回');
+ console.log(res, "Denglv返回");
router.push({ path: path, query: queryParams });
})
.catch(() => {
diff --git a/src/views/shop/list/components/detailModal.vue b/src/views/shop/list/components/detailModal.vue
index 7f83760..42e69d0 100644
--- a/src/views/shop/list/components/detailModal.vue
+++ b/src/views/shop/list/components/detailModal.vue
@@ -3,13 +3,16 @@
+
+
+
@@ -17,7 +20,10 @@
-
+
-->
-
-
-
+
- 启用
- 禁用
+ 启用
+ 禁用
-
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/addTable.vue b/src/views/tool/table/components/addTable.vue
new file mode 100644
index 0000000..feb542f
--- /dev/null
+++ b/src/views/tool/table/components/addTable.vue
@@ -0,0 +1,235 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 手动清台
+ 自动清台
+
+
+
+
+
+
+
+ 低消
+ 计时
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/choose-diners-number.vue b/src/views/tool/table/components/choose-diners-number.vue
new file mode 100644
index 0000000..7e8231a
--- /dev/null
+++ b/src/views/tool/table/components/choose-diners-number.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+ 清空
+
+
+ 位
+
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/choose-user.vue b/src/views/tool/table/components/choose-user.vue
new file mode 100644
index 0000000..f834fca
--- /dev/null
+++ b/src/views/tool/table/components/choose-user.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+
+ 不选择用户
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ scope.row.nickName }}
+
+
+
+
+
+
+
+ 会员等级{{ scope.row.isVip }}
+ 否
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/downloadTableCode.vue b/src/views/tool/table/components/downloadTableCode.vue
new file mode 100644
index 0000000..92f0218
--- /dev/null
+++ b/src/views/tool/table/components/downloadTableCode.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/keyboard.vue b/src/views/tool/table/components/keyboard.vue
new file mode 100644
index 0000000..8436f1f
--- /dev/null
+++ b/src/views/tool/table/components/keyboard.vue
@@ -0,0 +1,319 @@
+
+
+
+
+
+ {{ number }}
+
+
+
+
+ 确认
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/money-keyboard.vue b/src/views/tool/table/components/money-keyboard.vue
new file mode 100644
index 0000000..11e1909
--- /dev/null
+++ b/src/views/tool/table/components/money-keyboard.vue
@@ -0,0 +1,339 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/order-btn.js b/src/views/tool/table/components/order-btn.js
new file mode 100644
index 0000000..33c7922
--- /dev/null
+++ b/src/views/tool/table/components/order-btn.js
@@ -0,0 +1,62 @@
+export const orderBtns=[
+ {
+ text: "删除",
+ disabled: false,
+ },
+ {
+ text: "规格",
+ disabled: true,
+ },
+ {
+ text: "菜品打折",
+ disabled: false,
+ },
+ {
+ text: "赠菜",
+ disabled: false,
+ },
+ {
+ text: "赠菜",
+ disabled: false,
+ },
+ {
+ text: "打包",
+ disabled: false,
+ },
+ {
+ text: "等叫",
+ disabled: false,
+ },
+ {
+ text: "整单等叫",
+ disabled: false,
+ },
+ {
+ text: "单品备注",
+ disabled: false,
+ },
+ {
+ text: "退菜",
+ disabled: false,
+ },
+ {
+ text: "附加费",
+ disabled: false,
+ },
+ {
+ text: "存单",
+ disabled: false,
+ },
+ {
+ text: "取单",
+ disabled: false,
+ },
+ {
+ text: "修改价格",
+ disabled: false,
+ },
+ {
+ text: "撤单",
+ disabled: false,
+ }
+]
\ No newline at end of file
diff --git a/src/views/tool/table/components/pay-type.vue b/src/views/tool/table/components/pay-type.vue
new file mode 100644
index 0000000..692dd8c
--- /dev/null
+++ b/src/views/tool/table/components/pay-type.vue
@@ -0,0 +1,76 @@
+
+
+
选择支付方式
+
+
+
+
+ {{ item.payName }}
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/subscribe.vue b/src/views/tool/table/components/subscribe.vue
new file mode 100644
index 0000000..d28d178
--- /dev/null
+++ b/src/views/tool/table/components/subscribe.vue
@@ -0,0 +1,269 @@
+
+
+
+
+
+
+
+
+ {{ item.label }} / {{ item.date.substring(8,10) }}
+ {{ item.day }}
+
+
+
+
+
+ 午餐
+ 晚餐
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 先生
+ 女士
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tool/table/components/table-diancan copy.vue b/src/views/tool/table/components/table-diancan copy.vue
new file mode 100644
index 0000000..283e243
--- /dev/null
+++ b/src/views/tool/table/components/table-diancan copy.vue
@@ -0,0 +1,3990 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+ 先付费
+ 后付费
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+ 先付费
+ 后付费
+
+
+
+
+
+
+
+
+
+
+
+
选择用户
+
+
+
![]()
+
+
+
+
+
{{ vipUser.nickName }}
+
+ 余额:{{ vipUser.amount }}
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+ {{
+ status[item.status] ? status[item.status].label : ""
+ }}
+
+
+
+ {{ table ? "桌台号:" + table.name : "桌台号/取餐号" }}
+
+
+
+
+
+
+ 就餐人数:{{ perpole }}位
+
+
+
+
清空
+
+
+
+
+
+ 已优惠¥{{ allGiftMoney | to2 }}
+
+
+
+
+
打包
+
+ 共{{ allNumber }}件
+ ¥{{ allPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 仅下单
+
+
+
+
+
+
+ 去结账
+
+
+
+
+
+
+
+
+ 已下单菜品
+
+
+
+
+
+
+
+
+
+
+
+
+ 规格
+
+
+ {{ returnGiftText }}
+
+
+ {{ returnPackText }}
+
+
+ 删除
+
+
+
+ 存单
+
+
+ 取单
+ {{
+ prveOrder.list.length
+ }}
+
+
+
+
+
整单备注
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{
+ item.name
+ }}
+
+
+
+
+ 未找到相关商品
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+ {{ item | returntypeName }}
+
+
+
{{ item.name }}
+
+
+
+
+
+
¥{{ item.lowPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+ {{
+ vipUser.id ? vipUser.nickName : "服务员下单"
+ }}
+
+
+
余额:{{ vipUser.amount | to2 }}
+
积分:{{ vipUser.totalScore }}
+
+
+
+
+
+
+
+
+ 整单打折/减免
+
+
+
+
+
+
+
+
+ 立即支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ ({{ item.values.length }}选1)
+
+
+
+
+ {{ val.name }}
+
+
+
+
+
+
+
+
+
+
¥{{ skuGoods.data.salePrice | to2 }}
+
+ {{ skuText }}
+ 库存:{{ skuGoods.data.stockNumber || 0 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 数量
+
+
+
{{ keyborad.number }}
+
+
+
+
+
+
+
+
+
+
+
+
{{ index + 1 }}
+
¥{{ item.totalAmount }}
+
+
{{ item.created_at || "" }}
+
({{ item.totalNumber }}件)
+
+
+
+
+
+
+
![]()
+
+
+
+
{{ item.name }}
+
x{{ item.number }}
+
¥{{ item.totalAmount || 0 }}
+
+
+
+ {{ item.specSnap | formatSpecSnap }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tool/table/components/table-diancan-back.vue b/src/views/tool/table/components/table-diancan-back.vue
new file mode 100644
index 0000000..a407f04
--- /dev/null
+++ b/src/views/tool/table/components/table-diancan-back.vue
@@ -0,0 +1,3804 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+ 先付费
+ 后付费
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+ 先付费
+ 后付费
+
+
+
+
+
+
+
+
+
+
+
+
选择用户
+
+
+
![]()
+
+
+
+
+
{{ vipUser.nickName }}
+
+ 余额:{{ vipUser.amount }}
+
+
+
+
+
+
+
+
+ {{ table ? "桌台号:" + table.name : "桌台号/取餐号" }}
+
+
+
清空
+
+
+
+
+
+ 已优惠¥{{ allGiftMoney | to2 }}
+
+
+
+
+
打包
+
+ 共{{ allNumber }}件
+ ¥{{ allPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 仅下单
+
+
+
+
+
+
+ 去结账
+
+
+
+
+
+
+
+
+ 已下单菜品
+
+
+
+
+
+
+
+
+
+
+
+
+ 规格
+
+
+ {{ returnGiftText }}
+
+
+ {{ returnPackText }}
+
+
+ 删除
+
+
+
+ 存单
+
+
+ 取单
+ {{
+ prveOrder.list.length
+ }}
+
+
+
+
+
整单备注
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{
+ item.name
+ }}
+
+
+
+
+ 未找到相关商品
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+ {{ item | returntypeName }}
+
+
+
{{ item.name }}
+
+
+
+
+
+
¥{{ item.lowPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+ {{
+ vipUser.id ? vipUser.nickName : "服务员下单"
+ }}
+
+
+
余额:{{ vipUser.amount | to2 }}
+
积分:{{ vipUser.totalScore }}
+
+
+
+
+
+
+
+
+ 整单打折/减免
+
+
+
+
+
+
+
+ 立即支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ ({{ item.values.length }}选1)
+
+
+
+
+ {{ val.name }}
+
+
+
+
+
+
+
+
+
+
¥{{ skuGoods.data.salePrice | to2 }}
+
+ {{ skuText }}
+ 库存:{{ skuGoods.data.stockNumber || "" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 数量
+
+
+
{{ keyborad.number }}
+
+
+
+
+
+
+
+
+
+
+
+
{{ index + 1 }}
+
¥{{ item.totalAmount }}
+
+
{{ item.created_at || "" }}
+
({{ item.totalNumber }}件)
+
+
+
+
+
+
+
![]()
+
+
+
+
{{ item.name }}
+
x{{ item.number }}
+
¥{{ item.totalAmount || 0 }}
+
+
+
+ {{ item.specSnap | formatSpecSnap }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tool/table/components/table-diancan-oldList-back.vue b/src/views/tool/table/components/table-diancan-oldList-back.vue
new file mode 100644
index 0000000..50452fd
--- /dev/null
+++ b/src/views/tool/table/components/table-diancan-oldList-back.vue
@@ -0,0 +1,3839 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+ 先付费
+ 后付费
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+ 先付费
+ 后付费
+
+
+
+
+
+
+
+
+
+
+
+
选择用户
+
+
+
![]()
+
+
+
+
+
{{ vipUser.nickName }}
+
+ 余额:{{ vipUser.amount }}
+
+
+
+
+
+
+
+
+ {{ table ? "桌台号:" + table.name : "桌台号/取餐号" }}
+
+
+
清空
+
+
+
+
+
+ 已优惠¥{{ allGiftMoney | to2 }}
+
+
+
+
+
打包
+
+ 共{{ allNumber }}件
+ ¥{{ allPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 仅下单
+
+
+
+
+
+
+ 去结账
+
+
+
+
+
+
+
+
+ 已下单菜品
+
+
+
+
+
+
+
+
+
+
+
+
+ 规格
+
+
+ {{ returnGiftText }}
+
+
+ {{ returnPackText }}
+
+
+ 删除
+
+
+
+ 存单
+
+
+ 取单
+ {{
+ prveOrder.list.length
+ }}
+
+
+
+
+
整单备注
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{
+ item.name
+ }}
+
+
+
+
+ 未找到相关商品
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+ {{ item | returntypeName }}
+
+
+
{{ item.name }}
+
+
+
+
+
+
¥{{ item.lowPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+ {{
+ vipUser.id ? vipUser.nickName : "服务员下单"
+ }}
+
+
+
余额:{{ vipUser.amount | to2 }}
+
积分:{{ vipUser.totalScore }}
+
+
+
+
+
+
+
+
+ 整单打折/减免
+
+
+
+
+
+
+
+ 立即支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ ({{ item.values.length }}选1)
+
+
+
+
+ {{ val.name }}
+
+
+
+
+
+
+
+
+
+
¥{{ skuGoods.data.salePrice | to2 }}
+
+ {{ skuText }}
+ 库存:{{ skuGoods.data.stockNumber || 0 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 数量
+
+
+
{{ keyborad.number }}
+
+
+
+
+
+
+
+
+
+
+
+
{{ index + 1 }}
+
¥{{ item.totalAmount }}
+
+
{{ item.created_at || "" }}
+
({{ item.totalNumber }}件)
+
+
+
+
+
+
+
![]()
+
+
+
+
{{ item.name }}
+
x{{ item.number }}
+
¥{{ item.totalAmount || 0 }}
+
+
+
+ {{ item.specSnap | formatSpecSnap }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tool/table/components/table-diancan.vue b/src/views/tool/table/components/table-diancan.vue
new file mode 100644
index 0000000..1b5dcae
--- /dev/null
+++ b/src/views/tool/table/components/table-diancan.vue
@@ -0,0 +1,4302 @@
+
+
+
+
+
+
+
+ {{ title }}
+
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ postPay ? "后付费" : "先付费" }}
+
+
+
+ 先付费
+ 后付费
+
+
+
+
+
+
+
+
+
+
+
+
选择用户
+
+
+
![]()
+
+
+
+
+
{{ vipUser.nickName }}
+
+ 余额:{{ vipUser.amount }}
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
+ {{ item.name }}
+
+ {{
+ status[item.status] ? status[item.status].label : ""
+ }}
+
+
+
+ {{ table ? "桌台号:" + table.name : "桌台号/取餐号" }}
+
+
+
+
+
+
+
+ 就餐人数:{{ perpole }}位
+
+
+
+
+
+ 就餐人数:-位
+
+
+
+
+
清空
+
+
+
+
+
+
+
+
+
+
+
+ 第{{ orderItem.placeNum }}次下单
+
+
+
+
+
+
+ 餐位费
+
+
+
+
+
+
+
+
+ 已优惠¥{{ allGiftMoney | to2 }}
+
+
+
+
+
打印制作单
+
+
+ 共{{ allNumber }}件
+ ¥{{ allPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 仅下单
+
+
+
+
+
+
+ 去结账
+
+
+
+
+
+
+
+
+
+
+
+
+ 规格
+
+
+ {{ returnGiftText }}
+
+
+ {{ returnPackText }}
+
+
+ 删除
+
+
+
+ 存单
+
+
+ 取单
+ {{
+ prveOrder.list.length
+ }}
+
+
+
+
+
整单备注
+
+ 退菜
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ {{
+ item.name
+ }}
+
+
+
+
+ 未找到相关商品
+
+
+
+
+
+
+
![]()
+
+
+
+
+
+ {{ item | returntypeName }}
+
+
+
{{ item.name }}
+
+
+
+
+
+
¥{{ item.lowPrice }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
![]()
+
+
+ {{
+ vipUser.id ? vipUser.nickName : "服务员下单"
+ }}
+
+
+
余额:{{ vipUser.amount | to2 }}
+
积分:{{ vipUser.totalScore }}
+
+
+
+
+
+
+
+
+ 整单打折/减免
+
+
+
+
+
+
+
+
+ 立即支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+ ({{ item.values.length }}选1)
+
+
+
+
+ {{ val.name }}
+
+
+
+
+
+
+
+
+
+
¥{{ skuGoods.data.salePrice | to2 }}
+
+ {{ skuText }}
+ 库存:{{ skuGoods.data.stockNumber || 0 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 数量
+
+
+
{{ keyborad.number }}
+
+
+
+
+
+
+
+
+
+
+
+
{{ index + 1 }}
+
¥{{ item.totalAmount }}
+
+
{{ item.created_at || "" }}
+
({{ item.totalNumber }}件)
+
+
+
+
+
+
+
![]()
+
+
+
+
{{ item.name }}
+
x{{ item.number }}
+
¥{{ item.totalAmount || 0 }}
+
+
+
+ {{ item.specSnap | formatSpecSnap }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/tool/table/components/table-edit.vue b/src/views/tool/table/components/table-edit.vue
new file mode 100644
index 0000000..76171fc
--- /dev/null
+++ b/src/views/tool/table/components/table-edit.vue
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 手动清台
+ 自动清台
+
+
+
+
+
+
+
+ 低消
+ 计时
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/table/components/util.js b/src/views/tool/table/components/util.js
new file mode 100644
index 0000000..2ec3413
--- /dev/null
+++ b/src/views/tool/table/components/util.js
@@ -0,0 +1,47 @@
+//判断商品是否可以下单
+export function isCanBuy(goods,isStock) {
+ return goods.isGrounding && goods.isPauseSale == 0 && (isStock?goods.stockNumber > 0:true) ;
+}
+
+// 一个数组是否包含另外一个数组全部元素
+export function arrayContainsAll(arr1, arr2) {
+ for (let i = 0; i < arr2.length; i++) {
+ if (!arr1.includes(arr2[i])) {
+ return false;
+ }
+ }
+ return true;
+}
+
+//n项 n-1项组合,生成全部结果
+export function generateCombinations(arr, k) {
+ let result = [];
+
+ function helper(index, current) {
+ if (current.length === k) {
+ result.push(current.slice()); // 使用slice()来避免直接修改原始数组
+ } else {
+ for (let i = index; i < arr.length; i++) {
+ current.push(arr[i]); // 将当前元素添加到组合中
+ helper(i + 1, current); // 递归调用,索引增加以避免重复选择相同的元素
+ current.pop(); // 回溯,移除当前元素以便尝试其他组合
+ }
+ }
+ }
+
+ helper(0, []); // 从索引0开始,初始空数组作为起点
+ return result;
+}
+
+export function returnReverseVal(val, isReturnString = true) {
+ const isBol = typeof val === "boolean";
+ const isString = typeof val === "string";
+ let reverseNewval = "";
+ if (isBol) {
+ reverseNewval = !val;
+ }
+ if (isString) {
+ reverseNewval = val === "true" ? "false" : "true";
+ }
+ return reverseNewval;
+}
diff --git a/src/views/tool/table/index.vue b/src/views/tool/table/index.vue
new file mode 100644
index 0000000..41a40c8
--- /dev/null
+++ b/src/views/tool/table/index.vue
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/views/tool/table/status.js b/src/views/tool/table/status.js
new file mode 100644
index 0000000..ecaf8c8
--- /dev/null
+++ b/src/views/tool/table/status.js
@@ -0,0 +1,10 @@
+export default {
+ pending: { label: '挂单中', type: '#E6A23C' },
+ cleaning: { label: '待清台', type: '#FAAD14' },
+ using: { label: '开台中', type: '#FF4D4F' },
+ idle: { label: '空闲', type: '#3F9EFF' },
+ paying: { label: '结算中', type: '#E6A23C' },
+ closed: { label: '关台', type: '#DDDDDD' },
+ subscribe: { label: '预约', type: '#52C41A ' },
+ unbind: { label: '未绑定', type: 'rgb(221,221,221)' }
+}
diff --git a/src/views/user/active.vue b/src/views/user/active.vue
deleted file mode 100644
index e69de29..0000000
diff --git a/src/views/user/active/index.vue b/src/views/user/active/index.vue
new file mode 100644
index 0000000..30653d4
--- /dev/null
+++ b/src/views/user/active/index.vue
@@ -0,0 +1,155 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
+
+
+
+ {{ returnOptionsLabel(scope.prop, scope.row[scope.prop]) }}
+
+
+ {{ scope.row[scope.prop] ? "是" : "否" }}
+
+
+
+ {{ scope.row[scope.prop] === null ? "未知" : scope.row[scope.prop] == 1 ? "男" : "女" }}
+
+
+
+
+
+ {{ scope.row.nickName }}
+
+
+
+ {{ scope.row[scope.prop] }}
+
+
+ {{ scope.row[scope.prop] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/user/index.vue b/src/views/user/index.vue
deleted file mode 100644
index e69de29..0000000
diff --git a/src/views/user/list/config/add.ts b/src/views/user/list/config/add.ts
new file mode 100644
index 0000000..14aaa5b
--- /dev/null
+++ b/src/views/user/list/config/add.ts
@@ -0,0 +1,135 @@
+import shopUserApi, { type addRequest } from "@/api/account/shopUser";
+import type { IModalConfig } from "@/components/CURD/types";
+
+const modalConfig: IModalConfig
= {
+ pageName: "sys:user",
+ dialog: {
+ title: "添加用户",
+ width: 800,
+ draggable: true,
+ },
+ form: {
+ labelWidth: 140,
+ },
+ formAction: function (data: addRequest) {
+ return shopUserApi.add(data.shopid, data);
+ },
+ beforeSubmit(data) {
+ console.log("提交之前处理", data);
+ },
+ formItems: [
+ {
+ label: "用户头像",
+ prop: "headImg",
+ rules: [{ required: false, message: "请选择用户头像", trigger: "blur" }],
+ type: "UpImage",
+ attrs: {
+ placeholder: "请选择用户头像",
+ },
+
+ },
+ {
+ label: "用户昵称",
+ prop: "nickName",
+ rules: [{ required: true, message: "请输入用户昵称", trigger: "blur" }],
+ type: "input",
+ attrs: {
+ placeholder: "请输入用户昵称",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ type: "input",
+ label: "手机号码",
+ prop: "phone",
+ rules: [
+ {
+ required: true,
+ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+ message: "请输入正确的手机号码",
+ trigger: "blur",
+ },
+ ],
+ attrs: {
+ placeholder: "请输入手机号码",
+ maxlength: 11,
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ label: "会员生日",
+ prop: "birthDay",
+ rules: [{ required: false, message: "请选择会员生日", trigger: "blur" }],
+ type: "date-picker",
+ attrs: {
+ placeholder: "请选择会员生日",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ type: "radio",
+ label: "性别",
+ prop: "sex",
+ rules: [{ required: false, message: "请选择性别", trigger: "blur" }],
+ attrs: {
+ placeholder: "请选择性别",
+ },
+ initialValue: '',
+ options: [
+ { label: '男', value: 1 },
+ { label: '女', value: 0 },
+ ],
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ label: "账户积分",
+ prop: "accountPoints",
+ rules: [{ required: false, message: "请输入账户积分", trigger: "blur" }],
+ type: "input-number",
+ attrs: {
+ placeholder: "请输入账户积分",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ label: "钱包余额",
+ prop: "amount",
+ rules: [{ required: false, message: "请输入钱包余额", trigger: "blur" }],
+ type: "input-number",
+ attrs: {
+ placeholder: "请输入钱包余额",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ type: "radio",
+ label: "是否会员",
+ prop: "isVip",
+ options: [
+ { label: '是', value: 1 },
+ { label: '否', value: 0 },
+ ],
+ },
+ ],
+};
+
+// 如果有异步数据会修改配置的,推荐用reactive包裹,而纯静态配置的可以直接导出
+export default reactive(modalConfig);
diff --git a/src/views/user/list/config/config.ts b/src/views/user/list/config/config.ts
new file mode 100644
index 0000000..87d75d4
--- /dev/null
+++ b/src/views/user/list/config/config.ts
@@ -0,0 +1,46 @@
+export const isVipOptions: statusOptions[] = [
+ { label: "全部", value: "" },
+ { label: "非会员", value: "0" },
+ { label: "会员", value: "1" },
+
+];
+
+export type optionsType = "isVip";
+
+export function returnOptions(type: optionsType) {
+ if (type === "isVip") {
+ return isVipOptions;
+ }
+}
+
+export function returnOptionsLabel(optionsType: optionsType, value: string | number) {
+ const options = returnOptions(optionsType);
+ if (!options) {
+ return "";
+ }
+ const option = options.find((item) => item.value === value);
+ return option ? option.label : "";
+}
+
+export interface options {
+ label: string;
+ value: string | number;
+ [property: string]: any;
+}
+export interface statusOptions extends options {
+}
+
+export type payTypeValue =
+ | ""
+ | "cash"
+ | "bank"
+ | "scanCode"
+ | "deposit"
+ | "vipPay"
+ | "arrears"
+ | "virtual"
+ | "arrears";
+
+export interface payTypeOptions extends options {
+ value: payTypeValue;
+}
diff --git a/src/views/user/list/config/content.ts b/src/views/user/list/config/content.ts
new file mode 100644
index 0000000..bd9ed55
--- /dev/null
+++ b/src/views/user/list/config/content.ts
@@ -0,0 +1,106 @@
+import shopUserApi, { type getListRequest } from "@/api/account/shopUser";
+import type { IContentConfig } from "@/components/CURD/types";
+
+const contentConfig: IContentConfig = {
+ pageName: "sys:user",
+ table: {
+ border: true,
+ highlightCurrentRow: true,
+ },
+ pagination: {
+ background: true,
+ layout: "prev,pager,next,jumper,total,sizes",
+ pageSize: 20,
+ pageSizes: [10, 20, 30, 50],
+ },
+ indexAction: function (params: getListRequest) {
+ return shopUserApi.getList(params);
+ },
+ // deleteAction: shopUserApi.delete,
+ // modifyAction: function (data) {
+ // // return shopUserApi.edit(data);
+ // },
+ pk: "id",
+ toolbar: ["add"],
+ defaultToolbar: ["refresh", "filter", "search"],
+ cols: [
+ { type: "selection", width: 50, align: "center" },
+ { label: "id", align: "center", prop: "id", width: 100, show: true },
+ {
+ label: "用户",
+ align: "center",
+ prop: "user",
+ templet: "custom",
+ slotName: "user",
+ },
+ {
+ label: "性别",
+ align: "center",
+ prop: "sex",
+ templet: "custom",
+ slotName: "gender",
+ },
+ {
+ label: "会员",
+ align: "center",
+ prop: "isVip",
+ templet: "custom",
+ slotName: "bol",
+ },
+ {
+ label: "手机号",
+ align: "center",
+ prop: "phone",
+ width: 140,
+ templet: "custom",
+ slotName: "mobile",
+ },
+ {
+ label: "余额",
+ align: "center",
+ prop: "amount",
+ },
+ {
+ label: "积分",
+ align: "center",
+ prop: "accountPoints",
+ },
+ {
+ label: "消费累计",
+ align: "center",
+ prop: "consumeAmount",
+ },
+ {
+ label: "消费次数累计",
+ align: "center",
+ prop: "consumeAmount",
+ },
+ {
+ label: "注册时间",
+ align: "center",
+ prop: "createTime",
+ },
+ {
+ label: "操作",
+ align: "center",
+ fixed: "right",
+ width: 180,
+ templet: "tool",
+ operat: [
+ {
+ name: "edit",
+ text: "编辑",
+ },
+ {
+ name: "more",
+ text: "更多",
+ options: [
+ { label: '增减余额', command: 'change-money' }
+ ]
+ },
+ ],
+ },
+ ],
+};
+
+export default contentConfig;
diff --git a/src/views/user/list/config/edit-money.ts b/src/views/user/list/config/edit-money.ts
new file mode 100644
index 0000000..6f31cbe
--- /dev/null
+++ b/src/views/user/list/config/edit-money.ts
@@ -0,0 +1,145 @@
+import shopUserApi, { type editMoneyRequest } from "@/api/account/shopUser";
+import type { IModalConfig } from "@/components/CURD/types";
+import { min } from "lodash";
+
+// 增减或者减少余额的类型
+export interface optuions {
+ label: string;
+ value: string | number;
+}
+export const addOptions: optuions[] = [
+ { label: '增加充值', value: 'adminIn' },
+ { label: '增加消费退款', value: 'adminRefund' },
+]
+export const reduceOptions: optuions[] = [
+ { label: '扣除消费', value: 'adminOut' },
+ { label: '扣除充值退款', value: 'adminInOut' },
+]
+
+
+const modalConfig: IModalConfig = {
+ pageName: "sys:user",
+ dialog: {
+ title: "增减余额",
+ width: 800,
+ draggable: true,
+ },
+ pk: "id",
+ form: {
+ labelWidth: 140,
+ },
+ formAction: function (data) {
+ return shopUserApi.editMoney(data.shopid, data);
+ },
+ beforeSubmit(data) {
+ console.log("提交之前处理", data);
+ },
+ formItems: [
+ {
+ label: "用户昵称",
+ prop: "nickName",
+ rules: [{ required: false, message: "请输入用户昵称", trigger: "blur" }],
+ type: "input",
+ disabled: true,
+ attrs: {
+ placeholder: "请输入用户昵称",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ label: "钱包余额",
+ prop: "amount",
+ disabled: true,
+ rules: [{ required: false, message: "", trigger: "blur" }],
+ type: "input",
+ attrs: {
+ placeholder: "",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ type: "radio",
+ label: "增减余额",
+ prop: "type",
+ rules: [{ required: true, message: "增减余额", trigger: "blur" }],
+ initialValue: 1,
+ options: [
+ { label: '增加', value: 1 },
+ { label: '减少', value: 0 },
+ ],
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ watch() {
+
+ }
+ },
+ {
+ label: "金额",
+ prop: "money",
+ rules: [{ required: false, message: "请输入要增加或者减少的金额", trigger: "blur" }],
+ type: "input-number",
+ attrs: {
+ placeholder: "请输入要增加或者减少的金额",
+ min: 0,
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ initialValue: 0
+ },
+ {
+ label: "类型",
+ prop: "bizEnum",
+ rules: [{ required: true, message: "请选择类型", trigger: "blur" }],
+ type: "radio-button",
+ attrs: {
+ placeholder: "请选择类型",
+ },
+ options: addOptions,
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ rules: [{ required: false, message: "请输入备注", trigger: "blur" }],
+ type: "textarea",
+ attrs: {
+ placeholder: "请输入备注",
+ },
+ },
+ // {
+ // label: "钱包余额",
+ // prop: "amount",
+ // rules: [{ required: false, message: "请输入钱包余额", trigger: "blur" }],
+ // type: "input-number",
+ // attrs: {
+ // placeholder: "请输入钱包余额",
+ // },
+ // col: {
+ // xs: 24,
+ // sm: 12,
+ // },
+ // },
+ // {
+ // type: "radio",
+ // label: "是否会员",
+ // prop: "isVip",
+ // options: [
+ // { label: '是', value: 1 },
+ // { label: '否', value: 0 },
+ // ],
+ // },
+ ],
+};
+
+
+// 如果有异步数据会修改配置的,推荐用reactive包裹,而纯静态配置的可以直接导出
+export default reactive(modalConfig);
diff --git a/src/views/user/list/config/edit.ts b/src/views/user/list/config/edit.ts
new file mode 100644
index 0000000..0407712
--- /dev/null
+++ b/src/views/user/list/config/edit.ts
@@ -0,0 +1,136 @@
+import shopUserApi, { type editRequest } from "@/api/account/shopUser";
+import type { IModalConfig } from "@/components/CURD/types";
+
+const modalConfig: IModalConfig = {
+ pageName: "sys:user",
+ dialog: {
+ title: "修改用户",
+ width: 800,
+ draggable: true,
+ },
+ pk: "id",
+ form: {
+ labelWidth: 140,
+ },
+ formAction: function (data: editRequest) {
+ return shopUserApi.edit(data.shopid, data);
+ },
+ beforeSubmit(data) {
+ console.log("提交之前处理", data);
+ },
+ formItems: [
+ // {
+ // label: "用户头像",
+ // prop: "headImg",
+ // rules: [{ required: false, message: "请选择用户头像", trigger: "blur" }],
+ // type: "UpImage",
+ // attrs: {
+ // placeholder: "请选择用户头像",
+ // },
+
+ // },
+ {
+ label: "用户昵称",
+ prop: "nickName",
+ rules: [{ required: false, message: "请输入用户昵称", trigger: "blur" }],
+ type: "input",
+ attrs: {
+ placeholder: "请输入用户昵称",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ // {
+ // type: "input",
+ // label: "手机号码",
+ // prop: "phone",
+ // rules: [
+ // {
+ // required: true,
+ // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+ // message: "请输入正确的手机号码",
+ // trigger: "blur",
+ // },
+ // ],
+ // attrs: {
+ // placeholder: "请输入手机号码",
+ // maxlength: 11,
+ // },
+ // col: {
+ // xs: 24,
+ // sm: 12,
+ // },
+ // },
+ {
+ label: "会员生日",
+ prop: "birthDay",
+ rules: [{ required: false, message: "请选择会员生日", trigger: "blur" }],
+ type: "date-picker",
+ attrs: {
+ placeholder: "请选择会员生日",
+ },
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ {
+ type: "radio",
+ label: "性别",
+ prop: "sex",
+ rules: [{ required: false, message: "请选择性别", trigger: "blur" }],
+ attrs: {
+ placeholder: "请选择性别",
+ },
+ initialValue: '',
+ options: [
+ { label: '男', value: 1 },
+ { label: '女', value: 0 },
+ ],
+ col: {
+ xs: 24,
+ sm: 12,
+ },
+ },
+ // {
+ // label: "账户积分",
+ // prop: "accountPoints",
+ // rules: [{ required: false, message: "请输入账户积分", trigger: "blur" }],
+ // type: "input-number",
+ // attrs: {
+ // placeholder: "请输入账户积分",
+ // },
+ // col: {
+ // xs: 24,
+ // sm: 12,
+ // },
+ // },
+ // {
+ // label: "钱包余额",
+ // prop: "amount",
+ // rules: [{ required: false, message: "请输入钱包余额", trigger: "blur" }],
+ // type: "input-number",
+ // attrs: {
+ // placeholder: "请输入钱包余额",
+ // },
+ // col: {
+ // xs: 24,
+ // sm: 12,
+ // },
+ // },
+ // {
+ // type: "radio",
+ // label: "是否会员",
+ // prop: "isVip",
+ // options: [
+ // { label: '是', value: 1 },
+ // { label: '否', value: 0 },
+ // ],
+ // },
+ ],
+};
+
+// 如果有异步数据会修改配置的,推荐用reactive包裹,而纯静态配置的可以直接导出
+export default reactive(modalConfig);
diff --git a/src/views/user/list/config/search.ts b/src/views/user/list/config/search.ts
new file mode 100644
index 0000000..7986e8d
--- /dev/null
+++ b/src/views/user/list/config/search.ts
@@ -0,0 +1,35 @@
+import type { ISearchConfig } from "@/components/CURD/types";
+import { isVipOptions } from "./config";
+const searchConfig: ISearchConfig = {
+ pageName: "sys:user",
+ inline: true,
+ isExpandable: false,
+ formItems: [
+ {
+ type: "radio-button",
+ label: "是否会员",
+ prop: "isVip",
+ attrs: {
+ placeholder: "请选择",
+ clearable: true,
+ },
+ options: isVipOptions,
+ },
+
+ {
+ type: "input",
+ label: "昵称或手机号",
+ prop: "key",
+ attrs: {
+ placeholder: "请输入昵称或手机号",
+ clearable: true,
+ style: {
+ width: "200px",
+ },
+ },
+ },
+
+ ],
+};
+
+export default searchConfig;
diff --git a/src/views/user/list/index.vue b/src/views/user/list/index.vue
new file mode 100644
index 0000000..dae1f6f
--- /dev/null
+++ b/src/views/user/list/index.vue
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+ {{ scope.row[scope.prop] == 1 ? "启用" : "禁用" }}
+
+
+
+ {{ returnOptionsLabel(scope.prop, scope.row[scope.prop]) }}
+
+
+ {{ scope.row[scope.prop] ? "是" : "否" }}
+
+
+
+ {{ scope.row[scope.prop] === null ? "未知" : scope.row[scope.prop] == 1 ? "男" : "女" }}
+
+
+
+
+
+ {{ scope.row.nickName }}
+
+
+
+ {{ scope.row[scope.prop] }}
+
+
+ {{ scope.row[scope.prop] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+