Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23e4407459 | |||
| 53a1442cf7 | |||
| 6cc53db443 | |||
| 7f97467f82 | |||
| d6e1c83f88 | |||
| b69b5dbf31 |
@@ -1,85 +1,258 @@
|
||||
|
||||
export default {
|
||||
orderStatus: [
|
||||
{ label: "待支付", type: "unpaid" },
|
||||
{ label: "制作中", type: "in_production" },
|
||||
{ label: "待取餐", type: "wait_out" },
|
||||
{ label: "订单完成", type: "done" },
|
||||
{ label: "申请退单", type: "refunding" },
|
||||
{ label: "退单", type: "refund" },
|
||||
{ label: "部分退单", type: "part_refund" },
|
||||
{ label: "取消订单", type: "cancelled" },
|
||||
orderStatus: [{
|
||||
label: "待支付",
|
||||
type: "unpaid"
|
||||
},
|
||||
{
|
||||
label: "制作中",
|
||||
type: "in_production"
|
||||
},
|
||||
{
|
||||
label: "待取餐",
|
||||
type: "wait_out"
|
||||
},
|
||||
{
|
||||
label: "订单完成",
|
||||
type: "done"
|
||||
},
|
||||
{
|
||||
label: "申请退单",
|
||||
type: "refunding"
|
||||
},
|
||||
{
|
||||
label: "退单",
|
||||
type: "refund"
|
||||
},
|
||||
{
|
||||
label: "部分退单",
|
||||
type: "part_refund"
|
||||
},
|
||||
{
|
||||
label: "取消订单",
|
||||
type: "cancelled"
|
||||
},
|
||||
],
|
||||
orderType: [
|
||||
{ label: "收银", type: "cash" },
|
||||
{ label: "小程序", type: "miniapp" },
|
||||
orderType: [{
|
||||
label: "收银",
|
||||
type: "cash"
|
||||
},
|
||||
{
|
||||
label: "小程序",
|
||||
type: "miniapp"
|
||||
},
|
||||
],
|
||||
dineMode: [
|
||||
{ label: "堂食", type: "dine-in" },
|
||||
{ label: "外带", type: "take-out" },
|
||||
{ label: "外卖", type: "take-away" },
|
||||
dineMode: [{
|
||||
label: "堂食",
|
||||
type: "dine-in"
|
||||
},
|
||||
{
|
||||
label: "外带",
|
||||
type: "take-out"
|
||||
},
|
||||
{
|
||||
label: "外卖",
|
||||
type: "take-away"
|
||||
},
|
||||
],
|
||||
payType: [
|
||||
{ label: "主扫", type: "main_scan" },
|
||||
{ label: "被扫", type: "back_scan" },
|
||||
{ label: "微信小程序", type: "wechat_mini" },
|
||||
{ label: "支付宝小程序", type: "alipay_mini" },
|
||||
{ label: "会员支付", type: "vip_pay" },
|
||||
{ label: "现金支付", type: "cash_pay" },
|
||||
{ label: "挂账支付", type: "credit_pay" },
|
||||
payType: [{
|
||||
label: "主扫",
|
||||
type: "main_scan"
|
||||
},
|
||||
{
|
||||
label: "被扫",
|
||||
type: "back_scan"
|
||||
},
|
||||
{
|
||||
label: "微信小程序",
|
||||
type: "wechat_mini"
|
||||
},
|
||||
{
|
||||
label: "支付宝小程序",
|
||||
type: "alipay_mini"
|
||||
},
|
||||
{
|
||||
label: "会员支付",
|
||||
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" },
|
||||
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' },
|
||||
platformType: [{
|
||||
label: '微信小程序',
|
||||
type: 'WX'
|
||||
},
|
||||
{
|
||||
label: '支付宝小程序',
|
||||
type: 'ALI'
|
||||
},
|
||||
{
|
||||
label: '收银机客户端',
|
||||
type: 'PC'
|
||||
},
|
||||
{
|
||||
label: 'PC管理端',
|
||||
type: 'WEB'
|
||||
},
|
||||
{
|
||||
label: 'APP管理端',
|
||||
type: 'APP'
|
||||
},
|
||||
{
|
||||
label: '收款码',
|
||||
type: 'H5'
|
||||
},
|
||||
],
|
||||
tableStatus: {
|
||||
idle: { label: "空闲", type: "#3F9EFF" },
|
||||
using: { label: "使用中", type: "#fa5555" },
|
||||
subscribe: { label: "预定", type: "rgb(34, 191, 100)" },
|
||||
closed: { label: "关台", type: "rgb(221,221,221)" },
|
||||
opening: { label: "开台中", type: "#E6A23C" },
|
||||
cleaning: { label: "待清台", type: "#FAAD14" },
|
||||
paying: { label: "结算中", type: "#E6A23C" },
|
||||
unbind: { label: "未绑定", type: "rgb(221,221,221)" }
|
||||
unbound: {
|
||||
label: "未绑定",
|
||||
type: "#909090"
|
||||
},
|
||||
idle: {
|
||||
label: "空闲",
|
||||
type: "#3F9EFF"
|
||||
},
|
||||
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: [{
|
||||
label: '全部',
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
label: '手动入库',
|
||||
type: 'manual-in'
|
||||
},
|
||||
{
|
||||
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: [
|
||||
{ label: '全部', type: '' },
|
||||
{ label: '手动入库', type: 'manual-in' },
|
||||
{ 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: [
|
||||
{ label: '全部', type: '' },
|
||||
{ label: '手动入库', type: 'manual-in' },
|
||||
{ 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: [{
|
||||
label: '全部',
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
label: '手动入库',
|
||||
type: 'manual-in'
|
||||
},
|
||||
{
|
||||
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: [
|
||||
{ label: '现金退款', type: 'cash' },
|
||||
{ label: '原路退回', type: 'payBack' },
|
||||
refundType: [{
|
||||
label: '现金退款',
|
||||
type: 'cash'
|
||||
},
|
||||
{
|
||||
label: '原路退回',
|
||||
type: 'payBack'
|
||||
},
|
||||
],
|
||||
getDiceName(val, key) {
|
||||
let item = this[key].find(v => v.type == val)
|
||||
|
||||
1
env/env.development.js
vendored
1
env/env.development.js
vendored
@@ -5,5 +5,4 @@ export default {
|
||||
// 'JEEPAY_BASE_URL': 'https://cashier.sxczgkj.com/', // 请求URL(生产环境)
|
||||
// 'JEEPAY_BASE_URL_H5': 'https://cashier.sxczgkj.com/',
|
||||
// 'JEEPAY_BASE_URL_WSS': 'wss://czgeatws.sxczgkj.com/wss' // sockets
|
||||
|
||||
}
|
||||
@@ -166,18 +166,7 @@
|
||||
"enable" : true
|
||||
},
|
||||
"devServer" : {
|
||||
"disableHostCheck" : true,
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
// 需要被代理的后台地址
|
||||
"target" : "https://tapi.cashier.sxczgkj.cn",
|
||||
"changeOrigin" : true,
|
||||
"secure" : true,
|
||||
"pathRewrite" : {
|
||||
"/api" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
"disableHostCheck" : true
|
||||
},
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
|
||||
782
package-lock.json
generated
782
package-lock.json
generated
@@ -20,6 +20,70 @@
|
||||
"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": {
|
||||
"version": "2.1.5",
|
||||
"resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
|
||||
@@ -67,12 +131,239 @@
|
||||
"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": {
|
||||
"version": "7.0.15",
|
||||
"resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||
"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": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmmirror.com/ajv/-/ajv-8.16.0.tgz",
|
||||
@@ -183,6 +474,39 @@
|
||||
"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": {
|
||||
"version": "5.7.1",
|
||||
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-5.7.1.tgz",
|
||||
@@ -206,6 +530,34 @@
|
||||
"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": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz",
|
||||
@@ -242,6 +594,16 @@
|
||||
"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": {
|
||||
"version": "2.0.11",
|
||||
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
|
||||
@@ -252,6 +614,13 @@
|
||||
"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": {
|
||||
"version": "12.0.2",
|
||||
"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",
|
||||
"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": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/emojis-list/-/emojis-list-3.0.0.tgz",
|
||||
@@ -295,6 +671,94 @@
|
||||
"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": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||
@@ -382,6 +846,13 @@
|
||||
"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": {
|
||||
"version": "14.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/globby/-/globby-14.0.2.tgz",
|
||||
@@ -420,6 +891,23 @@
|
||||
"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": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
|
||||
@@ -495,6 +983,21 @@
|
||||
"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": {
|
||||
"version": "3.7.2",
|
||||
"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",
|
||||
"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": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
|
||||
@@ -537,6 +1047,16 @@
|
||||
"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": {
|
||||
"version": "2.0.4",
|
||||
"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",
|
||||
"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": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz",
|
||||
@@ -578,12 +1105,42 @@
|
||||
"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": {
|
||||
"version": "2.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz",
|
||||
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
|
||||
"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": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
@@ -605,6 +1162,13 @@
|
||||
"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": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
|
||||
@@ -833,9 +1397,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/schema-utils": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.2.0.tgz",
|
||||
"integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==",
|
||||
"version": "4.3.2",
|
||||
"resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-4.3.2.tgz",
|
||||
"integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/json-schema": "^7.0.9",
|
||||
@@ -844,7 +1408,7 @@
|
||||
"ajv-keywords": "^5.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12.13.0"
|
||||
"node": ">= 10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
@@ -889,6 +1453,16 @@
|
||||
"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": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz",
|
||||
@@ -898,6 +1472,97 @@
|
||||
"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": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
|
||||
@@ -920,6 +1585,13 @@
|
||||
"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": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
|
||||
@@ -932,6 +1604,37 @@
|
||||
"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": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz",
|
||||
@@ -952,6 +1655,77 @@
|
||||
"engines": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,23 +17,23 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<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">
|
||||
<my-radio disabled @click.stop="goodsClick" :modelValue="data.checked"></my-radio>
|
||||
<view class="u-flex u-m-l-32">
|
||||
<view class="goods-wrap">
|
||||
<view class="goods-item u-flex" @click="goodsClick">
|
||||
<my-radio @click="goodsClick" :modelValue="data.checked"></my-radio>
|
||||
<view class="u-flex u-m-l-10">
|
||||
<text class="">{{ data.name }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const emits = defineEmits(['goodsClick', 'del'])
|
||||
const emits = defineEmits(['goodsClick', 'del']);
|
||||
|
||||
const props = defineProps({
|
||||
isBind: {
|
||||
@@ -47,24 +47,23 @@
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
checked:false,
|
||||
}
|
||||
checked: false
|
||||
};
|
||||
}
|
||||
},
|
||||
showDetail: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
function goodsClick() {
|
||||
emits('goodsClick',props.index)
|
||||
emits('goodsClick', props.index);
|
||||
}
|
||||
|
||||
function del() {
|
||||
emits('del', props.index)
|
||||
emits('del', props.index);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -93,7 +92,7 @@
|
||||
font-size: 28rpx;
|
||||
|
||||
.skus {
|
||||
background: #F9F9F9;
|
||||
background: #f9f9f9;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
padding: 20rpx;
|
||||
|
||||
@@ -108,5 +107,11 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-wrap {
|
||||
padding: 0 20upx;
|
||||
.goods-item {
|
||||
padding: 20upx 0;
|
||||
border-bottom: 1px solid #ececec;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,18 +2,21 @@
|
||||
<view class="safe-page min-page">
|
||||
<up-sticky>
|
||||
<view class="bg-fff u-p-l-30 u-p-b-24">
|
||||
|
||||
<view class="input-wrapper">
|
||||
<view class="input-main">
|
||||
<view class="u-flex u-p-r-30 u-font-28" @click="onCategoryShowChange(true)">
|
||||
<text class="u-m-r-10 u-line-1"
|
||||
style="max-width: 100rpx;">{{pageData.categoryName||'全部' }}</text>
|
||||
<text class="u-m-r-10 u-line-1" style="max-width: 100rpx">{{ pageData.categoryName || '全部' }}</text>
|
||||
<up-icon name="arrow-down" size="16"></up-icon>
|
||||
</view>
|
||||
<uni-easyinput clearable class='jeepay-search' :inputBorder="false"
|
||||
:placeholder="pageData.search.placeholder" v-model="pageData.query.name"
|
||||
<uni-easyinput
|
||||
clearable
|
||||
class="jeepay-search"
|
||||
:inputBorder="false"
|
||||
:placeholder="pageData.search.placeholder"
|
||||
v-model="pageData.query.name"
|
||||
@clear="searchFunc"
|
||||
@confirm="searchFunc">
|
||||
@confirm="searchFunc"
|
||||
>
|
||||
<template #prefixIcon>
|
||||
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
||||
</template>
|
||||
@@ -24,27 +27,29 @@
|
||||
</view>
|
||||
</view>
|
||||
<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"
|
||||
:class="{'active':pageData.stateCurrent==index}" @tap="statesTableClick(index)"
|
||||
v-for="(item,index) in statesTabsList" :key="index">
|
||||
<view
|
||||
class="u-flex-1 item u-flex u-row-center tranistion u-text-center color-333"
|
||||
:class="{ active: pageData.stateCurrent == index }"
|
||||
@tap="statesTableClick(index)"
|
||||
v-for="(item, index) in statesTabsList"
|
||||
:key="index"
|
||||
>
|
||||
<view class="text">{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</up-sticky>
|
||||
<template v-if="pageData.stateCurrent == 0">
|
||||
<view class="goods-list u-p-30">
|
||||
<template v-if="pageData.bindGoodsList.length">
|
||||
<view class="u-m-b-32" v-for="(item, index) in pageData.bindGoodsList" :key="index">
|
||||
<my-goods isBind :index="index" :data="item" @del="goodsDel"
|
||||
:showDetail="pageData.showGoodsDetail"></my-goods>
|
||||
<my-goods isBind :index="index" :data="item" @del="goodsDel" :showDetail="pageData.showGoodsDetail"></my-goods>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="pageData.hasAjax && !pageData.bindGoodsList.length">
|
||||
<my-img-empty :tips="isSearch ? '未搜索到相关绑定商品' : '暂无绑定商品'"></my-img-empty>
|
||||
</template>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<view style="height: 100rpx"></view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
@@ -52,8 +57,7 @@
|
||||
<view class="bg-fff border-r-18 u-p-t-16 u-p-b-16 box-shadow">
|
||||
<template v-if="pageData.goodsList.length">
|
||||
<view class="" v-for="(item, index) in pageData.goodsList" :key="index">
|
||||
<my-goods @goodsClick="goodsClick" :index="index" :data="item"
|
||||
:showDetail="pageData.showGoodsDetail"></my-goods>
|
||||
<my-goods @goodsClick="goodsClick" :index="index" :data="item" :showDetail="pageData.showGoodsDetail"></my-goods>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="pageData.hasAjax && !pageData.goodsList.length">
|
||||
@@ -63,25 +67,24 @@
|
||||
<view class="fixed-b">
|
||||
<my-button shape="circle" @click="save">确定</my-button>
|
||||
</view>
|
||||
<view style="height: 100rpx;"></view>
|
||||
<view style="height: 100rpx"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 分类 -->
|
||||
<my-category v-model:isShow="pageData.categoryShow" @confirm="setCategory"></my-category>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { reactive, ref, watch } from 'vue';
|
||||
import myGoods from './components/goods.vue'
|
||||
import myCategory from './components/category.vue'
|
||||
import myGoods from './components/goods.vue';
|
||||
import myCategory from './components/category.vue';
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
|
||||
import { categoryPage } from '@/http/api/cateGory.js'
|
||||
import { getProductPage,getProdGroupDetail,updateProdGroup } from '@/http/api/product.js'
|
||||
import { categoryPage } from '@/http/api/cateGory.js';
|
||||
import { getProductPage, getProdGroupDetail, updateProdGroup } from '@/http/api/product.js';
|
||||
|
||||
const pageData = reactive({
|
||||
stateCurrent: 0,
|
||||
@@ -97,63 +100,67 @@
|
||||
size: 999,
|
||||
categoryId: '',
|
||||
name: '',
|
||||
id: "",
|
||||
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({})
|
||||
let isSearch = ref(false);
|
||||
const statesTabsList = ['已添加', '未添加'];
|
||||
const control = ref(null);
|
||||
const model = ref(null);
|
||||
const option = reactive({});
|
||||
//分类
|
||||
const category = ref(null)
|
||||
const category = ref(null);
|
||||
onLoad((opt) => {
|
||||
Object.assign(option, opt)
|
||||
init()
|
||||
})
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
watch(() => pageData.query.categoryId, (newval) => {
|
||||
Object.assign(option, opt);
|
||||
init();
|
||||
});
|
||||
onShow(() => {});
|
||||
watch(
|
||||
() => pageData.query.categoryId,
|
||||
(newval) => {
|
||||
if (pageData.stateCurrent == 1) {
|
||||
getGoodsList()
|
||||
getGoodsList();
|
||||
} else {
|
||||
getGroupBindGoods()
|
||||
getGroupBindGoods();
|
||||
}
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
watch(() => pageData.stateCurrent, (newval) => {
|
||||
watch(
|
||||
() => pageData.stateCurrent,
|
||||
(newval) => {
|
||||
if (newval == 1) {
|
||||
getGoodsList()
|
||||
getGoodsList();
|
||||
} else {
|
||||
getGroupBindGoods()
|
||||
getGroupBindGoods();
|
||||
}
|
||||
})
|
||||
}
|
||||
);
|
||||
async function init() {
|
||||
await getGroupBindGoods()
|
||||
getGoodsList()
|
||||
await getGroupBindGoods();
|
||||
getGoodsList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
async function searchFunc() {
|
||||
isSearch.value=true
|
||||
isSearch.value = true;
|
||||
if (pageData.stateCurrent) {
|
||||
getGoodsList()
|
||||
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)
|
||||
})
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,29 +168,29 @@
|
||||
* 获取商品列表
|
||||
*/
|
||||
function getGoodsList() {
|
||||
getProductPage(pageData.query).then(res => {
|
||||
pageData.hasAjax = true
|
||||
let goodsList = res.records.map(v => {
|
||||
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)
|
||||
})
|
||||
|
||||
})
|
||||
};
|
||||
});
|
||||
pageData.goodsList = goodsList.filter((v) => {
|
||||
return !pageData.bindOriginGoodsList.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))
|
||||
})
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -191,7 +198,7 @@
|
||||
* @param {Object} index
|
||||
*/
|
||||
function statesTableClick(index) {
|
||||
pageData.stateCurrent = index
|
||||
pageData.stateCurrent = index;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -199,7 +206,7 @@
|
||||
* @param {Object} show
|
||||
*/
|
||||
function onCategoryShowChange(show) {
|
||||
pageData.categoryShow = show
|
||||
pageData.categoryShow = show;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -207,62 +214,59 @@
|
||||
* @param {Object} category
|
||||
*/
|
||||
function setCategory(category) {
|
||||
pageData.query.categoryId = category.id
|
||||
pageData.categoryName = category.name
|
||||
pageData.query.categoryId = category.id;
|
||||
pageData.categoryName = category.name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定商品
|
||||
*/
|
||||
async function save() {
|
||||
const res = await hasPermission('允许修改分组')
|
||||
const res = await hasPermission('允许修改分组');
|
||||
if (!res) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
await updateProdGroup({
|
||||
...option,
|
||||
productIds: [...pageData.bindGoodsList.map(v => v.id), ...pageData.goodsList.filter(v => v.checked)
|
||||
.map(v => v.id)
|
||||
]
|
||||
})
|
||||
pageData.stateCurrent = 0
|
||||
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('允许修改分组')
|
||||
const res = await hasPermission('允许修改分组');
|
||||
if (!res) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
const goods = pageData.bindGoodsList[index]
|
||||
const goods = pageData.bindOriginGoodsList[index];
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否确认将' + goods.name + '从该分组中移除',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
pageData.bindGoodsList.splice(index, 1)
|
||||
pageData.bindGoodsList.splice(index, 1);
|
||||
pageData.bindOriginGoodsList.splice(index, 1);
|
||||
updateProdGroup({
|
||||
...option,
|
||||
productIds: pageData.bindGoodsList.map(v => v.id)
|
||||
})
|
||||
} else if (res.cancel) {}
|
||||
productIds: pageData.bindOriginGoodsList.map((v) => v.id)
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function goodsClick(e) {
|
||||
pageData.goodsList[e].checked = !pageData.goodsList[e].checked
|
||||
pageData.goodsList[e].checked = !pageData.goodsList[e].checked;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
@@ -274,7 +278,7 @@
|
||||
}
|
||||
|
||||
.safe-page {
|
||||
background: #F9F9F9;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.icon-guige {
|
||||
@@ -376,7 +380,7 @@
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
transition: all .2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
left: 10rpx;
|
||||
right: 10rpx;
|
||||
bottom: 0;
|
||||
@@ -395,12 +399,8 @@
|
||||
background-color: $my-main-color;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.fixed-b {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<up-switch :activeValue="1" :inactiveValue="0" v-model="data.status" @change="isShowChange" :size="18"></up-switch>
|
||||
</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="color-666 no-wrap">分组名</view>
|
||||
<view class="color-333 u-m-l-60">{{ data.name }}</view>
|
||||
@@ -30,6 +30,9 @@
|
||||
<text> - </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>
|
||||
|
||||
@@ -37,17 +40,15 @@
|
||||
<view class="btn-default btn" @click="del">删除</view>
|
||||
<view class="btn-primary btn u-m-l-38" @click="toEdit">编辑</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
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';
|
||||
|
||||
|
||||
const emits = defineEmits(['changeClick','edit', 'editName','editSort', 'del', 'isShowChange'])
|
||||
const emits = defineEmits(['changeClick', 'edit', 'editName', 'editSort', 'del', 'isShowChange']);
|
||||
|
||||
const props = defineProps({
|
||||
index: {
|
||||
@@ -58,52 +59,49 @@
|
||||
default: () => {
|
||||
return {
|
||||
status: true
|
||||
};
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
function isShowChange() {
|
||||
emits('isShowChange', {
|
||||
...props.data,
|
||||
})
|
||||
...props.data
|
||||
});
|
||||
}
|
||||
|
||||
let isSellNone = ref(true)
|
||||
isSellNone.value = props.isSellNone
|
||||
let isSellNone = ref(true);
|
||||
isSellNone.value = props.isSellNone;
|
||||
|
||||
function isSellNoneChange() {
|
||||
console.log(isSellNone.value);
|
||||
console.log('isSellNoneChange');
|
||||
}
|
||||
|
||||
let checked = ref(false)
|
||||
|
||||
let checked = ref(false);
|
||||
|
||||
function changeClick() {
|
||||
emits('changeClick', props.index)
|
||||
emits('changeClick', props.index);
|
||||
}
|
||||
|
||||
|
||||
function del() {
|
||||
emits('del', props.index)
|
||||
emits('del', props.index);
|
||||
}
|
||||
function editName() {
|
||||
emits('editName', props.index)
|
||||
emits('editName', props.index);
|
||||
}
|
||||
//携带参数type edit跳转到商品添加页面,编辑与添加同一页面,根据type值来判断
|
||||
function editSort() {
|
||||
emits('editSort', props.index)
|
||||
emits('editSort', props.index);
|
||||
}
|
||||
function toEdit() {
|
||||
emits('edit', props.index)
|
||||
emits('edit', props.index);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
$imgSize: 126rpx;
|
||||
$price-color: #F02C45;
|
||||
$price-color: #f02c45;
|
||||
|
||||
.btn {
|
||||
padding: 6rpx 28rpx;
|
||||
@@ -168,7 +166,7 @@
|
||||
font-size: 28rpx;
|
||||
|
||||
.skus {
|
||||
background: #F9F9F9;
|
||||
background: #f9f9f9;
|
||||
border-radius: 14rpx 14rpx 14rpx 14rpx;
|
||||
padding: 28rpx 42rpx;
|
||||
|
||||
@@ -184,7 +182,7 @@
|
||||
|
||||
.skd {
|
||||
padding: 14rpx 40rpx;
|
||||
background: #F0F2F5;
|
||||
background: #f0f2f5;
|
||||
border-radius: 4rpx;
|
||||
position: relative;
|
||||
color: #666;
|
||||
@@ -205,8 +203,6 @@
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -7,17 +7,18 @@
|
||||
@editName="popupShow($event, 'name', true)"
|
||||
@editSort="popupShow($event, 'sort', true)"
|
||||
@edit="actionsShow"
|
||||
@isShowChange="isSHowChange" :index="index" :data="item"
|
||||
:showDetail="pageData.showGoodsDetail"></my-category>
|
||||
@isShowChange="isSHowChange"
|
||||
:index="index"
|
||||
:data="item"
|
||||
:showDetail="pageData.showGoodsDetail"
|
||||
></my-category>
|
||||
</view>
|
||||
<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"
|
||||
@change="pageChange"></my-pagination>
|
||||
<view style="height: 200rpx;"></view>
|
||||
<my-pagination :page="pageData.query.page" :size="pageData.query.size" :totalElements="pageData.totalElements" @change="pageChange"></my-pagination>
|
||||
<view style="height: 200rpx"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="fixed-b">
|
||||
<my-button :height="80" shape="circle" font-weight="700" @tap="toAddGroup">新建分组</my-button>
|
||||
</view>
|
||||
@@ -27,40 +28,41 @@
|
||||
<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>
|
||||
|
||||
<up-action-sheet :round="10" @select="actionSelect" @close="actionsHide" cancelText="取消" :actions="actions.list"
|
||||
:show="actions.show"></up-action-sheet>
|
||||
<up-action-sheet :round="10" @select="actionSelect" @close="actionsHide" cancelText="取消" :actions="actions.list" :show="actions.show"></up-action-sheet>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
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 myCategory from './components/category.vue'
|
||||
import myCategory from './components/category.vue';
|
||||
import editSort from './components/edit-sort.vue';
|
||||
import editName from './components/edit-name.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({
|
||||
showGoodsDetail: false,
|
||||
query: {
|
||||
page: 1,
|
||||
size: 10,
|
||||
size: 10
|
||||
},
|
||||
totalElements: 0,
|
||||
list: [],
|
||||
selCategory: ''
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
* 编辑列表
|
||||
*/
|
||||
const actions = reactive({
|
||||
list: [{
|
||||
list: [
|
||||
{
|
||||
name: '排序',
|
||||
color: '#333',
|
||||
fontSize: '16'
|
||||
}, {
|
||||
},
|
||||
{
|
||||
name: '管理商品',
|
||||
color: '#333',
|
||||
fontSize: '16'
|
||||
@@ -71,9 +73,8 @@
|
||||
fontSize: '16'
|
||||
}
|
||||
],
|
||||
show: false,
|
||||
})
|
||||
|
||||
show: false
|
||||
});
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
@@ -92,22 +93,22 @@
|
||||
time: {
|
||||
show: false
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
getList()
|
||||
})
|
||||
getList();
|
||||
});
|
||||
|
||||
/**
|
||||
* 获取分组数据
|
||||
*/
|
||||
async function getList() {
|
||||
const res = await getProdGroupPage(pageData.query)
|
||||
pageData.list = res.records
|
||||
pageData.totalElements = res.totalRow
|
||||
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()
|
||||
pageData.query.page = res.totalPage;
|
||||
getList();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,16 +117,16 @@
|
||||
* @param {Object} e
|
||||
*/
|
||||
function actionsShow(e) {
|
||||
popup.selData = pageData.list[e]
|
||||
popup.selIndex = e
|
||||
actions.show = true
|
||||
popup.selData = pageData.list[e];
|
||||
popup.selIndex = e;
|
||||
actions.show = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑列表隐藏
|
||||
*/
|
||||
function actionsHide() {
|
||||
actions.show = false
|
||||
actions.show = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,16 +135,19 @@
|
||||
*/
|
||||
function actionSelect(e) {
|
||||
if (e.name == '排序') {
|
||||
return popupShow(popup.selIndex, 'sort', true)
|
||||
return popupShow(popup.selIndex, 'sort', true);
|
||||
}
|
||||
if (e.name == '管理商品') {
|
||||
const {id,status,name,sort}=popup.selData
|
||||
const { id, status, name, sort } = popup.selData;
|
||||
return go.to('PAGES_GOODS_GROUP_EDIT_GOODS', {
|
||||
id,status,name,sort
|
||||
})
|
||||
id,
|
||||
status,
|
||||
name,
|
||||
sort
|
||||
});
|
||||
}
|
||||
if (e.name == '售卖时间') {
|
||||
return popupShow(popup.selIndex, 'time', true)
|
||||
return popupShow(popup.selIndex, 'time', true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,9 +158,9 @@
|
||||
* @param {Object} show
|
||||
*/
|
||||
function popupShow(e, key, show) {
|
||||
popup[key].show = show
|
||||
popup.selIndex = e
|
||||
popup.selData = pageData.list[e]
|
||||
popup[key].show = show;
|
||||
popup.selIndex = e;
|
||||
popup.selData = pageData.list[e];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,14 +168,14 @@
|
||||
* @param {Object} e
|
||||
*/
|
||||
async function updataGroup(e) {
|
||||
console.log(e)
|
||||
const res = await editProdGroup(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()
|
||||
pageData.list[popup.selIndex] = e;
|
||||
uni.$utils.showToast('更新成功');
|
||||
getList();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -181,20 +185,19 @@
|
||||
async function isSHowChange(data) {
|
||||
const res = await editProdGroup({
|
||||
...data
|
||||
})
|
||||
uni.$utils.showToast('更新成功')
|
||||
|
||||
});
|
||||
uni.$utils.showToast('更新成功');
|
||||
}
|
||||
|
||||
|
||||
const goodsSortModel = ref(null)
|
||||
const goodsTypeModel = ref(null)
|
||||
let sort = ref(0)
|
||||
const goodsSortModel = ref(null);
|
||||
const goodsTypeModel = ref(null);
|
||||
let sort = ref(0);
|
||||
const goodsTypeModelData = reactive({
|
||||
selCategory: '',
|
||||
title: '',
|
||||
index: null,
|
||||
useTypes: [{
|
||||
useTypes: [
|
||||
{
|
||||
name: '堂食',
|
||||
isOpen: true
|
||||
},
|
||||
@@ -211,7 +214,7 @@
|
||||
isOpen: true
|
||||
}
|
||||
]
|
||||
})
|
||||
});
|
||||
|
||||
/**
|
||||
* 新增分组
|
||||
@@ -219,7 +222,7 @@
|
||||
function toAddGroup() {
|
||||
go.to('PAGES_GOODS_GROUP_EDIT', {
|
||||
type: 'add'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -230,14 +233,14 @@
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '请确保此分组下没有任何商品确认删除?',
|
||||
success: res => {
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
delProdGroup(pageData.list[index].id).then(res => {
|
||||
uni.$utils.showToast('删除成功')
|
||||
delProdGroup(pageData.list[index].id).then((res) => {
|
||||
uni.$utils.showToast('删除成功');
|
||||
setTimeout(() => {
|
||||
getList()
|
||||
},1500)
|
||||
})
|
||||
getList();
|
||||
}, 1500);
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {},
|
||||
@@ -245,17 +248,15 @@
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 页数改变事件
|
||||
function pageChange(page) {
|
||||
pageData.query.page = page
|
||||
getList()
|
||||
pageData.query.page = page;
|
||||
getList();
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
@@ -267,7 +268,7 @@
|
||||
}
|
||||
|
||||
.safe-page {
|
||||
background: #F9F9F9;
|
||||
background: #f1f1f1;
|
||||
}
|
||||
|
||||
.icon-guige {
|
||||
@@ -360,12 +361,12 @@
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
margin-right: 70rpx;
|
||||
background: #F4F4F4;
|
||||
background: #f4f4f4;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
}
|
||||
|
||||
.item.active {
|
||||
background: #E6F0FF;
|
||||
background: #e6f0ff;
|
||||
color: $my-main-color;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
}
|
||||
|
||||
@@ -13,23 +13,26 @@
|
||||
{{ returnStutasText(data.status) }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="u-flex u-flex-col u-row-center u-col-center bg-fff bottom">
|
||||
<template v-if="data.status != 'using'">
|
||||
<view class=" u-font-32" :style="{color:returnStutasColor(data.status)}">
|
||||
{{returnStutasText(data.status)}}~
|
||||
</view>
|
||||
<view class="u-font-32" :style="{ color: returnStutasColor(data.status) }">{{ returnStutasText(data.status) }}~</view>
|
||||
</template>
|
||||
<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">
|
||||
<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 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-flex u-row-between u-font-20 u-p-b-20 u-p-t-20">
|
||||
<text class="color-333">开台时间</text>
|
||||
@@ -40,28 +43,18 @@
|
||||
<view class="u-flex u-row-center u-m-t-16">
|
||||
<template v-if="data.id">
|
||||
<template v-if="data.status == 'unbind'">
|
||||
<my-button color="#333" :width="200" :height="56" type="default" @click="bind">
|
||||
绑定码牌
|
||||
</my-button>
|
||||
<my-button color="#333" :width="200" :height="56" type="default" @click="bind">绑定码牌</my-button>
|
||||
</template>
|
||||
<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>
|
||||
<my-button color="#333" :width="150" :height="56" type="default" @click="diancan">选择</my-button>
|
||||
</template>
|
||||
<template v-if="data.status == 'cleaning'">
|
||||
<my-button color="#333" :width="150" :height="56" type="default" @click="qingtai">
|
||||
清台
|
||||
</my-button>
|
||||
<my-button color="#333" :width="150" :height="56" type="default" @click="qingtai">清台</my-button>
|
||||
</template>
|
||||
</template>
|
||||
<my-button v-else :width="150" :height="56" type="default" disabled>
|
||||
选择
|
||||
</my-button>
|
||||
<my-button v-else :width="150" :height="56" type="default" disabled>选择</my-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -69,40 +62,39 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, ref } from 'vue';
|
||||
import myButton from '@/components/my-components/my-button'
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import { shopTableClear } from '@/http/api/table.js'
|
||||
import myButton from '@/components/my-components/my-button';
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
import { shopTableClear } from '@/http/api/table.js';
|
||||
|
||||
const emits = defineEmits(['more', 'update', 'bind'])
|
||||
const emits = defineEmits(['more', 'update', 'bind']);
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
return {};
|
||||
}
|
||||
},
|
||||
areaMap: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
const computedClass = computed(() => {
|
||||
return props.data.status
|
||||
})
|
||||
return props.data.status;
|
||||
});
|
||||
|
||||
function returnStutasText(key) {
|
||||
const item = uni.$dict.tableStatus[key]
|
||||
return item ? item.label : ''
|
||||
const item = uni.$dict.tableStatus[key];
|
||||
return item ? item.label : '';
|
||||
}
|
||||
|
||||
function returnStutasColor(key) {
|
||||
const item = uni.$dict.tableStatus[key]
|
||||
return item ? item.type : ''
|
||||
const item = uni.$dict.tableStatus[key];
|
||||
return item ? item.type : '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更多
|
||||
*/
|
||||
@@ -111,53 +103,56 @@
|
||||
return uni.showToast({
|
||||
icon: 'none',
|
||||
title: '桌台关闭中!'
|
||||
})
|
||||
});
|
||||
}
|
||||
emits('more')
|
||||
emits('more');
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定码牌
|
||||
*/
|
||||
function bind() {
|
||||
emits('bind',props.data)
|
||||
emits('bind', props.data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择下单
|
||||
*/
|
||||
async function diancan() {
|
||||
hasPermission('允许下单').then(res=>{
|
||||
console.log(res)
|
||||
hasPermission('允许下单').then((res) => {
|
||||
console.log(res);
|
||||
if (res) {
|
||||
const useType = props.status == 'using' ? props.data.useType : undefined
|
||||
console.log(props.data)
|
||||
go.to('PAGES_CREATE_ORDER', props.data)
|
||||
const useType = props.status == 'using' ? props.data.useType : undefined;
|
||||
console.log(props.data);
|
||||
go.to('PAGES_CREATE_ORDER', props.data);
|
||||
}
|
||||
})
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 清台
|
||||
*/
|
||||
function qingtai() {
|
||||
let item = props.data
|
||||
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')
|
||||
id: item.id
|
||||
}).then((res) => {
|
||||
uni.$utils.showToast('清台成功');
|
||||
emits('update');
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
diancan
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -173,10 +168,10 @@
|
||||
}
|
||||
|
||||
.my-bg-main {
|
||||
padding: 32rpx 28rpx;
|
||||
padding: 24rpx 28rpx;
|
||||
|
||||
.tag {
|
||||
background-color: rgba(255, 255, 255, .7);
|
||||
background-color: rgba(255, 255, 255, 0.7);
|
||||
font-size: 24rpx;
|
||||
color: $my-main-color;
|
||||
border-radius: 8rpx;
|
||||
@@ -189,6 +184,5 @@
|
||||
color: rgb(250, 85, 85);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -1,22 +1,23 @@
|
||||
<template>
|
||||
<view class="color-333 u-font-28 min-page bg-gray">
|
||||
|
||||
<up-sticky>
|
||||
<view class="bg-fff u-p-l-30 u-p-b-30 u-relative">
|
||||
|
||||
<view class="input-wrapper">
|
||||
<view class="input-main">
|
||||
<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!=''}"
|
||||
style="max-width: 100rpx;">{{pageData.statusName }}</text>
|
||||
<text class="u-m-r-10 u-line-1" :class="{ 'color-main': pageData.query.status != '' }" style="max-width: 100rpx">{{ pageData.statusName }}</text>
|
||||
<up-icon name="arrow-down" size="16"></up-icon>
|
||||
</view>
|
||||
<uni-easyinput clearable class='jeepay-search' :inputBorder="false"
|
||||
<uni-easyinput
|
||||
clearable
|
||||
class="jeepay-search"
|
||||
:inputBorder="false"
|
||||
trim="all"
|
||||
placeholder="搜索"
|
||||
v-model="pageData.query.name"
|
||||
@clear="searchConfirm"
|
||||
@confirm="searchConfirm">
|
||||
@confirm="searchConfirm"
|
||||
>
|
||||
<template #prefixIcon>
|
||||
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
||||
</template>
|
||||
@@ -31,11 +32,16 @@
|
||||
|
||||
<view class="list u-p-30">
|
||||
<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)"
|
||||
v-for="(item,index) in pageData.area.list" :key="index">
|
||||
<view class="item u-p-20" :class="{ sel: pageData.area.sel == '' }" @tap="changeAreaSel({ id: '' })">
|
||||
<view class="box">
|
||||
<view class='up-line-1'>{{item.name}}</view>
|
||||
<view class="u-m-t-10">0/12</view>
|
||||
<view class="up-line-1">全部</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>
|
||||
@@ -44,20 +50,17 @@
|
||||
<template v-if="pageData.tabList.length">
|
||||
<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">
|
||||
<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>
|
||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
||||
@change="pageChange"></my-pagination>
|
||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size" @change="pageChange"></my-pagination>
|
||||
</template>
|
||||
|
||||
<my-img-empty v-if="pageData.hasAjax && !pageData.tabList.length" tips="未找到相关桌台"></my-img-empty>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<my-action-sheet :active="4" @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list"
|
||||
:title="actionSheet.title">
|
||||
<my-action-sheet :active="4" @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list" :title="actionSheet.title">
|
||||
<template #title>
|
||||
<view class="color-999 u-p-30 u-text-center border-bottom">桌号:{{ actionSheet.title }}</view>
|
||||
</template>
|
||||
@@ -66,19 +69,19 @@
|
||||
</template>
|
||||
|
||||
<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 tableItem from './components/table-item'
|
||||
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 { 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'
|
||||
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,
|
||||
@@ -89,62 +92,70 @@
|
||||
size: 10,
|
||||
status: '',
|
||||
areaId: '',
|
||||
name: '',
|
||||
name: ''
|
||||
},
|
||||
totalElements: 0,
|
||||
statusList: [[{
|
||||
statusList: [
|
||||
[
|
||||
{
|
||||
key: '',
|
||||
label: '全部'
|
||||
},...uni.$utils.objToArrary(uni.$dict.tableStatus)]],
|
||||
},
|
||||
...uni.$utils.objToArrary(uni.$dict.tableStatus)
|
||||
]
|
||||
],
|
||||
statusName: '全部',
|
||||
tabList: [],
|
||||
area: {
|
||||
list: [],
|
||||
sel: ''
|
||||
},
|
||||
orderInfo: null,
|
||||
})
|
||||
orderInfo: null
|
||||
});
|
||||
|
||||
const refMoreSheet = ref(null)
|
||||
const refMoreSheet = ref(null);
|
||||
const actionSheet = reactive({
|
||||
list: ['结账', '清台', '增减菜', '换台', '打印订单', '历史订单','绑定码牌'],
|
||||
list: ['结账', '清台', '加菜', '换台', '打印订单', '历史订单', '绑定码牌'],
|
||||
title: '',
|
||||
selTable: ''
|
||||
})
|
||||
});
|
||||
|
||||
watch(() => pageData.area.sel, (newval) => {
|
||||
pageData.query.page = 1
|
||||
getTable()
|
||||
})
|
||||
watch(
|
||||
() => pageData.area.sel,
|
||||
(newval) => {
|
||||
pageData.query.page = 1;
|
||||
getTable();
|
||||
}
|
||||
);
|
||||
|
||||
onShow(opt => {
|
||||
getData()
|
||||
})
|
||||
onShow((opt) => {
|
||||
getData();
|
||||
});
|
||||
function getData() {
|
||||
getTable()
|
||||
getArea()
|
||||
getTable();
|
||||
getArea();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取桌台列表
|
||||
*/
|
||||
async function getTable() {
|
||||
const res = await getShopTable(pageData.query)
|
||||
pageData.hasAjax = true
|
||||
pageData.tabList = res.records
|
||||
pageData.totalElements = res.totalRow
|
||||
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
|
||||
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
|
||||
}, {})
|
||||
prve[cur.id] = cur.name;
|
||||
return prve;
|
||||
}, {});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,10 +163,10 @@
|
||||
* @param {Object} e
|
||||
*/
|
||||
function confirmStatus(e) {
|
||||
pageData.statusShow = false
|
||||
pageData.query.status = e.value[0].key
|
||||
pageData.statusName = e.value[0].label
|
||||
getTable()
|
||||
pageData.statusShow = false;
|
||||
pageData.query.status = e.value[0].key;
|
||||
pageData.statusName = e.value[0].label;
|
||||
getTable();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -163,22 +174,23 @@
|
||||
* @param {Object} item
|
||||
*/
|
||||
function changeAreaSel(item) {
|
||||
pageData.area.sel = item.id
|
||||
pageData.query.areaId = item.id
|
||||
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()
|
||||
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
|
||||
})
|
||||
getHistoryOrder({ orderId: actionSheet.selTable.orderId }).then((res) => {
|
||||
pageData.orderInfo = res;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,18 +198,20 @@
|
||||
* 更多操作选择
|
||||
* @param {Object} index
|
||||
*/
|
||||
const tableItemRefsIndex = ref(0);
|
||||
const tableItemRefs = ref([]);
|
||||
async function actionSheetClick(index) {
|
||||
console.log(index);
|
||||
const item = actionSheet.selTable
|
||||
const item = actionSheet.selTable;
|
||||
if (index == 0) {
|
||||
if (!item.orderId) {
|
||||
return uni.$utils.showToast('该桌台暂无要结账的订单!')
|
||||
return uni.$utils.showToast('该桌台暂无要结账的订单!');
|
||||
}
|
||||
const canJieZhang = await hasPermission('允许收款')
|
||||
const canJieZhang = await hasPermission('允许收款');
|
||||
if (!canJieZhang) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
return toPay(item)
|
||||
return toPay(item);
|
||||
}
|
||||
if (index == 1) {
|
||||
//清台
|
||||
@@ -207,37 +221,37 @@
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
shopTableClear({
|
||||
id: item.id,
|
||||
}).then(res => {
|
||||
uni.$utils.showToast('清台成功')
|
||||
pageData.query.page = 1
|
||||
getTable()
|
||||
})
|
||||
id: item.id
|
||||
}).then((res) => {
|
||||
uni.$utils.showToast('清台成功');
|
||||
pageData.query.page = 1;
|
||||
getTable();
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
if (index == 2) {
|
||||
return uni.$utils.showToast('待开放,请敬请期待!')
|
||||
tableItemRefs.value[tableItemRefsIndex.value].diancan();
|
||||
}
|
||||
if (index == 3) {
|
||||
return uni.$utils.showToast('待开放,请敬请期待!')
|
||||
return uni.$utils.showToast('待开放,请敬请期待!');
|
||||
}
|
||||
if (index == 4) {
|
||||
//打印订单
|
||||
if (!item.orderId) {
|
||||
return uni.$utils.showToast('该桌台暂无要打印的订单!')
|
||||
return uni.$utils.showToast('该桌台暂无要打印的订单!');
|
||||
}
|
||||
|
||||
let res = await printOrder( {id: actionSheet.selTable.orderId, type: pageData.orderInfo.status == 'unpaid' ? 1 : 0 } )
|
||||
return
|
||||
let res = await printOrder({ id: actionSheet.selTable.orderId, type: pageData.orderInfo.status == 'unpaid' ? 1 : 0 });
|
||||
return;
|
||||
}
|
||||
if (index == 6) {
|
||||
//绑定码牌
|
||||
scanCode(item)
|
||||
return
|
||||
scanCode(item);
|
||||
return;
|
||||
}
|
||||
uni.$utils.showToast('待开放,请敬请期待!')
|
||||
uni.$utils.showToast('待开放,请敬请期待!');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -251,7 +265,7 @@
|
||||
orderId: item.orderId,
|
||||
discount: 1,
|
||||
userId: item.userId
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -259,7 +273,6 @@
|
||||
* @param {Object} item
|
||||
*/
|
||||
function scanCode(item) {
|
||||
|
||||
uni.scanCode({
|
||||
onlyFromCamera: true,
|
||||
success: function (res) {
|
||||
@@ -267,14 +280,14 @@
|
||||
console.log('条码内容:' + res.result);
|
||||
let params = getQueryString(res.result);
|
||||
shopTableBind({
|
||||
"tableCode": params.code,
|
||||
"id": item.id,
|
||||
}).then(res => {
|
||||
uni.$utils.showToast('桌台绑定成功')
|
||||
tableCode: params.code,
|
||||
id: item.id
|
||||
}).then((res) => {
|
||||
uni.$utils.showToast('桌台绑定成功');
|
||||
setTimeout(() => {
|
||||
getTable()
|
||||
},1500)
|
||||
})
|
||||
getTable();
|
||||
}, 1500);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -291,7 +304,6 @@
|
||||
params[key] = value;
|
||||
});
|
||||
return params;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -299,7 +311,7 @@
|
||||
*/
|
||||
function searchConfirm() {
|
||||
pageData.query.page = 1;
|
||||
getTable()
|
||||
getTable();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -307,11 +319,9 @@
|
||||
* @param {Object} page
|
||||
*/
|
||||
function pageChange(page) {
|
||||
pageData.query.page = page
|
||||
getTable()
|
||||
pageData.query.page = page;
|
||||
getTable();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -396,7 +406,7 @@
|
||||
width: 2px;
|
||||
border-radius: 2px;
|
||||
right: -20rpx;
|
||||
background-color: rgba(255, 255, 255, .5);
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,13 +418,12 @@
|
||||
|
||||
&.sel {
|
||||
.box {
|
||||
background-color: rgba(255, 255, 255, .6);
|
||||
background-color: rgba(255, 255, 255, 0.6);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.search-box {
|
||||
background-color: #fff;
|
||||
padding: 16rpx 0;
|
||||
@@ -425,7 +434,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// width: 164rpx;
|
||||
transition: all .3s ease-in-out;
|
||||
transition: all 0.3s ease-in-out;
|
||||
background-color: rgb(247, 247, 247);
|
||||
border-radius: 100px;
|
||||
}
|
||||
@@ -440,7 +449,6 @@
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
|
||||
.icon-arrow-down-fill {
|
||||
width: 16rpx;
|
||||
height: 10rpx;
|
||||
|
||||
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": {
|
||||
"navigationBarTitleText": "首页(自定义导航)",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
"enablePullDownRefresh": true,
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
<view class="page-wrapper" style="overflow: visible; height: auto">
|
||||
<!-- 背景图片view -->
|
||||
<view class="bg-img-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="bgbottomStyle">
|
||||
</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="bgbottomStyle"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 解决定位层级问题 -->
|
||||
@@ -22,13 +20,11 @@
|
||||
<view class="u-flex u-row-center u-relative">
|
||||
<view class="u-flex u-col-center">
|
||||
<view class="u-m-r-12">总收入</view>
|
||||
<up-icon name="/static/indexImg/icon-help.svg" color="#fff" :size="12"
|
||||
@click="toggleTips"></up-icon>
|
||||
<up-icon name="/static/indexImg/icon-help.svg" color="#fff" :size="12" @click="toggleTips"></up-icon>
|
||||
</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>
|
||||
</view>
|
||||
<view class="u-flex u-row-center">
|
||||
@@ -43,7 +39,6 @@
|
||||
<JeepayNavigation :navList="navList" type="grid" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -52,24 +47,24 @@
|
||||
|
||||
import go from '@/commons/utils/go.js';
|
||||
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 { hasPermission } from '@/commons/utils/hasPermission.js'
|
||||
import { hasPermission } from '@/commons/utils/hasPermission.js';
|
||||
|
||||
uni.hideTabBar()
|
||||
let shopName = ref()
|
||||
let totalRevenuedata = ref()
|
||||
uni.hideTabBar();
|
||||
let shopName = ref();
|
||||
let totalRevenuedata = ref();
|
||||
let totalRevenue = (d) => {
|
||||
totalRevenuedata.value = d
|
||||
}
|
||||
totalRevenuedata.value = d;
|
||||
};
|
||||
|
||||
let showTips = ref(false)
|
||||
let showTips = ref(false);
|
||||
function toggleTips() {
|
||||
showTips.value = !showTips.value
|
||||
showTips.value = !showTips.value;
|
||||
}
|
||||
|
||||
function toSetting() {
|
||||
go.to('PAGES_SHOP_SETUP')
|
||||
go.to('PAGES_SHOP_SETUP');
|
||||
}
|
||||
// 导航列表
|
||||
const navList = [
|
||||
@@ -83,11 +78,11 @@
|
||||
icon: '/static/indexImg/icon-substitute-ordering.svg',
|
||||
pageUrl: 'PAGES_CREATE_ORDER',
|
||||
clickFunc: () => {
|
||||
hasPermission('允许下单').then(res => {
|
||||
hasPermission('允许下单').then((res) => {
|
||||
if (res) {
|
||||
go.to('PAGES_CREATE_ORDER')
|
||||
go.to('PAGES_CREATE_ORDER');
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -98,23 +93,24 @@
|
||||
{
|
||||
title: '商品管理',
|
||||
icon: '/static/indexImg/icon-product-control.svg',
|
||||
pageUrl: 'PAGES_PRODUCT',
|
||||
pageUrl: 'PAGES_PRODUCT'
|
||||
},
|
||||
{
|
||||
title: '分组管理',
|
||||
icon: '/static/indexImg/goods-group.svg',
|
||||
pageUrl: 'PAGES_GOODS_GROUP',
|
||||
pageUrl: 'PAGES_GOODS_GROUP'
|
||||
},
|
||||
{
|
||||
title: '分类管理',
|
||||
icon: '/static/indexImg/icon-category.svg',
|
||||
pageUrl: 'PAGES_CATEGORY',
|
||||
pageUrl: 'PAGES_CATEGORY'
|
||||
},
|
||||
{
|
||||
title: '会员管理',
|
||||
icon: '/static/indexImg/icon-user.svg',
|
||||
pageUrl: 'PAGES_USER_CONTROL',
|
||||
}, {
|
||||
pageUrl: 'PAGES_USER_CONTROL'
|
||||
},
|
||||
{
|
||||
title: '员工管理',
|
||||
icon: '/static/indexImg/icon-staff.svg',
|
||||
pageUrl: 'PAGES_STAFF'
|
||||
@@ -127,17 +123,17 @@
|
||||
{
|
||||
title: '订单管理',
|
||||
icon: '/static/indexImg/icon-order.svg',
|
||||
pageUrl: 'PAGES_ORDER_INDEX',
|
||||
pageUrl: 'PAGES_ORDER_INDEX'
|
||||
},
|
||||
{
|
||||
title: '设备管理',
|
||||
icon: '/static/indexImg/icon-printer.svg',
|
||||
pageUrl: 'PAGES_PRINTER_INDEX',
|
||||
pageUrl: 'PAGES_PRINTER_INDEX'
|
||||
},
|
||||
{
|
||||
title: '交班',
|
||||
icon: '/static/indexImg/icon-work.svg',
|
||||
pageUrl: 'PAGES_WORK_INDEX',
|
||||
pageUrl: 'PAGES_WORK_INDEX'
|
||||
},
|
||||
{
|
||||
title: '排队',
|
||||
@@ -152,17 +148,17 @@
|
||||
{
|
||||
title: '优惠券',
|
||||
icon: '/static/coupon/icon_coupon.svg',
|
||||
pageUrl: 'PAGES_COUPON_INDEX',
|
||||
pageUrl: 'PAGES_COUPON_INDEX'
|
||||
},
|
||||
{
|
||||
title: '订阅通知',
|
||||
icon: '/static/indexImg/icon-notification.svg',
|
||||
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
||||
pageUrl: 'PAGES_NOTIFICATION_INDEX'
|
||||
},
|
||||
{
|
||||
title: '挂账管理',
|
||||
icon: '/static/indexImg/icon_credit.svg',
|
||||
pageUrl: 'PAGES_CREDIT_BUYER_INDEX',
|
||||
pageUrl: 'PAGES_CREDIT_BUYER_INDEX'
|
||||
},
|
||||
{
|
||||
title: '核销管理',
|
||||
@@ -174,8 +170,8 @@
|
||||
icon: '/static/indexImg/icon-login-out.svg',
|
||||
pageUrl: 'PAGES_LOGIN',
|
||||
clickFunc: () => {
|
||||
storageManage.cleanByLogout()
|
||||
go.to('PAGES_LOGIN', {}, 'redirect')
|
||||
storageManage.cleanByLogout();
|
||||
go.to('PAGES_LOGIN', {}, 'redirect');
|
||||
}
|
||||
}
|
||||
// {
|
||||
@@ -257,8 +253,6 @@
|
||||
// pageUrl: 'PAGES_AD_LIST',
|
||||
// entId: 'ENT_ADVERT_CONTROL'
|
||||
// },
|
||||
|
||||
|
||||
];
|
||||
|
||||
const vdata = reactive({
|
||||
@@ -331,7 +325,7 @@
|
||||
|
||||
width: 750rpx;
|
||||
height: 74rpx;
|
||||
background: linear-gradient( 180deg, rgba(195,215,235,0) 0%, #F9F9F9 100%);
|
||||
background: linear-gradient(180deg, rgba(195, 215, 235, 0) 0%, #f9f9f9 100%);
|
||||
}
|
||||
.income {
|
||||
/* #ifdef H5 */
|
||||
@@ -343,7 +337,7 @@
|
||||
/* #endif */
|
||||
> view {
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
}
|
||||
|
||||
@@ -369,8 +363,8 @@
|
||||
.tips {
|
||||
opacity: 0;
|
||||
right: 28rpx;
|
||||
transition: opacity .3s;
|
||||
background: #FFFFFF;
|
||||
transition: opacity 0.3s;
|
||||
background: #ffffff;
|
||||
padding: 20rpx 14rpx;
|
||||
width: 211rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -10,11 +10,17 @@
|
||||
<!-- <view class="page-cell m" @tap="updateValue('商户名称','shopName',vdata.shopInfo.shopName)"> -->
|
||||
<view class="page-cell m" @tap="go.to('PAGES_SHOP_EDITVAL', { name: 'shopName', value: vdata.shopInfo.shopName })">
|
||||
<view class="label">商户名称</view>
|
||||
<view class="right"><view>{{ vdata.shopInfo.shopName }}</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon></view>
|
||||
<view class="right">
|
||||
<view>{{ vdata.shopInfo.shopName }}</view>
|
||||
<up-icon name="arrow-right" color="#999999" size="15"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell m" @tap="go.to('PAGES_SHOP_EDITVAL', { name: 'phone', value: vdata.shopInfo.phone })">
|
||||
<view class="label">商户电话</view>
|
||||
<view class="right"><view>{{ vdata.shopInfo.phone }}</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon></view>
|
||||
<view class="right">
|
||||
<view>{{ vdata.shopInfo.phone }}</view>
|
||||
<up-icon name="arrow-right" color="#999999" size="15"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="page-cell m" >
|
||||
<view class="label">到期时间</view>
|
||||
@@ -22,11 +28,16 @@
|
||||
</view> -->
|
||||
<view class="page-cell m">
|
||||
<view class="label">营业状态</view>
|
||||
<view class="right"><up-switch v-model="vdata.shopInfo.status" size="20" :inactiveValue="2" :activeValue="1" activeColor="#0FC161" @change="switchChange('status')"></up-switch></view>
|
||||
<view class="right">
|
||||
<up-switch v-model="vdata.shopInfo.status" size="20" :inactiveValue="2" :activeValue="1" activeColor="#0FC161" @change="switchChange('status')"></up-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell m" @tap="showMap">
|
||||
<view class="label">门店详细地址</view>
|
||||
<view class="right"><view>{{ vdata.shopInfo.address }}</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon></view>
|
||||
<view class="right">
|
||||
<view>{{ vdata.shopInfo.address }}</view>
|
||||
<up-icon name="arrow-right" color="#999999" size="15"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="page-cell">
|
||||
<view class="label">堂食功能</view>
|
||||
@@ -38,27 +49,66 @@
|
||||
</view>
|
||||
<view class="page-cell m">
|
||||
<view class="label">是否开启会员余额支付</view>
|
||||
<view class="right"><up-switch v-model="vdata.shopInfo.isAccountPay" size="20" :inactiveValue="0" :activeValue="1" activeColor="#0FC161" @change="switchChange('isAccountPay')"></up-switch></view>
|
||||
<view class="right">
|
||||
<up-switch
|
||||
v-model="vdata.shopInfo.isAccountPay"
|
||||
size="20"
|
||||
:inactiveValue="0"
|
||||
:activeValue="1"
|
||||
activeColor="#0FC161"
|
||||
@change="switchChange('isAccountPay')"
|
||||
></up-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell m">
|
||||
<view class="label">是否开启会员价支付</view>
|
||||
<view class="right"><up-switch v-model="vdata.shopInfo.isMemberPrice" size="20" :inactiveValue="0" :activeValue="1" activeColor="#0FC161" @change="switchChange('isMemberPrice')"></up-switch></view>
|
||||
<view class="right">
|
||||
<up-switch
|
||||
v-model="vdata.shopInfo.isMemberPrice"
|
||||
size="20"
|
||||
:inactiveValue="0"
|
||||
:activeValue="1"
|
||||
activeColor="#0FC161"
|
||||
@change="switchChange('isMemberPrice')"
|
||||
></up-switch>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell">
|
||||
<view class="label">桌位费<view v-if="!vdata.isTableFee" class="tableFee" @tap="go.to('PAGES_SHOP_EDITVAL',{name:'tableFee',value: vdata.shopInfo.tableFee})">{{vdata.shopInfo.tableFee}}</view></view>
|
||||
<view class="label">
|
||||
桌位费
|
||||
<view v-if="!vdata.isTableFee" class="tableFee" @tap="go.to('PAGES_SHOP_EDITVAL', { name: 'tableFee', value: vdata.shopInfo.tableFee })">
|
||||
{{ vdata.shopInfo.tableFee }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view>
|
||||
<up-checkbox-group><up-checkbox label="免桌位费" v-model:checked="vdata.isTableFee" activeColor="#0FC161" shape="circle" @change="isTableFeeChange"> </up-checkbox></up-checkbox-group>
|
||||
<up-checkbox-group>
|
||||
<up-checkbox label="免桌位费" v-model:checked="vdata.isTableFee" activeColor="#0FC161" shape="circle" @change="isTableFeeChange"></up-checkbox>
|
||||
</up-checkbox-group>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="page-cell">
|
||||
<view class="label">台桌清理类型</view>
|
||||
<view class="right">
|
||||
<up-radio-group v-model="vdata.shopInfo.tableClearType" placement="row" @change="tableClearChange">
|
||||
<up-radio label="自动" name="auto" :customStyle="{ marginRight: '10px' }" activeColor="#0FC161"></up-radio>
|
||||
<up-radio label="手动" name="hand" :customStyle="{ marginRight: '10px' }" activeColor="#0FC161"></up-radio>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell">
|
||||
<view class="label">
|
||||
自动清台时间
|
||||
</view>
|
||||
<view class="right">
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="page-cell m">
|
||||
<view class="label">付费模式</view>
|
||||
<view class="right">
|
||||
<up-radio-group
|
||||
v-model="vdata.shopInfo.registerType"
|
||||
placement="row"
|
||||
>
|
||||
<up-radio-group v-model="vdata.shopInfo.registerType" placement="row">
|
||||
<up-radio
|
||||
:customStyle="{ marginRight: '10px' }"
|
||||
v-for="(item, index) in vdata.registerTypeList"
|
||||
@@ -67,10 +117,8 @@
|
||||
:name="item.value"
|
||||
activeColor="#0FC161"
|
||||
@change="radioChange"
|
||||
>
|
||||
</up-radio>
|
||||
></up-radio>
|
||||
</up-radio-group>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="page-cell" @tap="go.to('PAGES_SHOP_QRCODE', { paymentQrcode: vdata.shopInfo.paymentQrcode })">
|
||||
@@ -81,24 +129,37 @@
|
||||
<view class="label">店铺图片</view>
|
||||
<view class="extendList">
|
||||
<view class="extendTab">
|
||||
<view class="extendTab_item"
|
||||
v-for="(item,index) in vdata.extendList" :key="index"
|
||||
:class="{'active':vdata.extendIndex==index}"
|
||||
<view
|
||||
class="extendTab_item"
|
||||
v-for="(item, index) in vdata.extendList"
|
||||
:key="index"
|
||||
:class="{ active: vdata.extendIndex == index }"
|
||||
@click="extendTabClick(item, index)"
|
||||
>{{item.name}}</view>
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="extend_content">
|
||||
<view class="preview" v-if="vdata.extendInfo.autoKey != 'ticket_logo'">
|
||||
<view class="index_bg"><up-image v-if="'index_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="my_bg"><up-image v-if="'my_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="bg"><up-image v-if="'member_bg' == vdata.extendInfo.autoKey" :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
|
||||
<view class="bg">
|
||||
<up-image
|
||||
v-if="'member_bg' == vdata.extendInfo.autoKey"
|
||||
:src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/' + vdata.extendInfo.autoKey + '.png'"
|
||||
></up-image>
|
||||
</view>
|
||||
<view class="member_bg"><up-image v-if="'member_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="shopinfo_bg"><up-image v-if="'shopinfo_bg' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
<view class="shopinfo_bg_f" v-if="'shopinfo_bg' == vdata.extendInfo.autoKey"></view>
|
||||
<view class="bg" v-if="vdata.extendInfo.autoKey" ><up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
|
||||
<view class="bg" v-if="vdata.extendInfo.autoKey">
|
||||
<up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/' + vdata.extendInfo.autoKey + '.png'"></up-image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preview" v-else style="width: 359rpx; height: 232rpx">
|
||||
<view class="bg ticket_logo" v-if="vdata.extendInfo.autoKey == 'ticket_logo'" ><up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/'+vdata.extendInfo.autoKey+'.png'" ></up-image></view>
|
||||
<view class="bg ticket_logo" v-if="vdata.extendInfo.autoKey == 'ticket_logo'">
|
||||
<up-image :src="'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/cashier_admin_app_shopSet/' + vdata.extendInfo.autoKey + '.png'"></up-image>
|
||||
</view>
|
||||
<view class="ticket_logo img"><up-image v-if="'ticket_logo' == vdata.extendInfo.autoKey" :src="vdata.extendInfo.value"></up-image></view>
|
||||
</view>
|
||||
<view class="extend_img">
|
||||
@@ -113,41 +174,38 @@
|
||||
</view>
|
||||
<!-- <view class="cutShop" @tap="go.to('PAGES_SHOP_LIST')">切换门店</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ref, reactive, onMounted } from 'vue';
|
||||
import { onShow } from '@dcloudio/uni-app';
|
||||
import go from '@/commons/utils/go.js'
|
||||
import { uploadFile } from '@/http/api/index.js'
|
||||
import { getShopInfo, editShopInfo, getShopExtend, editShopExtend } from '@/http/api/shop.js'
|
||||
import go from '@/commons/utils/go.js';
|
||||
import { uploadFile } from '@/http/api/index.js';
|
||||
import { getShopInfo, editShopInfo, getShopExtend, editShopExtend } from '@/http/api/shop.js';
|
||||
|
||||
const vdata = reactive({
|
||||
shopInfo: {
|
||||
status: 2,
|
||||
isAccountPay: 0,
|
||||
isMemberPrice: 0,
|
||||
isMemberPrice: 0
|
||||
},
|
||||
extendList: [],
|
||||
registerTypeList: [
|
||||
{name: "先付费", value: "before"},
|
||||
{name: "后付费", value: "after"}
|
||||
{ name: '先付费', value: 'before' },
|
||||
{ name: '后付费', value: 'after' }
|
||||
],
|
||||
extendIndex: 0,
|
||||
extendInfo: {},
|
||||
dineIn: false,
|
||||
takeout: false,
|
||||
isTableFee: false,
|
||||
label: "",
|
||||
type: "",
|
||||
inputValue: "",
|
||||
|
||||
})
|
||||
label: '',
|
||||
type: '',
|
||||
inputValue: ''
|
||||
});
|
||||
onMounted(() => {
|
||||
shopExtend();
|
||||
})
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
shopInfo();
|
||||
@@ -155,21 +213,20 @@ onShow(() => {
|
||||
// 这里执行刷新数据的操作,例如重新调用API获取数据
|
||||
refreshData(params);
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* 输入内容修改
|
||||
*/
|
||||
let refreshData = (e) => {
|
||||
let params = {
|
||||
id : vdata.shopInfo.id,
|
||||
}
|
||||
params[e.name] = e.value
|
||||
id: vdata.shopInfo.id
|
||||
};
|
||||
params[e.name] = e.value;
|
||||
vdata.type = e.name;
|
||||
vdata.inputValue = e.value;
|
||||
updateShopInfo(params,'input')
|
||||
}
|
||||
updateShopInfo(params, 'input');
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取店铺信息
|
||||
@@ -177,15 +234,15 @@ let refreshData = (e) => {
|
||||
const shopInfo = () => {
|
||||
getShopInfo({ id: uni.getStorageSync('shopInfo').id }).then((res) => {
|
||||
vdata.isTableFee = res.isTableFee == 1 ? true : false;
|
||||
if (res.eatModel.split(",").indexOf("dine-in") != -1) {
|
||||
vdata.dineIn = true
|
||||
if (res.eatModel.split(',').indexOf('dine-in') != -1) {
|
||||
vdata.dineIn = true;
|
||||
}
|
||||
if (res.eatModel.split(",").indexOf("take-out") != -1) {
|
||||
vdata.takeout = true
|
||||
if (res.eatModel.split(',').indexOf('take-out') != -1) {
|
||||
vdata.takeout = true;
|
||||
}
|
||||
vdata.shopInfo = res;
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取店铺图片
|
||||
@@ -197,7 +254,16 @@ let shopExtend = () => {
|
||||
vdata.extendIndex = 0;
|
||||
vdata.extendInfo = res[0];
|
||||
}
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
// 台桌清理模式修改
|
||||
function tableClearChange(n) {
|
||||
let params = {
|
||||
id: vdata.shopInfo.id,
|
||||
tableClearType: n
|
||||
};
|
||||
updateShopInfo(params);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -206,9 +272,9 @@ let shopExtend = () => {
|
||||
let radioChange = (n) => {
|
||||
let params = {
|
||||
id: vdata.shopInfo.id,
|
||||
registerType : n,
|
||||
}
|
||||
updateShopInfo(params)
|
||||
registerType: n
|
||||
};
|
||||
updateShopInfo(params);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -216,11 +282,11 @@ let radioChange = (n) => {
|
||||
*/
|
||||
let updateShopInfo = (params, type) => {
|
||||
editShopInfo(params).then((res) => {
|
||||
if (type && type == "input") {
|
||||
if (type && type == 'input') {
|
||||
vdata.shopInfo[vdata.type] = vdata.inputValue;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改店铺图片
|
||||
@@ -228,11 +294,9 @@ let updateShopInfo = (params,type) => {
|
||||
let updateShopExtend = () => {
|
||||
editShopExtend({
|
||||
autokey: vdata.extendInfo.autoKey,
|
||||
value: vdata.extendInfo.value,
|
||||
}).then((res) => {})
|
||||
}
|
||||
|
||||
|
||||
value: vdata.extendInfo.value
|
||||
}).then((res) => {});
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传头像
|
||||
@@ -245,36 +309,36 @@ let chooseAndUploadAvatar = ( type ) => {
|
||||
sourceType: ['album', 'camera'], // 图片来源,相册或相机
|
||||
success: (res) => {
|
||||
let file = res.tempFiles[0];
|
||||
uploadFile(file).then(res => {
|
||||
if ( type == "coverImg") {
|
||||
uploadFile(file)
|
||||
.then((res) => {
|
||||
if (type == 'coverImg') {
|
||||
vdata.shopInfo.coverImg = res;
|
||||
let params = {
|
||||
id: vdata.shopInfo.id,
|
||||
coverImg : vdata.shopInfo.coverImg,
|
||||
coverImg: vdata.shopInfo.coverImg
|
||||
};
|
||||
updateShopInfo(params);
|
||||
}
|
||||
updateShopInfo(params)
|
||||
}
|
||||
if ( type == "extendUp") {
|
||||
if (type == 'extendUp') {
|
||||
vdata.extendInfo.value = res;
|
||||
updateShopExtend()
|
||||
updateShopExtend();
|
||||
}
|
||||
|
||||
}).catch(res=>{
|
||||
})
|
||||
.catch((res) => {
|
||||
if (res.errMsg) {
|
||||
uni.showToast({
|
||||
title: '图片大小超出限制',
|
||||
icon: 'error'
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
fail: chooseImageError => {
|
||||
fail: (chooseImageError) => {
|
||||
// 选择图片失败处理逻辑
|
||||
console.log('choose image fail:', chooseImageError);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 店铺图片TAB切换
|
||||
@@ -282,7 +346,7 @@ let chooseAndUploadAvatar = ( type ) => {
|
||||
let extendTabClick = (item, index) => {
|
||||
vdata.extendInfo = item;
|
||||
vdata.extendIndex = index;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 是否免桌位费
|
||||
@@ -293,26 +357,26 @@ let isTableFeeChange = (e) => {
|
||||
} else {
|
||||
vdata.isTableFee = false;
|
||||
}
|
||||
switchChange('isTableFee')
|
||||
}
|
||||
switchChange('isTableFee');
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
let switchChange = (type) => {
|
||||
let params = {
|
||||
id : vdata.shopInfo.id,
|
||||
}
|
||||
id: vdata.shopInfo.id
|
||||
};
|
||||
switch (type) {
|
||||
case "address":
|
||||
case 'address':
|
||||
params.lng = vdata.shopInfo.lng;
|
||||
params.lat = vdata.shopInfo.lat;
|
||||
params.address = vdata.shopInfo.address;
|
||||
break;
|
||||
case "status":
|
||||
case 'status':
|
||||
params.status = vdata.shopInfo.status;
|
||||
break;
|
||||
case "eatModel":
|
||||
case 'eatModel':
|
||||
params.eatModel = [];
|
||||
if (vdata.dineIn) {
|
||||
params.eatModel.push('dine-in');
|
||||
@@ -320,15 +384,15 @@ let switchChange = ( type ) => {
|
||||
if (vdata.takeout) {
|
||||
params.eatModel.push('take-out');
|
||||
}
|
||||
params.eatModel = params.eatModel.join(',')
|
||||
params.eatModel = params.eatModel.join(',');
|
||||
break;
|
||||
case "isAccountPay":
|
||||
case 'isAccountPay':
|
||||
params.isAccountPay = vdata.shopInfo.isAccountPay;
|
||||
break;
|
||||
case "isMemberPrice":
|
||||
case 'isMemberPrice':
|
||||
params.isMemberPrice = vdata.shopInfo.isMemberPrice;
|
||||
break;
|
||||
case "isTableFee":
|
||||
case 'isTableFee':
|
||||
if (vdata.isTableFee) {
|
||||
params.isTableFee = 1;
|
||||
} else {
|
||||
@@ -337,7 +401,7 @@ let switchChange = ( type ) => {
|
||||
break;
|
||||
}
|
||||
updateShopInfo(params);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 选择地图
|
||||
@@ -349,11 +413,10 @@ let showMap = () => {
|
||||
uni.chooseLocation({
|
||||
// type: 'wgs84',
|
||||
success: function (res) {
|
||||
|
||||
vdata.shopInfo.lng = res.longitude.toFixed(6); // IOS 小程序中: 经纬度12位。
|
||||
vdata.shopInfo.lat = res.latitude.toFixed(6);
|
||||
vdata.shopInfo.address = res.name;
|
||||
switchChange('address')
|
||||
switchChange('address');
|
||||
},
|
||||
fail: function (err) {
|
||||
console.log(err);
|
||||
@@ -362,17 +425,13 @@ let showMap = () => {
|
||||
// icon:'error'
|
||||
// })
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-wrapper {
|
||||
background-color: #F8F8F8;
|
||||
background-color: #f8f8f8;
|
||||
padding-bottom: 32rpx;
|
||||
.page-cell {
|
||||
display: flex;
|
||||
@@ -397,7 +456,7 @@ let showMap = () => {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
text-align: left;
|
||||
padding: 0 18rpx;
|
||||
box-sizing: border-box;
|
||||
@@ -416,12 +475,12 @@ let showMap = () => {
|
||||
font-weight: 400;
|
||||
padding: 4rpx 12rpx;
|
||||
border-radius: 4rpx;
|
||||
border: 2rpx solid #E5E5E5;
|
||||
border: 2rpx solid #e5e5e5;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
.active {
|
||||
background: #318AFE;
|
||||
border: 2rpx solid #318AFE;
|
||||
background: #318afe;
|
||||
border: 2rpx solid #318afe;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@@ -434,28 +493,33 @@ let showMap = () => {
|
||||
position: relative;
|
||||
margin-right: 32rpx;
|
||||
background-color: #f7f7f7;
|
||||
::v-deep .bg,::v-deep .bg .u-image,::v-deep .bg .u-image__image{
|
||||
::v-deep .bg,
|
||||
::v-deep .bg .u-image,
|
||||
::v-deep .bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 342rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
::v-deep .index_bg .u-image,::v-deep .index_bg .u-image__image{
|
||||
::v-deep .index_bg .u-image,
|
||||
::v-deep .index_bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 242rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
::v-deep .my_bg .u-image,::v-deep .my_bg .u-image__image{
|
||||
::v-deep .my_bg .u-image,
|
||||
::v-deep .my_bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 90rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
::v-deep .member_bg .u-image,::v-deep .member_bg .u-image__image{
|
||||
::v-deep .member_bg .u-image,
|
||||
::v-deep .member_bg .u-image__image {
|
||||
width: 34rpx !important;
|
||||
height: 63rpx !important;
|
||||
position: absolute;
|
||||
@@ -466,19 +530,23 @@ let showMap = () => {
|
||||
border-radius: 5rpx !important;
|
||||
}
|
||||
|
||||
::v-deep .shopinfo_bg .u-image,::v-deep .shopinfo_bg .u-image__image{
|
||||
::v-deep .shopinfo_bg .u-image,
|
||||
::v-deep .shopinfo_bg .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 50rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
::v-deep .bg.ticket_logo,::v-deep .bg.ticket_logo .u-image,::v-deep .bg.ticket_logo .u-image__image{
|
||||
::v-deep .bg.ticket_logo,
|
||||
::v-deep .bg.ticket_logo .u-image,
|
||||
::v-deep .bg.ticket_logo .u-image__image {
|
||||
width: 359rpx !important;
|
||||
height: 232rpx !important;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
::v-deep .ticket_logo.img .u-image,::v-deep .ticket_logo.img .u-image__image{
|
||||
::v-deep .ticket_logo.img .u-image,
|
||||
::v-deep .ticket_logo.img .u-image__image {
|
||||
width: 146rpx !important;
|
||||
height: 50rpx !important;
|
||||
position: absolute;
|
||||
@@ -493,7 +561,6 @@ let showMap = () => {
|
||||
bottom: 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
}
|
||||
.extend_img {
|
||||
display: flex;
|
||||
@@ -515,14 +582,14 @@ let showMap = () => {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
::v-deep .u-image,::v-deep .u-image__image{
|
||||
::v-deep .u-image,
|
||||
::v-deep .u-image__image {
|
||||
width: 148rpx !important;
|
||||
height: 148rpx !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.column {
|
||||
flex-direction: column;
|
||||
@@ -537,11 +604,11 @@ let showMap = () => {
|
||||
width: 530rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background: #318AFE;
|
||||
background: #318afe;
|
||||
border-radius: 56rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
margin: 48rpx auto 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
@@ -574,9 +641,5 @@ let showMap = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,9 @@
|
||||
<template>
|
||||
<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="u-absolute goods bg-fff">
|
||||
<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">
|
||||
<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">
|
||||
<view>已添加{{ goodsNumber.toFixed(0) }}件商品</view>
|
||||
<view class="color-666">
|
||||
<uni-icons color="#666" type="trash"></uni-icons>
|
||||
@@ -14,8 +12,7 @@
|
||||
</view>
|
||||
<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"
|
||||
style="opacity: 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" style="opacity: 0">
|
||||
<view>已添加{{ goodsNumber.toFixed(0) }}件商品</view>
|
||||
<view class="color-666">
|
||||
<uni-icons color="#666" type="trash"></uni-icons>
|
||||
@@ -23,13 +20,12 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 占位 -->
|
||||
<view class="color-333 item border-top u-flex u-row-center u-row-between"
|
||||
v-for="(item,index) in data" :key="index">
|
||||
<view class="color-333 item border-top u-flex u-row-center u-row-between" v-for="(item, index) in data" :key="index">
|
||||
<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>
|
||||
<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="u-flex" @tap="updateNumber(false, index, item)">
|
||||
<image src="/pagesCreateOrder/static/images/icon-reduce-black.svg" class="icon" mode="" />
|
||||
@@ -38,43 +34,44 @@
|
||||
{{ item.number.toFixed(2) }}
|
||||
</view>
|
||||
<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="" />
|
||||
</view>
|
||||
|
||||
<image
|
||||
src="/pagesCreateOrder/static/images/icon-add-black.svg"
|
||||
class="icon"
|
||||
:class="{ grayscale: item.type == 'package' && item.groupType == 1 }"
|
||||
mode=""
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view style="margin: 50rpx auto 110rpx auto;" v-if="!data.length">
|
||||
</view>
|
||||
<view style="margin: 50rpx auto 110rpx auto" v-if="!data.length">
|
||||
<my-empty text="暂未有添加商品"></my-empty>
|
||||
</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 class="color-333" style="font-weight: bold;">历史订单</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 class="color-333" style="font-weight: bold">历史订单</view>
|
||||
<view class="color-666">
|
||||
<uni-icons color="#666" type="trash"></uni-icons>
|
||||
<text class="u-m-l-10" @tap="setModalShow('clear', true, 'allHistoryOrder', '清空历史订单')">清空历史订单</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-for="(item, index) in historyOrder" :key="index">
|
||||
<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">
|
||||
<view class="color-333" style="font-size: 30rpx;">第{{item.placeNum}}次下单</view>
|
||||
<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">
|
||||
<view class="color-333" style="font-size: 30rpx">第{{ item.placeNum }}次下单</view>
|
||||
<view class="color-666">
|
||||
<uni-icons color="#666" type="trash"></uni-icons>
|
||||
<text class="u-m-l-10" @tap="setModalShow('clear', true, item.placeNum, '清空第' + item.placeNum + '次下单历史订单')">清空</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="color-333 item border-top u-flex u-row-center u-row-between"
|
||||
v-for="(v,i) in item.info" :key="i">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view class="up-line-1" style="margin-right: 10rpx;">{{v.productName}}</view>
|
||||
<uni-tag v-if="v.returnNum>0" :text="'退菜X'+v.returnNum"
|
||||
custom-style="background-color: #EB4F4F; border-color: #EB4F4F; color: #fff;">
|
||||
</uni-tag>
|
||||
<view class="color-333 item border-top u-flex u-row-center u-row-between" v-for="(v, i) in item.info" :key="i">
|
||||
<view style="display: flex; align-items: center">
|
||||
<view class="up-line-1" style="margin-right: 10rpx">{{ v.productName }}</view>
|
||||
<uni-tag
|
||||
v-if="v.returnNum > 0"
|
||||
:text="'退菜X' + v.returnNum"
|
||||
custom-style="background-color: #EB4F4F; border-color: #EB4F4F; color: #fff;"
|
||||
></uni-tag>
|
||||
</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="u-m-l-30 u-m-r-30 color-333">X{{ v.num.toFixed(2) }}</view>
|
||||
</view>
|
||||
@@ -93,33 +90,40 @@
|
||||
<my-button shape="circle" height="80" width="220" @tap="toConfimOrder">
|
||||
<text class="u-font-32 font-bold">{{ table.type == 'add' ? '确认加菜' : '去下单' }}</text>
|
||||
</my-button>
|
||||
|
||||
|
||||
</view>
|
||||
<up-modal title="提示" :content="modal.title" :show="modal.clear" showCancelButton closeOnClickOverlay
|
||||
@confirm="confirmModelConfirm" @cancel="setModalShow('clear',false)" @close="setModalShow('clear',false)"
|
||||
width="300px"></up-modal>
|
||||
<up-modal
|
||||
title="提示"
|
||||
:content="modal.title"
|
||||
:show="modal.clear"
|
||||
showCancelButton
|
||||
closeOnClickOverlay
|
||||
@confirm="confirmModelConfirm"
|
||||
@cancel="setModalShow('clear', false)"
|
||||
@close="setModalShow('clear', false)"
|
||||
width="300px"
|
||||
></up-modal>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
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 infoBox from '@/commons/utils/infoBox.js';
|
||||
import { formatPrice } from '@/commons/utils/format.js';
|
||||
import { $trturnPayAfter } from '../util.js'
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
return [];
|
||||
}
|
||||
},
|
||||
historyOrder: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return []
|
||||
return [];
|
||||
}
|
||||
},
|
||||
isCreateOrderToDetail: {
|
||||
@@ -131,7 +135,7 @@
|
||||
default: () => {
|
||||
return {
|
||||
id: ''
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
table: {
|
||||
@@ -139,53 +143,56 @@
|
||||
default: () => {
|
||||
return {
|
||||
tableId: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
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 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)
|
||||
let price = Math.floor(cur.price * (cur.num - cur.returnNum) * 100) / 100;
|
||||
return prve + price;
|
||||
}, 0);
|
||||
|
||||
return (cartPrice + historyOrderPrice).toFixed(2)
|
||||
})
|
||||
return (cartPrice + historyOrderPrice).toFixed(2);
|
||||
});
|
||||
|
||||
const goodsNumber = computed(() => {
|
||||
let result = 0
|
||||
let result = 0;
|
||||
let cart = props.data.reduce((prve, cur) => {
|
||||
return prve + cur.number
|
||||
}, 0)
|
||||
return prve + cur.number;
|
||||
}, 0);
|
||||
|
||||
let historyOrderNum = allHistoryOrder.value.reduce((prve, cur) => {
|
||||
return prve + cur.num
|
||||
}, 0)
|
||||
result = cart + historyOrderNum
|
||||
result = result > 0 ? result.toFixed(2) : 0
|
||||
return result >= 99 ? 99 : parseFloat(result)
|
||||
})
|
||||
watch(() => props.historyOrder, (newval) => {
|
||||
// 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 = [];
|
||||
newval.forEach(item=>{
|
||||
allHistoryOrder.value = [...allHistoryOrder.value,...item.info]
|
||||
})
|
||||
})
|
||||
newval.forEach((item) => {
|
||||
allHistoryOrder.value = [...allHistoryOrder.value, ...item.info];
|
||||
});
|
||||
}
|
||||
);
|
||||
const modal = reactive({
|
||||
key: '',
|
||||
title: '',
|
||||
type: '',
|
||||
clear: false
|
||||
})
|
||||
});
|
||||
|
||||
function confirmModelConfirm() {
|
||||
if (modal.key == 'clear') {
|
||||
clear()
|
||||
clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,49 +200,56 @@
|
||||
// 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
|
||||
if (title) {
|
||||
modal.title = title;
|
||||
}
|
||||
if (type) {
|
||||
modal.type = type;
|
||||
}
|
||||
modal.key = key;
|
||||
modal[key] = show;
|
||||
console.log(modal);
|
||||
}
|
||||
|
||||
const edmits = defineEmits(['clear', 'updateNumber'])
|
||||
const edmits = defineEmits(['clear', 'updateNumber']);
|
||||
|
||||
// mask
|
||||
let switchGoods = ref(false)
|
||||
let switchGoods = ref(false);
|
||||
|
||||
function hideGoods() {
|
||||
switchGoods.value = false
|
||||
switchGoods.value = false;
|
||||
}
|
||||
|
||||
function showGoods() {
|
||||
switchGoods.value = true
|
||||
switchGoods.value = true;
|
||||
}
|
||||
|
||||
function toggleGoods() {
|
||||
switchGoods.value = !switchGoods.value
|
||||
switchGoods.value = !switchGoods.value;
|
||||
}
|
||||
|
||||
function toConfimOrder() {
|
||||
if (props.data.length <= 0 && allHistoryOrder.value.length <= 0) {
|
||||
return infoBox.showToast('还没有选择商品')
|
||||
return infoBox.showToast('还没有选择商品');
|
||||
}
|
||||
const { name, status, type } = props.table
|
||||
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
|
||||
orderId: props.orderInfo.id
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (props.table.id == '' && props.table.tableCode == '') {
|
||||
go.to('PAGES_CONFIRM_ORDER', {
|
||||
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
||||
})
|
||||
return
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let shopInfo = uni.getStorageSync('shopInfo');
|
||||
console.log($trturnPayAfter(shopInfo));
|
||||
|
||||
go.to('PAGES_CONFIRM_ORDER', {
|
||||
type: type,
|
||||
tableId: props.table.id,
|
||||
@@ -243,33 +257,30 @@
|
||||
name: name,
|
||||
status: status,
|
||||
isCreateOrderToDetail: props.isCreateOrderToDetail ? 1 : 0
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateNumber(isAdd, index, goods) {
|
||||
const step = isAdd ? 1 : -1
|
||||
const newval = goods.number + step
|
||||
const step = isAdd ? 1 : -1;
|
||||
const newval = goods.number + step;
|
||||
if (goods.type == 'package' && goods.groupType == 1 && isAdd) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
const par = {
|
||||
num: newval,
|
||||
index: index,
|
||||
goods: goods
|
||||
}
|
||||
edmits('updateNumber', par)
|
||||
};
|
||||
edmits('updateNumber', par);
|
||||
}
|
||||
|
||||
function clear() {
|
||||
if (modal.type == 'cart') {
|
||||
hideGoods()
|
||||
hideGoods();
|
||||
}
|
||||
setModalShow('clear', false)
|
||||
edmits('clear',modal.type)
|
||||
setModalShow('clear', false);
|
||||
edmits('clear', modal.type);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -293,24 +304,22 @@
|
||||
|
||||
.icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx
|
||||
height: 40rpx;
|
||||
}
|
||||
.grayscale {
|
||||
filter: opacity(60%)
|
||||
filter: opacity(60%);
|
||||
}
|
||||
.mask {
|
||||
@include fixedAll;
|
||||
background: rgba(51, 51, 51, 0.5);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.goods {
|
||||
position: absolute;
|
||||
bottom: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
transition: all .2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
overflow: hidden;
|
||||
|
||||
.item {
|
||||
@@ -319,15 +328,15 @@
|
||||
}
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.border-top {
|
||||
border-top: 1px solid #E5E5E5;
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #EB4F4F;
|
||||
color: #eb4f4f;
|
||||
}
|
||||
|
||||
.car {
|
||||
@@ -357,19 +366,19 @@
|
||||
top: 0;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
background: #EB4F4F;
|
||||
background: #eb4f4f;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 20rpx;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.price {
|
||||
color: #EB4F4F;
|
||||
color: #eb4f4f;
|
||||
margin-left: calc(38rpx + $car-size);
|
||||
transform: translateY(calc($car-top / 2));
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,34 +2,38 @@
|
||||
<view class="min-page bg-gray u-font-28 u-p-30">
|
||||
<user-vue :orderInfo="orderDetail.info" :user="user"></user-vue>
|
||||
|
||||
<goods-list @printOrder="onPrintOrder" @tuikuan="onTuikuan" :orderInfo="orderDetail.info"
|
||||
<goods-list
|
||||
@printOrder="onPrintOrder"
|
||||
@tuikuan="onTuikuan"
|
||||
:orderInfo="orderDetail.info"
|
||||
:user="user"
|
||||
:data="orderDetail.goodsList" :seatFee="orderDetail.seatFee" @tuicai="onTuiCai"></goods-list>
|
||||
:data="orderDetail.goodsList"
|
||||
:seatFee="orderDetail.seatFee"
|
||||
@tuicai="onTuiCai"
|
||||
></goods-list>
|
||||
|
||||
<template v-if="true">
|
||||
<extra-vue @tuicai="onSeatFeeTuicai" @tuikuan="onSeatFeeTuiKuan" :orderInfo="orderDetail.info"
|
||||
:data="orderDetail.seatFee"></extra-vue>
|
||||
<extra-vue @tuicai="onSeatFeeTuicai" @tuikuan="onSeatFeeTuiKuan" :orderInfo="orderDetail.info" :data="orderDetail.seatFee"></extra-vue>
|
||||
</template>
|
||||
<order-vue :data="orderDetail.info" :table="options" :seatFee="orderDetail.seatFee"></order-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-flex u-abso">
|
||||
<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'">
|
||||
<my-button @tap="toPay" borderRadius="100rpx" shape="circle"
|
||||
type="primary">结账</my-button>
|
||||
<my-button @tap="toPay" borderRadius="100rpx" shape="circle" type="primary">结账</my-button>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="orderDetail.info.status == 'unpaid'">
|
||||
<view class="u-flex-1">
|
||||
<my-button @tap="diancan" color="#fff" bgColor="rgb(57,53,52)" borderRadius="100rpx 0 0 100rpx" fontWeight="700"
|
||||
shape="circle" plain type="primary">加菜</my-button>
|
||||
<my-button @tap="diancan" color="#fff" bgColor="rgb(57,53,52)" borderRadius="100rpx 0 0 100rpx" fontWeight="700" shape="circle" plain type="primary">
|
||||
加菜
|
||||
</my-button>
|
||||
</view>
|
||||
<view class="u-flex-1">
|
||||
<my-button @tap="toPay" borderRadius="0 100rpx 100rpx 0" shape="circle" fontWeight="700"
|
||||
type="primary">结账</my-button>
|
||||
<my-button @tap="toPay" borderRadius="0 100rpx 100rpx 0" shape="circle" fontWeight="700" type="primary">结账</my-button>
|
||||
</view>
|
||||
</template>
|
||||
</template>
|
||||
@@ -42,7 +46,7 @@
|
||||
|
||||
<script setup>
|
||||
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 orderVue from './components/order.vue';
|
||||
import goodsList from './components/list.vue';
|
||||
@@ -50,113 +54,118 @@
|
||||
import extraVue from './components/extra.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 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'
|
||||
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 websocketUtil = inject('websocketUtil');
|
||||
|
||||
const tuicai = reactive({
|
||||
show: false,
|
||||
isSeatFee: false,
|
||||
selGoods: {}
|
||||
})
|
||||
});
|
||||
const orderDetail = reactive({
|
||||
goodsList: [],
|
||||
info: {},
|
||||
seatFee: {
|
||||
totalAmount: 0
|
||||
}
|
||||
})
|
||||
const options = reactive({})
|
||||
});
|
||||
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()
|
||||
})
|
||||
shopInfo: {}
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
watchEmit()
|
||||
watchChooseuser()
|
||||
getOrderDetail()
|
||||
})
|
||||
watchEmit();
|
||||
watchChooseuser();
|
||||
getOrderDetail();
|
||||
});
|
||||
|
||||
/**
|
||||
* 获取店铺信息
|
||||
*/
|
||||
function getShopInfoData() {
|
||||
getShopInfo({id:uni.getStorageSync('shopInfo').id}).then(res=>{
|
||||
getShopInfo({ id: uni.getStorageSync('shopInfo').id }).then((res) => {
|
||||
pageData.shopInfo = res;
|
||||
uni.setStorageSync('shopInfo',res)
|
||||
})
|
||||
uni.setStorageSync('shopInfo', res);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详情
|
||||
*/
|
||||
async function getOrderDetail() {
|
||||
let res = await getHistoryOrder({orderId: options.id})
|
||||
// console.log("订单详情===",res)
|
||||
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
|
||||
let resUser = await shopUserDetail({ userId: res.userId });
|
||||
user.value = resUser;
|
||||
}
|
||||
orderDetail.seatFee = {
|
||||
seatNum: res.seatNum,
|
||||
seatAmount: res.seatAmount,
|
||||
}
|
||||
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
|
||||
orderDetail.goodsList.map((item) => {
|
||||
item.info.map((item) => {
|
||||
item.unitPrice = uni.$utils.isGoodsPrice(item, user.value);
|
||||
});
|
||||
});
|
||||
orderDetail.info = res;
|
||||
}
|
||||
|
||||
function onSeatFeeTuicai(seatFee) {
|
||||
seatFee={...seatFee,num:seatFee.num,productName:seatFee.productName}
|
||||
tuicai.show = true
|
||||
tuicai.isSeatFee = seatFee
|
||||
tuicai.selGoods = 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
|
||||
const isHas = await hasPermission('允许退款');
|
||||
return isHas;
|
||||
}
|
||||
|
||||
async function onSeatFeeTuiKuan(seatFee) {
|
||||
const canTuikuan=await hasTuiKuan()
|
||||
const canTuikuan = await hasTuiKuan();
|
||||
if (!canTuikuan) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
const {
|
||||
id,cartId,
|
||||
productId,
|
||||
productSkuId,
|
||||
productName,
|
||||
num,
|
||||
priceAmount,
|
||||
price
|
||||
} = seatFee
|
||||
const { id, cartId, productId, productSkuId, productName, num, priceAmount, price } = seatFee;
|
||||
go.to('PAGES_ORDER_TUIKUAN', {
|
||||
orderId: orderDetail.info.id,
|
||||
id,
|
||||
@@ -169,20 +178,20 @@
|
||||
skuName: '',
|
||||
priceAmount,
|
||||
price
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function onTuiCai(goods, index) {
|
||||
tuicai.show = true
|
||||
tuicai.selGoods = goods
|
||||
tuicai.show = true;
|
||||
tuicai.selGoods = goods;
|
||||
}
|
||||
async function tuicaiConfirm(e) {
|
||||
const res = await refundOrder(e)
|
||||
tuicai.show = false
|
||||
const res = await refundOrder(e);
|
||||
tuicai.show = false;
|
||||
if (res) {
|
||||
go.back()
|
||||
go.back();
|
||||
} else {
|
||||
getOrderDetail()
|
||||
getOrderDetail();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,74 +208,69 @@
|
||||
const res = await printOrder({
|
||||
id: orderDetail.info.id,
|
||||
type: orderDetail.info.status == 'unpaid' ? 1 : 0
|
||||
|
||||
})
|
||||
infoBox.showToast('已发送打印请求')
|
||||
});
|
||||
infoBox.showToast('已发送打印请求');
|
||||
} catch (e) {
|
||||
infoBox.showToast('发送打印请求失败')
|
||||
infoBox.showToast('发送打印请求失败');
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async function onTuikuan(goods, index) {
|
||||
const canTuikuan=await hasTuiKuan()
|
||||
const canTuikuan = await hasTuiKuan();
|
||||
if (!canTuikuan) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (Array.isArray(goods)) {
|
||||
|
||||
go.to('PAGES_ORDER_TUIKUAN', {
|
||||
orderInfo: JSON.stringify(orderDetail.info),
|
||||
goodsList: JSON.stringify(goods)
|
||||
|
||||
})
|
||||
});
|
||||
} else {
|
||||
goods.number = 0
|
||||
goods.skuName = goods.skuName || ''
|
||||
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:''
|
||||
goods.number = 0;
|
||||
goods.skuName = goods.skuName || '';
|
||||
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()
|
||||
const uiPage = new OrderDetail();
|
||||
setTimeout(() => {
|
||||
uiPage.setVal('user', {
|
||||
name: 1
|
||||
})
|
||||
}, 1500)
|
||||
});
|
||||
}, 1500);
|
||||
|
||||
async function diancan() {
|
||||
const canXiadan=await hasPermission('允许下单')
|
||||
const canXiadan = await hasPermission('允许下单');
|
||||
if (!canXiadan) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
clearEmit()
|
||||
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('允许收款')
|
||||
const canJieZhang = await hasPermission('允许收款');
|
||||
if (!canJieZhang) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
const userId=orderDetail.info.userId||''
|
||||
clearEmit()
|
||||
const userId = orderDetail.info.userId || '';
|
||||
clearEmit();
|
||||
go.to('PAGES_ORDER_PAY', {
|
||||
tableId: options.tableId || orderDetail.info.tableId,
|
||||
tableCode: options.tableCode || orderDetail.info.tableCode,
|
||||
@@ -274,18 +278,16 @@
|
||||
orderId: orderDetail.info.id,
|
||||
discount: 1,
|
||||
userId
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function watchEmit() {
|
||||
uni.$off('orderDetail:update')
|
||||
uni.$off('orderDetail:update');
|
||||
uni.$once('orderDetail:update', (newval) => {
|
||||
getOrderDetail()
|
||||
})
|
||||
getOrderDetail();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
//更新选择用户
|
||||
async function setUser(par) {
|
||||
const submitPar = {
|
||||
@@ -294,29 +296,42 @@
|
||||
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;
|
||||
}
|
||||
Object.assign(submitPar, par)
|
||||
const res=await Api.$setUser(submitPar)
|
||||
getOrderDetail()
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
function clearEmit() {
|
||||
uni.$off('choose-user')
|
||||
uni.$off('orderDetail:update')
|
||||
uni.$off('choose-user');
|
||||
uni.$off('orderDetail:update');
|
||||
}
|
||||
|
||||
function watchChooseuser() {
|
||||
uni.$off('choose-user')
|
||||
uni.$off('choose-user');
|
||||
uni.$on('choose-user', (data) => {
|
||||
console.log(data);
|
||||
user.value = data
|
||||
setUser()
|
||||
})
|
||||
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) => {
|
||||
Object.assign(options, opt);
|
||||
getShopInfoData();
|
||||
// onMessage();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,8 @@ export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://tapi.cashier.sxczgkj.cn/api', // 目标服务器地址
|
||||
target: 'https://cashier.sxczgkj.com', // 目标服务器地址
|
||||
// target: 'http://192.168.1.31/\', // 目标服务器地址
|
||||
changeOrigin: true, // 是否更改请求源
|
||||
rewrite: path => path.replace(/^\/api/, '')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user