From 0990e082010677d85a4bf1cc013170c1acbeab95 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Tue, 13 Jan 2026 14:52:10 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=A7=AF=E5=88=86=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=88=86=E9=94=80=E5=91=98?=
=?UTF-8?q?=E7=AD=9B=E9=80=89=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=B6=85=E7=BA=A7?=
=?UTF-8?q?=E4=BC=9A=E5=91=98=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8=E6=A3=80?=
=?UTF-8?q?=E7=B4=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/my-components/my-user-select.vue | 222 ++
http/api/market/index.js | 11 +-
http/api/market/points.js | 17 +
http/yskApi/http.js | 2 +-
.../components/fenxiao-user-select.vue | 219 ++
pageMarket/distribution/index.vue | 874 +++--
pageMarket/superVip/index.vue | 10 +-
pagesCreateOrder/choose-user/choose-user.vue | 4 +-
.../confirm-order/confirm-order.vue | 21 +-
.../components/edit-accountPoints.vue | 146 +-
pagesOrder/pay-order/pay-order.vue | 2904 ++++++++---------
11 files changed, 2416 insertions(+), 2014 deletions(-)
create mode 100644 components/my-components/my-user-select.vue
create mode 100644 http/api/market/points.js
create mode 100644 pageMarket/distribution/components/fenxiao-user-select.vue
diff --git a/components/my-components/my-user-select.vue b/components/my-components/my-user-select.vue
new file mode 100644
index 0000000..27b5eda
--- /dev/null
+++ b/components/my-components/my-user-select.vue
@@ -0,0 +1,222 @@
+
+
+
+
+ 请选择用户
+ {{returnLabel()}}
+
+
+
+
+
+
+ 选择用户
+
+
+
+
+
+
+
+
+ {{item.nickName}}/{{item.phone}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/http/api/market/index.js b/http/api/market/index.js
index 014ff57..f98301e 100644
--- a/http/api/market/index.js
+++ b/http/api/market/index.js
@@ -188,4 +188,13 @@ export function shopUserFlow(data) {
method: 'get',
data
});
-}
\ No newline at end of file
+}
+
+
+export function getShopUser(data) {
+ return request({
+ url: `account/admin/shopUser`,
+ method: 'get',
+ data
+ });
+}
diff --git a/http/api/market/points.js b/http/api/market/points.js
new file mode 100644
index 0000000..42a940d
--- /dev/null
+++ b/http/api/market/points.js
@@ -0,0 +1,17 @@
+import http from '@/http/http.js'
+const request = http.request
+const MARKET_URL = 'market'
+const ORDER_URL = 'order'
+
+/**
+ * 积分:配置:新增/更新
+ * @param {Object} data
+ */
+export function pointsConfig(data) {
+ return request({
+ url: MARKET_URL+`/admin/points/config`,
+ method: "GET",
+ data
+ })
+}
+
diff --git a/http/yskApi/http.js b/http/yskApi/http.js
index fe371ef..5d3eeb0 100644
--- a/http/yskApi/http.js
+++ b/http/yskApi/http.js
@@ -14,7 +14,7 @@ import storageManage from '@/commons/utils/storageManage.js'
import infoBox from "@/commons/utils/infoBox.js"
import go from '@/commons/utils/go.js';
import { reject } from 'lodash';
-let baseUrl = appConfig.returnBaseUrl({apiType:'php'});
+let baseUrl = appConfig.returnBaseUrl({apiType:'java'});
const loadingShowTime = 200
function getHeader(){
diff --git a/pageMarket/distribution/components/fenxiao-user-select.vue b/pageMarket/distribution/components/fenxiao-user-select.vue
new file mode 100644
index 0000000..9edf009
--- /dev/null
+++ b/pageMarket/distribution/components/fenxiao-user-select.vue
@@ -0,0 +1,219 @@
+
+
+
+
+ 请选择用户
+ {{returnLabel()}}
+
+
+
+
+
+
+ 选择用户
+
+
+
+
+
+
+
+
+ {{item.nickName}}/{{item.phone}}
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+
+ 确定
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageMarket/distribution/index.vue b/pageMarket/distribution/index.vue
index 862e804..dd62192 100644
--- a/pageMarket/distribution/index.vue
+++ b/pageMarket/distribution/index.vue
@@ -1,34 +1,25 @@
-
-
-
-
-
-
-
- 分销
- 用户成为业务员,可促进消费
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 分销
+ 用户成为业务员,可促进消费
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ userComponentQuery.startTime }} -
+ {{ userComponentQuery.endTime }}
+
+
+
+
+
+
+ 请选择日期范围
+
+
+
+
+
+
+
+ {{ selActions.name }}
+
+
+ 全部
+
+
+
+
+
+
+
+
+
+
+ {{ userComponentQuery.startTime }} -
+ {{ userComponentQuery.endTime }}
+
+
+
+
+
+
+ 请选择日期
+
+
+
+
+
+
+ {{
listRes.totalCount
}}
- 支付开通人数
-
-
- {{
+ 支付开通人数
+
+
+ {{
listRes.totalAmount
}}
- 已支付金额(元)
-
-
-
-
- {{
+ 已支付金额(元)
+
+
+
+
+ {{
listRes.successAmount
}}
- 已入账金额(元)
-
-
- {{
+ 已入账金额(元)
+
+
+ {{
listRes.pendingAmount || 0
}}
- 待入账金额(元)
-
-
- {{
+ 待入账金额(元)
+
+
+ {{
listRes.balanceAmount
}}
-
- 运营余额(元)
- 充值{{ ">" }}
-
-
-
-
-
-
-
+
+ 运营余额(元)
+ 充值{{ ">" }}
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
+
-
-
-
+
+
+
+ .delete-btn {
+ background: #ffe7e6;
+ color: #ff1c1c;
+ }
+
+ .filter-box {
+ display: flex;
+ padding: 8rpx 24rpx;
+ align-items: center;
+ border-radius: 8rpx;
+ border: 2rpx solid #d9d9d9;
+ background: #f7f7f7;
+ min-height: 62rpx;
+ box-sizing: border-box;
+ }
+
\ No newline at end of file
diff --git a/pageMarket/superVip/index.vue b/pageMarket/superVip/index.vue
index f08c874..c39e2db 100644
--- a/pageMarket/superVip/index.vue
+++ b/pageMarket/superVip/index.vue
@@ -14,10 +14,13 @@
-
+
+
+
@@ -215,6 +218,7 @@ function refresh() {
}
const listRes = ref({});
+const userId=ref('')
async function getList() {
let res = null;
if (active.value == 1) {
@@ -232,7 +236,8 @@ async function getList() {
res = await memberApi.orderList({
page: pageNum.value,
size: 10,
- key: userComponentQuery.user,
+ // key: userComponentQuery.user,
+ key: userId.value,
startTime: userComponentQuery.startTime ? userComponentQuery.startTime + ' 00:00:00' : '',
endTime: userComponentQuery.endTime ? userComponentQuery.endTime + ' 23:59:59' : ''
});
@@ -264,6 +269,7 @@ watch(
userComponentQuery.startTime = '';
userComponentQuery.endTime = '';
keyWord.value = '';
+ userId.value=''
refresh();
}
);
diff --git a/pagesCreateOrder/choose-user/choose-user.vue b/pagesCreateOrder/choose-user/choose-user.vue
index 15d871e..334d0c7 100644
--- a/pagesCreateOrder/choose-user/choose-user.vue
+++ b/pagesCreateOrder/choose-user/choose-user.vue
@@ -37,7 +37,7 @@
积分:
- {{item.accountPoints}}
+ {{item.pointBalance||0}}
@@ -113,7 +113,7 @@
headImg: '',
telephone: '',
amount: '0.00',
- accountPoints: '0.00'
+ pointBalance: '0.00'
})
} else {
list[index].checked = true
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 3871e97..409a1fd 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -32,7 +32,7 @@
积分:
{{
- pageData.user.accountPoints
+ pageData.user.pointBalance||0
}}
@@ -88,7 +88,7 @@
积分
{{
- pageData.user.accountPoints
+ pageData.user.pointBalance||0
}}
@@ -935,14 +935,15 @@ function watchChooseuser() {
if (pageData.user.id == data.id) {
return;
}
- if (data.id) {
- const res = await shopUserDetail({
- userId: data.userId,
- });
- pageData.user = res;
- } else {
- pageData.user = data;
- }
+ pageData.user = data;
+ // if (data.id) {
+ // const res = await shopUserDetail({
+ // userId: data.userId,
+ // });
+ // pageData.user = res;
+ // } else {
+ // pageData.user = data;
+ // }
// 更新购物车和历史订单数据
uodateCartAndHistory();
});
diff --git a/pagesOrder/pay-order/components/edit-accountPoints.vue b/pagesOrder/pay-order/components/edit-accountPoints.vue
index b7b2adf..6312b6f 100644
--- a/pagesOrder/pay-order/components/edit-accountPoints.vue
+++ b/pagesOrder/pay-order/components/edit-accountPoints.vue
@@ -2,20 +2,18 @@
-
-
+
+
*
100积分等于{{to2(accountPoints.calcRes.equivalentPoints*100)}}元,
+ v-if="pointDeductionRule.equivalentPoints">{{ pointDeductionRule.equivalentPoints }}积分等于1元,
- 最大抵扣积分{{accountPoints.calcRes.maxUsablePoints}}
-
- ,
- 最小抵扣积分0
+ 最大抵扣积分{{ maxCanUsePoints }}
+ , 最小抵扣积分0
-
+
积分
\ No newline at end of file
+
+
+ /**
+ * 积分确认
+ * @param {Object} e
+ */
+ function pointsConfirm(e) {
+ userPoints.value = e
+ }
+
+ const maxPointDiscount = ref(0)
+ const maxCanUsePoints = ref(0)
+
+ /**
+ * 获取积分信息
+ * @param {Object} orderAmount
+ */
+ async function getCalcUsablePoints() {
+ if (!pageData.user.userId) {
+ return;
+ }
+
+
+ let userAccountPoints = pageData.user ? pageData.user.pointBalance * 1 : 0;
+
+ //1积分等于多少钱
+ const onePointsMoney = pointDeductionRule.pointsPerYuan ? ((1 || 0) / pointDeductionRule.pointsPerYuan) : 0
+
+
+ const calcMaxDiscount = Math.floor(pointsCanDicountMaxMoney.value * (pointDeductionRule.maxDeductionRatio /
+ 100))
+ const userMaxDiscount = BigNumber(userAccountPoints).times(onePointsMoney).decimalPlaces(2, BigNumber
+ .ROUND_DOWN)
+ .toNumber()
+
+ maxPointDiscount.value = Math.min(calcMaxDiscount, userMaxDiscount)
+ console.log('积分最大可抵扣金额', maxPointDiscount.value)
+ pointDeductionRule.maxDeductionAmount = maxPointDiscount.value || 0
+ if (pointDeductionRule.enableRewards) {
+ let num = (maxPointDiscount.value || 0) * pointDeductionRule.pointsPerYuan
+ if (num > userAccountPoints) {
+ num = userAccountPoints
+ }
+ maxCanUsePoints.value = num
+ if (accountPoints.sel) {
+ userPoints.value = num
+ }
+ }
+
+ if (!pointDeductionRule.enableRewards) {
+ userPoints.value = 0
+ }
+ console.log('maxCanUsePoints.value', maxCanUsePoints.value)
+ }
+
+ function changeAccountPoints() {
+ if (!pointDeductionRule.enableRewards) {
+ return;
+ }
+ accountPoints.sel = !accountPoints.sel;
+ if (!accountPoints.sel) {
+ accountPoints.num = 0;
+ }
+ }
+
+ /**
+ * 选择优惠券
+ */
+ function toQuan() {
+ if (orderCostSummary.value.fullReduction.usedThreshold) {
+ return infoBox.showToast("满减活动不可与优惠券同享");
+ }
+ if (!order.userId && !pageData.user.id) {
+ return infoBox.showToast("请先选择会员", 0.5).then(() => {
+ chooseUser();
+ });
+ }
+ uni.setStorageSync("selCoupon", selCoupon.value);
+
+ go.to("PAGES_ORDER_QUAN", {
+ orderId: order.id,
+ shopUserId: pageData.user.id,
+ orderPrice: BigNumber(payPrice.value).plus(BigNumber(orderCostSummary.value.couponDeductionAmount))
+ .decimalPlaces(2, BigNumber.ROUND_DOWN)
+ });
+ }
+
+ /**
+ * 判断是否可以修改金额
+ */
+ async function discountShow() {
+ const bol = await hasPermission("yun_xu_da_zhe");
+ if (bol) {
+ showModel("editMoney", true);
+ }
+ }
+
+ /**
+ * 积分金额处理
+ * @param {Object} n
+ */
+ function to2(n) {
+ if (!n) {
+ return "";
+ }
+ return Number(n).toFixed(2);
+ }
+
+ /**
+ * 优惠券选择
+ */
+ function watchChooseQuan() {
+ uni.$off("selCoupon");
+ uni.$on("selCoupon", function(data) {
+ setQuan(data);
+ });
+ }
+
+ /**
+ * 删除优惠券
+ * @param {Object} i
+ */
+ function delQuan(i) {
+ pays.quan.splice(i, 1);
+ discount.discount = 100;
+ discount.value = 0;
+ }
+
+ /**
+ * 选择用户
+ */
+ function chooseUser() {
+ go.to("PAGES_CHOOSE_USER");
+ }
+
+ /**
+ * 更新选择用户
+ */
+ function watchChooseuser() {
+ uni.$off("choose-user");
+ uni.$on("choose-user", (data) => {
+ pageData.user = data;
+ });
+ }
+
+ watch(
+ () => pageData.user.id,
+ (newval) => {
+ selCoupon.value = [];
+ accountPoints.sel = false;
+ merchantReductionConfig.fixedAmount = 0;
+ // 更新购物车和历史订单数据
+ uodateCartAndHistory();
+ if (newval) {
+ getNewUserDiscount();
+ // getShopUserDetail();
+ }
+ }
+ );
+
+ /**
+ * 更新购物车和历史订单数据
+ */
+ function uodateCartAndHistory() {
+ let newData = {
+ history: [],
+ cart: [],
+ };
+ for (let cart of pageData.goodsList) {
+ const canUseLimitTimeDiscount = yskUtils.limitUtils.canUseLimitTimeDiscount(
+ cart,
+ order.limitRate,
+ pageData.shopInfo,
+ pageData.user,
+ "productId"
+ ) ?
+ 1 :
+ 0;
+ if (canUseLimitTimeDiscount != cart.isTimeDiscount) {
+ newData.history.push({
+ id: cart.id,
+ is_time_discount: canUseLimitTimeDiscount,
+ });
+ }
+ }
+
+ if (newData.history.length <= 0 && newData.cart.length <= 0) {
+ return;
+ }
+
+ websocketUtil.send(
+ JSON.stringify({
+ type: "pad",
+ account: uni.getStorageSync("shopInfo").id,
+ shop_id: uni.getStorageSync("shopInfo").id,
+ operate_type: "bulk_edit",
+ table_code: order.takeCode,
+ data: newData,
+ })
+ );
+ }
+
+ function getShopUserDetail() {
+ shopUserDetail({
+ // shopId: uni.getStorageSync("shopInfo").id,
+ id: pageData.user.id,
+ }).then((res) => {
+ if (res) {
+ pageData.user = res;
+ }
+ });
+ }
+
+ const newUserDiscountRes = ref(null);
+ //获取用户新客立减
+ function getNewUserDiscount() {
+ getDiscountByUserId({
+ shopUserId: pageData.user.id,
+ }).then((res) => {
+ if (res) {
+ newUserDiscount.value = res.amount || 0;
+ newUserDiscountRes.value = res;
+ }
+ });
+ }
+
+ /**
+ * 选择挂账人
+ */
+ function chooseBuyer() {
+ go.to("PAGES_CHOOSE_BUYER");
+ }
+
+ /**
+ * 更新选择挂账人
+ */
+ function watchChoosebuyer() {
+ uni.$off("choose-buyer");
+ uni.$on("choose-buyer", (data) => {
+ pageData.buyer = data;
+ });
+ }
+
+ /**
+ * 修改价格确认
+ * @param {Object} form
+ */
+ function editDiscountConfirm(form) {
+ accountPoints.sel = false;
+ console.log(form);
+ const discount = BigNumber(returnMerchantReductionBeforeMoney.value)
+ .minus(form.currentPrice)
+ .toNumber();
+ merchantReductionConfig.fixedAmount = discount;
+ }
+
+ /**
+ * 支付方式选择
+ * @param {Object} i
+ * @param {Object} item
+ */
+ function changePayType(i, item) {
+ if (item.disabled) {
+ return infoBox.showToast(item.payName + "不可用");
+ }
+ pays.payTypes.selIndex = i;
+ if (item.payType == "member-account" && !pageData.user.id) {
+ chooseUser();
+ }
+ if (item.payType == "arrears" && !pageData.buyer.id) {
+ chooseBuyer();
+ }
+ }
+
+ const models = new Map();
+
+ function setModel(el) {
+ if (el && el.$attrs["name"]) {
+ models.set(el.$attrs["name"], el);
+ }
+ }
+
+ function showModel(key) {
+ const model = models.get(key);
+ model && model.open();
+ }
+
+ let payStatus = "";
+
+ /**
+ * 确认付款
+ */
+ const tipsMap = {
+ paying: "支付中",
+ success: "已支付成功",
+ };
+
+ function payOrderClick() {
+ const payType = pays.payTypes.list[pays.payTypes.selIndex].payType;
+ if (payType == "scanCode" || payType == "deposit") {
+ return saomaPay(payType);
+ }
+ if (payType == "cash" && payPrice.value * 1 > 0) {
+ return cashConfirmShow();
+ }
+ if (
+ payType == "arrears" &&
+ pageData.buyer.remainingAmount < payPrice.value * 1
+ ) {
+ return infoBox.showToast("挂账额度不足");
+ }
+ if (
+ payType == "member-account" &&
+ pageData.user.amount * 1 < payPrice.value * 1
+ ) {
+ return infoBox.showToast("余额不足");
+ }
+ if (payStatus) {
+ return infoBox.showToast(tipsMap[payStatus]);
+ }
+ try {
+ pay();
+ } catch (e) {
+ //TODO handle the exception
+ payStatus = "";
+ }
+ }
+
+ /**
+ * 支付调佣
+ * @param {Object} par
+ */
+ async function pay(par) {
+ const payType = pays.payTypes.list[pays.payTypes.selIndex].payType;
+ let pars = getPayParam();
+ payStatus = "paying";
+ let params = {
+ shopId: uni.getStorageSync("shopInfo").id || '',
+ checkOrderPay: {
+ ...pars,
+ },
+ ...par,
+ };
+ if (order.userId || pageData.user.userId) {
+ params.checkOrderPay.userId = order.userId || pageData.user.userId;
+ }
+ if (payType == "arrears") {
+ params.creditBuyerId = pageData.buyer.id;
+ }
+ let payRes = null;
+ try {
+ if (payType == "scanCode") {
+ payRes = await microPay(params);
+ }
+ if (payType == "cash") {
+ payRes = await cashPay(params);
+ }
+ if (payType == "arrears") {
+ payRes = await creditPay(params);
+ }
+ if (payType == "member-account" || payType == "deposit") {
+ if (pageData.user.amount * 1 >= payPrice.value * 1) {
+ params.payType = "userPay";
+ params.shopUserId = pageData.user.id;
+ payRes = await vipPay(params);
+ } else {
+ infoBox.showToast("余额不足");
+ return;
+ }
+ }
+ } catch (error) {
+ console.log(error);
+ let res;
+ let timer;
+ if (error.code == 211 && error.msg == "等待用户付款") {
+ uni.showLoading({
+ title: "支付中...",
+ });
+ timer = setInterval(async () => {
+ res = await queryOrderStatus({
+ orderId: pars.orderId
+ });
+ if (res == "done") {
+ clearInterval(timer);
+ uni.hideLoading();
+ paySuccess();
+ }
+ console.log(res);
+ }, 1000);
+ }
+ if (error.code == 701) {
+ uni.removeStorageSync("table_code");
+ uni.navigateBack();
+ }
+ payStatus = "";
+ return false;
+ }
+ paySuccess();
+
+
+ }
+
+ /**
+ * 支付成功回调
+ */
+ function paySuccess() {
+ infoBox.showToast("支付成功");
+ payStatus = "success";
+ setTimeout(() => {
+ // uni.$emit('orderDetail:update')
+ uni.$emit("get:table");
+ uni.$emit("update:orderDetail");
+ uni.navigateBack({
+ delta: 1,
+ });
+ websocketUtil.send(
+ JSON.stringify({
+ type: "onboc",
+ account: uni.getStorageSync("iToken").loginId,
+ shop_id: uni.getStorageSync("shopInfo").id || '',
+ operate_type: "cleanup",
+ table_code: order.tableCode,
+ })
+ );
+ }, 1500);
+ }
+
+ /**
+ * 弹窗关闭
+ */
+ function confirmModelCancel() {
+ if (modal.key == "fullCoupon") {
+ // 取消改价
+ discount.discount = 100;
+ discount.value = 0;
+ }
+ modal.show = false;
+ modal.key = "";
+ modal.data = "";
+ }
+
+ /**
+ * 弹窗确认
+ */
+ async function confirmModelConfirm() {
+ if (modal.key == "cash") {
+ await pay();
+ confirmModelCancel();
+ return;
+ }
+ if (modal.key == "fullCoupon") {
+ //删除满减券
+ const index = pays.quan.findIndex((v) => v.type == 1);
+ pays.quan.splice(index, 1);
+ return;
+ }
+ }
+
+ function objToArrary(obj) {
+ if (Object.values(obj) && Array.isArray(Object.values(obj)[0])) {
+ // 是数组
+ let arr = [];
+ Object.values(obj).forEach((item) => {
+ item.map((v) => {
+ v.salePrice = v.salePrice ? v.salePrice : v.price;
+ v.number = v.num;
+ v.packFee = v.packAmount || 0;
+ return v;
+ });
+ arr = [...arr, ...item];
+ });
+ return arr;
+ } else {
+ // 不是数组
+ return Object.keys(obj).map((key) => {
+ return obj[key];
+ });
+ }
+ }
+ /**
+ * 扫码/储值卡支付
+ */
+ function saomaPay() {
+ const item = pays.payTypes.list[pays.payTypes.selIndex];
+ uni.scanCode({
+ onlyFromCamera: true,
+ success: function(res) {
+ console.log("条码类型:" + res.scanType);
+ console.log("条码内容:" + res.result);
+
+ pay({
+ authCode: res.result,
+ });
+ },
+ });
+ }
+
+ /**
+ * 现金支付唤起
+ */
+ function cashConfirmShow() {
+ modal.content = "是否确认已现金收款" + payPrice.value;
+ modal.key = "cash";
+ modal.show = true;
+ }
+
+ /**
+ * 获取历史订单并更新商品列表
+ */
+ async function getHistoryAndUpdateGoodsList() {
+ // 获取订单详情
+ const orderRes = await getHistoryOrder({
+ orderId: order.orderId
+ });
+ if (orderRes.status == "cancelled") {
+ uni.showToast({
+ title: "订单已取消",
+ icon: "none",
+ });
+ toDiancai();
+ return;
+ }
+ if (orderRes.status == "done") {
+ uni.showToast({
+ title: "订单已完成",
+ icon: "none",
+ });
+ toDiancai();
+ return;
+ }
+ Object.assign(order, orderRes);
+ pageData.goodsList = objToArrary(orderRes.detailMap);
+ pageData.seatNum = order.seatNum;
+ }
+ /**
+ * socket消息监听
+ */
+ function onMessage() {
+ websocketUtil.offMessage();
+ websocketUtil.onMessage((res) => {
+ let msg = JSON.parse(res);
+ console.log("onMessage", msg);
+ switch (msg.operate_type) {
+ case "pad_init":
+ getHistoryAndUpdateGoodsList();
+ break;
+ case "pad_add":
+ case "add":
+ break;
+ case "pad_edit":
+ case "edit":
+ break;
+ case "bulk_edit":
+ getHistoryAndUpdateGoodsList();
+ break;
+ case "pad_del":
+ case "del":
+ break;
+ case "pad_cleanup":
+ case "cleanup":
+ break;
+ case "product_update":
+ break;
+ case "pad_batch":
+ break;
+ }
+ });
+ }
+
+
+
\ No newline at end of file