Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23e4407459 | |||
| 53a1442cf7 | |||
| 6cc53db443 | |||
| 7f97467f82 | |||
| d6e1c83f88 | |||
| b69b5dbf31 |
@@ -1,87 +1,260 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
orderStatus: [
|
orderStatus: [{
|
||||||
{ label: "待支付", type: "unpaid" },
|
label: "待支付",
|
||||||
{ label: "制作中", type: "in_production" },
|
type: "unpaid"
|
||||||
{ label: "待取餐", type: "wait_out" },
|
},
|
||||||
{ label: "订单完成", type: "done" },
|
{
|
||||||
{ label: "申请退单", type: "refunding" },
|
label: "制作中",
|
||||||
{ label: "退单", type: "refund" },
|
type: "in_production"
|
||||||
{ label: "部分退单", type: "part_refund" },
|
},
|
||||||
{ label: "取消订单", type: "cancelled" },
|
{
|
||||||
|
label: "待取餐",
|
||||||
|
type: "wait_out"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "订单完成",
|
||||||
|
type: "done"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "申请退单",
|
||||||
|
type: "refunding"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "退单",
|
||||||
|
type: "refund"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "部分退单",
|
||||||
|
type: "part_refund"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "取消订单",
|
||||||
|
type: "cancelled"
|
||||||
|
},
|
||||||
],
|
],
|
||||||
orderType: [
|
orderType: [{
|
||||||
{ label: "收银", type: "cash" },
|
label: "收银",
|
||||||
{ label: "小程序", type: "miniapp" },
|
type: "cash"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "小程序",
|
||||||
|
type: "miniapp"
|
||||||
|
},
|
||||||
],
|
],
|
||||||
dineMode: [
|
dineMode: [{
|
||||||
{ label: "堂食", type: "dine-in" },
|
label: "堂食",
|
||||||
{ label: "外带", type: "take-out" },
|
type: "dine-in"
|
||||||
{ label: "外卖", type: "take-away" },
|
},
|
||||||
],
|
{
|
||||||
payType: [
|
label: "外带",
|
||||||
{ label: "主扫", type: "main_scan" },
|
type: "take-out"
|
||||||
{ label: "被扫", type: "back_scan" },
|
},
|
||||||
{ label: "微信小程序", type: "wechat_mini" },
|
{
|
||||||
{ label: "支付宝小程序", type: "alipay_mini" },
|
label: "外卖",
|
||||||
{ label: "会员支付", type: "vip_pay" },
|
type: "take-away"
|
||||||
{ label: "现金支付", type: "cash_pay" },
|
},
|
||||||
{ label: "挂账支付", type: "credit_pay" },
|
],
|
||||||
],
|
payType: [{
|
||||||
bizCodes: [
|
label: "主扫",
|
||||||
{ label: "现金充值", type: "cashIn" },
|
type: "main_scan"
|
||||||
{ label: "微信小程序充值", type: "wechatIn" },
|
},
|
||||||
{ label: "支付宝小程序充值", type: "alipayIn" },
|
{
|
||||||
{ label: "充值奖励", type: "awardIn" },
|
label: "被扫",
|
||||||
{ label: "充值退款", type: "rechargeRefund" },
|
type: "back_scan"
|
||||||
{ label: "订单消费", type: "orderPay" },
|
},
|
||||||
{ label: "订单退款", type: "orderRefund" },
|
{
|
||||||
{ label: "管理员充值", type: "adminIn" },
|
label: "微信小程序",
|
||||||
{ label: "管理员消费", type: "adminOut" },
|
type: "wechat_mini"
|
||||||
],
|
},
|
||||||
platformType: [
|
{
|
||||||
{ label: '微信小程序', type: 'WX' },
|
label: "支付宝小程序",
|
||||||
{ label: '支付宝小程序', type: 'ALI' },
|
type: "alipay_mini"
|
||||||
{ label: '收银机客户端', type: 'PC' },
|
},
|
||||||
{ label: 'PC管理端', type: 'WEB' },
|
{
|
||||||
{ label: 'APP管理端', type: 'APP' },
|
label: "会员支付",
|
||||||
{ label: '收款码', type: 'H5' },
|
type: "vip_pay"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "现金支付",
|
||||||
|
type: "cash_pay"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "挂账支付",
|
||||||
|
type: "credit_pay"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
bizCodes: [{
|
||||||
|
label: "现金充值",
|
||||||
|
type: "cashIn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "微信小程序充值",
|
||||||
|
type: "wechatIn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "支付宝小程序充值",
|
||||||
|
type: "alipayIn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "充值奖励",
|
||||||
|
type: "awardIn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "充值退款",
|
||||||
|
type: "rechargeRefund"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "订单消费",
|
||||||
|
type: "orderPay"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "订单退款",
|
||||||
|
type: "orderRefund"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "管理员充值",
|
||||||
|
type: "adminIn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "管理员消费",
|
||||||
|
type: "adminOut"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
platformType: [{
|
||||||
|
label: '微信小程序',
|
||||||
|
type: 'WX'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '支付宝小程序',
|
||||||
|
type: 'ALI'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '收银机客户端',
|
||||||
|
type: 'PC'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'PC管理端',
|
||||||
|
type: 'WEB'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'APP管理端',
|
||||||
|
type: 'APP'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '收款码',
|
||||||
|
type: 'H5'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
tableStatus: {
|
tableStatus: {
|
||||||
idle: { label: "空闲", type: "#3F9EFF" },
|
unbound: {
|
||||||
using: { label: "使用中", type: "#fa5555" },
|
label: "未绑定",
|
||||||
subscribe: { label: "预定", type: "rgb(34, 191, 100)" },
|
type: "#909090"
|
||||||
closed: { label: "关台", type: "rgb(221,221,221)" },
|
},
|
||||||
opening: { label: "开台中", type: "#E6A23C" },
|
idle: {
|
||||||
cleaning: { label: "待清台", type: "#FAAD14" },
|
label: "空闲",
|
||||||
paying: { label: "结算中", type: "#E6A23C" },
|
type: "#3F9EFF"
|
||||||
unbind: { label: "未绑定", type: "rgb(221,221,221)" }
|
},
|
||||||
|
ordering: {
|
||||||
|
label: "点餐中",
|
||||||
|
type: "#46AEA4"
|
||||||
|
},
|
||||||
|
unsettled: {
|
||||||
|
label: "未结账",
|
||||||
|
type: "#DD3F41"
|
||||||
|
},
|
||||||
|
paying: {
|
||||||
|
label: "支付中",
|
||||||
|
type: "#909090"
|
||||||
|
},
|
||||||
|
settled: {
|
||||||
|
label: "待清台",
|
||||||
|
type: "#FF9500"
|
||||||
|
},
|
||||||
|
closed: {
|
||||||
|
label: "关台",
|
||||||
|
type: "#DDDDDD"
|
||||||
|
},
|
||||||
|
subscribe: {
|
||||||
|
label: "预定",
|
||||||
|
type: "#58B22C"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
invoicingType: [
|
invoicingType: [{
|
||||||
{ label: '全部', type: '' },
|
label: '全部',
|
||||||
{ label: '手动入库', type: 'manual-in' },
|
type: ''
|
||||||
{ label: '手动出库', type: 'manual-out' },
|
},
|
||||||
{ label: '盘盈入库', type: 'win-in' },
|
{
|
||||||
{ label: '盘亏出库', type: 'loss-out' },
|
label: '手动入库',
|
||||||
{ label: '订单退款入库', type: 'other-out' },
|
type: 'manual-in'
|
||||||
{ label: '订单消费出库', type: 'order-out' },
|
},
|
||||||
{ label: '损耗出库', type: 'damage-out' },
|
{
|
||||||
|
label: '手动出库',
|
||||||
|
type: 'manual-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '盘盈入库',
|
||||||
|
type: 'win-in'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '盘亏出库',
|
||||||
|
type: 'loss-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '订单退款入库',
|
||||||
|
type: 'other-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '订单消费出库',
|
||||||
|
type: 'order-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '损耗出库',
|
||||||
|
type: 'damage-out'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
invoicingType: [
|
invoicingType: [{
|
||||||
{ label: '全部', type: '' },
|
label: '全部',
|
||||||
{ label: '手动入库', type: 'manual-in' },
|
type: ''
|
||||||
{ label: '手动出库', type: 'manual-out' },
|
},
|
||||||
{ label: '盘盈入库', type: 'win-in' },
|
{
|
||||||
{ label: '盘亏出库', type: 'loss-out' },
|
label: '手动入库',
|
||||||
{ label: '订单退款入库', type: 'other-out' },
|
type: 'manual-in'
|
||||||
{ label: '订单消费出库', type: 'order-out' },
|
},
|
||||||
{ label: '损耗出库', type: 'damage-out' },
|
{
|
||||||
|
label: '手动出库',
|
||||||
|
type: 'manual-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '盘盈入库',
|
||||||
|
type: 'win-in'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '盘亏出库',
|
||||||
|
type: 'loss-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '订单退款入库',
|
||||||
|
type: 'other-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '订单消费出库',
|
||||||
|
type: 'order-out'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '损耗出库',
|
||||||
|
type: 'damage-out'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
refundType: [
|
refundType: [{
|
||||||
{ label: '现金退款', type: 'cash' },
|
label: '现金退款',
|
||||||
{ label: '原路退回', type: 'payBack' },
|
type: 'cash'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '原路退回',
|
||||||
|
type: 'payBack'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
getDiceName(val,key){
|
getDiceName(val, key) {
|
||||||
let item = this[key].find(v => v.type == val)
|
let item = this[key].find(v => v.type == val)
|
||||||
return item ? item.label : ''
|
return item ? item.label : ''
|
||||||
}
|
}
|
||||||
|
|||||||
3
env/env.development.js
vendored
3
env/env.development.js
vendored
@@ -4,6 +4,5 @@ export default {
|
|||||||
'JEEPAY_BASE_URL_WSS': 'ws://192.168.1.31:2348' ,// sockets
|
'JEEPAY_BASE_URL_WSS': 'ws://192.168.1.31:2348' ,// sockets
|
||||||
// 'JEEPAY_BASE_URL': 'https://cashier.sxczgkj.com/', // 请求URL(生产环境)
|
// 'JEEPAY_BASE_URL': 'https://cashier.sxczgkj.com/', // 请求URL(生产环境)
|
||||||
// 'JEEPAY_BASE_URL_H5': 'https://cashier.sxczgkj.com/',
|
// 'JEEPAY_BASE_URL_H5': 'https://cashier.sxczgkj.com/',
|
||||||
// 'JEEPAY_BASE_URL_WSS': 'wss://czgeatws.sxczgkj.com/wss' // sockets
|
// 'JEEPAY_BASE_URL_WSS': 'wss://czgeatws.sxczgkj.com/wss' // sockets
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -166,18 +166,7 @@
|
|||||||
"enable" : true
|
"enable" : true
|
||||||
},
|
},
|
||||||
"devServer" : {
|
"devServer" : {
|
||||||
"disableHostCheck" : true,
|
"disableHostCheck" : true
|
||||||
"proxy" : {
|
|
||||||
"/api" : {
|
|
||||||
// 需要被代理的后台地址
|
|
||||||
"target" : "https://tapi.cashier.sxczgkj.cn",
|
|
||||||
"changeOrigin" : true,
|
|
||||||
"secure" : true,
|
|
||||||
"pathRewrite" : {
|
|
||||||
"/api" : ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"sdkConfigs" : {
|
"sdkConfigs" : {
|
||||||
"maps" : {
|
"maps" : {
|
||||||
|
|||||||
782
package-lock.json
generated
782
package-lock.json
generated
@@ -20,6 +20,70 @@
|
|||||||
"sass-loader": "^10.5.2"
|
"sass-loader": "^10.5.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
|
"version": "0.3.8",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz",
|
||||||
|
"integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/set-array": "^1.2.1",
|
||||||
|
"@jridgewell/sourcemap-codec": "^1.4.10",
|
||||||
|
"@jridgewell/trace-mapping": "^0.3.24"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/resolve-uri": {
|
||||||
|
"version": "3.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
|
||||||
|
"integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/set-array": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@jridgewell/set-array/-/set-array-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/source-map": {
|
||||||
|
"version": "0.3.6",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.6.tgz",
|
||||||
|
"integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/gen-mapping": "^0.3.5",
|
||||||
|
"@jridgewell/trace-mapping": "^0.3.25"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/sourcemap-codec": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
|
||||||
|
"integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@jridgewell/trace-mapping": {
|
||||||
|
"version": "0.3.25",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz",
|
||||||
|
"integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/resolve-uri": "^3.1.0",
|
||||||
|
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@nodelib/fs.scandir": {
|
"node_modules/@nodelib/fs.scandir": {
|
||||||
"version": "2.1.5",
|
"version": "2.1.5",
|
||||||
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||||
@@ -67,12 +131,239 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/eslint": {
|
||||||
|
"version": "9.6.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-9.6.1.tgz",
|
||||||
|
"integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/estree": "*",
|
||||||
|
"@types/json-schema": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/eslint-scope": {
|
||||||
|
"version": "3.7.7",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz",
|
||||||
|
"integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/eslint": "*",
|
||||||
|
"@types/estree": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/estree": {
|
||||||
|
"version": "1.0.7",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.7.tgz",
|
||||||
|
"integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/@types/json-schema": {
|
"node_modules/@types/json-schema": {
|
||||||
"version": "7.0.15",
|
"version": "7.0.15",
|
||||||
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz",
|
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "22.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@types/node/-/node-22.14.1.tgz",
|
||||||
|
"integrity": "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~6.21.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/ast": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/helper-numbers": "1.13.2",
|
||||||
|
"@webassemblyjs/helper-wasm-bytecode": "1.13.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/floating-point-hex-parser": {
|
||||||
|
"version": "1.13.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz",
|
||||||
|
"integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/helper-api-error": {
|
||||||
|
"version": "1.13.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz",
|
||||||
|
"integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/helper-buffer": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/helper-numbers": {
|
||||||
|
"version": "1.13.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz",
|
||||||
|
"integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/floating-point-hex-parser": "1.13.2",
|
||||||
|
"@webassemblyjs/helper-api-error": "1.13.2",
|
||||||
|
"@xtuc/long": "4.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/helper-wasm-bytecode": {
|
||||||
|
"version": "1.13.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz",
|
||||||
|
"integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/helper-wasm-section": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/ast": "1.14.1",
|
||||||
|
"@webassemblyjs/helper-buffer": "1.14.1",
|
||||||
|
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||||
|
"@webassemblyjs/wasm-gen": "1.14.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/ieee754": {
|
||||||
|
"version": "1.13.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz",
|
||||||
|
"integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@xtuc/ieee754": "^1.2.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/leb128": {
|
||||||
|
"version": "1.13.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.13.2.tgz",
|
||||||
|
"integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@xtuc/long": "4.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/utf8": {
|
||||||
|
"version": "1.13.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.13.2.tgz",
|
||||||
|
"integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/wasm-edit": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/ast": "1.14.1",
|
||||||
|
"@webassemblyjs/helper-buffer": "1.14.1",
|
||||||
|
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||||
|
"@webassemblyjs/helper-wasm-section": "1.14.1",
|
||||||
|
"@webassemblyjs/wasm-gen": "1.14.1",
|
||||||
|
"@webassemblyjs/wasm-opt": "1.14.1",
|
||||||
|
"@webassemblyjs/wasm-parser": "1.14.1",
|
||||||
|
"@webassemblyjs/wast-printer": "1.14.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/wasm-gen": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/ast": "1.14.1",
|
||||||
|
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||||
|
"@webassemblyjs/ieee754": "1.13.2",
|
||||||
|
"@webassemblyjs/leb128": "1.13.2",
|
||||||
|
"@webassemblyjs/utf8": "1.13.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/wasm-opt": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/ast": "1.14.1",
|
||||||
|
"@webassemblyjs/helper-buffer": "1.14.1",
|
||||||
|
"@webassemblyjs/wasm-gen": "1.14.1",
|
||||||
|
"@webassemblyjs/wasm-parser": "1.14.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/wasm-parser": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/ast": "1.14.1",
|
||||||
|
"@webassemblyjs/helper-api-error": "1.13.2",
|
||||||
|
"@webassemblyjs/helper-wasm-bytecode": "1.13.2",
|
||||||
|
"@webassemblyjs/ieee754": "1.13.2",
|
||||||
|
"@webassemblyjs/leb128": "1.13.2",
|
||||||
|
"@webassemblyjs/utf8": "1.13.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@webassemblyjs/wast-printer": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@webassemblyjs/ast": "1.14.1",
|
||||||
|
"@xtuc/long": "4.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@xtuc/ieee754": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/@xtuc/long": {
|
||||||
|
"version": "4.2.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.2.tgz",
|
||||||
|
"integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/acorn": {
|
||||||
|
"version": "8.14.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.1.tgz",
|
||||||
|
"integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"bin": {
|
||||||
|
"acorn": "bin/acorn"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ajv": {
|
"node_modules/ajv": {
|
||||||
"version": "8.16.0",
|
"version": "8.16.0",
|
||||||
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.16.0.tgz",
|
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.16.0.tgz",
|
||||||
@@ -183,6 +474,39 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/browserslist": {
|
||||||
|
"version": "4.24.4",
|
||||||
|
"resolved": "https://registry.npmmirror.com/browserslist/-/browserslist-4.24.4.tgz",
|
||||||
|
"integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/browserslist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tidelift",
|
||||||
|
"url": "https://tidelift.com/funding/github/npm/browserslist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/ai"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"caniuse-lite": "^1.0.30001688",
|
||||||
|
"electron-to-chromium": "^1.5.73",
|
||||||
|
"node-releases": "^2.0.19",
|
||||||
|
"update-browserslist-db": "^1.1.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"browserslist": "cli.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/buffer": {
|
"node_modules/buffer": {
|
||||||
"version": "5.7.1",
|
"version": "5.7.1",
|
||||||
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
|
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
|
||||||
@@ -206,6 +530,34 @@
|
|||||||
"ieee754": "^1.1.13"
|
"ieee754": "^1.1.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/buffer-from": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/caniuse-lite": {
|
||||||
|
"version": "1.0.30001715",
|
||||||
|
"resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001715.tgz",
|
||||||
|
"integrity": "sha512-7ptkFGMm2OAOgvZpwgA4yjQ5SQbrNVGdRjzH0pBdy1Fasvcr+KAeECmbCAECzTuDuoX0FCY8KzUxjf9+9kfZEw==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/browserslist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tidelift",
|
||||||
|
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/ai"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/chokidar": {
|
"node_modules/chokidar": {
|
||||||
"version": "3.6.0",
|
"version": "3.6.0",
|
||||||
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz",
|
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz",
|
||||||
@@ -242,6 +594,16 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/chrome-trace-event": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/clipboard": {
|
"node_modules/clipboard": {
|
||||||
"version": "2.0.11",
|
"version": "2.0.11",
|
||||||
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
|
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
|
||||||
@@ -252,6 +614,13 @@
|
|||||||
"tiny-emitter": "^2.0.0"
|
"tiny-emitter": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/commander": {
|
||||||
|
"version": "2.20.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
|
||||||
|
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/copy-webpack-plugin": {
|
"node_modules/copy-webpack-plugin": {
|
||||||
"version": "12.0.2",
|
"version": "12.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz",
|
||||||
@@ -286,6 +655,13 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
|
||||||
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
|
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
|
||||||
},
|
},
|
||||||
|
"node_modules/electron-to-chromium": {
|
||||||
|
"version": "1.5.141",
|
||||||
|
"resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.141.tgz",
|
||||||
|
"integrity": "sha512-qS+qH9oqVYc1ooubTiB9l904WVyM6qNYxtOEEGReoZXw3xlqeYdFr5GclNzbkAufWgwWLEPoDi3d9MoRwwIjGw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/emojis-list": {
|
"node_modules/emojis-list": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||||
@@ -295,6 +671,94 @@
|
|||||||
"node": ">= 4"
|
"node": ">= 4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/enhanced-resolve": {
|
||||||
|
"version": "5.18.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz",
|
||||||
|
"integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"graceful-fs": "^4.2.4",
|
||||||
|
"tapable": "^2.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.13.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/es-module-lexer": {
|
||||||
|
"version": "1.7.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.7.0.tgz",
|
||||||
|
"integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/escalade": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/eslint-scope": {
|
||||||
|
"version": "5.1.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz",
|
||||||
|
"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"esrecurse": "^4.3.0",
|
||||||
|
"estraverse": "^4.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/esrecurse": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"estraverse": "^5.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/esrecurse/node_modules/estraverse": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/estraverse": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/events": {
|
||||||
|
"version": "3.3.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz",
|
||||||
|
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.8.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fast-deep-equal": {
|
"node_modules/fast-deep-equal": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
"resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
@@ -382,6 +846,13 @@
|
|||||||
"node": ">=10.13.0"
|
"node": ">=10.13.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/glob-to-regexp": {
|
||||||
|
"version": "0.4.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
|
||||||
|
"integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/globby": {
|
"node_modules/globby": {
|
||||||
"version": "14.0.2",
|
"version": "14.0.2",
|
||||||
"resolved": "https://registry.npmmirror.com/globby/-/globby-14.0.2.tgz",
|
"resolved": "https://registry.npmmirror.com/globby/-/globby-14.0.2.tgz",
|
||||||
@@ -420,6 +891,23 @@
|
|||||||
"delegate": "^3.1.2"
|
"delegate": "^3.1.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/graceful-fs": {
|
||||||
|
"version": "4.2.11",
|
||||||
|
"resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz",
|
||||||
|
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
|
"node_modules/has-flag": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ieee754": {
|
"node_modules/ieee754": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
|
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
|
||||||
@@ -495,6 +983,21 @@
|
|||||||
"node": ">=0.12.0"
|
"node": ">=0.12.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/jest-worker": {
|
||||||
|
"version": "27.5.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/jest-worker/-/jest-worker-27.5.1.tgz",
|
||||||
|
"integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"merge-stream": "^2.0.0",
|
||||||
|
"supports-color": "^8.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.13.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/js-base64": {
|
"node_modules/js-base64": {
|
||||||
"version": "3.7.2",
|
"version": "3.7.2",
|
||||||
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz",
|
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz",
|
||||||
@@ -510,6 +1013,13 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz",
|
"resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz",
|
||||||
"integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A=="
|
"integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A=="
|
||||||
},
|
},
|
||||||
|
"node_modules/json-parse-even-better-errors": {
|
||||||
|
"version": "2.3.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
|
||||||
|
"integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/json-schema-traverse": {
|
"node_modules/json-schema-traverse": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||||
@@ -537,6 +1047,16 @@
|
|||||||
"node": ">= 8"
|
"node": ">= 8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/loader-runner": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.11.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/loader-utils": {
|
"node_modules/loader-utils": {
|
||||||
"version": "2.0.4",
|
"version": "2.0.4",
|
||||||
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
|
"resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz",
|
||||||
@@ -556,6 +1076,13 @@
|
|||||||
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
||||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||||
},
|
},
|
||||||
|
"node_modules/merge-stream": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/merge-stream/-/merge-stream-2.0.0.tgz",
|
||||||
|
"integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/merge2": {
|
"node_modules/merge2": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",
|
"resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",
|
||||||
@@ -578,12 +1105,42 @@
|
|||||||
"node": ">=8.6"
|
"node": ">=8.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mime-db": {
|
||||||
|
"version": "1.52.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
|
||||||
|
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/mime-types": {
|
||||||
|
"version": "2.1.35",
|
||||||
|
"resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
|
||||||
|
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"mime-db": "1.52.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.6"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/neo-async": {
|
"node_modules/neo-async": {
|
||||||
"version": "2.6.2",
|
"version": "2.6.2",
|
||||||
"resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz",
|
"resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz",
|
||||||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
|
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/node-releases": {
|
||||||
|
"version": "2.0.19",
|
||||||
|
"resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz",
|
||||||
|
"integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/normalize-path": {
|
"node_modules/normalize-path": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
|
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||||
@@ -605,6 +1162,13 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/picocolors": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/picomatch": {
|
"node_modules/picomatch": {
|
||||||
"version": "2.3.1",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
|
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
|
||||||
@@ -833,9 +1397,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/schema-utils": {
|
"node_modules/schema-utils": {
|
||||||
"version": "4.2.0",
|
"version": "4.3.2",
|
||||||
"resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.2.0.tgz",
|
"resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.3.2.tgz",
|
||||||
"integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
|
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/json-schema": "^7.0.9",
|
"@types/json-schema": "^7.0.9",
|
||||||
@@ -844,7 +1408,7 @@
|
|||||||
"ajv-keywords": "^5.1.0"
|
"ajv-keywords": "^5.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 12.13.0"
|
"node": ">= 10.13.0"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
@@ -889,6 +1453,16 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/source-map-js": {
|
"node_modules/source-map-js": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
|
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||||
@@ -898,6 +1472,97 @@
|
|||||||
"node": ">=0.10.0"
|
"node": ">=0.10.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/source-map-support": {
|
||||||
|
"version": "0.5.21",
|
||||||
|
"resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz",
|
||||||
|
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"buffer-from": "^1.0.0",
|
||||||
|
"source-map": "^0.6.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/supports-color": {
|
||||||
|
"version": "8.1.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-8.1.1.tgz",
|
||||||
|
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/tapable": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz",
|
||||||
|
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/terser": {
|
||||||
|
"version": "5.39.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/terser/-/terser-5.39.0.tgz",
|
||||||
|
"integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/source-map": "^0.3.3",
|
||||||
|
"acorn": "^8.8.2",
|
||||||
|
"commander": "^2.20.0",
|
||||||
|
"source-map-support": "~0.5.20"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"terser": "bin/terser"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/terser-webpack-plugin": {
|
||||||
|
"version": "5.3.14",
|
||||||
|
"resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz",
|
||||||
|
"integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@jridgewell/trace-mapping": "^0.3.25",
|
||||||
|
"jest-worker": "^27.4.5",
|
||||||
|
"schema-utils": "^4.3.0",
|
||||||
|
"serialize-javascript": "^6.0.2",
|
||||||
|
"terser": "^5.31.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 10.13.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/webpack"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"webpack": "^5.1.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@swc/core": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"esbuild": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"uglify-js": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/tiny-emitter": {
|
"node_modules/tiny-emitter": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||||
@@ -920,6 +1585,13 @@
|
|||||||
"node": ">=8.0"
|
"node": ">=8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "6.21.0",
|
||||||
|
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz",
|
||||||
|
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true
|
||||||
|
},
|
||||||
"node_modules/unicorn-magic": {
|
"node_modules/unicorn-magic": {
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmmirror.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
|
"resolved": "https://registry.npmmirror.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
|
||||||
@@ -932,6 +1604,37 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/update-browserslist-db": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz",
|
||||||
|
"integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/browserslist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tidelift",
|
||||||
|
"url": "https://tidelift.com/funding/github/npm/browserslist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/ai"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"escalade": "^3.2.0",
|
||||||
|
"picocolors": "^1.1.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"update-browserslist-db": "cli.js"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"browserslist": ">= 4.21.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/uri-js": {
|
"node_modules/uri-js": {
|
||||||
"version": "4.4.1",
|
"version": "4.4.1",
|
||||||
"resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz",
|
"resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz",
|
||||||
@@ -952,6 +1655,77 @@
|
|||||||
"engines": {
|
"engines": {
|
||||||
"HBuilderX": "^3.1.0"
|
"HBuilderX": "^3.1.0"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/watchpack": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.2.tgz",
|
||||||
|
"integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"glob-to-regexp": "^0.4.1",
|
||||||
|
"graceful-fs": "^4.1.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.13.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/webpack": {
|
||||||
|
"version": "5.99.6",
|
||||||
|
"resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.99.6.tgz",
|
||||||
|
"integrity": "sha512-TJOLrJ6oeccsGWPl7ujCYuc0pIq2cNsuD6GZDma8i5o5Npvcco/z+NKvZSFsP0/x6SShVb0+X2JK/JHUjKY9dQ==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/eslint-scope": "^3.7.7",
|
||||||
|
"@types/estree": "^1.0.6",
|
||||||
|
"@webassemblyjs/ast": "^1.14.1",
|
||||||
|
"@webassemblyjs/wasm-edit": "^1.14.1",
|
||||||
|
"@webassemblyjs/wasm-parser": "^1.14.1",
|
||||||
|
"acorn": "^8.14.0",
|
||||||
|
"browserslist": "^4.24.0",
|
||||||
|
"chrome-trace-event": "^1.0.2",
|
||||||
|
"enhanced-resolve": "^5.17.1",
|
||||||
|
"es-module-lexer": "^1.2.1",
|
||||||
|
"eslint-scope": "5.1.1",
|
||||||
|
"events": "^3.2.0",
|
||||||
|
"glob-to-regexp": "^0.4.1",
|
||||||
|
"graceful-fs": "^4.2.11",
|
||||||
|
"json-parse-even-better-errors": "^2.3.1",
|
||||||
|
"loader-runner": "^4.2.0",
|
||||||
|
"mime-types": "^2.1.27",
|
||||||
|
"neo-async": "^2.6.2",
|
||||||
|
"schema-utils": "^4.3.0",
|
||||||
|
"tapable": "^2.1.1",
|
||||||
|
"terser-webpack-plugin": "^5.3.11",
|
||||||
|
"watchpack": "^2.4.1",
|
||||||
|
"webpack-sources": "^3.2.3"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"webpack": "bin/webpack.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.13.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/webpack"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"webpack-cli": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/webpack-sources": {
|
||||||
|
"version": "3.2.3",
|
||||||
|
"resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz",
|
||||||
|
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
|
||||||
|
"dev": true,
|
||||||
|
"peer": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.13.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,106 +7,111 @@
|
|||||||
<up--image :width="63" :height="63" :radius="3" :src="data.coverImg"></up--image>
|
<up--image :width="63" :height="63" :radius="3" :src="data.coverImg"></up--image>
|
||||||
</view>
|
</view>
|
||||||
<view class="w-full info u-p-l-30">
|
<view class="w-full info u-p-l-30">
|
||||||
<view class=" color-333 u-flex u-row-between">
|
<view class="color-333 u-flex u-row-between">
|
||||||
<view class="u-flex">
|
<view class="u-flex">
|
||||||
<text class="u-m-r-24">{{data.name}}</text>
|
<text class="u-m-r-24">{{ data.name }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-t-10 u-row-right">
|
<view class="u-flex u-m-t-10 u-row-right">
|
||||||
<view class="btn-default btn" @tap="del">删除</view>
|
<view class="btn-default btn" @tap="del">删除</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class=" u-flex u-p-l-30 u-p-r-30 u-p-t-16 u-p-b-16" @click="goodsClick">
|
<view class="goods-wrap">
|
||||||
<my-radio disabled @click.stop="goodsClick" :modelValue="data.checked"></my-radio>
|
<view class="goods-item u-flex" @click="goodsClick">
|
||||||
<view class="u-flex u-m-l-32">
|
<my-radio @click="goodsClick" :modelValue="data.checked"></my-radio>
|
||||||
<text class="">{{data.name}}</text>
|
<view class="u-flex u-m-l-10">
|
||||||
|
<text class="">{{ data.name }}</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const emits = defineEmits(['goodsClick', 'del'])
|
const emits = defineEmits(['goodsClick', 'del']);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
isBind: {
|
isBind: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
index: {
|
index: {
|
||||||
type: Number
|
type: Number
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {
|
return {
|
||||||
checked:false,
|
checked: false
|
||||||
}
|
};
|
||||||
}
|
|
||||||
},
|
|
||||||
showDetail: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
showDetail: {
|
||||||
function goodsClick(){
|
type: Boolean,
|
||||||
emits('goodsClick',props.index)
|
default: false
|
||||||
}
|
|
||||||
|
|
||||||
function del() {
|
|
||||||
emits('del', props.index)
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function goodsClick() {
|
||||||
|
emits('goodsClick', props.index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function del() {
|
||||||
|
emits('del', props.index);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$imgSize: 126rpx;
|
$imgSize: 126rpx;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
padding: 6rpx 28rpx;
|
padding: 6rpx 28rpx;
|
||||||
border-radius: 100rpx;
|
border-radius: 100rpx;
|
||||||
border: 2rpx solid transparent;
|
border: 2rpx solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-default {
|
.btn-default {
|
||||||
border-color: #999;
|
border-color: #999;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img {
|
.img {
|
||||||
width: $imgSize;
|
width: $imgSize;
|
||||||
height: $imgSize;
|
height: $imgSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods {
|
.goods {
|
||||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 32rpx 28rpx 32rpx 28rpx;
|
padding: 32rpx 28rpx 32rpx 28rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.skus {
|
.skus {
|
||||||
background: #F9F9F9;
|
background: #f9f9f9;
|
||||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
|
|
||||||
.sku {
|
.sku {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
padding: 6rpx 40rpx;
|
padding: 6rpx 40rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skds {
|
.skds {
|
||||||
gap: 10rpx 50rpx;
|
gap: 10rpx 50rpx;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
.goods-wrap {
|
||||||
|
padding: 0 20upx;
|
||||||
|
.goods-item {
|
||||||
|
padding: 20upx 0;
|
||||||
|
border-bottom: 1px solid #ececec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="safe-page min-page">
|
<view class="safe-page min-page">
|
||||||
<up-sticky>
|
<up-sticky>
|
||||||
<view class="bg-fff u-p-l-30 u-p-b-24">
|
<view class="bg-fff u-p-l-30 u-p-b-24">
|
||||||
|
|
||||||
<view class="input-wrapper">
|
<view class="input-wrapper">
|
||||||
<view class="input-main">
|
<view class="input-main">
|
||||||
<view class="u-flex u-p-r-30 u-font-28" @click="onCategoryShowChange(true)">
|
<view class="u-flex u-p-r-30 u-font-28" @click="onCategoryShowChange(true)">
|
||||||
<text class="u-m-r-10 u-line-1"
|
<text class="u-m-r-10 u-line-1" style="max-width: 100rpx">{{ pageData.categoryName || '全部' }}</text>
|
||||||
style="max-width: 100rpx;">{{pageData.categoryName||'全部' }}</text>
|
|
||||||
<up-icon name="arrow-down" size="16"></up-icon>
|
<up-icon name="arrow-down" size="16"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput clearable class='jeepay-search' :inputBorder="false"
|
<uni-easyinput
|
||||||
:placeholder="pageData.search.placeholder" v-model="pageData.query.name"
|
clearable
|
||||||
|
class="jeepay-search"
|
||||||
|
:inputBorder="false"
|
||||||
|
:placeholder="pageData.search.placeholder"
|
||||||
|
v-model="pageData.query.name"
|
||||||
@clear="searchFunc"
|
@clear="searchFunc"
|
||||||
@confirm="searchFunc">
|
@confirm="searchFunc"
|
||||||
|
>
|
||||||
<template #prefixIcon>
|
<template #prefixIcon>
|
||||||
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
||||||
</template>
|
</template>
|
||||||
@@ -23,393 +26,390 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex states1 u-row-between u-font-28">
|
<view class="u-flex states1 u-row-between u-font-28">
|
||||||
<view class=" u-flex-1 item u-flex u-row-center tranistion u-text-center color-333"
|
<view
|
||||||
:class="{'active':pageData.stateCurrent==index}" @tap="statesTableClick(index)"
|
class="u-flex-1 item u-flex u-row-center tranistion u-text-center color-333"
|
||||||
v-for="(item,index) in statesTabsList" :key="index">
|
:class="{ active: pageData.stateCurrent == index }"
|
||||||
<view class="text">{{item}}</view>
|
@tap="statesTableClick(index)"
|
||||||
|
v-for="(item, index) in statesTabsList"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<view class="text">{{ item }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</up-sticky>
|
</up-sticky>
|
||||||
<template v-if="pageData.stateCurrent==0">
|
<template v-if="pageData.stateCurrent == 0">
|
||||||
<view class="goods-list u-p-30">
|
<view class="goods-list u-p-30">
|
||||||
<template v-if="pageData.bindGoodsList.length">
|
<template v-if="pageData.bindGoodsList.length">
|
||||||
<view class="u-m-b-32" v-for="(item,index) in pageData.bindGoodsList" :key="index">
|
<view class="u-m-b-32" v-for="(item, index) in pageData.bindGoodsList" :key="index">
|
||||||
<my-goods isBind :index="index" :data="item" @del="goodsDel"
|
<my-goods isBind :index="index" :data="item" @del="goodsDel" :showDetail="pageData.showGoodsDetail"></my-goods>
|
||||||
:showDetail="pageData.showGoodsDetail"></my-goods>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="pageData.hasAjax&&!pageData.bindGoodsList.length">
|
<template v-if="pageData.hasAjax && !pageData.bindGoodsList.length">
|
||||||
<my-img-empty :tips="isSearch?'未搜索到相关绑定商品':'暂无绑定商品' "></my-img-empty>
|
<my-img-empty :tips="isSearch ? '未搜索到相关绑定商品' : '暂无绑定商品'"></my-img-empty>
|
||||||
</template>
|
</template>
|
||||||
<view style="height: 100rpx;"></view>
|
<view style="height: 100rpx"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="goods-list u-p-30">
|
<view class="goods-list u-p-30">
|
||||||
<view class="bg-fff border-r-18 u-p-t-16 u-p-b-16 box-shadow">
|
<view class="bg-fff border-r-18 u-p-t-16 u-p-b-16 box-shadow">
|
||||||
<template v-if="pageData.goodsList.length">
|
<template v-if="pageData.goodsList.length">
|
||||||
<view class="" v-for="(item,index) in pageData.goodsList" :key="index">
|
<view class="" v-for="(item, index) in pageData.goodsList" :key="index">
|
||||||
<my-goods @goodsClick="goodsClick" :index="index" :data="item"
|
<my-goods @goodsClick="goodsClick" :index="index" :data="item" :showDetail="pageData.showGoodsDetail"></my-goods>
|
||||||
:showDetail="pageData.showGoodsDetail"></my-goods>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="pageData.hasAjax&&!pageData.goodsList.length">
|
<template v-if="pageData.hasAjax && !pageData.goodsList.length">
|
||||||
<my-img-empty tips="未找到相关商品"></my-img-empty>
|
<my-img-empty tips="未找到相关商品"></my-img-empty>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view class="fixed-b">
|
<view class="fixed-b">
|
||||||
<my-button shape="circle" @click="save">确定</my-button>
|
<my-button shape="circle" @click="save">确定</my-button>
|
||||||
</view>
|
</view>
|
||||||
<view style="height: 100rpx;"></view>
|
<view style="height: 100rpx"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 分类 -->
|
<!-- 分类 -->
|
||||||
<my-category v-model:isShow="pageData.categoryShow" @confirm="setCategory"></my-category>
|
<my-category v-model:isShow="pageData.categoryShow" @confirm="setCategory"></my-category>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
import { reactive, ref, watch } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
import myGoods from './components/goods.vue'
|
import myGoods from './components/goods.vue';
|
||||||
import myCategory from './components/category.vue'
|
import myCategory from './components/category.vue';
|
||||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||||
|
|
||||||
import { categoryPage } from '@/http/api/cateGory.js'
|
import { categoryPage } from '@/http/api/cateGory.js';
|
||||||
import { getProductPage,getProdGroupDetail,updateProdGroup } from '@/http/api/product.js'
|
import { getProductPage, getProdGroupDetail, updateProdGroup } from '@/http/api/product.js';
|
||||||
|
|
||||||
const pageData = reactive({
|
|
||||||
stateCurrent: 0,
|
|
||||||
search: {
|
|
||||||
value: '',
|
|
||||||
placeholder: '输入搜索的商品'
|
|
||||||
},
|
|
||||||
showGoodsDetail: false,
|
|
||||||
bindGoodsList: [],
|
|
||||||
goodsList: [],
|
|
||||||
query: {
|
|
||||||
page: 1,
|
|
||||||
size: 999,
|
|
||||||
categoryId: '',
|
|
||||||
name: '',
|
|
||||||
id: "",
|
|
||||||
},
|
|
||||||
category: '',
|
|
||||||
categoryList: [], //分类列表
|
|
||||||
categoryShow: false,
|
|
||||||
categoryName: '',
|
|
||||||
hasAjax: false
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let isSearch=ref(false)
|
|
||||||
const statesTabsList = ['已添加', '未添加']
|
|
||||||
const control = ref(null)
|
|
||||||
const model = ref(null)
|
|
||||||
const option = reactive({})
|
|
||||||
//分类
|
|
||||||
const category = ref(null)
|
|
||||||
onLoad((opt) => {
|
|
||||||
Object.assign(option, opt)
|
|
||||||
init()
|
|
||||||
})
|
|
||||||
onShow(() => {
|
|
||||||
|
|
||||||
})
|
|
||||||
watch(() => pageData.query.categoryId, (newval) => {
|
|
||||||
if(pageData.stateCurrent==1){
|
|
||||||
getGoodsList()
|
|
||||||
}else{
|
|
||||||
getGroupBindGoods()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(() => pageData.stateCurrent, (newval) => {
|
|
||||||
if (newval==1) {
|
|
||||||
getGoodsList()
|
|
||||||
} else {
|
|
||||||
getGroupBindGoods()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
async function init() {
|
|
||||||
await getGroupBindGoods()
|
|
||||||
getGoodsList()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 搜索
|
|
||||||
*/
|
|
||||||
async function searchFunc() {
|
|
||||||
isSearch.value=true
|
|
||||||
if (pageData.stateCurrent) {
|
|
||||||
getGoodsList()
|
|
||||||
} else {
|
|
||||||
const res = await getProdGroupDetail(option.id)
|
|
||||||
pageData.bindGoodsList = res.productList.filter(v=>{
|
|
||||||
return v.name.includes(pageData.query.name)&&(pageData.query.categoryId==''?true:v.categoryId==pageData.query.categoryId)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取商品列表
|
|
||||||
*/
|
|
||||||
function getGoodsList() {
|
|
||||||
getProductPage(pageData.query).then(res => {
|
|
||||||
pageData.hasAjax = true
|
|
||||||
let goodsList = res.records.map(v => {
|
|
||||||
return {
|
|
||||||
...v,
|
|
||||||
checked: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
pageData.goodsList = goodsList.filter(v => {
|
|
||||||
return !pageData.bindGoodsList.find(bindGoods => bindGoods.id == v.id)
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取分组详情
|
|
||||||
*/
|
|
||||||
async function getGroupBindGoods() {
|
|
||||||
let res = await getProdGroupDetail(option.id)
|
|
||||||
pageData.bindGoodsList = res.productList.filter(v=>{
|
|
||||||
return pageData.query.categoryId === '' ? true : (v.categoryId==pageData.query.categoryId)&&(v.name.includes(pageData.query.name))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 已添加/未添加切换
|
|
||||||
* @param {Object} index
|
|
||||||
*/
|
|
||||||
function statesTableClick(index) {
|
|
||||||
pageData.stateCurrent = index
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分类选择
|
|
||||||
* @param {Object} show
|
|
||||||
*/
|
|
||||||
function onCategoryShowChange(show) {
|
|
||||||
pageData.categoryShow = show
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分类选择确定
|
|
||||||
* @param {Object} category
|
|
||||||
*/
|
|
||||||
function setCategory(category) {
|
|
||||||
pageData.query.categoryId = category.id
|
|
||||||
pageData.categoryName = category.name
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定商品
|
|
||||||
*/
|
|
||||||
async function save() {
|
|
||||||
const res = await hasPermission('允许修改分组')
|
|
||||||
if (!res) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
await updateProdGroup({
|
|
||||||
...option,
|
|
||||||
productIds: [...pageData.bindGoodsList.map(v => v.id), ...pageData.goodsList.filter(v => v.checked)
|
|
||||||
.map(v => v.id)
|
|
||||||
]
|
|
||||||
})
|
|
||||||
pageData.stateCurrent = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
const pageData = reactive({
|
||||||
/**
|
stateCurrent: 0,
|
||||||
* 删除商品
|
search: {
|
||||||
* @param {Object} index
|
value: '',
|
||||||
*/
|
placeholder: '输入搜索的商品'
|
||||||
async function goodsDel(index) {
|
},
|
||||||
const res = await hasPermission('允许修改分组')
|
showGoodsDetail: false,
|
||||||
if (!res) {
|
bindGoodsList: [],
|
||||||
return
|
goodsList: [],
|
||||||
|
query: {
|
||||||
|
page: 1,
|
||||||
|
size: 999,
|
||||||
|
categoryId: '',
|
||||||
|
name: '',
|
||||||
|
id: ''
|
||||||
|
},
|
||||||
|
// 原始已绑定的上商品列表
|
||||||
|
bindOriginGoodsList: [],
|
||||||
|
category: '',
|
||||||
|
categoryList: [], //分类列表
|
||||||
|
categoryShow: false,
|
||||||
|
categoryName: '',
|
||||||
|
hasAjax: false
|
||||||
|
});
|
||||||
|
|
||||||
|
let isSearch = ref(false);
|
||||||
|
const statesTabsList = ['已添加', '未添加'];
|
||||||
|
const control = ref(null);
|
||||||
|
const model = ref(null);
|
||||||
|
const option = reactive({});
|
||||||
|
//分类
|
||||||
|
const category = ref(null);
|
||||||
|
onLoad((opt) => {
|
||||||
|
Object.assign(option, opt);
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
onShow(() => {});
|
||||||
|
watch(
|
||||||
|
() => pageData.query.categoryId,
|
||||||
|
(newval) => {
|
||||||
|
if (pageData.stateCurrent == 1) {
|
||||||
|
getGoodsList();
|
||||||
|
} else {
|
||||||
|
getGroupBindGoods();
|
||||||
}
|
}
|
||||||
const goods = pageData.bindGoodsList[index]
|
}
|
||||||
uni.showModal({
|
);
|
||||||
title: '提示',
|
|
||||||
content: '是否确认将' + goods.name + '从该分组中移除',
|
watch(
|
||||||
success: function(res) {
|
() => pageData.stateCurrent,
|
||||||
if (res.confirm) {
|
(newval) => {
|
||||||
pageData.bindGoodsList.splice(index, 1)
|
if (newval == 1) {
|
||||||
updateProdGroup({
|
getGoodsList();
|
||||||
...option,
|
} else {
|
||||||
productIds: pageData.bindGoodsList.map(v => v.id)
|
getGroupBindGoods();
|
||||||
})
|
}
|
||||||
} else if (res.cancel) {}
|
}
|
||||||
}
|
);
|
||||||
|
async function init() {
|
||||||
|
await getGroupBindGoods();
|
||||||
|
getGoodsList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索
|
||||||
|
*/
|
||||||
|
async function searchFunc() {
|
||||||
|
isSearch.value = true;
|
||||||
|
if (pageData.stateCurrent) {
|
||||||
|
getGoodsList();
|
||||||
|
} else {
|
||||||
|
const res = await getProdGroupDetail(option.id);
|
||||||
|
pageData.bindGoodsList = res.productList.filter((v) => {
|
||||||
|
return v.name.includes(pageData.query.name) && (pageData.query.categoryId == '' ? true : v.categoryId == pageData.query.categoryId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function goodsClick(e) {
|
/**
|
||||||
pageData.goodsList[e].checked = !pageData.goodsList[e].checked
|
* 获取商品列表
|
||||||
|
*/
|
||||||
|
function getGoodsList() {
|
||||||
|
getProductPage(pageData.query).then((res) => {
|
||||||
|
pageData.hasAjax = true;
|
||||||
|
let goodsList = res.records.map((v) => {
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
checked: false
|
||||||
|
};
|
||||||
|
});
|
||||||
|
pageData.goodsList = goodsList.filter((v) => {
|
||||||
|
return !pageData.bindOriginGoodsList.find((bindGoods) => bindGoods.id == v.id);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取分组详情
|
||||||
|
*/
|
||||||
|
async function getGroupBindGoods() {
|
||||||
|
let res = await getProdGroupDetail(option.id);
|
||||||
|
pageData.bindOriginGoodsList = res.productList;
|
||||||
|
pageData.bindGoodsList = res.productList.filter((v) => {
|
||||||
|
return pageData.query.categoryId === '' ? true : v.categoryId == pageData.query.categoryId && v.name.includes(pageData.query.name);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 已添加/未添加切换
|
||||||
|
* @param {Object} index
|
||||||
|
*/
|
||||||
|
function statesTableClick(index) {
|
||||||
|
pageData.stateCurrent = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类选择
|
||||||
|
* @param {Object} show
|
||||||
|
*/
|
||||||
|
function onCategoryShowChange(show) {
|
||||||
|
pageData.categoryShow = show;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类选择确定
|
||||||
|
* @param {Object} category
|
||||||
|
*/
|
||||||
|
function setCategory(category) {
|
||||||
|
pageData.query.categoryId = category.id;
|
||||||
|
pageData.categoryName = category.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定商品
|
||||||
|
*/
|
||||||
|
async function save() {
|
||||||
|
const res = await hasPermission('允许修改分组');
|
||||||
|
if (!res) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
await updateProdGroup({
|
||||||
|
...option,
|
||||||
|
productIds: [...pageData.bindOriginGoodsList.map((v) => v.id), ...pageData.goodsList.filter((v) => v.checked).map((v) => v.id)]
|
||||||
|
});
|
||||||
|
pageData.stateCurrent = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品
|
||||||
|
* @param {Object} index
|
||||||
|
*/
|
||||||
|
async function goodsDel(index) {
|
||||||
|
const res = await hasPermission('允许修改分组');
|
||||||
|
if (!res) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const goods = pageData.bindOriginGoodsList[index];
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否确认将' + goods.name + '从该分组中移除',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
pageData.bindGoodsList.splice(index, 1);
|
||||||
|
pageData.bindOriginGoodsList.splice(index, 1);
|
||||||
|
updateProdGroup({
|
||||||
|
...option,
|
||||||
|
productIds: pageData.bindOriginGoodsList.map((v) => v.id)
|
||||||
|
});
|
||||||
|
} else if (res.cancel) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function goodsClick(e) {
|
||||||
|
pageData.goodsList[e].checked = !pageData.goodsList[e].checked;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
page {
|
page {
|
||||||
background: #F9F9F9;
|
background: #f9f9f9;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.stock-btns {
|
.stock-btns {
|
||||||
padding: 0 100rpx;
|
padding: 0 100rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.safe-page {
|
||||||
|
background: #f9f9f9;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-guige {
|
||||||
|
width: 42rpx;
|
||||||
|
height: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-fff {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.myTabs {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 434rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 26rpx;
|
||||||
|
background-color: $J-bg-ff;
|
||||||
|
|
||||||
|
.input-main {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
gap: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.safe-page {
|
|
||||||
background: #F9F9F9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-guige {
|
|
||||||
width: 42rpx;
|
|
||||||
height: 42rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-fff {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.myTabs {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 434rpx;
|
|
||||||
height: 64rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-wrapper {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 26rpx;
|
height: 64rpx;
|
||||||
background-color: $J-bg-ff;
|
|
||||||
|
|
||||||
.input-main {
|
image {
|
||||||
|
padding: 22rpx;
|
||||||
|
width: 26rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
font-size: 27rpx;
|
||||||
align-items: center;
|
}
|
||||||
height: 64rpx;
|
|
||||||
|
|
||||||
image {
|
::v-deep uni-button {
|
||||||
padding: 22rpx;
|
font-size: 28rpx;
|
||||||
width: 26rpx;
|
color: $my-main-color;
|
||||||
height: 26rpx;
|
background: rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
::v-deep.uni-easyinput {
|
||||||
flex: 1;
|
.uni-easyinput__content {
|
||||||
font-size: 27rpx;
|
background-color: $J-bg-f5 !important;
|
||||||
}
|
border-radius: $J-b-r12;
|
||||||
|
|
||||||
::v-deep uni-button {
|
.uni-easyinput__content-input {
|
||||||
font-size: 28rpx;
|
padding-left: 0 !important;
|
||||||
color: $my-main-color;
|
|
||||||
background: rgba(255, 255, 255, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep.uni-easyinput {
|
.uni-input-input {
|
||||||
.uni-easyinput__content {
|
border-radius: $J-b-r12 !important;
|
||||||
background-color: $J-bg-f5 !important;
|
overflow: hidden !important;
|
||||||
border-radius: $J-b-r12;
|
|
||||||
|
|
||||||
.uni-easyinput__content-input {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
|
|
||||||
.uni-input-input {
|
|
||||||
border-radius: $J-b-r12 !important;
|
|
||||||
overflow: hidden !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.uni-input-placeholder {
|
.uni-input-placeholder {
|
||||||
font-size: 27rpx;
|
font-size: 27rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-icons {
|
.uni-icons {
|
||||||
color: rgba(230, 230, 230, 1) !important;
|
color: rgba(230, 230, 230, 1) !important;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.input-icon {
|
.input-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-button {
|
.search-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
background-color: transparent !important;
|
background-color: transparent !important;
|
||||||
color: transparent !important;
|
color: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.states1 {
|
.states1 {
|
||||||
margin-top: 24rpx;
|
margin-top: 24rpx;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
position: relative;
|
||||||
|
padding-top: 14rpx;
|
||||||
|
padding-bottom: 16rpx;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
left: 10rpx;
|
||||||
|
right: 10rpx;
|
||||||
|
bottom: 0;
|
||||||
|
height: 4rpx;
|
||||||
|
background: transparent;
|
||||||
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: $my-main-color;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
position: relative;
|
|
||||||
padding-top: 14rpx;
|
|
||||||
padding-bottom: 16rpx;
|
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
content: '';
|
background-color: $my-main-color;
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
transition: all .2s ease-in-out;
|
|
||||||
left: 10rpx;
|
|
||||||
right: 10rpx;
|
|
||||||
bottom: 0;
|
|
||||||
height: 4rpx;
|
|
||||||
background: transparent;
|
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
|
||||||
color: $my-main-color;
|
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
||||||
|
|
||||||
.text {
|
|
||||||
&::after {
|
|
||||||
background-color: $my-main-color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.fixed-b {
|
.fixed-b {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: calc(env(safe-area-inset-bottom) + 16rpx);
|
bottom: calc(env(safe-area-inset-bottom) + 16rpx);
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
bottom: 50rpx;
|
bottom: 50rpx;
|
||||||
/* #endif */
|
/* #endif */
|
||||||
left: 110rpx;
|
left: 110rpx;
|
||||||
right: 110rpx;
|
right: 110rpx;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class=" goods">
|
<view class="goods">
|
||||||
<view class="u-flex u-font-24 u-col-center u-row-between u-p-b-16 border-bottom">
|
<view class="u-flex u-font-24 u-col-center u-row-between u-p-b-16 border-bottom">
|
||||||
<view class="u-flex u-col-center">
|
<view class="u-flex u-col-center">
|
||||||
<view class="u-font-24">
|
<view class="u-font-24">
|
||||||
<text>排序</text>
|
<text>排序</text>
|
||||||
<text class="u-m-l-12">{{data.sort}}</text>
|
<text class="u-m-l-12">{{ data.sort }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-l-16 " @click="editSort">
|
<view class="u-flex u-m-l-16" @click="editSort">
|
||||||
<image src="/pageGoodsGroup/static/image/icon-edit.svg" class="icon-edit" mode=""></image>
|
<image src="/pageGoodsGroup/static/image/icon-edit.svg" class="icon-edit" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -15,20 +15,23 @@
|
|||||||
<up-switch :activeValue="1" :inactiveValue="0" v-model="data.status" @change="isShowChange" :size="18"></up-switch>
|
<up-switch :activeValue="1" :inactiveValue="0" v-model="data.status" @change="isShowChange" :size="18"></up-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-24 u-p-l-54 ">
|
<view class="u-m-t-24">
|
||||||
<view class="u-flex-1 u-flex u-col-top">
|
<view class="u-flex-1 u-flex u-col-top">
|
||||||
<view class="color-666 no-wrap">分组名</view>
|
<view class="color-666 no-wrap">分组名</view>
|
||||||
<view class="color-333 u-m-l-60">{{data.name}}</view>
|
<view class="color-333 u-m-l-60">{{ data.name }}</view>
|
||||||
<view class="u-flex u-m-l-16 " @click="editName">
|
<view class="u-flex u-m-l-16" @click="editName">
|
||||||
<image src="/pageGoodsGroup/static/image/icon-edit.svg" class="icon-edit" mode=""></image>
|
<image src="/pageGoodsGroup/static/image/icon-edit.svg" class="icon-edit" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-t-24">
|
<view class="u-flex u-m-t-24">
|
||||||
<view class="color-666">售卖时间</view>
|
<view class="color-666">售卖时间</view>
|
||||||
<view class="color-main u-m-l-32" v-if="data.saleStartTime&&data.saleEndTime">
|
<view class="color-main u-m-l-32" v-if="data.saleStartTime && data.saleEndTime">
|
||||||
<text>{{data.saleStartTime}}</text>
|
<text>{{ data.saleStartTime }}</text>
|
||||||
<text>-</text>
|
<text> - </text>
|
||||||
<text>{{data.saleEndTime}}</text>
|
<text>{{ data.saleEndTime }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="color-main u-m-l-32" v-else>
|
||||||
|
<text>00:00:00 - 23:59:59</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -37,176 +40,169 @@
|
|||||||
<view class="btn-default btn" @click="del">删除</view>
|
<view class="btn-default btn" @click="del">删除</view>
|
||||||
<view class="btn-primary btn u-m-l-38" @click="toEdit">编辑</view>
|
<view class="btn-primary btn u-m-l-38" @click="toEdit">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, watchEffect } from 'vue';
|
import { computed, ref, watchEffect } from 'vue';
|
||||||
import mySwitch from '@/components/my-components/my-switch.vue'
|
import mySwitch from '@/components/my-components/my-switch.vue';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
|
|
||||||
|
const emits = defineEmits(['changeClick', 'edit', 'editName', 'editSort', 'del', 'isShowChange']);
|
||||||
|
|
||||||
const emits = defineEmits(['changeClick','edit', 'editName','editSort', 'del', 'isShowChange'])
|
const props = defineProps({
|
||||||
|
index: {
|
||||||
const props = defineProps({
|
type: Number
|
||||||
index: {
|
},
|
||||||
type: Number
|
data: {
|
||||||
},
|
type: Object,
|
||||||
data: {
|
default: () => {
|
||||||
type: Object,
|
return {
|
||||||
default: () => {
|
status: true
|
||||||
return {
|
};
|
||||||
status:true
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
function isShowChange() {
|
|
||||||
emits('isShowChange', {
|
|
||||||
...props.data,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
let isSellNone = ref(true)
|
function isShowChange() {
|
||||||
isSellNone.value = props.isSellNone
|
emits('isShowChange', {
|
||||||
|
...props.data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function isSellNoneChange() {
|
let isSellNone = ref(true);
|
||||||
console.log(isSellNone.value);
|
isSellNone.value = props.isSellNone;
|
||||||
console.log('isSellNoneChange');
|
|
||||||
}
|
|
||||||
|
|
||||||
let checked = ref(false)
|
function isSellNoneChange() {
|
||||||
|
console.log(isSellNone.value);
|
||||||
|
console.log('isSellNoneChange');
|
||||||
|
}
|
||||||
|
|
||||||
|
let checked = ref(false);
|
||||||
|
|
||||||
function changeClick() {
|
function changeClick() {
|
||||||
emits('changeClick', props.index)
|
emits('changeClick', props.index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function del() {
|
||||||
function del() {
|
emits('del', props.index);
|
||||||
emits('del', props.index)
|
}
|
||||||
}
|
function editName() {
|
||||||
function editName() {
|
emits('editName', props.index);
|
||||||
emits('editName', props.index)
|
}
|
||||||
}
|
//携带参数type edit跳转到商品添加页面,编辑与添加同一页面,根据type值来判断
|
||||||
//携带参数type edit跳转到商品添加页面,编辑与添加同一页面,根据type值来判断
|
function editSort() {
|
||||||
function editSort() {
|
emits('editSort', props.index);
|
||||||
emits('editSort', props.index)
|
}
|
||||||
}
|
function toEdit() {
|
||||||
function toEdit() {
|
emits('edit', props.index);
|
||||||
emits('edit', props.index)
|
}
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$imgSize: 126rpx;
|
$imgSize: 126rpx;
|
||||||
$price-color: #F02C45;
|
$price-color: #f02c45;
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
padding: 6rpx 28rpx;
|
padding: 6rpx 28rpx;
|
||||||
border-radius: 100rpx;
|
border-radius: 100rpx;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
border-color: $my-main-color;
|
border-color: $my-main-color;
|
||||||
color: $my-main-color;
|
color: $my-main-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-default {
|
.btn-default {
|
||||||
border-color: #999;
|
border-color: #999;
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
color: $price-color;
|
color: $price-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.h-100 {
|
.h-100 {
|
||||||
height: $imgSize;
|
height: $imgSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img {
|
.img {
|
||||||
width: $imgSize;
|
width: $imgSize;
|
||||||
height: $imgSize;
|
height: $imgSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-arrow-right {
|
.icon-arrow-right {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock {
|
.stock {
|
||||||
padding-right: 46rpx;
|
padding-right: 46rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.icon-edit {
|
.icon-edit {
|
||||||
width: 24rpx;
|
width: 24rpx;
|
||||||
height: 24rpx;
|
height: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stock::after {
|
.stock::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10rpx;
|
right: 10rpx;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
display: block;
|
display: block;
|
||||||
width: 16rpx;
|
width: 16rpx;
|
||||||
border: 2rpx solid #333333;
|
border: 2rpx solid #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.goods {
|
.goods {
|
||||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 32rpx 28rpx 32rpx 28rpx;
|
padding: 32rpx 28rpx 32rpx 28rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.skus {
|
.skus {
|
||||||
background: #F9F9F9;
|
background: #f9f9f9;
|
||||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||||
padding: 28rpx 42rpx;
|
padding: 28rpx 42rpx;
|
||||||
|
|
||||||
.sku {
|
.sku {
|
||||||
color: #000;
|
color: #000;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
padding: 6rpx 40rpx;
|
padding: 6rpx 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skds {
|
||||||
|
gap: 10rpx 50rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skd {
|
||||||
|
padding: 14rpx 40rpx;
|
||||||
|
background: #f0f2f5;
|
||||||
|
border-radius: 4rpx;
|
||||||
|
position: relative;
|
||||||
|
color: #666;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
font-size: 12rpx;
|
||||||
|
right: 0;
|
||||||
|
padding: 2rpx 4rpx;
|
||||||
|
border-radius: 0rpx 4rpx 4rpx 4rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skds {
|
.tag-primary {
|
||||||
gap: 10rpx 50rpx;
|
background-color: $my-main-color;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.skd {
|
|
||||||
padding: 14rpx 40rpx;
|
|
||||||
background: #F0F2F5;
|
|
||||||
border-radius: 4rpx;
|
|
||||||
position: relative;
|
|
||||||
color: #666;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
font-size: 12rpx;
|
|
||||||
right: 0;
|
|
||||||
padding: 2rpx 4rpx;
|
|
||||||
border-radius: 0rpx 4rpx 4rpx 4rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tag-primary {
|
|
||||||
background-color: $my-main-color;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,23 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="safe-page min-page">
|
<view class="safe-page min-page">
|
||||||
<view class="goods-list u-p-30">
|
<view class="goods-list u-p-30">
|
||||||
<view class="u-m-b-32" v-for="(item,index) in pageData.list" :key="index">
|
<view class="u-m-b-32" v-for="(item, index) in pageData.list" :key="index">
|
||||||
<my-category
|
<my-category
|
||||||
@del="groupDel"
|
@del="groupDel"
|
||||||
@editName="popupShow($event,'name',true)"
|
@editName="popupShow($event, 'name', true)"
|
||||||
@editSort="popupShow($event,'sort',true)"
|
@editSort="popupShow($event, 'sort', true)"
|
||||||
@edit="actionsShow"
|
@edit="actionsShow"
|
||||||
@isShowChange="isSHowChange" :index="index" :data="item"
|
@isShowChange="isSHowChange"
|
||||||
:showDetail="pageData.showGoodsDetail"></my-category>
|
:index="index"
|
||||||
|
:data="item"
|
||||||
|
:showDetail="pageData.showGoodsDetail"
|
||||||
|
></my-category>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-44" v-if="pageData.list.length>0">
|
<view class="u-m-t-44" v-if="pageData.list.length > 0">
|
||||||
<my-pagination :page="pageData.query.page" :size="pageData.query.size" :totalElements="pageData.totalElements"
|
<my-pagination :page="pageData.query.page" :size="pageData.query.size" :totalElements="pageData.totalElements" @change="pageChange"></my-pagination>
|
||||||
@change="pageChange"></my-pagination>
|
<view style="height: 200rpx"></view>
|
||||||
<view style="height: 200rpx;"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<view class="fixed-b">
|
<view class="fixed-b">
|
||||||
<my-button :height="80" shape="circle" font-weight="700" @tap="toAddGroup">新建分组</my-button>
|
<my-button :height="80" shape="circle" font-weight="700" @tap="toAddGroup">新建分组</my-button>
|
||||||
</view>
|
</view>
|
||||||
@@ -27,40 +28,41 @@
|
|||||||
<edit-name @save="updataGroup" :item="popup.selData" v-model:show="popup.name.show"></edit-name>
|
<edit-name @save="updataGroup" :item="popup.selData" v-model:show="popup.name.show"></edit-name>
|
||||||
<edit-time @save="updataGroup" :item="popup.selData" v-model:show="popup.time.show"></edit-time>
|
<edit-time @save="updataGroup" :item="popup.selData" v-model:show="popup.time.show"></edit-time>
|
||||||
|
|
||||||
<up-action-sheet :round="10" @select="actionSelect" @close="actionsHide" cancelText="取消" :actions="actions.list"
|
<up-action-sheet :round="10" @select="actionSelect" @close="actionsHide" cancelText="取消" :actions="actions.list" :show="actions.show"></up-action-sheet>
|
||||||
:show="actions.show"></up-action-sheet>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { onShow } from '@dcloudio/uni-app'
|
import { onShow } from '@dcloudio/uni-app';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import myCategory from './components/category.vue'
|
import myCategory from './components/category.vue';
|
||||||
import editSort from './components/edit-sort.vue';
|
import editSort from './components/edit-sort.vue';
|
||||||
import editName from './components/edit-name.vue';
|
import editName from './components/edit-name.vue';
|
||||||
import editTime from './components/edit-time.vue';
|
import editTime from './components/edit-time.vue';
|
||||||
import { getProdGroupPage, addProdGroup, updateProdGroup, delProdGroup,editProdGroup } from '@/http/api/product.js'
|
import { getProdGroupPage, addProdGroup, updateProdGroup, delProdGroup, editProdGroup } from '@/http/api/product.js';
|
||||||
|
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
showGoodsDetail: false,
|
showGoodsDetail: false,
|
||||||
query: {
|
query: {
|
||||||
page: 1,
|
page: 1,
|
||||||
size: 10,
|
size: 10
|
||||||
},
|
},
|
||||||
totalElements: 0,
|
totalElements: 0,
|
||||||
list: [],
|
list: [],
|
||||||
selCategory: ''
|
selCategory: ''
|
||||||
})
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑列表
|
* 编辑列表
|
||||||
*/
|
*/
|
||||||
const actions = reactive({
|
const actions = reactive({
|
||||||
list: [{
|
list: [
|
||||||
|
{
|
||||||
name: '排序',
|
name: '排序',
|
||||||
color: '#333',
|
color: '#333',
|
||||||
fontSize: '16'
|
fontSize: '16'
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
name: '管理商品',
|
name: '管理商品',
|
||||||
color: '#333',
|
color: '#333',
|
||||||
fontSize: '16'
|
fontSize: '16'
|
||||||
@@ -70,311 +72,310 @@
|
|||||||
color: '#333',
|
color: '#333',
|
||||||
fontSize: '16'
|
fontSize: '16'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
show: false,
|
show: false
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑数据
|
|
||||||
*/
|
|
||||||
const popup = reactive({
|
|
||||||
selIndex: -1,
|
|
||||||
selData: {
|
|
||||||
sort: ''
|
|
||||||
},
|
|
||||||
sort: {
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
name:{
|
|
||||||
show: false
|
|
||||||
},
|
|
||||||
time:{
|
|
||||||
show: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
onShow(() => {
|
|
||||||
getList()
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取分组数据
|
|
||||||
*/
|
|
||||||
async function getList() {
|
|
||||||
const res = await getProdGroupPage(pageData.query)
|
|
||||||
pageData.list = res.records
|
|
||||||
pageData.totalElements = res.totalRow
|
|
||||||
if(res.records.length <= 0&&res.totalPage>1) {
|
|
||||||
pageData.query.page = res.totalPage
|
|
||||||
getList()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑列表显示
|
|
||||||
* @param {Object} e
|
|
||||||
*/
|
|
||||||
function actionsShow(e) {
|
|
||||||
popup.selData = pageData.list[e]
|
|
||||||
popup.selIndex = e
|
|
||||||
actions.show = true
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑列表隐藏
|
|
||||||
*/
|
|
||||||
function actionsHide() {
|
|
||||||
actions.show = false
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑列表选择
|
|
||||||
* @param {Object} e
|
|
||||||
*/
|
|
||||||
function actionSelect(e) {
|
|
||||||
if (e.name == '排序') {
|
|
||||||
return popupShow(popup.selIndex, 'sort', true)
|
|
||||||
}
|
|
||||||
if (e.name == '管理商品') {
|
|
||||||
const {id,status,name,sort}=popup.selData
|
|
||||||
return go.to('PAGES_GOODS_GROUP_EDIT_GOODS', {
|
|
||||||
id,status,name,sort
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (e.name == '售卖时间') {
|
|
||||||
return popupShow(popup.selIndex, 'time', true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 编辑打开
|
|
||||||
* @param {Object} e
|
|
||||||
* @param {Object} key
|
|
||||||
* @param {Object} show
|
|
||||||
*/
|
|
||||||
function popupShow(e, key, show) {
|
|
||||||
popup[key].show = show
|
|
||||||
popup.selIndex = e
|
|
||||||
popup.selData = pageData.list[e]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑确认
|
* 编辑数据
|
||||||
* @param {Object} e
|
*/
|
||||||
*/
|
const popup = reactive({
|
||||||
async function updataGroup(e) {
|
selIndex: -1,
|
||||||
console.log(e)
|
selData: {
|
||||||
const res = await editProdGroup(e)
|
sort: ''
|
||||||
popup.sort.show = false;
|
},
|
||||||
popup.name.show = false;
|
sort: {
|
||||||
popup.time.show = false;
|
show: false
|
||||||
pageData.list[popup.selIndex] = e
|
},
|
||||||
uni.$utils.showToast('更新成功')
|
name: {
|
||||||
getList()
|
show: false
|
||||||
|
},
|
||||||
|
time: {
|
||||||
|
show: false
|
||||||
}
|
}
|
||||||
|
});
|
||||||
/**
|
|
||||||
* 状态修改
|
|
||||||
* @param {Object} data
|
|
||||||
*/
|
|
||||||
async function isSHowChange(data) {
|
|
||||||
const res = await editProdGroup({
|
|
||||||
...data
|
|
||||||
})
|
|
||||||
uni.$utils.showToast('更新成功')
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const goodsSortModel = ref(null)
|
onShow(() => {
|
||||||
const goodsTypeModel = ref(null)
|
getList();
|
||||||
let sort = ref(0)
|
});
|
||||||
const goodsTypeModelData = reactive({
|
|
||||||
selCategory: '',
|
|
||||||
title: '',
|
|
||||||
index: null,
|
|
||||||
useTypes: [{
|
|
||||||
name: '堂食',
|
|
||||||
isOpen: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '自取',
|
|
||||||
isOpen: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '外卖',
|
|
||||||
isOpen: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '快递',
|
|
||||||
isOpen: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增分组
|
|
||||||
*/
|
|
||||||
function toAddGroup() {
|
|
||||||
go.to('PAGES_GOODS_GROUP_EDIT', {
|
|
||||||
type: 'add'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除分组
|
* 获取分组数据
|
||||||
* @param {Object} index
|
*/
|
||||||
*/
|
async function getList() {
|
||||||
function groupDel(index) {
|
const res = await getProdGroupPage(pageData.query);
|
||||||
uni.showModal({
|
pageData.list = res.records;
|
||||||
title: '提示',
|
pageData.totalElements = res.totalRow;
|
||||||
content: '请确保此分组下没有任何商品确认删除?',
|
if (res.records.length <= 0 && res.totalPage > 1) {
|
||||||
success: res => {
|
pageData.query.page = res.totalPage;
|
||||||
if (res.confirm) {
|
getList();
|
||||||
delProdGroup(pageData.list[index].id).then(res => {
|
}
|
||||||
uni.$utils.showToast('删除成功')
|
}
|
||||||
setTimeout(()=>{
|
|
||||||
getList()
|
/**
|
||||||
},1500)
|
* 编辑列表显示
|
||||||
})
|
* @param {Object} e
|
||||||
}
|
*/
|
||||||
},
|
function actionsShow(e) {
|
||||||
fail: () => {},
|
popup.selData = pageData.list[e];
|
||||||
complete: () => {}
|
popup.selIndex = e;
|
||||||
|
actions.show = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑列表隐藏
|
||||||
|
*/
|
||||||
|
function actionsHide() {
|
||||||
|
actions.show = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑列表选择
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
function actionSelect(e) {
|
||||||
|
if (e.name == '排序') {
|
||||||
|
return popupShow(popup.selIndex, 'sort', true);
|
||||||
|
}
|
||||||
|
if (e.name == '管理商品') {
|
||||||
|
const { id, status, name, sort } = popup.selData;
|
||||||
|
return go.to('PAGES_GOODS_GROUP_EDIT_GOODS', {
|
||||||
|
id,
|
||||||
|
status,
|
||||||
|
name,
|
||||||
|
sort
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (e.name == '售卖时间') {
|
||||||
|
return popupShow(popup.selIndex, 'time', true);
|
||||||
// 页数改变事件
|
|
||||||
function pageChange(page) {
|
|
||||||
pageData.query.page = page
|
|
||||||
getList()
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑打开
|
||||||
|
* @param {Object} e
|
||||||
|
* @param {Object} key
|
||||||
|
* @param {Object} show
|
||||||
|
*/
|
||||||
|
function popupShow(e, key, show) {
|
||||||
|
popup[key].show = show;
|
||||||
|
popup.selIndex = e;
|
||||||
|
popup.selData = pageData.list[e];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑确认
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
async function updataGroup(e) {
|
||||||
|
console.log(e);
|
||||||
|
const res = await editProdGroup(e);
|
||||||
|
popup.sort.show = false;
|
||||||
|
popup.name.show = false;
|
||||||
|
popup.time.show = false;
|
||||||
|
pageData.list[popup.selIndex] = e;
|
||||||
|
uni.$utils.showToast('更新成功');
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态修改
|
||||||
|
* @param {Object} data
|
||||||
|
*/
|
||||||
|
async function isSHowChange(data) {
|
||||||
|
const res = await editProdGroup({
|
||||||
|
...data
|
||||||
|
});
|
||||||
|
uni.$utils.showToast('更新成功');
|
||||||
|
}
|
||||||
|
|
||||||
|
const goodsSortModel = ref(null);
|
||||||
|
const goodsTypeModel = ref(null);
|
||||||
|
let sort = ref(0);
|
||||||
|
const goodsTypeModelData = reactive({
|
||||||
|
selCategory: '',
|
||||||
|
title: '',
|
||||||
|
index: null,
|
||||||
|
useTypes: [
|
||||||
|
{
|
||||||
|
name: '堂食',
|
||||||
|
isOpen: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '自取',
|
||||||
|
isOpen: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '外卖',
|
||||||
|
isOpen: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '快递',
|
||||||
|
isOpen: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增分组
|
||||||
|
*/
|
||||||
|
function toAddGroup() {
|
||||||
|
go.to('PAGES_GOODS_GROUP_EDIT', {
|
||||||
|
type: 'add'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除分组
|
||||||
|
* @param {Object} index
|
||||||
|
*/
|
||||||
|
function groupDel(index) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '请确保此分组下没有任何商品确认删除?',
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
delProdGroup(pageData.list[index].id).then((res) => {
|
||||||
|
uni.$utils.showToast('删除成功');
|
||||||
|
setTimeout(() => {
|
||||||
|
getList();
|
||||||
|
}, 1500);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail: () => {},
|
||||||
|
complete: () => {}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 页数改变事件
|
||||||
|
function pageChange(page) {
|
||||||
|
pageData.query.page = page;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
page {
|
page {
|
||||||
background: #F9F9F9;
|
background: #f1f1f1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.stock-btns {
|
.stock-btns {
|
||||||
padding: 0 100rpx;
|
padding: 0 100rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.safe-page {
|
||||||
|
background: #f1f1f1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-guige {
|
||||||
|
width: 42rpx;
|
||||||
|
height: 42rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-fff {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.myTabs {
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 434rpx;
|
||||||
|
height: 64rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 26rpx;
|
||||||
|
background-color: $J-bg-ff;
|
||||||
|
|
||||||
|
.input-main {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
|
||||||
gap: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.safe-page {
|
|
||||||
background: #F9F9F9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-guige {
|
|
||||||
width: 42rpx;
|
|
||||||
height: 42rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bg-fff {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.myTabs {
|
|
||||||
margin: 0 auto;
|
|
||||||
width: 434rpx;
|
|
||||||
height: 64rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-wrapper {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 26rpx;
|
height: 64rpx;
|
||||||
background-color: $J-bg-ff;
|
|
||||||
|
|
||||||
.input-main {
|
image {
|
||||||
|
padding: 22rpx;
|
||||||
|
width: 26rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
font-size: 27rpx;
|
||||||
align-items: center;
|
}
|
||||||
height: 64rpx;
|
|
||||||
|
|
||||||
image {
|
::v-deep uni-button {
|
||||||
padding: 22rpx;
|
font-size: 28rpx;
|
||||||
width: 26rpx;
|
color: $my-main-color;
|
||||||
height: 26rpx;
|
background: rgba(255, 255, 255, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
::v-deep.uni-easyinput {
|
||||||
flex: 1;
|
.uni-easyinput__content {
|
||||||
font-size: 27rpx;
|
background-color: $J-bg-f5 !important;
|
||||||
}
|
border-radius: $J-b-r12;
|
||||||
|
|
||||||
::v-deep uni-button {
|
.uni-easyinput__content-input {
|
||||||
font-size: 28rpx;
|
padding-left: 0 !important;
|
||||||
color: $my-main-color;
|
|
||||||
background: rgba(255, 255, 255, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
::v-deep.uni-easyinput {
|
.uni-input-input {
|
||||||
.uni-easyinput__content {
|
border-radius: $J-b-r12 !important;
|
||||||
background-color: $J-bg-f5 !important;
|
overflow: hidden !important;
|
||||||
border-radius: $J-b-r12;
|
|
||||||
|
|
||||||
.uni-easyinput__content-input {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
|
|
||||||
.uni-input-input {
|
|
||||||
border-radius: $J-b-r12 !important;
|
|
||||||
overflow: hidden !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.uni-input-placeholder {
|
.uni-input-placeholder {
|
||||||
font-size: 27rpx;
|
font-size: 27rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-icons {
|
.uni-icons {
|
||||||
color: rgba(230, 230, 230, 1) !important;
|
color: rgba(230, 230, 230, 1) !important;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.input-icon {
|
.input-icon {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-button {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.states1 {
|
||||||
|
margin-top: 78rpx;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #666;
|
||||||
|
margin-right: 70rpx;
|
||||||
|
background: #f4f4f4;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-button {
|
.item.active {
|
||||||
position: absolute;
|
background: #e6f0ff;
|
||||||
right: 0;
|
color: $my-main-color;
|
||||||
background-color: transparent !important;
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
color: transparent !important;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.states1 {
|
.fixed-b {
|
||||||
margin-top: 78rpx;
|
position: fixed;
|
||||||
|
left: 110rpx;
|
||||||
.item {
|
right: 110rpx;
|
||||||
font-size: 24rpx;
|
bottom: 110rpx;
|
||||||
color: #666;
|
}
|
||||||
margin-right: 70rpx;
|
</style>
|
||||||
background: #F4F4F4;
|
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item.active {
|
|
||||||
background: #E6F0FF;
|
|
||||||
color: $my-main-color;
|
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.fixed-b {
|
|
||||||
position: fixed;
|
|
||||||
left: 110rpx;
|
|
||||||
right: 110rpx;
|
|
||||||
bottom: 110rpx;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -1,194 +1,188 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="item color-fff border-r-12" :class="[computedClass]">
|
<view class="item color-fff border-r-12" :class="[computedClass]">
|
||||||
<view class="my-bg-main" :style="{'background-color':returnStutasColor(data.status)}">
|
<view class="my-bg-main" :style="{ 'background-color': returnStutasColor(data.status) }">
|
||||||
<view class="u-flex u-row-between">
|
<view class="u-flex u-row-between">
|
||||||
<view class="u-font-32">{{data.name}}</view>
|
<view class="u-font-32">{{ data.name }}</view>
|
||||||
<view class="u-flex" @tap.stop="more">
|
<view class="u-flex" @tap.stop="more">
|
||||||
<uni-icons type="more-filled" color="#fff" size="16"></uni-icons>
|
<uni-icons type="more-filled" color="#fff" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-t-10 u-row-between">
|
<view class="u-flex u-m-t-10 u-row-between">
|
||||||
<view>{{areaMap[data.areaId]||'' }}</view>
|
<view>{{ areaMap[data.areaId] || '' }}</view>
|
||||||
<view class="tag" :style="{color:returnStutasColor(data.status)}">
|
<view class="tag" :style="{ color: returnStutasColor(data.status) }">
|
||||||
{{returnStutasText(data.status)}}
|
{{ returnStutasText(data.status) }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-flex-col u-row-center u-col-center bg-fff bottom">
|
<view class="u-flex u-flex-col u-row-center u-col-center bg-fff bottom">
|
||||||
<template v-if="data.status!='using'">
|
<template v-if="data.status != 'using'">
|
||||||
<view class=" u-font-32" :style="{color:returnStutasColor(data.status)}">
|
<view class="u-font-32" :style="{ color: returnStutasColor(data.status) }">{{ returnStutasText(data.status) }}~</view>
|
||||||
{{returnStutasText(data.status)}}~
|
|
||||||
</view>
|
|
||||||
</template>
|
</template>
|
||||||
<view class=" w-full u-p-l-16 u-p-r-16 u-p-t-16 u-font-24">
|
<view class="w-full u-p-l-16 u-p-r-16 u-p-t-16 u-font-24">
|
||||||
<template v-if="data.status=='using'&& data.orderId">
|
<template v-if="data.status == 'using' && data.orderId">
|
||||||
<view class="color-666 u-text-left u-p-b-20 border-bottom">
|
<view class="color-666 u-text-left u-p-b-20 border-bottom">
|
||||||
<view class=""><text>已点</text><text class="u-m-l-20 color-333">{{data.productNum||0}}件</text>
|
<view class="">
|
||||||
|
<text>已点</text>
|
||||||
|
<text class="u-m-l-20 color-333">{{ data.productNum || 0 }}件</text>
|
||||||
|
</view>
|
||||||
|
<view class="u-m-t-10">
|
||||||
|
<text>金额</text>
|
||||||
|
<text class="u-m-l-20 color-333">{{ data.totalAmount || 0 }} 元</text>
|
||||||
|
</view>
|
||||||
|
<view class="u-m-t-10">
|
||||||
|
<text>待结</text>
|
||||||
|
<text class="u-m-l-20 color-333">{{ data.totalAmount || 0 }} 元</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-10"><text>金额</text><text class="u-m-l-20 color-333">{{data.totalAmount||0}}
|
|
||||||
元</text> </view>
|
|
||||||
<view class="u-m-t-10"><text>待结</text><text class="u-m-l-20 color-333">{{data.totalAmount||0}}
|
|
||||||
元</text> </view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between u-font-20 u-p-b-20 u-p-t-20">
|
<view class="u-flex u-row-between u-font-20 u-p-b-20 u-p-t-20">
|
||||||
<text class="color-333">开台时间</text>
|
<text class="color-333">开台时间</text>
|
||||||
<text class="color-666"> {{data.useTime}}</text>
|
<text class="color-666">{{ data.useTime }}</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="u-flex u-row-center u-m-t-16">
|
<view class="u-flex u-row-center u-m-t-16">
|
||||||
<template v-if="data.id">
|
<template v-if="data.id">
|
||||||
<template v-if="data.status =='unbind' ">
|
<template v-if="data.status == 'unbind'">
|
||||||
<my-button color="#333" :width="200" :height="56" type="default" @click="bind">
|
<my-button color="#333" :width="200" :height="56" type="default" @click="bind">绑定码牌</my-button>
|
||||||
绑定码牌
|
|
||||||
</my-button>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="data.status=='idle'||(data.status=='using'&&!data.orderId) ">
|
<template v-if="data.status == 'idle' || (data.status == 'using' && !data.orderId)">
|
||||||
<my-button color="#333" :width="150" :height="56" type="default" @click="diancan">
|
<my-button color="#333" :width="150" :height="56" type="default" @click="diancan">选择</my-button>
|
||||||
选择
|
|
||||||
</my-button>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="data.status=='cleaning' ">
|
<template v-if="data.status == 'cleaning'">
|
||||||
<my-button color="#333" :width="150" :height="56" type="default" @click="qingtai">
|
<my-button color="#333" :width="150" :height="56" type="default" @click="qingtai">清台</my-button>
|
||||||
清台
|
|
||||||
</my-button>
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<my-button v-else :width="150" :height="56" type="default" disabled>
|
<my-button v-else :width="150" :height="56" type="default" disabled>选择</my-button>
|
||||||
选择
|
|
||||||
</my-button>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import myButton from '@/components/my-components/my-button'
|
import myButton from '@/components/my-components/my-button';
|
||||||
import go from '@/commons/utils/go.js'
|
import go from '@/commons/utils/go.js';
|
||||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||||
import { shopTableClear } from '@/http/api/table.js'
|
import { shopTableClear } from '@/http/api/table.js';
|
||||||
|
|
||||||
const emits = defineEmits(['more', 'update', 'bind'])
|
const emits = defineEmits(['more', 'update', 'bind']);
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {}
|
return {};
|
||||||
}
|
|
||||||
},
|
|
||||||
areaMap: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {}
|
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
|
areaMap: {
|
||||||
const computedClass = computed(() => {
|
type: Object,
|
||||||
return props.data.status
|
default: () => {}
|
||||||
})
|
|
||||||
|
|
||||||
function returnStutasText(key) {
|
|
||||||
const item = uni.$dict.tableStatus[key]
|
|
||||||
return item ? item.label : ''
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
function returnStutasColor(key) {
|
|
||||||
const item = uni.$dict.tableStatus[key]
|
const computedClass = computed(() => {
|
||||||
return item ? item.type : ''
|
return props.data.status;
|
||||||
|
});
|
||||||
|
|
||||||
|
function returnStutasText(key) {
|
||||||
|
const item = uni.$dict.tableStatus[key];
|
||||||
|
return item ? item.label : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function returnStutasColor(key) {
|
||||||
|
const item = uni.$dict.tableStatus[key];
|
||||||
|
return item ? item.type : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更多
|
||||||
|
*/
|
||||||
|
function more() {
|
||||||
|
if (props.data.status == 'done') {
|
||||||
|
return uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '桌台关闭中!'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
emits('more');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定码牌
|
||||||
|
*/
|
||||||
|
function bind() {
|
||||||
|
emits('bind', props.data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更多
|
* 选择下单
|
||||||
*/
|
*/
|
||||||
function more() {
|
async function diancan() {
|
||||||
if(props.data.status=='done'){
|
hasPermission('允许下单').then((res) => {
|
||||||
return uni.showToast({
|
console.log(res);
|
||||||
icon:'none',
|
if (res) {
|
||||||
title:'桌台关闭中!'
|
const useType = props.status == 'using' ? props.data.useType : undefined;
|
||||||
})
|
console.log(props.data);
|
||||||
|
go.to('PAGES_CREATE_ORDER', props.data);
|
||||||
}
|
}
|
||||||
emits('more')
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 绑定码牌
|
* 清台
|
||||||
*/
|
*/
|
||||||
function bind() {
|
function qingtai() {
|
||||||
emits('bind',props.data)
|
let item = props.data;
|
||||||
}
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
/**
|
content: '确定要清台:' + item.name + '?',
|
||||||
* 选择下单
|
success(res) {
|
||||||
*/
|
if (res.confirm) {
|
||||||
async function diancan() {
|
shopTableClear({
|
||||||
hasPermission('允许下单').then(res=>{
|
id: item.id
|
||||||
console.log(res)
|
}).then((res) => {
|
||||||
if(res){
|
uni.$utils.showToast('清台成功');
|
||||||
const useType = props.status == 'using' ? props.data.useType : undefined
|
emits('update');
|
||||||
console.log(props.data)
|
});
|
||||||
go.to('PAGES_CREATE_ORDER', props.data)
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
defineExpose({
|
||||||
* 清台
|
diancan
|
||||||
*/
|
})
|
||||||
function qingtai() {
|
|
||||||
let item = props.data
|
|
||||||
uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '确定要清台:' + item.name + '?',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
shopTableClear({
|
|
||||||
id: item.id,
|
|
||||||
}).then(res => {
|
|
||||||
uni.$utils.showToast('清台成功')
|
|
||||||
emits('update')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.item {
|
.item {
|
||||||
width: 330rpx;
|
width: 330rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
box-shadow: 1px 1px 0 #eee;
|
box-shadow: 1px 1px 0 #eee;
|
||||||
border-color: #eee;
|
border-color: #eee;
|
||||||
|
|
||||||
.bottom {
|
|
||||||
min-height: 224rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-bg-main {
|
|
||||||
padding: 32rpx 28rpx;
|
|
||||||
|
|
||||||
.tag {
|
|
||||||
background-color: rgba(255, 255, 255, .7);
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: $my-main-color;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
padding: 2rpx 10rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.using {
|
|
||||||
.tag {
|
|
||||||
color: rgb(250, 85, 85);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
min-height: 224rpx;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.my-bg-main {
|
||||||
|
padding: 24rpx 28rpx;
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
background-color: rgba(255, 255, 255, 0.7);
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: $my-main-color;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
padding: 2rpx 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.using {
|
||||||
|
.tag {
|
||||||
|
color: rgb(250, 85, 85);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,28 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="color-333 u-font-28 min-page bg-gray ">
|
<view class="color-333 u-font-28 min-page bg-gray">
|
||||||
|
|
||||||
<up-sticky>
|
<up-sticky>
|
||||||
<view class="bg-fff u-p-l-30 u-p-b-30 u-relative">
|
<view class="bg-fff u-p-l-30 u-p-b-30 u-relative">
|
||||||
|
|
||||||
<view class="input-wrapper">
|
<view class="input-wrapper">
|
||||||
<view class="input-main">
|
<view class="input-main">
|
||||||
<view class="u-flex u-p-r-30 u-font-28" @click="pageData.statusShow = !pageData.statusShow">
|
<view class="u-flex u-p-r-30 u-font-28" @click="pageData.statusShow = !pageData.statusShow">
|
||||||
<text class="u-m-r-10 u-line-1 " :class="{'color-main':pageData.query.status!=''}"
|
<text class="u-m-r-10 u-line-1" :class="{ 'color-main': pageData.query.status != '' }" style="max-width: 100rpx">{{ pageData.statusName }}</text>
|
||||||
style="max-width: 100rpx;">{{pageData.statusName }}</text>
|
|
||||||
<up-icon name="arrow-down" size="16"></up-icon>
|
<up-icon name="arrow-down" size="16"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<uni-easyinput clearable class='jeepay-search' :inputBorder="false"
|
<uni-easyinput
|
||||||
|
clearable
|
||||||
|
class="jeepay-search"
|
||||||
|
:inputBorder="false"
|
||||||
trim="all"
|
trim="all"
|
||||||
placeholder="搜索"
|
placeholder="搜索"
|
||||||
v-model="pageData.query.name"
|
v-model="pageData.query.name"
|
||||||
@clear="searchConfirm"
|
@clear="searchConfirm"
|
||||||
@confirm="searchConfirm">
|
@confirm="searchConfirm"
|
||||||
|
>
|
||||||
<template #prefixIcon>
|
<template #prefixIcon>
|
||||||
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
||||||
</template>
|
</template>
|
||||||
</uni-easyinput>
|
</uni-easyinput>
|
||||||
<view class="u-m-l-4">
|
<view class="u-m-l-4">
|
||||||
<button class="" type="text" @click="searchConfirm"> <text class="color-333">搜索</text></button>
|
<button class="" type="text" @click="searchConfirm"><text class="color-333">搜索</text></button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -30,423 +31,430 @@
|
|||||||
</up-sticky>
|
</up-sticky>
|
||||||
|
|
||||||
<view class="list u-p-30">
|
<view class="list u-p-30">
|
||||||
<view class="my-bg-main table-type u-flex border-r-12 color-fff ">
|
<view class="my-bg-main table-type u-flex border-r-12 color-fff">
|
||||||
<view class="item u-p-20" :class="{sel:pageData.area.sel===item.id}" @tap="changeAreaSel(item)"
|
<view class="item u-p-20" :class="{ sel: pageData.area.sel == '' }" @tap="changeAreaSel({ id: '' })">
|
||||||
v-for="(item,index) in pageData.area.list" :key="index">
|
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<view class='up-line-1'>{{item.name}}</view>
|
<view class="up-line-1">全部</view>
|
||||||
<view class="u-m-t-10">0/12</view>
|
<!-- <view class="u-m-t-10">0/12</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="item u-p-20" :class="{ sel: pageData.area.sel === item.id }" @tap="changeAreaSel(item)" v-for="(item, index) in pageData.area.list" :key="index">
|
||||||
|
<view class="box">
|
||||||
|
<view class="up-line-1">{{ item.name }}</view>
|
||||||
|
<!-- <view class="u-m-t-10">0/12</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-m-t-30 ">
|
<view class="u-m-t-30">
|
||||||
<template v-if="pageData.tabList.length">
|
<template v-if="pageData.tabList.length">
|
||||||
<view class="u-flex u-flex-wrap u-row-between">
|
<view class="u-flex u-flex-wrap u-row-between">
|
||||||
<view class="u-m-b-30" v-for="(item,index) in pageData.tabList" :key="index">
|
<view class="u-m-b-30" v-for="(item, index) in pageData.tabList" :key="index">
|
||||||
<table-item @bind="scanCode" @update="getTable" :areaMap="pageData.areaMap" @more="moreShow(item)" :data="item"></table-item>
|
<table-item ref="tableItemRefs" @bind="scanCode" @update="getTable" :areaMap="pageData.areaMap" @more="moreShow(item, index)" :data="item"></table-item>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size" @change="pageChange"></my-pagination>
|
||||||
@change="pageChange"></my-pagination>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<my-img-empty v-if="pageData.hasAjax&&!pageData.tabList.length" tips="未找到相关桌台"></my-img-empty>
|
<my-img-empty v-if="pageData.hasAjax && !pageData.tabList.length" tips="未找到相关桌台"></my-img-empty>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<my-action-sheet :active="4" @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list"
|
<my-action-sheet :active="4" @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list" :title="actionSheet.title">
|
||||||
:title="actionSheet.title">
|
|
||||||
<template #title>
|
<template #title>
|
||||||
<view class="color-999 u-p-30 u-text-center border-bottom">桌号:{{actionSheet.title}}</view>
|
<view class="color-999 u-p-30 u-text-center border-bottom">桌号:{{ actionSheet.title }}</view>
|
||||||
</template>
|
</template>
|
||||||
</my-action-sheet>
|
</my-action-sheet>
|
||||||
<up-picker :show="pageData.statusShow" :columns="pageData.statusList" keyName="label" @cancel="pageData.statusShow=false" @confirm="confirmStatus" ></up-picker>
|
<up-picker :show="pageData.statusShow" :columns="pageData.statusList" keyName="label" @cancel="pageData.statusShow = false" @confirm="confirmStatus"></up-picker>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onReady, onShow, } from '@dcloudio/uni-app';
|
import { onLoad, onReady, onShow } from '@dcloudio/uni-app';
|
||||||
import { ref, reactive, computed, watch } from 'vue';
|
import { ref, reactive, computed, watch } from 'vue';
|
||||||
|
|
||||||
import tableItem from './components/table-item'
|
|
||||||
|
|
||||||
import go from '@/commons/utils/go.js';
|
|
||||||
import myActionSheet from '@/components/my-components/my-action-sheet';
|
|
||||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
|
||||||
|
|
||||||
import { getShopTable, shopTableBind, shopTableClear } from '@/http/api/table.js'
|
|
||||||
import { getShopArea } from '@/http/api/area.js'
|
|
||||||
import { printOrder } from '@/http/api/order.js'
|
|
||||||
import { getHistoryOrder } from '@/http/api/order.js'
|
|
||||||
|
|
||||||
const pageData = reactive({
|
|
||||||
statusShow: false,
|
|
||||||
hasAjax: false,
|
|
||||||
areaMap: {},
|
|
||||||
query: {
|
|
||||||
page: 1,
|
|
||||||
size: 10,
|
|
||||||
status: '',
|
|
||||||
areaId: '',
|
|
||||||
name: '',
|
|
||||||
},
|
|
||||||
totalElements:0,
|
|
||||||
statusList: [[{
|
|
||||||
key: '',
|
|
||||||
label: '全部'
|
|
||||||
},...uni.$utils.objToArrary(uni.$dict.tableStatus)]],
|
|
||||||
statusName: '全部',
|
|
||||||
tabList: [],
|
|
||||||
area: {
|
|
||||||
list: [],
|
|
||||||
sel: ''
|
|
||||||
},
|
|
||||||
orderInfo: null,
|
|
||||||
})
|
|
||||||
|
|
||||||
const refMoreSheet = ref(null)
|
import tableItem from './components/table-item';
|
||||||
const actionSheet = reactive({
|
|
||||||
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单','绑定码牌'],
|
|
||||||
title: '',
|
|
||||||
selTable: ''
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(() => pageData.area.sel, (newval) => {
|
import go from '@/commons/utils/go.js';
|
||||||
pageData.query.page = 1
|
import myActionSheet from '@/components/my-components/my-action-sheet';
|
||||||
getTable()
|
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||||
})
|
|
||||||
|
|
||||||
onShow(opt => {
|
import { getShopTable, shopTableBind, shopTableClear } from '@/http/api/table.js';
|
||||||
getData()
|
import { getShopArea } from '@/http/api/area.js';
|
||||||
})
|
import { printOrder } from '@/http/api/order.js';
|
||||||
function getData() {
|
import { getHistoryOrder } from '@/http/api/order.js';
|
||||||
getTable()
|
|
||||||
getArea()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
const pageData = reactive({
|
||||||
* 获取桌台列表
|
statusShow: false,
|
||||||
*/
|
hasAjax: false,
|
||||||
async function getTable() {
|
areaMap: {},
|
||||||
const res = await getShopTable(pageData.query)
|
query: {
|
||||||
pageData.hasAjax = true
|
page: 1,
|
||||||
pageData.tabList = res.records
|
size: 10,
|
||||||
pageData.totalElements = res.totalRow
|
status: '',
|
||||||
}
|
areaId: '',
|
||||||
|
name: ''
|
||||||
/**
|
},
|
||||||
* 获取区域
|
totalElements: 0,
|
||||||
*/
|
statusList: [
|
||||||
async function getArea() {
|
[
|
||||||
const res = await getShopArea({ name: '', page: 1, size: 300 })
|
{
|
||||||
pageData.area.list = res.records
|
key: '',
|
||||||
pageData.areaMap = res.records.reduce((prve, cur) => {
|
label: '全部'
|
||||||
prve[cur.id] = cur.name
|
},
|
||||||
return prve
|
...uni.$utils.objToArrary(uni.$dict.tableStatus)
|
||||||
}, {})
|
]
|
||||||
}
|
],
|
||||||
|
statusName: '全部',
|
||||||
/**
|
tabList: [],
|
||||||
* 类型选择
|
area: {
|
||||||
* @param {Object} e
|
list: [],
|
||||||
*/
|
sel: ''
|
||||||
function confirmStatus(e){
|
},
|
||||||
pageData.statusShow = false
|
orderInfo: null
|
||||||
pageData.query.status = e.value[0].key
|
});
|
||||||
pageData.statusName = e.value[0].label
|
|
||||||
getTable()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
const refMoreSheet = ref(null);
|
||||||
* 区域选择确定
|
const actionSheet = reactive({
|
||||||
* @param {Object} item
|
list: ['结账', '清台', '加菜', '换台', '打印订单', '历史订单', '绑定码牌'],
|
||||||
*/
|
title: '',
|
||||||
function changeAreaSel(item) {
|
selTable: ''
|
||||||
pageData.area.sel = item.id
|
});
|
||||||
pageData.query.areaId = item.id
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更多操作打开
|
|
||||||
* @param {Object} table
|
|
||||||
*/
|
|
||||||
function moreShow(table) {
|
|
||||||
actionSheet.title = table.name
|
|
||||||
actionSheet.selTable = table
|
|
||||||
refMoreSheet.value.open()
|
|
||||||
if( actionSheet.selTable.orderId ){
|
|
||||||
getHistoryOrder({orderId: actionSheet.selTable.orderId}).then(res=>{
|
|
||||||
pageData.orderInfo = res
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更多操作选择
|
|
||||||
* @param {Object} index
|
|
||||||
*/
|
|
||||||
async function actionSheetClick(index) {
|
|
||||||
console.log(index);
|
|
||||||
const item = actionSheet.selTable
|
|
||||||
if (index == 0) {
|
|
||||||
if (!item.orderId) {
|
|
||||||
return uni.$utils.showToast('该桌台暂无要结账的订单!')
|
|
||||||
}
|
|
||||||
const canJieZhang = await hasPermission('允许收款')
|
|
||||||
if(!canJieZhang){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
return toPay(item)
|
|
||||||
}
|
|
||||||
if (index == 1) {
|
|
||||||
//清台
|
|
||||||
return uni.showModal({
|
|
||||||
title: '提示',
|
|
||||||
content: '确定要清台:' + item.name + '?',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
shopTableClear({
|
|
||||||
id: item.id,
|
|
||||||
}).then(res => {
|
|
||||||
uni.$utils.showToast('清台成功')
|
|
||||||
pageData.query.page = 1
|
|
||||||
getTable()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
if (index == 2) {
|
|
||||||
return uni.$utils.showToast('待开放,请敬请期待!')
|
|
||||||
}
|
|
||||||
if (index == 3) {
|
|
||||||
return uni.$utils.showToast('待开放,请敬请期待!')
|
|
||||||
}
|
|
||||||
if (index == 4) {
|
|
||||||
//打印订单
|
|
||||||
if (!item.orderId) {
|
|
||||||
return uni.$utils.showToast('该桌台暂无要打印的订单!')
|
|
||||||
}
|
|
||||||
|
|
||||||
let res = await printOrder( {id: actionSheet.selTable.orderId, type: pageData.orderInfo.status == 'unpaid' ? 1 : 0 } )
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (index == 6) {
|
|
||||||
//绑定码牌
|
|
||||||
scanCode(item)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
uni.$utils.showToast('待开放,请敬请期待!')
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 去结账
|
|
||||||
* @param {Object} item
|
|
||||||
*/
|
|
||||||
function toPay(item) {
|
|
||||||
go.to('PAGES_ORDER_PAY', {
|
|
||||||
tableId: item.id,
|
|
||||||
tableName: item.name,
|
|
||||||
orderId: item.orderId,
|
|
||||||
discount: 1,
|
|
||||||
userId: item.userId
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 绑定码牌
|
|
||||||
* @param {Object} item
|
|
||||||
*/
|
|
||||||
function scanCode(item) {
|
|
||||||
|
|
||||||
uni.scanCode({
|
|
||||||
onlyFromCamera: true,
|
|
||||||
success: function(res) {
|
|
||||||
console.log('条码类型:' + res.scanType);
|
|
||||||
console.log('条码内容:' + res.result);
|
|
||||||
let params = getQueryString(res.result);
|
|
||||||
shopTableBind({
|
|
||||||
"tableCode": params.code,
|
|
||||||
"id": item.id,
|
|
||||||
}).then(res => {
|
|
||||||
uni.$utils.showToast('桌台绑定成功')
|
|
||||||
setTimeout(()=>{
|
|
||||||
getTable()
|
|
||||||
},1500)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 解码
|
|
||||||
* @param {Object} url
|
|
||||||
*/
|
|
||||||
function getQueryString(url) {
|
|
||||||
let params = {};
|
|
||||||
// 正则表达式来匹配URL中的查询字符串
|
|
||||||
let reg = /(?:\?|#|&){1}([^=]*)=([^&]*)/g;
|
|
||||||
url.replace(reg, (match, key, value) => {
|
|
||||||
params[key] = value;
|
|
||||||
});
|
|
||||||
return params;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
watch(
|
||||||
* 搜索
|
() => pageData.area.sel,
|
||||||
*/
|
(newval) => {
|
||||||
function searchConfirm() {
|
|
||||||
pageData.query.page = 1;
|
pageData.query.page = 1;
|
||||||
getTable()
|
getTable();
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
onShow((opt) => {
|
||||||
* 页数改变事件
|
getData();
|
||||||
* @param {Object} page
|
});
|
||||||
*/
|
function getData() {
|
||||||
function pageChange(page) {
|
getTable();
|
||||||
pageData.query.page = page
|
getArea();
|
||||||
getTable()
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取桌台列表
|
||||||
|
*/
|
||||||
|
async function getTable() {
|
||||||
|
const res = await getShopTable(pageData.query);
|
||||||
|
pageData.hasAjax = true;
|
||||||
|
pageData.tabList = res.records;
|
||||||
|
pageData.totalElements = res.totalRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取区域
|
||||||
|
*/
|
||||||
|
async function getArea() {
|
||||||
|
const res = await getShopArea({ name: '', page: 1, size: 300 });
|
||||||
|
pageData.area.list = res.records;
|
||||||
|
pageData.areaMap = res.records.reduce((prve, cur) => {
|
||||||
|
prve[cur.id] = cur.name;
|
||||||
|
return prve;
|
||||||
|
}, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型选择
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
function confirmStatus(e) {
|
||||||
|
pageData.statusShow = false;
|
||||||
|
pageData.query.status = e.value[0].key;
|
||||||
|
pageData.statusName = e.value[0].label;
|
||||||
|
getTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 区域选择确定
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
function changeAreaSel(item) {
|
||||||
|
pageData.area.sel = item.id;
|
||||||
|
pageData.query.areaId = item.id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更多操作打开
|
||||||
|
* @param {Object} table
|
||||||
|
*/
|
||||||
|
function moreShow(table, index) {
|
||||||
|
tableItemRefsIndex.value = index;
|
||||||
|
actionSheet.title = table.name;
|
||||||
|
actionSheet.selTable = table;
|
||||||
|
refMoreSheet.value.open();
|
||||||
|
if (actionSheet.selTable.orderId) {
|
||||||
|
getHistoryOrder({ orderId: actionSheet.selTable.orderId }).then((res) => {
|
||||||
|
pageData.orderInfo = res;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更多操作选择
|
||||||
|
* @param {Object} index
|
||||||
|
*/
|
||||||
|
const tableItemRefsIndex = ref(0);
|
||||||
|
const tableItemRefs = ref([]);
|
||||||
|
async function actionSheetClick(index) {
|
||||||
|
console.log(index);
|
||||||
|
const item = actionSheet.selTable;
|
||||||
|
if (index == 0) {
|
||||||
|
if (!item.orderId) {
|
||||||
|
return uni.$utils.showToast('该桌台暂无要结账的订单!');
|
||||||
|
}
|
||||||
|
const canJieZhang = await hasPermission('允许收款');
|
||||||
|
if (!canJieZhang) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
return toPay(item);
|
||||||
|
}
|
||||||
|
if (index == 1) {
|
||||||
|
//清台
|
||||||
|
return uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定要清台:' + item.name + '?',
|
||||||
|
success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
shopTableClear({
|
||||||
|
id: item.id
|
||||||
|
}).then((res) => {
|
||||||
|
uni.$utils.showToast('清台成功');
|
||||||
|
pageData.query.page = 1;
|
||||||
|
getTable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (index == 2) {
|
||||||
|
tableItemRefs.value[tableItemRefsIndex.value].diancan();
|
||||||
|
}
|
||||||
|
if (index == 3) {
|
||||||
|
return uni.$utils.showToast('待开放,请敬请期待!');
|
||||||
|
}
|
||||||
|
if (index == 4) {
|
||||||
|
//打印订单
|
||||||
|
if (!item.orderId) {
|
||||||
|
return uni.$utils.showToast('该桌台暂无要打印的订单!');
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = await printOrder({ id: actionSheet.selTable.orderId, type: pageData.orderInfo.status == 'unpaid' ? 1 : 0 });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (index == 6) {
|
||||||
|
//绑定码牌
|
||||||
|
scanCode(item);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uni.$utils.showToast('待开放,请敬请期待!');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 去结账
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
function toPay(item) {
|
||||||
|
go.to('PAGES_ORDER_PAY', {
|
||||||
|
tableId: item.id,
|
||||||
|
tableName: item.name,
|
||||||
|
orderId: item.orderId,
|
||||||
|
discount: 1,
|
||||||
|
userId: item.userId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定码牌
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
function scanCode(item) {
|
||||||
|
uni.scanCode({
|
||||||
|
onlyFromCamera: true,
|
||||||
|
success: function (res) {
|
||||||
|
console.log('条码类型:' + res.scanType);
|
||||||
|
console.log('条码内容:' + res.result);
|
||||||
|
let params = getQueryString(res.result);
|
||||||
|
shopTableBind({
|
||||||
|
tableCode: params.code,
|
||||||
|
id: item.id
|
||||||
|
}).then((res) => {
|
||||||
|
uni.$utils.showToast('桌台绑定成功');
|
||||||
|
setTimeout(() => {
|
||||||
|
getTable();
|
||||||
|
}, 1500);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 解码
|
||||||
|
* @param {Object} url
|
||||||
|
*/
|
||||||
|
function getQueryString(url) {
|
||||||
|
let params = {};
|
||||||
|
// 正则表达式来匹配URL中的查询字符串
|
||||||
|
let reg = /(?:\?|#|&){1}([^=]*)=([^&]*)/g;
|
||||||
|
url.replace(reg, (match, key, value) => {
|
||||||
|
params[key] = value;
|
||||||
|
});
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索
|
||||||
|
*/
|
||||||
|
function searchConfirm() {
|
||||||
|
pageData.query.page = 1;
|
||||||
|
getTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页数改变事件
|
||||||
|
* @param {Object} page
|
||||||
|
*/
|
||||||
|
function pageChange(page) {
|
||||||
|
pageData.query.page = page;
|
||||||
|
getTable();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.fixed-top {
|
.fixed-top {
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
.input-wrapper {
|
.input-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding-top: 26rpx;
|
||||||
|
background-color: $J-bg-ff;
|
||||||
|
|
||||||
|
.input-main {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 26rpx;
|
height: 64rpx;
|
||||||
background-color: $J-bg-ff;
|
|
||||||
|
image {
|
||||||
.input-main {
|
padding: 22rpx;
|
||||||
|
width: 26rpx;
|
||||||
|
height: 26rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: flex;
|
font-size: 27rpx;
|
||||||
align-items: center;
|
}
|
||||||
height: 64rpx;
|
|
||||||
|
::v-deep uni-button {
|
||||||
image {
|
font-size: 28rpx;
|
||||||
padding: 22rpx;
|
color: $my-main-color;
|
||||||
width: 26rpx;
|
background: rgba(255, 255, 255, 1);
|
||||||
height: 26rpx;
|
}
|
||||||
}
|
|
||||||
|
::v-deep.uni-easyinput {
|
||||||
input {
|
.uni-easyinput__content {
|
||||||
flex: 1;
|
background-color: $J-bg-f5 !important;
|
||||||
font-size: 27rpx;
|
border-radius: $J-b-r12;
|
||||||
}
|
|
||||||
|
.uni-easyinput__content-input {
|
||||||
::v-deep uni-button {
|
padding-left: 0 !important;
|
||||||
font-size: 28rpx;
|
|
||||||
color: $my-main-color;
|
.uni-input-input {
|
||||||
background: rgba(255, 255, 255, 1);
|
border-radius: $J-b-r12 !important;
|
||||||
}
|
overflow: hidden !important;
|
||||||
|
|
||||||
::v-deep.uni-easyinput {
|
|
||||||
.uni-easyinput__content {
|
|
||||||
background-color: $J-bg-f5 !important;
|
|
||||||
border-radius: $J-b-r12;
|
|
||||||
|
|
||||||
.uni-easyinput__content-input {
|
|
||||||
padding-left: 0 !important;
|
|
||||||
|
|
||||||
.uni-input-input {
|
|
||||||
border-radius: $J-b-r12 !important;
|
|
||||||
overflow: hidden !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-input-placeholder {
|
|
||||||
font-size: 27rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uni-icons {
|
|
||||||
color: rgba(230, 230, 230, 1) !important;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uni-input-placeholder {
|
||||||
|
font-size: 27rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uni-icons {
|
||||||
|
color: rgba(230, 230, 230, 1) !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.table-type {
|
.table-type {
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding: 0 10rpx 0 10rpx;
|
padding: 0 10rpx 0 10rpx;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
|
|
||||||
|
.box {
|
||||||
|
position: relative;
|
||||||
|
padding: 10rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
content: '';
|
||||||
|
top: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 2px;
|
||||||
|
border-radius: 2px;
|
||||||
|
right: -20rpx;
|
||||||
|
background-color: rgba(255, 255, 255, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-of-type(4n) {
|
||||||
|
.box::after {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.sel {
|
||||||
.box {
|
.box {
|
||||||
position: relative;
|
background-color: rgba(255, 255, 255, 0.6);
|
||||||
padding: 10rpx;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
position: absolute;
|
|
||||||
display: block;
|
|
||||||
content: '';
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
width: 2px;
|
|
||||||
border-radius: 2px;
|
|
||||||
right: -20rpx;
|
|
||||||
background-color: rgba(255, 255, 255, .5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&:nth-of-type(4n) {
|
|
||||||
.box::after {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&.sel {
|
|
||||||
.box {
|
|
||||||
background-color: rgba(255, 255, 255, .6);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box {
|
||||||
.search-box {
|
background-color: #fff;
|
||||||
background-color: #fff;
|
padding: 16rpx 0;
|
||||||
padding: 16rpx 0;
|
display: flex;
|
||||||
|
.search-btn {
|
||||||
|
padding: 0 30rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
display: flex;
|
display: flex;
|
||||||
.search-btn {
|
align-items: center;
|
||||||
padding: 0 30rpx;
|
// width: 164rpx;
|
||||||
box-sizing: border-box;
|
transition: all 0.3s ease-in-out;
|
||||||
display: flex;
|
background-color: rgb(247, 247, 247);
|
||||||
align-items: center;
|
border-radius: 100px;
|
||||||
// width: 164rpx;
|
|
||||||
transition: all .3s ease-in-out;
|
|
||||||
background-color: rgb(247, 247, 247);
|
|
||||||
border-radius: 100px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.status {
|
.status {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-arrow-down-fill {
|
||||||
|
width: 16rpx;
|
||||||
|
height: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.icon-arrow-down-fill {
|
.list {
|
||||||
width: 16rpx;
|
// margin-top: 52px;
|
||||||
height: 10rpx;
|
}
|
||||||
}
|
</style>
|
||||||
|
|
||||||
.list {
|
|
||||||
// margin-top: 52px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
41
pageTable/index/tableStatus.js
Normal file
41
pageTable/index/tableStatus.js
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
export default [{
|
||||||
|
label: "未绑定",
|
||||||
|
type: "unbound",
|
||||||
|
color: "#909090",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "空闲",
|
||||||
|
type: "idle",
|
||||||
|
color: "#187CAA",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "点餐中",
|
||||||
|
type: "ordering",
|
||||||
|
color: "#46AEA4",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "未结账",
|
||||||
|
type: "unsettled",
|
||||||
|
color: "#DD3F41",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "支付中",
|
||||||
|
type: "paying",
|
||||||
|
color: "#909090",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "待清台",
|
||||||
|
type: "settled ",
|
||||||
|
color: "#FF9500",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "关台",
|
||||||
|
type: "closed",
|
||||||
|
color: "#DDDDDD",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "预定",
|
||||||
|
type: "subscribe",
|
||||||
|
color: "#58B22C",
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -14,7 +14,8 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "首页(自定义导航)",
|
"navigationBarTitleText": "首页(自定义导航)",
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"enablePullDownRefresh": true
|
"enablePullDownRefresh": true,
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -219,7 +220,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"root": "pageWorkControl",
|
"root": "pageWorkControl",
|
||||||
"pages": [{
|
"pages": [{
|
||||||
@@ -265,7 +266,7 @@
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"root": "pageRecharge",
|
"root": "pageRecharge",
|
||||||
"pages": [{
|
"pages": [{
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
<!-- 首页 -->
|
<!-- 首页 -->
|
||||||
<template>
|
<template>
|
||||||
<view class="page-wrapper" style="overflow:visible;height:auto">
|
<view class="page-wrapper" style="overflow: visible; height: auto">
|
||||||
<!-- 背景图片view -->
|
<!-- 背景图片view -->
|
||||||
<view class="bg-img-view" >
|
<view class="bg-img-view">
|
||||||
|
|
||||||
<!-- 背景颜色view -->
|
<!-- 背景颜色view -->
|
||||||
<view class="bg-color-view" style="position: absolute;top: 0;left: 0;right: 0;height: 550rpx;border-radius:0 0 32rpx 32rpx;background-color: #318AFE!important;">
|
<view class="bg-color-view" style="position: absolute; top: 0; left: 0; right: 0; height: 550rpx; border-radius: 0 0 32rpx 32rpx; background-color: #318afe !important">
|
||||||
<view class="bgbottomStyle">
|
<view class="bgbottomStyle"></view>
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 解决定位层级问题 -->
|
<!-- 解决定位层级问题 -->
|
||||||
<view class="bg-main">
|
<view class="bg-main">
|
||||||
<!-- 导航条 -->
|
<!-- 导航条 -->
|
||||||
<up-navbar title="首页" bg-color="#318AFE" titleStyle="color:#fff;font-size:16px;" @leftClick="toSetting">
|
<up-navbar title="首页" bg-color="#318AFE" titleStyle="color:#fff;font-size:16px;" @leftClick="toSetting">
|
||||||
<template #left>
|
<template #left>
|
||||||
@@ -22,369 +20,365 @@
|
|||||||
<view class="u-flex u-row-center u-relative">
|
<view class="u-flex u-row-center u-relative">
|
||||||
<view class="u-flex u-col-center">
|
<view class="u-flex u-col-center">
|
||||||
<view class="u-m-r-12">总收入</view>
|
<view class="u-m-r-12">总收入</view>
|
||||||
<up-icon name="/static/indexImg/icon-help.svg" color="#fff" :size="12"
|
<up-icon name="/static/indexImg/icon-help.svg" color="#fff" :size="12" @click="toggleTips"></up-icon>
|
||||||
@click="toggleTips"></up-icon>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="tips u-absolute color-666 u-font-20 u-text-left " :class="{'showTips':showTips}">
|
<view class="tips u-absolute color-666 u-font-20 u-text-left" :class="{ showTips: showTips }">
|
||||||
<view class="sanjiao u-flex"><up-icon name="play-left-fill" size="12" color="#fff"></up-icon></view>
|
<view class="sanjiao u-flex"><up-icon name="play-left-fill" size="12" color="#fff"></up-icon></view>
|
||||||
总收入为除会员余额
|
总收入为除会员余额 支付外所有收入
|
||||||
支付外所有收入
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-center">
|
<view class="u-flex u-row-center">
|
||||||
<view class="">¥{{((totalRevenuedata||0)*1).toFixed(2)}}</view>
|
<view class="">¥{{ ((totalRevenuedata || 0) * 1).toFixed(2) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view>{{shopName||''}}</view>
|
<view>{{ shopName || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 统计 or 快捷扫码 -->
|
<!-- 统计 or 快捷扫码 -->
|
||||||
<!-- <Stats ref="statsRef" /> -->
|
<!-- <Stats ref="statsRef" /> -->
|
||||||
<statistics @totalRevenue="totalRevenue"></statistics>
|
<statistics @totalRevenue="totalRevenue"></statistics>
|
||||||
<!-- 导航栅格 -->
|
<!-- 导航栅格 -->
|
||||||
<JeepayNavigation :navList="navList" type="grid" />
|
<JeepayNavigation :navList="navList" type="grid" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref, onMounted, nextTick } from 'vue';
|
import { reactive, ref, onMounted, nextTick } from 'vue';
|
||||||
import { onPullDownRefresh, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
|
import { onPullDownRefresh, onLoad, onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app';
|
||||||
|
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import Stats from './components/Stats.vue';
|
import Stats from './components/Stats.vue';
|
||||||
import statistics from './components/statistics.vue'
|
import statistics from './components/statistics.vue';
|
||||||
import storageManage from '@/commons/utils/storageManage.js';
|
import storageManage from '@/commons/utils/storageManage.js';
|
||||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||||
|
|
||||||
uni.hideTabBar()
|
|
||||||
let shopName = ref()
|
|
||||||
let totalRevenuedata = ref()
|
|
||||||
let totalRevenue = (d) => {
|
|
||||||
totalRevenuedata.value = d
|
|
||||||
}
|
|
||||||
|
|
||||||
let showTips = ref(false)
|
uni.hideTabBar();
|
||||||
function toggleTips() {
|
let shopName = ref();
|
||||||
showTips.value = !showTips.value
|
let totalRevenuedata = ref();
|
||||||
}
|
let totalRevenue = (d) => {
|
||||||
|
totalRevenuedata.value = d;
|
||||||
|
};
|
||||||
|
|
||||||
function toSetting() {
|
let showTips = ref(false);
|
||||||
go.to('PAGES_SHOP_SETUP')
|
function toggleTips() {
|
||||||
}
|
showTips.value = !showTips.value;
|
||||||
// 导航列表
|
}
|
||||||
const navList = [
|
|
||||||
{
|
function toSetting() {
|
||||||
title: '销售汇总',
|
go.to('PAGES_SHOP_SETUP');
|
||||||
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
|
}
|
||||||
pageUrl: 'PAGES_SALES_SUMMARY'
|
// 导航列表
|
||||||
},
|
const navList = [
|
||||||
{
|
{
|
||||||
title: '代客下单',
|
title: '销售汇总',
|
||||||
icon: '/static/indexImg/icon-substitute-ordering.svg',
|
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
|
||||||
pageUrl: 'PAGES_CREATE_ORDER',
|
pageUrl: 'PAGES_SALES_SUMMARY'
|
||||||
clickFunc: () => {
|
},
|
||||||
hasPermission('允许下单').then(res => {
|
{
|
||||||
if (res) {
|
title: '代客下单',
|
||||||
go.to('PAGES_CREATE_ORDER')
|
icon: '/static/indexImg/icon-substitute-ordering.svg',
|
||||||
}
|
pageUrl: 'PAGES_CREATE_ORDER',
|
||||||
})
|
clickFunc: () => {
|
||||||
}
|
hasPermission('允许下单').then((res) => {
|
||||||
},
|
if (res) {
|
||||||
{
|
go.to('PAGES_CREATE_ORDER');
|
||||||
title: '桌台',
|
}
|
||||||
icon: '/static/indexImg/icon-table.svg',
|
});
|
||||||
pageUrl: 'PAGES_TABLE'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '商品管理',
|
|
||||||
icon: '/static/indexImg/icon-product-control.svg',
|
|
||||||
pageUrl: 'PAGES_PRODUCT',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '分组管理',
|
|
||||||
icon: '/static/indexImg/goods-group.svg',
|
|
||||||
pageUrl: 'PAGES_GOODS_GROUP',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '分类管理',
|
|
||||||
icon: '/static/indexImg/icon-category.svg',
|
|
||||||
pageUrl: 'PAGES_CATEGORY',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '会员管理',
|
|
||||||
icon: '/static/indexImg/icon-user.svg',
|
|
||||||
pageUrl: 'PAGES_USER_CONTROL',
|
|
||||||
}, {
|
|
||||||
title: '员工管理',
|
|
||||||
icon: '/static/indexImg/icon-staff.svg',
|
|
||||||
pageUrl: 'PAGES_STAFF'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '耗材管理',
|
|
||||||
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
|
|
||||||
pageUrl: 'PAGES_SALES_CONSUMABLES'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '订单管理',
|
|
||||||
icon: '/static/indexImg/icon-order.svg',
|
|
||||||
pageUrl: 'PAGES_ORDER_INDEX',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '设备管理',
|
|
||||||
icon: '/static/indexImg/icon-printer.svg',
|
|
||||||
pageUrl: 'PAGES_PRINTER_INDEX',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '交班',
|
|
||||||
icon: '/static/indexImg/icon-work.svg',
|
|
||||||
pageUrl: 'PAGES_WORK_INDEX',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '排队',
|
|
||||||
icon: '/static/indexImg/icon-line-up.svg',
|
|
||||||
pageUrl: 'PAGES_LINE_UP'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '霸王餐',
|
|
||||||
icon: '/static/indexImg/icon-bwc.svg',
|
|
||||||
pageUrl: 'PAGES_BWC'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '优惠券',
|
|
||||||
icon: '/static/coupon/icon_coupon.svg',
|
|
||||||
pageUrl: 'PAGES_COUPON_INDEX',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '订阅通知',
|
|
||||||
icon: '/static/indexImg/icon-notification.svg',
|
|
||||||
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '挂账管理',
|
|
||||||
icon: '/static/indexImg/icon_credit.svg',
|
|
||||||
pageUrl: 'PAGES_CREDIT_BUYER_INDEX',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '核销管理',
|
|
||||||
icon: '/static/indexImg/pagewriteoff.svg',
|
|
||||||
pageUrl: 'PAGES_WEITEOFF'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '退出登录',
|
|
||||||
icon: '/static/indexImg/icon-login-out.svg',
|
|
||||||
pageUrl: 'PAGES_LOGIN',
|
|
||||||
clickFunc: () => {
|
|
||||||
storageManage.cleanByLogout()
|
|
||||||
go.to('PAGES_LOGIN', {}, 'redirect')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// {
|
},
|
||||||
// title: '成员管理',
|
{
|
||||||
// icon: '/static/indexImg/icon-staff.svg',
|
title: '桌台',
|
||||||
// pageUrl: 'PAGES_USER'
|
icon: '/static/indexImg/icon-table.svg',
|
||||||
// },
|
pageUrl: 'PAGES_TABLE'
|
||||||
// {
|
},
|
||||||
// title: '订阅通知',
|
{
|
||||||
// icon: '/static/indexImg/icon-notification.svg',
|
title: '商品管理',
|
||||||
// pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
icon: '/static/indexImg/icon-product-control.svg',
|
||||||
// },
|
pageUrl: 'PAGES_PRODUCT'
|
||||||
// {
|
},
|
||||||
// title: '进销存',
|
{
|
||||||
// icon: '/static/indexImg/icon-invoicing.svg',
|
title: '分组管理',
|
||||||
// pageUrl: 'PAGES_INVOICING_INDEX',
|
icon: '/static/indexImg/goods-group.svg',
|
||||||
// },
|
pageUrl: 'PAGES_GOODS_GROUP'
|
||||||
// {
|
},
|
||||||
// title: '预定座位',
|
{
|
||||||
// icon: '/static/indexImg/icon-yuyue-zuo.svg',
|
title: '分类管理',
|
||||||
// pageUrl: 'PAGES_RESERVE_SEAT_INDEX',
|
icon: '/static/indexImg/icon-category.svg',
|
||||||
// },
|
pageUrl: 'PAGES_CATEGORY'
|
||||||
// {
|
},
|
||||||
// title: '预约管理',
|
{
|
||||||
// icon: '/static/indexImg/icon-yuyue.svg',
|
title: '会员管理',
|
||||||
// pageUrl: 'PAGES_BOOKING_INDEX',
|
icon: '/static/indexImg/icon-user.svg',
|
||||||
// },
|
pageUrl: 'PAGES_USER_CONTROL'
|
||||||
// {
|
},
|
||||||
// title: '充值管理',
|
{
|
||||||
// icon: '/static/indexImg/icon-recharge.svg',
|
title: '员工管理',
|
||||||
// pageUrl: 'PAGES_RECHARGE_INDEX',
|
icon: '/static/indexImg/icon-staff.svg',
|
||||||
// },
|
pageUrl: 'PAGES_STAFF'
|
||||||
// {
|
},
|
||||||
// title: '进件管理',
|
{
|
||||||
// icon: '/static/indexImg/icon-passage.svg',
|
title: '耗材管理',
|
||||||
// pageUrl: 'PAGES_APPLYMENT',
|
icon: '/static/indexImg/PAGE_SALES_SUMMARY.svg',
|
||||||
// entId: 'ENT_MCH_APPLYMENT_LIST'
|
pageUrl: 'PAGES_SALES_CONSUMABLES'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: '商户管理',
|
title: '订单管理',
|
||||||
// icon: '/static/indexImg/business.svg',
|
icon: '/static/indexImg/icon-order.svg',
|
||||||
// pageUrl: 'PAGES_APPLYMENT_BUSINESS',
|
pageUrl: 'PAGES_ORDER_INDEX'
|
||||||
// entId: 'ENT_MCH_APPLYMENT_LIST'
|
},
|
||||||
// },
|
{
|
||||||
// {
|
title: '设备管理',
|
||||||
// title: '门店管理',
|
icon: '/static/indexImg/icon-printer.svg',
|
||||||
// icon: '/static/indexImg/icon-store.svg',
|
pageUrl: 'PAGES_PRINTER_INDEX'
|
||||||
// pageUrl: 'PAGES_STORE',
|
},
|
||||||
// entId: 'ENT_MCH_STORE'
|
{
|
||||||
// },
|
title: '交班',
|
||||||
// {
|
icon: '/static/indexImg/icon-work.svg',
|
||||||
// title: '设备管理',
|
pageUrl: 'PAGES_WORK_INDEX'
|
||||||
// icon: '/static/indexImg/icon-calc.svg',
|
},
|
||||||
// pageUrl: 'PAGES_DEVICE_MAIN',
|
{
|
||||||
// entId: 'ENT_DEVICE'
|
title: '排队',
|
||||||
// },
|
icon: '/static/indexImg/icon-line-up.svg',
|
||||||
|
pageUrl: 'PAGES_LINE_UP'
|
||||||
// {
|
},
|
||||||
// title: '数据中心',
|
{
|
||||||
// icon: '/static/indexImg/icon-pro.svg',
|
title: '霸王餐',
|
||||||
// pageUrl: 'PAGES_STAT',
|
icon: '/static/indexImg/icon-bwc.svg',
|
||||||
// entId: 'ENT_ORDER_STATISTIC'
|
pageUrl: 'PAGES_BWC'
|
||||||
// },
|
},
|
||||||
// {
|
{
|
||||||
// title: '商户应用',
|
title: '优惠券',
|
||||||
// icon: '/static/indexImg/icon-app.svg',
|
icon: '/static/coupon/icon_coupon.svg',
|
||||||
// pageUrl: 'PAGES_APP',
|
pageUrl: 'PAGES_COUPON_INDEX'
|
||||||
// entId: 'ENT_MCH_APP_LIST'
|
},
|
||||||
// },
|
{
|
||||||
// {
|
title: '订阅通知',
|
||||||
// title: '会员中心',
|
icon: '/static/indexImg/icon-notification.svg',
|
||||||
// icon: '/static/indexImg/icon-member.svg',
|
pageUrl: 'PAGES_NOTIFICATION_INDEX'
|
||||||
// pageUrl: 'PAGES_MEMBER_CENTER',
|
},
|
||||||
// entId: 'ENT_MCH_MEMBER'
|
{
|
||||||
// },
|
title: '挂账管理',
|
||||||
// {
|
icon: '/static/indexImg/icon_credit.svg',
|
||||||
// title: '广告管理',
|
pageUrl: 'PAGES_CREDIT_BUYER_INDEX'
|
||||||
// icon: '/static/indexImg/icon-ad.svg',
|
},
|
||||||
// pageUrl: 'PAGES_AD_LIST',
|
{
|
||||||
// entId: 'ENT_ADVERT_CONTROL'
|
title: '核销管理',
|
||||||
// },
|
icon: '/static/indexImg/pagewriteoff.svg',
|
||||||
|
pageUrl: 'PAGES_WEITEOFF'
|
||||||
|
},
|
||||||
];
|
{
|
||||||
|
title: '退出登录',
|
||||||
const vdata = reactive({
|
icon: '/static/indexImg/icon-login-out.svg',
|
||||||
noticeList: [], // 公告列表
|
pageUrl: 'PAGES_LOGIN',
|
||||||
adList: [],
|
clickFunc: () => {
|
||||||
shareImgUrl: '' //分享图片
|
storageManage.cleanByLogout();
|
||||||
});
|
go.to('PAGES_LOGIN', {}, 'redirect');
|
||||||
|
|
||||||
onLoad((options) => {
|
|
||||||
shopName.value = uni.getStorageSync('shopInfo').shopName;
|
|
||||||
});
|
|
||||||
|
|
||||||
// 启动加载
|
|
||||||
onMounted(() => {
|
|
||||||
// refData();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 如果不是超管 删除 刷脸广告菜单
|
|
||||||
if (storageManage.userInfo().userType != 1) {
|
|
||||||
const index = navList.findIndex((v) => v.entId == 'ENT_ADVERT_CONTROL');
|
|
||||||
if (index != -1) {
|
|
||||||
navList.splice(index, 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// title: '成员管理',
|
||||||
|
// icon: '/static/indexImg/icon-staff.svg',
|
||||||
|
// pageUrl: 'PAGES_USER'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '订阅通知',
|
||||||
|
// icon: '/static/indexImg/icon-notification.svg',
|
||||||
|
// pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '进销存',
|
||||||
|
// icon: '/static/indexImg/icon-invoicing.svg',
|
||||||
|
// pageUrl: 'PAGES_INVOICING_INDEX',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '预定座位',
|
||||||
|
// icon: '/static/indexImg/icon-yuyue-zuo.svg',
|
||||||
|
// pageUrl: 'PAGES_RESERVE_SEAT_INDEX',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '预约管理',
|
||||||
|
// icon: '/static/indexImg/icon-yuyue.svg',
|
||||||
|
// pageUrl: 'PAGES_BOOKING_INDEX',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '充值管理',
|
||||||
|
// icon: '/static/indexImg/icon-recharge.svg',
|
||||||
|
// pageUrl: 'PAGES_RECHARGE_INDEX',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '进件管理',
|
||||||
|
// icon: '/static/indexImg/icon-passage.svg',
|
||||||
|
// pageUrl: 'PAGES_APPLYMENT',
|
||||||
|
// entId: 'ENT_MCH_APPLYMENT_LIST'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '商户管理',
|
||||||
|
// icon: '/static/indexImg/business.svg',
|
||||||
|
// pageUrl: 'PAGES_APPLYMENT_BUSINESS',
|
||||||
|
// entId: 'ENT_MCH_APPLYMENT_LIST'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '门店管理',
|
||||||
|
// icon: '/static/indexImg/icon-store.svg',
|
||||||
|
// pageUrl: 'PAGES_STORE',
|
||||||
|
// entId: 'ENT_MCH_STORE'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '设备管理',
|
||||||
|
// icon: '/static/indexImg/icon-calc.svg',
|
||||||
|
// pageUrl: 'PAGES_DEVICE_MAIN',
|
||||||
|
// entId: 'ENT_DEVICE'
|
||||||
|
// },
|
||||||
|
|
||||||
async function refData() {
|
// {
|
||||||
// 调用子组件方法 , 避免组件没有加载完成。
|
// title: '数据中心',
|
||||||
|
// icon: '/static/indexImg/icon-pro.svg',
|
||||||
// nextTick(() => statsRef.value.refData());
|
// pageUrl: 'PAGES_STAT',
|
||||||
// 停止刷新
|
// entId: 'ENT_ORDER_STATISTIC'
|
||||||
uni.stopPullDownRefresh();
|
// },
|
||||||
|
// {
|
||||||
|
// title: '商户应用',
|
||||||
|
// icon: '/static/indexImg/icon-app.svg',
|
||||||
|
// pageUrl: 'PAGES_APP',
|
||||||
|
// entId: 'ENT_MCH_APP_LIST'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '会员中心',
|
||||||
|
// icon: '/static/indexImg/icon-member.svg',
|
||||||
|
// pageUrl: 'PAGES_MEMBER_CENTER',
|
||||||
|
// entId: 'ENT_MCH_MEMBER'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '广告管理',
|
||||||
|
// icon: '/static/indexImg/icon-ad.svg',
|
||||||
|
// pageUrl: 'PAGES_AD_LIST',
|
||||||
|
// entId: 'ENT_ADVERT_CONTROL'
|
||||||
|
// },
|
||||||
|
];
|
||||||
|
|
||||||
|
const vdata = reactive({
|
||||||
|
noticeList: [], // 公告列表
|
||||||
|
adList: [],
|
||||||
|
shareImgUrl: '' //分享图片
|
||||||
|
});
|
||||||
|
|
||||||
|
onLoad((options) => {
|
||||||
|
shopName.value = uni.getStorageSync('shopInfo').shopName;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 启动加载
|
||||||
|
onMounted(() => {
|
||||||
|
// refData();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 如果不是超管 删除 刷脸广告菜单
|
||||||
|
if (storageManage.userInfo().userType != 1) {
|
||||||
|
const index = navList.findIndex((v) => v.entId == 'ENT_ADVERT_CONTROL');
|
||||||
|
if (index != -1) {
|
||||||
|
navList.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* 微信分享
|
async function refData() {
|
||||||
*/
|
// 调用子组件方法 , 避免组件没有加载完成。
|
||||||
onShareAppMessage((res) => {
|
|
||||||
if (res.from == 'menu')
|
// nextTick(() => statsRef.value.refData());
|
||||||
return {
|
// 停止刷新
|
||||||
title: uni.$appName,
|
uni.stopPullDownRefresh();
|
||||||
path: '/pages/index/index',
|
}
|
||||||
imageUrl: vdata.shareImgUrl
|
|
||||||
};
|
/**
|
||||||
});
|
* 微信分享
|
||||||
|
*/
|
||||||
/**
|
onShareAppMessage((res) => {
|
||||||
* 分享到朋友圈
|
if (res.from == 'menu')
|
||||||
*/
|
|
||||||
onShareTimeline(() => {
|
|
||||||
return {
|
return {
|
||||||
title: uni.$appName,
|
title: uni.$appName,
|
||||||
|
path: '/pages/index/index',
|
||||||
imageUrl: vdata.shareImgUrl
|
imageUrl: vdata.shareImgUrl
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
// 下拉刷新
|
|
||||||
onPullDownRefresh(() => {
|
/**
|
||||||
refData();
|
* 分享到朋友圈
|
||||||
});
|
*/
|
||||||
|
onShareTimeline(() => {
|
||||||
|
return {
|
||||||
|
title: uni.$appName,
|
||||||
|
imageUrl: vdata.shareImgUrl
|
||||||
|
};
|
||||||
|
});
|
||||||
|
// 下拉刷新
|
||||||
|
onPullDownRefresh(() => {
|
||||||
|
refData();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.bg-main{
|
.bg-main {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
}
|
||||||
|
.bgbottomStyle {
|
||||||
|
position: absolute;
|
||||||
|
bottom: -2rpx;
|
||||||
|
left: 0;
|
||||||
|
|
||||||
|
width: 750rpx;
|
||||||
|
height: 74rpx;
|
||||||
|
background: linear-gradient(180deg, rgba(195, 215, 235, 0) 0%, #f9f9f9 100%);
|
||||||
|
}
|
||||||
|
.income {
|
||||||
|
/* #ifdef H5 */
|
||||||
|
padding-top: calc(84rpx);
|
||||||
|
/* #endif */
|
||||||
|
/* #ifndef H5 */
|
||||||
|
padding-top: calc(84rpx + 44px);
|
||||||
|
|
||||||
|
/* #endif */
|
||||||
|
> view {
|
||||||
|
text-align: center;
|
||||||
|
color: #ffffff;
|
||||||
|
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||||
}
|
}
|
||||||
.bgbottomStyle{
|
|
||||||
|
> view:nth-child(1) {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 84rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
> view:nth-child(2) {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 64rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
> view:nth-child(3) {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-top: 50rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
opacity: 0;
|
||||||
|
right: 28rpx;
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 20rpx 14rpx;
|
||||||
|
width: 211rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||||
|
|
||||||
|
&.showTips {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sanjiao {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -2rpx;
|
right: 100%;
|
||||||
left: 0;
|
top: 50%;
|
||||||
|
transform: translateX(10rpx) translateY(-50%);
|
||||||
width: 750rpx;
|
|
||||||
height: 74rpx;
|
|
||||||
background: linear-gradient( 180deg, rgba(195,215,235,0) 0%, #F9F9F9 100%);
|
|
||||||
}
|
}
|
||||||
.income {
|
}
|
||||||
/* #ifdef H5 */
|
</style>
|
||||||
padding-top: calc(84rpx);
|
|
||||||
/* #endif */
|
|
||||||
/* #ifndef H5 */
|
|
||||||
padding-top: calc(84rpx + 44px);
|
|
||||||
|
|
||||||
/* #endif */
|
|
||||||
>view {
|
|
||||||
text-align: center;
|
|
||||||
color: #FFFFFF;
|
|
||||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view:nth-child(1) {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 28rpx;
|
|
||||||
margin-top: 84rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view:nth-child(2) {
|
|
||||||
margin-top: 20rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
font-size: 64rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
>view:nth-child(3) {
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 28rpx;
|
|
||||||
margin-top: 50rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tips {
|
|
||||||
opacity: 0;
|
|
||||||
right: 28rpx;
|
|
||||||
transition: opacity .3s;
|
|
||||||
background: #FFFFFF;
|
|
||||||
padding: 20rpx 14rpx;
|
|
||||||
width: 211rpx;
|
|
||||||
box-sizing: border-box;
|
|
||||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
|
||||||
|
|
||||||
&.showTips {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sanjiao {
|
|
||||||
position: absolute;
|
|
||||||
right: 100%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateX(10rpx) translateY(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,82 +1,79 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
|
||||||
<view class="mask" @tap="hideGoods" v-if="switchGoods"></view>
|
<view class="mask" @tap="hideGoods" v-if="switchGoods"></view>
|
||||||
<view class="car border-top u-flex u-row-between u-col-bottom u-relative">
|
<view class="car border-top u-flex u-row-between u-col-bottom u-relative">
|
||||||
<view class="u-absolute goods bg-fff">
|
<view class="u-absolute goods bg-fff">
|
||||||
<view
|
<view class="u-p-t-32 color-666 border-bottom bg-fff u-absolute total u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
||||||
class="u-p-t-32 color-666 border-bottom bg-fff u-absolute total u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
<view>已添加{{ goodsNumber.toFixed(0) }}件商品</view>
|
||||||
<view>已添加{{goodsNumber.toFixed(0)}}件商品</view>
|
|
||||||
<view class="color-666">
|
<view class="color-666">
|
||||||
<uni-icons color="#666" type="trash"></uni-icons>
|
<uni-icons color="#666" type="trash"></uni-icons>
|
||||||
<text class="u-m-l-10" @tap="setModalShow('clear',true,'cart','是否清空全部已添加的商品')">清空购物车</text>
|
<text class="u-m-l-10" @tap="setModalShow('clear', true, 'cart', '是否清空全部已添加的商品')">清空购物车</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<scroll-view scroll-y="true" class="tranistion" :style="{height:switchGoods?'50vh':0 }">
|
<scroll-view scroll-y="true" class="tranistion" :style="{ height: switchGoods ? '50vh' : 0 }">
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
<view class="u-p-t-32 color-666 border-bottom u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between"
|
<view class="u-p-t-32 color-666 border-bottom u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between" style="opacity: 0">
|
||||||
style="opacity: 0;">
|
<view>已添加{{ goodsNumber.toFixed(0) }}件商品</view>
|
||||||
<view>已添加{{goodsNumber.toFixed(0)}}件商品</view>
|
|
||||||
<view class="color-666">
|
<view class="color-666">
|
||||||
<uni-icons color="#666" type="trash"></uni-icons>
|
<uni-icons color="#666" type="trash"></uni-icons>
|
||||||
<text class="u-m-l-10">清空</text>
|
<text class="u-m-l-10">清空</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 占位 -->
|
<!-- 占位 -->
|
||||||
<view class="color-333 item border-top u-flex u-row-center u-row-between"
|
<view class="color-333 item border-top u-flex u-row-center u-row-between" v-for="(item, index) in data" :key="index">
|
||||||
v-for="(item,index) in data" :key="index">
|
|
||||||
<view>
|
<view>
|
||||||
<view class="up-line-1" >{{item.name}}</view>
|
<view class="up-line-1">{{ item.name }}</view>
|
||||||
<view class="u-m-t-10 u-font-24 color-666 up-line-1">{{item.specInfo||''}}</view>
|
<view class="u-m-t-10 u-font-24 color-666 up-line-1">{{ item.specInfo || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex" style="flex-shrink: 0;">
|
<view class="u-flex" style="flex-shrink: 0">
|
||||||
<view class="font-bold red u-m-r-32">¥{{formatPrice(item.lowPrice*item.number) }}</view>
|
<view class="font-bold red u-m-r-32">¥{{ formatPrice(item.lowPrice * item.number) }}</view>
|
||||||
<view class="u-flex" @tap="updateNumber(false,index,item)">
|
<view class="u-flex" @tap="updateNumber(false, index, item)">
|
||||||
<image src="/pagesCreateOrder/static/images/icon-reduce-black.svg" class="icon" mode="" />
|
<image src="/pagesCreateOrder/static/images/icon-reduce-black.svg" class="icon" mode="" />
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-l-30 u-m-r-30 color-333">
|
<view class="u-m-l-30 u-m-r-30 color-333">
|
||||||
{{item.number.toFixed(2)}}
|
{{ item.number.toFixed(2) }}
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex" @tap="updateNumber(true,index,item)" >
|
<view class="u-flex" @tap="updateNumber(true, index, item)">
|
||||||
<image src="/pagesCreateOrder/static/images/icon-add-black.svg" class="icon " :class="{'grayscale': item.type == 'package'&&item.groupType == 1}" mode="" />
|
<image
|
||||||
|
src="/pagesCreateOrder/static/images/icon-add-black.svg"
|
||||||
|
class="icon"
|
||||||
|
:class="{ grayscale: item.type == 'package' && item.groupType == 1 }"
|
||||||
|
mode=""
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin: 50rpx auto 110rpx auto;" v-if="!data.length">
|
<view style="margin: 50rpx auto 110rpx auto" v-if="!data.length">
|
||||||
<my-empty text="暂未有添加商品"></my-empty>
|
<my-empty text="暂未有添加商品"></my-empty>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 历史订单 -->
|
<!-- 历史订单 -->
|
||||||
|
<view v-if="historyOrder.length > 0" class="u-p-t-32 u-p-b-32 u-p-r-28 u-p-l-28 u-m-t-40 bg-fff u-flex u-row-between">
|
||||||
<view v-if="historyOrder.length > 0"
|
<view class="color-333" style="font-weight: bold">历史订单</view>
|
||||||
class="u-p-t-32 u-p-b-32 u-p-r-28 u-p-l-28 u-m-t-40 bg-fff u-flex u-row-between">
|
|
||||||
<view class="color-333" style="font-weight: bold;">历史订单</view>
|
|
||||||
<view class="color-666">
|
<view class="color-666">
|
||||||
<uni-icons color="#666" type="trash"></uni-icons>
|
<uni-icons color="#666" type="trash"></uni-icons>
|
||||||
<text class="u-m-l-10" @tap="setModalShow('clear',true,'allHistoryOrder','清空历史订单')">清空历史订单</text>
|
<text class="u-m-l-10" @tap="setModalShow('clear', true, 'allHistoryOrder', '清空历史订单')">清空历史订单</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view v-for="(item,index) in historyOrder" :key="index">
|
<view v-for="(item, index) in historyOrder" :key="index">
|
||||||
<view v-if="historyOrder.length > 0"
|
<view v-if="historyOrder.length > 0" class="u-p-t-32 border-top bg-fff u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
||||||
class="u-p-t-32 border-top bg-fff u-p-r-28 u-p-b-32 u-p-l-28 u-flex u-row-between">
|
<view class="color-333" style="font-size: 30rpx">第{{ item.placeNum }}次下单</view>
|
||||||
<view class="color-333" style="font-size: 30rpx;">第{{item.placeNum}}次下单</view>
|
|
||||||
<view class="color-666">
|
<view class="color-666">
|
||||||
<uni-icons color="#666" type="trash"></uni-icons>
|
<uni-icons color="#666" type="trash"></uni-icons>
|
||||||
<text class="u-m-l-10" @tap="setModalShow('clear',true,item.placeNum,'清空第'+item.placeNum+'次下单历史订单')">清空</text>
|
<text class="u-m-l-10" @tap="setModalShow('clear', true, item.placeNum, '清空第' + item.placeNum + '次下单历史订单')">清空</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="color-333 item border-top u-flex u-row-center u-row-between"
|
<view class="color-333 item border-top u-flex u-row-center u-row-between" v-for="(v, i) in item.info" :key="i">
|
||||||
v-for="(v,i) in item.info" :key="i">
|
<view style="display: flex; align-items: center">
|
||||||
<view style="display: flex;align-items: center;">
|
<view class="up-line-1" style="margin-right: 10rpx">{{ v.productName }}</view>
|
||||||
<view class="up-line-1" style="margin-right: 10rpx;">{{v.productName}}</view>
|
<uni-tag
|
||||||
<uni-tag v-if="v.returnNum>0" :text="'退菜X'+v.returnNum"
|
v-if="v.returnNum > 0"
|
||||||
custom-style="background-color: #EB4F4F; border-color: #EB4F4F; color: #fff;">
|
:text="'退菜X' + v.returnNum"
|
||||||
</uni-tag>
|
custom-style="background-color: #EB4F4F; border-color: #EB4F4F; color: #fff;"
|
||||||
|
></uni-tag>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex" style="flex-shrink: 0;">
|
<view class="u-flex" style="flex-shrink: 0">
|
||||||
<view class="font-bold red u-m-r-32">¥{{formatPrice(v.price*(v.num - v.returnNum)) }}</view>
|
<view class="font-bold red u-m-r-32">¥{{ formatPrice(v.price * (v.num - v.returnNum)) }}</view>
|
||||||
<view class="u-m-l-30 u-m-r-30 color-333"> X{{v.num.toFixed(2)}} </view>
|
<view class="u-m-l-30 u-m-r-30 color-333">X{{ v.num.toFixed(2) }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -84,299 +81,311 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="icon-car-box" @tap="toggleGoods">
|
<view class="icon-car-box" @tap="toggleGoods">
|
||||||
<image src="/pagesCreateOrder/static/images/icon-car.svg" class="icon-car" />
|
<image src="/pagesCreateOrder/static/images/icon-car.svg" class="icon-car" />
|
||||||
<view class="dot" v-if="goodsNumber>0">{{goodsNumber}}</view>
|
<view class="dot" v-if="goodsNumber > 0">{{ goodsNumber }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="price font-bold u-flex">
|
<view class="price font-bold u-flex">
|
||||||
<view>¥</view>
|
<view>¥</view>
|
||||||
<view>{{allPrice}}</view>
|
<view>{{ allPrice }}</view>
|
||||||
</view>
|
</view>
|
||||||
<my-button shape="circle" height="80" width="220" @tap="toConfimOrder">
|
<my-button shape="circle" height="80" width="220" @tap="toConfimOrder">
|
||||||
<text class="u-font-32 font-bold">{{table.type=='add'?'确认加菜':'去下单'}} </text>
|
<text class="u-font-32 font-bold">{{ table.type == 'add' ? '确认加菜' : '去下单' }}</text>
|
||||||
</my-button>
|
</my-button>
|
||||||
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<up-modal title="提示" :content="modal.title" :show="modal.clear" showCancelButton closeOnClickOverlay
|
<up-modal
|
||||||
@confirm="confirmModelConfirm" @cancel="setModalShow('clear',false)" @close="setModalShow('clear',false)"
|
title="提示"
|
||||||
width="300px"></up-modal>
|
:content="modal.title"
|
||||||
|
:show="modal.clear"
|
||||||
|
showCancelButton
|
||||||
|
closeOnClickOverlay
|
||||||
|
@confirm="confirmModelConfirm"
|
||||||
|
@cancel="setModalShow('clear', false)"
|
||||||
|
@close="setModalShow('clear', false)"
|
||||||
|
width="300px"
|
||||||
|
></up-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, reactive, ref, watch } from 'vue';
|
import { computed, reactive, ref, watch } from 'vue';
|
||||||
import myButton from '@/components/my-components/my-button.vue'
|
import myButton from '@/components/my-components/my-button.vue';
|
||||||
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 { formatPrice } from '@/commons/utils/format.js';
|
import { formatPrice } from '@/commons/utils/format.js';
|
||||||
|
import { $trturnPayAfter } from '../util.js'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: () => {
|
||||||
return []
|
return [];
|
||||||
}
|
|
||||||
},
|
|
||||||
historyOrder: {
|
|
||||||
type: Array,
|
|
||||||
default: () => {
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isCreateOrderToDetail: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
orderInfo: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {
|
|
||||||
return {
|
|
||||||
id: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
table: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {
|
|
||||||
return {
|
|
||||||
tableId: ''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
},
|
||||||
let allHistoryOrder = ref([]);
|
historyOrder: {
|
||||||
const allPrice = computed(() => {
|
type: Array,
|
||||||
let cartPrice = props.data.reduce((prve, cur) => {
|
default: () => {
|
||||||
let price = Math.floor((cur.lowPrice * cur.number)*100)/100
|
return [];
|
||||||
return prve + price
|
}
|
||||||
}, 0)
|
},
|
||||||
let historyOrderPrice = allHistoryOrder.value.reduce((prve, cur) => {
|
isCreateOrderToDetail: {
|
||||||
let price = Math.floor((cur.price * (cur.num-cur.returnNum))*100)/100
|
type: Boolean,
|
||||||
return prve + price
|
default: false
|
||||||
}, 0)
|
},
|
||||||
|
orderInfo: {
|
||||||
return (cartPrice + historyOrderPrice).toFixed(2)
|
type: Object,
|
||||||
})
|
default: () => {
|
||||||
|
return {
|
||||||
const goodsNumber = computed(() => {
|
id: ''
|
||||||
let result = 0
|
};
|
||||||
let cart = props.data.reduce((prve, cur) => {
|
}
|
||||||
return prve + cur.number
|
},
|
||||||
}, 0)
|
table: {
|
||||||
|
type: Object,
|
||||||
let historyOrderNum = allHistoryOrder.value.reduce((prve, cur) => {
|
default: () => {
|
||||||
return prve + cur.num
|
return {
|
||||||
}, 0)
|
tableId: ''
|
||||||
result = cart + historyOrderNum
|
};
|
||||||
result = result > 0 ? result.toFixed(2) : 0
|
}
|
||||||
return result >= 99 ? 99 : parseFloat(result)
|
}
|
||||||
})
|
});
|
||||||
watch(() => props.historyOrder, (newval) => {
|
let allHistoryOrder = ref([]);
|
||||||
|
const allPrice = computed(() => {
|
||||||
|
let cartPrice = props.data.reduce((prve, cur) => {
|
||||||
|
let price = Math.floor(cur.lowPrice * cur.number * 100) / 100;
|
||||||
|
return prve + price;
|
||||||
|
}, 0);
|
||||||
|
let historyOrderPrice = allHistoryOrder.value.reduce((prve, cur) => {
|
||||||
|
let price = Math.floor(cur.price * (cur.num - cur.returnNum) * 100) / 100;
|
||||||
|
return prve + price;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
return (cartPrice + historyOrderPrice).toFixed(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
const goodsNumber = computed(() => {
|
||||||
|
let result = 0;
|
||||||
|
let cart = props.data.reduce((prve, cur) => {
|
||||||
|
return prve + cur.number;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
|
// let historyOrderNum = allHistoryOrder.value.reduce((prve, cur) => {
|
||||||
|
// return prve + cur.num;
|
||||||
|
// }, 0);
|
||||||
|
result = cart;
|
||||||
|
result = result > 0 ? result.toFixed(2) : 0;
|
||||||
|
return result >= 99 ? 99 : parseFloat(result);
|
||||||
|
});
|
||||||
|
watch(
|
||||||
|
() => props.historyOrder,
|
||||||
|
(newval) => {
|
||||||
allHistoryOrder.value = [];
|
allHistoryOrder.value = [];
|
||||||
newval.forEach(item=>{
|
newval.forEach((item) => {
|
||||||
allHistoryOrder.value = [...allHistoryOrder.value,...item.info]
|
allHistoryOrder.value = [...allHistoryOrder.value, ...item.info];
|
||||||
})
|
});
|
||||||
})
|
}
|
||||||
const modal = reactive({
|
);
|
||||||
key: '',
|
const modal = reactive({
|
||||||
title: '',
|
key: '',
|
||||||
type: '',
|
title: '',
|
||||||
clear: false
|
type: '',
|
||||||
})
|
clear: false
|
||||||
|
});
|
||||||
|
|
||||||
function confirmModelConfirm() {
|
function confirmModelConfirm() {
|
||||||
if (modal.key == 'clear') {
|
if (modal.key == 'clear') {
|
||||||
clear()
|
clear();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function setModalShow(key = 'show', show = true, type = '', title = '') {
|
||||||
|
// if (key == 'clear' && show && props.data.length <= 0) {
|
||||||
|
// return infoBox.showToast('购物车是空的!')
|
||||||
|
// }
|
||||||
|
if (title) {
|
||||||
|
modal.title = title;
|
||||||
|
}
|
||||||
|
if (type) {
|
||||||
|
modal.type = type;
|
||||||
|
}
|
||||||
|
modal.key = key;
|
||||||
|
modal[key] = show;
|
||||||
|
console.log(modal);
|
||||||
|
}
|
||||||
|
|
||||||
|
const edmits = defineEmits(['clear', 'updateNumber']);
|
||||||
|
|
||||||
|
// mask
|
||||||
|
let switchGoods = ref(false);
|
||||||
|
|
||||||
|
function hideGoods() {
|
||||||
|
switchGoods.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showGoods() {
|
||||||
|
switchGoods.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleGoods() {
|
||||||
|
switchGoods.value = !switchGoods.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function toConfimOrder() {
|
||||||
|
if (props.data.length <= 0 && allHistoryOrder.value.length <= 0) {
|
||||||
|
return infoBox.showToast('还没有选择商品');
|
||||||
|
}
|
||||||
|
const { name, status, type } = props.table;
|
||||||
|
if (props.data.length <= 0 && allHistoryOrder.value.length > 0) {
|
||||||
|
go.to('PAGES_ORDER_PAY', {
|
||||||
|
orderId: props.orderInfo.id
|
||||||
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setModalShow(key = 'show',show = true, type = '' , title = '') {
|
if (props.table.id == '' && props.table.tableCode == '') {
|
||||||
// if (key == 'clear' && show && props.data.length <= 0) {
|
|
||||||
// return infoBox.showToast('购物车是空的!')
|
|
||||||
// }
|
|
||||||
if( title ){ modal.title = title }
|
|
||||||
if( type ){ modal.type = type }
|
|
||||||
modal.key = key
|
|
||||||
modal[key] = show
|
|
||||||
console.log(modal);
|
|
||||||
}
|
|
||||||
|
|
||||||
const edmits = defineEmits(['clear', 'updateNumber'])
|
|
||||||
|
|
||||||
// mask
|
|
||||||
let switchGoods = ref(false)
|
|
||||||
|
|
||||||
function hideGoods() {
|
|
||||||
switchGoods.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
function showGoods() {
|
|
||||||
switchGoods.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggleGoods() {
|
|
||||||
switchGoods.value = !switchGoods.value
|
|
||||||
}
|
|
||||||
|
|
||||||
function toConfimOrder() {
|
|
||||||
if ( props.data.length <= 0 && allHistoryOrder.value.length <= 0 ) {
|
|
||||||
return infoBox.showToast('还没有选择商品')
|
|
||||||
}
|
|
||||||
const { name, status, type } = props.table
|
|
||||||
if ( props.data.length <= 0 && allHistoryOrder.value.length > 0 ) {
|
|
||||||
go.to('PAGES_ORDER_PAY', {
|
|
||||||
orderId: props.orderInfo.id,
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (props.table.id == '' && props.table.tableCode == '') {
|
|
||||||
go.to('PAGES_CONFIRM_ORDER', {
|
|
||||||
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
go.to('PAGES_CONFIRM_ORDER', {
|
go.to('PAGES_CONFIRM_ORDER', {
|
||||||
type: type,
|
|
||||||
tableId: props.table.id,
|
|
||||||
tableCode: props.table.tableCode,
|
|
||||||
name:name,
|
|
||||||
status:status,
|
|
||||||
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
||||||
})
|
});
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let shopInfo = uni.getStorageSync('shopInfo');
|
||||||
|
console.log($trturnPayAfter(shopInfo));
|
||||||
|
|
||||||
|
go.to('PAGES_CONFIRM_ORDER', {
|
||||||
|
type: type,
|
||||||
|
tableId: props.table.id,
|
||||||
|
tableCode: props.table.tableCode,
|
||||||
|
name: name,
|
||||||
|
status: status,
|
||||||
|
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function updateNumber(isAdd, index, goods) {
|
function updateNumber(isAdd, index, goods) {
|
||||||
const step = isAdd ? 1 : -1
|
const step = isAdd ? 1 : -1;
|
||||||
const newval = goods.number + step
|
const newval = goods.number + step;
|
||||||
if(goods.type == 'package'&&goods.groupType == 1&&isAdd){
|
if (goods.type == 'package' && goods.groupType == 1 && isAdd) {
|
||||||
return
|
return;
|
||||||
}
|
|
||||||
const par = {
|
|
||||||
num: newval,
|
|
||||||
index: index,
|
|
||||||
goods: goods
|
|
||||||
}
|
|
||||||
edmits('updateNumber', par)
|
|
||||||
}
|
}
|
||||||
|
const par = {
|
||||||
|
num: newval,
|
||||||
|
index: index,
|
||||||
|
goods: goods
|
||||||
|
};
|
||||||
|
edmits('updateNumber', par);
|
||||||
|
}
|
||||||
|
|
||||||
function clear() {
|
function clear() {
|
||||||
if ( modal.type == 'cart') {
|
if (modal.type == 'cart') {
|
||||||
hideGoods()
|
hideGoods();
|
||||||
}
|
|
||||||
setModalShow('clear', false)
|
|
||||||
edmits('clear',modal.type)
|
|
||||||
}
|
}
|
||||||
|
setModalShow('clear', false);
|
||||||
|
edmits('clear', modal.type);
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$car-size: 96rpx;
|
$car-size: 96rpx;
|
||||||
$car-top: -16rpx;
|
$car-top: -16rpx;
|
||||||
|
|
||||||
@mixin fixedAll {
|
@mixin fixedAll {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.total {
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 40rpx;
|
||||||
|
height: 40rpx;
|
||||||
|
}
|
||||||
|
.grayscale {
|
||||||
|
filter: opacity(60%);
|
||||||
|
}
|
||||||
|
.mask {
|
||||||
|
@include fixedAll;
|
||||||
|
background: rgba(51, 51, 51, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
.goods {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 100%;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
transition: all 0.2s ease-in-out;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.item {
|
||||||
|
padding: 32rpx 28rpx;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.total {
|
.border-bottom {
|
||||||
left: 0;
|
border-bottom: 1px solid #e5e5e5;
|
||||||
right: 0;
|
}
|
||||||
top: 0;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
.border-top {
|
||||||
width: 40rpx;
|
border-top: 1px solid #e5e5e5;
|
||||||
height: 40rpx
|
}
|
||||||
}
|
|
||||||
.grayscale{
|
|
||||||
filter: opacity(60%)
|
|
||||||
}
|
|
||||||
.mask {
|
|
||||||
@include fixedAll;
|
|
||||||
background: rgba(51, 51, 51, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
.red {
|
||||||
|
color: #eb4f4f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.car {
|
||||||
|
padding: 0 28rpx;
|
||||||
|
position: relative;
|
||||||
|
background-color: #fff;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
|
||||||
|
/* #ifdef H5 */
|
||||||
|
padding-bottom: 68rpx;
|
||||||
|
|
||||||
.goods {
|
/* #endif */
|
||||||
|
.icon-car-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 100%;
|
left: 28rpx;
|
||||||
left: 0;
|
top: $car-top;
|
||||||
right: 0;
|
display: flex;
|
||||||
transition: all .2s ease-in-out;
|
width: $car-size;
|
||||||
overflow: hidden;
|
height: $car-size;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
.item {
|
.dot {
|
||||||
padding: 32rpx 28rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-bottom {
|
|
||||||
border-bottom: 1px solid #E5E5E5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.border-top {
|
|
||||||
border-top: 1px solid #E5E5E5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.red {
|
|
||||||
color: #EB4F4F;
|
|
||||||
}
|
|
||||||
|
|
||||||
.car {
|
|
||||||
padding: 0 28rpx;
|
|
||||||
position: relative;
|
|
||||||
background-color: #fff;
|
|
||||||
padding-top: 10rpx;
|
|
||||||
padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
|
|
||||||
/* #ifdef H5 */
|
|
||||||
padding-bottom: 68rpx;
|
|
||||||
|
|
||||||
/* #endif */
|
|
||||||
.icon-car-box {
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 28rpx;
|
right: 0;
|
||||||
top: $car-top;
|
top: 0;
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
background: #eb4f4f;
|
||||||
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: $car-size;
|
|
||||||
height: $car-size;
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 2;
|
font-size: 20rpx;
|
||||||
|
font-weight: bold;
|
||||||
.dot {
|
color: #ffffff;
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 28rpx;
|
|
||||||
height: 28rpx;
|
|
||||||
background: #EB4F4F;
|
|
||||||
border-radius: 50%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 20rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.price {
|
|
||||||
color: #EB4F4F;
|
|
||||||
margin-left: calc(38rpx + $car-size);
|
|
||||||
transform: translateY(calc($car-top / 2));
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-car {
|
|
||||||
width: $car-size;
|
|
||||||
height: $car-size;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.price {
|
||||||
|
color: #eb4f4f;
|
||||||
|
margin-left: calc(38rpx + $car-size);
|
||||||
|
transform: translateY(calc($car-top / 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-car {
|
||||||
|
width: $car-size;
|
||||||
|
height: $car-size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,35 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="min-page bg-gray u-font-28 u-p-30">
|
<view class="min-page bg-gray u-font-28 u-p-30">
|
||||||
<user-vue :orderInfo="orderDetail.info" :user="user"></user-vue>
|
<user-vue :orderInfo="orderDetail.info" :user="user"></user-vue>
|
||||||
|
|
||||||
<goods-list @printOrder="onPrintOrder" @tuikuan="onTuikuan" :orderInfo="orderDetail.info"
|
<goods-list
|
||||||
:user="user"
|
@printOrder="onPrintOrder"
|
||||||
:data="orderDetail.goodsList" :seatFee="orderDetail.seatFee" @tuicai="onTuiCai"></goods-list>
|
@tuikuan="onTuikuan"
|
||||||
|
:orderInfo="orderDetail.info"
|
||||||
|
:user="user"
|
||||||
|
:data="orderDetail.goodsList"
|
||||||
|
:seatFee="orderDetail.seatFee"
|
||||||
|
@tuicai="onTuiCai"
|
||||||
|
></goods-list>
|
||||||
|
|
||||||
<template v-if="true">
|
<template v-if="true">
|
||||||
<extra-vue @tuicai="onSeatFeeTuicai" @tuikuan="onSeatFeeTuiKuan" :orderInfo="orderDetail.info"
|
<extra-vue @tuicai="onSeatFeeTuicai" @tuikuan="onSeatFeeTuiKuan" :orderInfo="orderDetail.info" :data="orderDetail.seatFee"></extra-vue>
|
||||||
:data="orderDetail.seatFee"></extra-vue>
|
|
||||||
</template>
|
</template>
|
||||||
<order-vue :data="orderDetail.info" :table="options" :seatFee="orderDetail.seatFee"></order-vue>
|
<order-vue :data="orderDetail.info" :table="options" :seatFee="orderDetail.seatFee"></order-vue>
|
||||||
<!-- <step-vue></step-vue> -->
|
<!-- <step-vue></step-vue> -->
|
||||||
<view style="height: 200rpx;"></view>
|
<view style="height: 200rpx"></view>
|
||||||
<view class="u-fixed bottom bg-fff ">
|
<view class="u-fixed bottom bg-fff">
|
||||||
<view class="u-flex u-abso">
|
<view class="u-flex u-abso">
|
||||||
<template v-if="orderDetail.info.dineMode=='take-out'||!orderDetail.info.tableCode||pageData.shopInfo.registerType=='before'">
|
<template v-if="orderDetail.info.dineMode == 'take-out' || !orderDetail.info.tableCode || pageData.shopInfo.registerType == 'before'">
|
||||||
<view class="u-flex-1" v-if="orderDetail.info.status=='unpaid'">
|
<view class="u-flex-1" v-if="orderDetail.info.status == 'unpaid'">
|
||||||
<my-button @tap="toPay" borderRadius="100rpx" shape="circle"
|
<my-button @tap="toPay" borderRadius="100rpx" shape="circle" type="primary">结账</my-button>
|
||||||
type="primary">结账</my-button>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="orderDetail.info.status=='unpaid'">
|
<template v-if="orderDetail.info.status == 'unpaid'">
|
||||||
<view class="u-flex-1">
|
<view class="u-flex-1">
|
||||||
<my-button @tap="diancan" color="#fff" bgColor="rgb(57,53,52)" borderRadius="100rpx 0 0 100rpx" fontWeight="700"
|
<my-button @tap="diancan" color="#fff" bgColor="rgb(57,53,52)" borderRadius="100rpx 0 0 100rpx" fontWeight="700" shape="circle" plain type="primary">
|
||||||
shape="circle" plain type="primary">加菜</my-button>
|
加菜
|
||||||
|
</my-button>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex-1">
|
<view class="u-flex-1">
|
||||||
<my-button @tap="toPay" borderRadius="0 100rpx 100rpx 0" shape="circle" fontWeight="700"
|
<my-button @tap="toPay" borderRadius="0 100rpx 100rpx 0" shape="circle" fontWeight="700" type="primary">结账</my-button>
|
||||||
type="primary">结账</my-button>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
@@ -41,295 +45,306 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref, inject } from 'vue';
|
||||||
import userVue from './components/user.vue';
|
import userVue from './components/user.vue';
|
||||||
import orderVue from './components/order.vue';
|
import orderVue from './components/order.vue';
|
||||||
import goodsList from './components/list.vue';
|
import goodsList from './components/list.vue';
|
||||||
import stepVue from './components/step.vue';
|
import stepVue from './components/step.vue';
|
||||||
import extraVue from './components/extra.vue';
|
import extraVue from './components/extra.vue';
|
||||||
import tuicaiVue from './components/tuicai.vue';
|
import tuicaiVue from './components/tuicai.vue';
|
||||||
|
|
||||||
import go from '@/commons/utils/go.js'
|
|
||||||
import infoBox from '@/commons/utils/infoBox.js'
|
|
||||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
|
||||||
|
|
||||||
import OrderDetail from './page.js'
|
|
||||||
import { getHistoryOrder, refundOrder,getOrderById,printOrder } from '@/http/api/order.js'
|
|
||||||
import { shopStaffDetail } from '@/http/api/staff.js'
|
|
||||||
import { shopUserDetail } from '@/http/api/shopUser.js'
|
|
||||||
import { getShopInfo } from '@/http/api/shop.js'
|
|
||||||
|
|
||||||
const tuicai = reactive({
|
|
||||||
show: false,
|
|
||||||
isSeatFee: false,
|
|
||||||
selGoods: {}
|
|
||||||
})
|
|
||||||
const orderDetail = reactive({
|
|
||||||
goodsList: [],
|
|
||||||
info: {},
|
|
||||||
seatFee: {
|
|
||||||
totalAmount: 0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
const options = reactive({})
|
|
||||||
// 监听选择用户事件
|
|
||||||
let user = ref({
|
|
||||||
headImg:'',
|
|
||||||
phone:'',
|
|
||||||
amount:'0.00',
|
|
||||||
accountPoints:'0.00'
|
|
||||||
})
|
|
||||||
const pageData = reactive({
|
|
||||||
shopInfo: {},
|
|
||||||
})
|
|
||||||
onLoad((opt) => {
|
|
||||||
Object.assign(options, opt)
|
|
||||||
getShopInfoData()
|
|
||||||
})
|
|
||||||
onShow(() => {
|
|
||||||
watchEmit()
|
|
||||||
watchChooseuser()
|
|
||||||
getOrderDetail()
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取店铺信息
|
|
||||||
*/
|
|
||||||
function getShopInfoData () {
|
|
||||||
getShopInfo({id:uni.getStorageSync('shopInfo').id}).then(res=>{
|
|
||||||
pageData.shopInfo = res;
|
|
||||||
uni.setStorageSync('shopInfo',res)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取订单详情
|
|
||||||
*/
|
|
||||||
async function getOrderDetail () {
|
|
||||||
let res = await getHistoryOrder({orderId: options.id})
|
|
||||||
// console.log("订单详情===",res)
|
|
||||||
if(res.userId){
|
|
||||||
let resUser = await shopUserDetail({userId:res.userId})
|
|
||||||
user.value = resUser
|
|
||||||
}
|
|
||||||
orderDetail.seatFee = {
|
|
||||||
seatNum: res.seatNum,
|
|
||||||
seatAmount: res.seatAmount,
|
|
||||||
}
|
|
||||||
|
|
||||||
orderDetail.goodsList = Object.entries(res.detailMap).map(([key, value]) => ({
|
|
||||||
info: value,
|
|
||||||
placeNum: key
|
|
||||||
}))
|
|
||||||
|
|
||||||
orderDetail.goodsList.map(item=>{
|
|
||||||
item.info.map(item=>{
|
|
||||||
item.unitPrice = uni.$utils.isGoodsPrice(item,user.value)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
orderDetail.info = res
|
|
||||||
}
|
|
||||||
|
|
||||||
function onSeatFeeTuicai(seatFee) {
|
import go from '@/commons/utils/go.js';
|
||||||
seatFee={...seatFee,num:seatFee.num,productName:seatFee.productName}
|
import infoBox from '@/commons/utils/infoBox.js';
|
||||||
tuicai.show = true
|
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||||
tuicai.isSeatFee = seatFee
|
|
||||||
tuicai.selGoods = seatFee
|
|
||||||
}
|
|
||||||
//是否有允许退款权限
|
|
||||||
async function hasTuiKuan(){
|
|
||||||
const isHas=await hasPermission('允许退款')
|
|
||||||
return isHas
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onSeatFeeTuiKuan(seatFee) {
|
|
||||||
const canTuikuan=await hasTuiKuan()
|
|
||||||
if(!canTuikuan){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const {
|
|
||||||
id,cartId,
|
|
||||||
productId,
|
|
||||||
productSkuId,
|
|
||||||
productName,
|
|
||||||
num,
|
|
||||||
priceAmount,
|
|
||||||
price
|
|
||||||
} = seatFee
|
|
||||||
go.to('PAGES_ORDER_TUIKUAN', {
|
|
||||||
orderId:orderDetail.info.id,
|
|
||||||
id,
|
|
||||||
cartId,
|
|
||||||
productId,
|
|
||||||
productSkuId,
|
|
||||||
productName,
|
|
||||||
num,
|
|
||||||
number: 0,
|
|
||||||
skuName: '',
|
|
||||||
priceAmount,
|
|
||||||
price
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function onTuiCai(goods, index) {
|
import OrderDetail from './page.js';
|
||||||
tuicai.show = true
|
import { getHistoryOrder, refundOrder, getOrderById, printOrder } from '@/http/api/order.js';
|
||||||
tuicai.selGoods = goods
|
import { shopStaffDetail } from '@/http/api/staff.js';
|
||||||
|
import { shopUserDetail } from '@/http/api/shopUser.js';
|
||||||
|
import { getShopInfo } from '@/http/api/shop.js';
|
||||||
|
|
||||||
|
const websocketUtil = inject('websocketUtil');
|
||||||
|
|
||||||
|
const tuicai = reactive({
|
||||||
|
show: false,
|
||||||
|
isSeatFee: false,
|
||||||
|
selGoods: {}
|
||||||
|
});
|
||||||
|
const orderDetail = reactive({
|
||||||
|
goodsList: [],
|
||||||
|
info: {},
|
||||||
|
seatFee: {
|
||||||
|
totalAmount: 0
|
||||||
}
|
}
|
||||||
async function tuicaiConfirm(e) {
|
});
|
||||||
const res = await refundOrder(e)
|
const options = reactive({});
|
||||||
tuicai.show = false
|
// 监听选择用户事件
|
||||||
if(res){
|
let user = ref({
|
||||||
go.back()
|
headImg: '',
|
||||||
}else{
|
phone: '',
|
||||||
getOrderDetail()
|
amount: '0.00',
|
||||||
}
|
accountPoints: '0.00'
|
||||||
|
});
|
||||||
|
const pageData = reactive({
|
||||||
|
shopInfo: {}
|
||||||
|
});
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
watchEmit();
|
||||||
|
watchChooseuser();
|
||||||
|
getOrderDetail();
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取店铺信息
|
||||||
|
*/
|
||||||
|
function getShopInfoData() {
|
||||||
|
getShopInfo({ id: uni.getStorageSync('shopInfo').id }).then((res) => {
|
||||||
|
pageData.shopInfo = res;
|
||||||
|
uni.setStorageSync('shopInfo', res);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取订单详情
|
||||||
|
*/
|
||||||
|
async function getOrderDetail() {
|
||||||
|
let res = await getHistoryOrder({ orderId: options.id });
|
||||||
|
console.log('订单详情===', res);
|
||||||
|
// 初始化socket
|
||||||
|
// if (res.tableName && res.tableCode) {
|
||||||
|
// let shopInfo = uni.getStorageSync('shopInfo');
|
||||||
|
// websocketUtil.send(
|
||||||
|
// JSON.stringify({
|
||||||
|
// type: 'onboc',
|
||||||
|
// account: shopInfo.account,
|
||||||
|
// operate_type: 'init',
|
||||||
|
// table_code: res.tableCode,
|
||||||
|
// shop_id: shopInfo.id
|
||||||
|
// })
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (res.userId) {
|
||||||
|
let resUser = await shopUserDetail({ userId: res.userId });
|
||||||
|
user.value = resUser;
|
||||||
}
|
}
|
||||||
|
orderDetail.seatFee = {
|
||||||
/**
|
seatNum: res.seatNum,
|
||||||
* 打印订单
|
seatAmount: res.seatAmount
|
||||||
*/
|
};
|
||||||
function onPrintOrder() {
|
|
||||||
uni.showModal({
|
orderDetail.goodsList = Object.entries(res.detailMap).map(([key, value]) => ({
|
||||||
title: '提示',
|
info: value,
|
||||||
content: '是否打印当前台桌菜品',
|
placeNum: key
|
||||||
async success(res) {
|
}));
|
||||||
if (res.confirm) {
|
|
||||||
try {
|
orderDetail.goodsList.map((item) => {
|
||||||
const res = await printOrder({
|
item.info.map((item) => {
|
||||||
id: orderDetail.info.id,
|
item.unitPrice = uni.$utils.isGoodsPrice(item, user.value);
|
||||||
type: orderDetail.info.status == 'unpaid' ? 1 : 0
|
});
|
||||||
|
});
|
||||||
})
|
orderDetail.info = res;
|
||||||
infoBox.showToast('已发送打印请求')
|
}
|
||||||
} catch (e) {
|
|
||||||
infoBox.showToast('发送打印请求失败')
|
function onSeatFeeTuicai(seatFee) {
|
||||||
}
|
seatFee = { ...seatFee, num: seatFee.num, productName: seatFee.productName };
|
||||||
|
tuicai.show = true;
|
||||||
|
tuicai.isSeatFee = seatFee;
|
||||||
|
tuicai.selGoods = seatFee;
|
||||||
|
}
|
||||||
|
//是否有允许退款权限
|
||||||
|
async function hasTuiKuan() {
|
||||||
|
const isHas = await hasPermission('允许退款');
|
||||||
|
return isHas;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onSeatFeeTuiKuan(seatFee) {
|
||||||
|
const canTuikuan = await hasTuiKuan();
|
||||||
|
if (!canTuikuan) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const { id, cartId, productId, productSkuId, productName, num, priceAmount, price } = seatFee;
|
||||||
|
go.to('PAGES_ORDER_TUIKUAN', {
|
||||||
|
orderId: orderDetail.info.id,
|
||||||
|
id,
|
||||||
|
cartId,
|
||||||
|
productId,
|
||||||
|
productSkuId,
|
||||||
|
productName,
|
||||||
|
num,
|
||||||
|
number: 0,
|
||||||
|
skuName: '',
|
||||||
|
priceAmount,
|
||||||
|
price
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function onTuiCai(goods, index) {
|
||||||
|
tuicai.show = true;
|
||||||
|
tuicai.selGoods = goods;
|
||||||
|
}
|
||||||
|
async function tuicaiConfirm(e) {
|
||||||
|
const res = await refundOrder(e);
|
||||||
|
tuicai.show = false;
|
||||||
|
if (res) {
|
||||||
|
go.back();
|
||||||
|
} else {
|
||||||
|
getOrderDetail();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 打印订单
|
||||||
|
*/
|
||||||
|
function onPrintOrder() {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '是否打印当前台桌菜品',
|
||||||
|
async success(res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
try {
|
||||||
|
const res = await printOrder({
|
||||||
|
id: orderDetail.info.id,
|
||||||
|
type: orderDetail.info.status == 'unpaid' ? 1 : 0
|
||||||
|
});
|
||||||
|
infoBox.showToast('已发送打印请求');
|
||||||
|
} catch (e) {
|
||||||
|
infoBox.showToast('发送打印请求失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
async function onTuikuan(goods, index) {
|
|
||||||
const canTuikuan=await hasTuiKuan()
|
|
||||||
if(!canTuikuan){
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if (Array.isArray(goods)) {
|
});
|
||||||
|
}
|
||||||
go.to('PAGES_ORDER_TUIKUAN', {
|
|
||||||
orderInfo: JSON.stringify(orderDetail.info),
|
async function onTuikuan(goods, index) {
|
||||||
goodsList:JSON.stringify(goods)
|
const canTuikuan = await hasTuiKuan();
|
||||||
|
if (!canTuikuan) {
|
||||||
})
|
return;
|
||||||
} else {
|
}
|
||||||
goods.number = 0
|
if (Array.isArray(goods)) {
|
||||||
goods.skuName = goods.skuName || ''
|
go.to('PAGES_ORDER_TUIKUAN', {
|
||||||
goods.priceAmount = goods.priceAmount ? goods.priceAmount : (goods.num*uni.$utils.isGoodsPrice(goods,user.value)).toFixed(2)
|
orderInfo: JSON.stringify(orderDetail.info),
|
||||||
console.log(goods)
|
goodsList: JSON.stringify(goods)
|
||||||
goods.unitPrice = uni.$utils.isGoodsPrice(goods,user.value)
|
});
|
||||||
goods.userCouponId = goods.userCouponId ? goods.userCouponId:''
|
} else {
|
||||||
go.to('PAGES_ORDER_TUIKUAN', {
|
goods.number = 0;
|
||||||
orderInfo: JSON.stringify(orderDetail.info),
|
goods.skuName = goods.skuName || '';
|
||||||
goodsList:JSON.stringify([goods])
|
goods.priceAmount = goods.priceAmount ? goods.priceAmount : (goods.num * uni.$utils.isGoodsPrice(goods, user.value)).toFixed(2);
|
||||||
})
|
console.log(goods);
|
||||||
|
goods.unitPrice = uni.$utils.isGoodsPrice(goods, user.value);
|
||||||
|
goods.userCouponId = goods.userCouponId ? goods.userCouponId : '';
|
||||||
|
go.to('PAGES_ORDER_TUIKUAN', {
|
||||||
|
orderInfo: JSON.stringify(orderDetail.info),
|
||||||
|
goodsList: JSON.stringify([goods])
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const uiPage = new OrderDetail();
|
||||||
|
setTimeout(() => {
|
||||||
|
uiPage.setVal('user', {
|
||||||
|
name: 1
|
||||||
|
});
|
||||||
|
}, 1500);
|
||||||
|
|
||||||
|
async function diancan() {
|
||||||
|
const canXiadan = await hasPermission('允许下单');
|
||||||
|
if (!canXiadan) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
clearEmit();
|
||||||
|
go.to('PAGES_CREATE_ORDER', {
|
||||||
|
tableId: options.tableId || orderDetail.info.tableId,
|
||||||
|
tableCode: options.tableCode || orderDetail.info.tableCode,
|
||||||
|
name: options.name || orderDetail.info.tableName,
|
||||||
|
type: 'add',
|
||||||
|
vipUserId: orderDetail.info.userId ? orderDetail.info.userId : ''
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function toPay() {
|
||||||
|
const canJieZhang = await hasPermission('允许收款');
|
||||||
|
if (!canJieZhang) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const userId = orderDetail.info.userId || '';
|
||||||
|
clearEmit();
|
||||||
|
go.to('PAGES_ORDER_PAY', {
|
||||||
|
tableId: options.tableId || orderDetail.info.tableId,
|
||||||
|
tableCode: options.tableCode || orderDetail.info.tableCode,
|
||||||
|
tableName: options.name || orderDetail.info.tableName,
|
||||||
|
orderId: orderDetail.info.id,
|
||||||
|
discount: 1,
|
||||||
|
userId
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function watchEmit() {
|
||||||
|
uni.$off('orderDetail:update');
|
||||||
|
uni.$once('orderDetail:update', (newval) => {
|
||||||
|
getOrderDetail();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新选择用户
|
||||||
|
async function setUser(par) {
|
||||||
|
const submitPar = {
|
||||||
|
orderId: options.id || '',
|
||||||
|
masterId: options.masterId,
|
||||||
|
tableId: options.tableId || orderDetail.info.tableId,
|
||||||
|
vipUserId: user.value.id ? user.value.id : '',
|
||||||
|
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
||||||
|
};
|
||||||
|
Object.assign(submitPar, par);
|
||||||
|
const res = await Api.$setUser(submitPar);
|
||||||
|
getOrderDetail();
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
function clearEmit() {
|
||||||
|
uni.$off('choose-user');
|
||||||
|
uni.$off('orderDetail:update');
|
||||||
|
}
|
||||||
|
|
||||||
|
function watchChooseuser() {
|
||||||
|
uni.$off('choose-user');
|
||||||
|
uni.$on('choose-user', (data) => {
|
||||||
|
console.log(data);
|
||||||
|
user.value = data;
|
||||||
|
setUser();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 监听购物车
|
||||||
|
function onMessage() {
|
||||||
|
websocketUtil.onMessage(async (res) => {
|
||||||
|
let data = JSON.parse(res);
|
||||||
|
console.log(data);
|
||||||
|
if (data.operate_type == 'onboc_init' && data.data.length) {
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onLoad((opt) => {
|
||||||
const uiPage = new OrderDetail()
|
Object.assign(options, opt);
|
||||||
setTimeout(() => {
|
getShopInfoData();
|
||||||
uiPage.setVal('user', {
|
// onMessage();
|
||||||
name: 1
|
});
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
|
|
||||||
async function diancan() {
|
|
||||||
const canXiadan=await hasPermission('允许下单')
|
|
||||||
if(!canXiadan){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
clearEmit()
|
|
||||||
go.to('PAGES_CREATE_ORDER', {
|
|
||||||
tableId: options.tableId || orderDetail.info.tableId,
|
|
||||||
tableCode: options.tableCode || orderDetail.info.tableCode,
|
|
||||||
name: options.name || orderDetail.info.tableName,
|
|
||||||
type: 'add',
|
|
||||||
vipUserId: orderDetail.info.userId?orderDetail.info.userId:''
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async function toPay() {
|
|
||||||
const canJieZhang=await hasPermission('允许收款')
|
|
||||||
if(!canJieZhang){
|
|
||||||
return
|
|
||||||
}
|
|
||||||
const userId=orderDetail.info.userId||''
|
|
||||||
clearEmit()
|
|
||||||
go.to('PAGES_ORDER_PAY', {
|
|
||||||
tableId: options.tableId|| orderDetail.info.tableId,
|
|
||||||
tableCode: options.tableCode || orderDetail.info.tableCode,
|
|
||||||
tableName: options.name || orderDetail.info.tableName,
|
|
||||||
orderId: orderDetail.info.id,
|
|
||||||
discount: 1,
|
|
||||||
userId
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function watchEmit() {
|
|
||||||
uni.$off('orderDetail:update')
|
|
||||||
uni.$once('orderDetail:update', (newval) => {
|
|
||||||
getOrderDetail()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//更新选择用户
|
|
||||||
async function setUser(par) {
|
|
||||||
const submitPar = {
|
|
||||||
orderId:options.id||'',
|
|
||||||
masterId: options.masterId,
|
|
||||||
tableId: options.tableId|| orderDetail.info.tableId,
|
|
||||||
vipUserId: user.value.id ? user.value.id : '',
|
|
||||||
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
|
||||||
}
|
|
||||||
Object.assign(submitPar, par)
|
|
||||||
const res=await Api.$setUser(submitPar)
|
|
||||||
getOrderDetail()
|
|
||||||
return res
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function clearEmit(){
|
|
||||||
uni.$off('choose-user')
|
|
||||||
uni.$off('orderDetail:update')
|
|
||||||
}
|
|
||||||
|
|
||||||
function watchChooseuser() {
|
|
||||||
uni.$off('choose-user')
|
|
||||||
uni.$on('choose-user', (data) => {
|
|
||||||
console.log(data);
|
|
||||||
user.value = data
|
|
||||||
setUser()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.bottom {
|
.bottom {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 68rpx;
|
height: 68rpx;
|
||||||
|
|
||||||
.u-abso {
|
.u-abso {
|
||||||
bottom: 84rpx;
|
bottom: 84rpx;
|
||||||
left: 28rpx;
|
left: 28rpx;
|
||||||
right: 28rpx;
|
right: 28rpx;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,8 @@ export default defineConfig({
|
|||||||
server: {
|
server: {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'https://tapi.cashier.sxczgkj.cn/api', // 目标服务器地址
|
target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||||
|
// target: 'http://192.168.1.31/\', // 目标服务器地址
|
||||||
changeOrigin: true, // 是否更改请求源
|
changeOrigin: true, // 是否更改请求源
|
||||||
rewrite: path => path.replace(/^\/api/, '')
|
rewrite: path => path.replace(/^\/api/, '')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user