@@ -128,7 +128,7 @@ function dateConfirmHandle(e) {
queryForm.orderStartTime = e.start;
queryForm.orderEndTime = e.end;
time.value = e.text;
- gbOrderPageAjax(1);
+ resetGetList();
}
const statusActive = ref(0);
@@ -199,7 +199,7 @@ function tabChange(index) {
statusActive.value = index;
listData.page = 1;
queryForm.status = tabs.value[index].value;
- gbOrderPageAjax();
+ resetGetList();
}
const listData = reactive({
@@ -239,7 +239,7 @@ function refundHandle(item) {
icon: 'none'
});
}, 100);
- goodsRecordPageAjax(1);
+ resetGetList();
}
} catch (error) {
uni.hideLoading();
@@ -281,7 +281,7 @@ async function returnCostConfirmHandle() {
icon: 'none'
});
}, 100);
- gbOrderPageAjax(1);
+ resetGetList();
} catch (error) {
console.log(error);
}
@@ -294,33 +294,40 @@ async function checkoutHandle(item) {
title: '注意',
content: '确认要核销吗?',
success: async (res) => {
- try {
- uni.showLoading({
- title: '核销中...',
- mask: true
- });
- await checkout(item.verifyCode);
- setTimeout(() => {
- uni.showToast({
- title: '已核销',
- icon: 'none'
+ if (res.confirm) {
+ try {
+ uni.showLoading({
+ title: '核销中...',
+ mask: true
});
- }, 100);
- item.status = '已核销';
- item.verifyTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
- } catch (error) {
- console.log(error);
+ await checkout(item.verifyCode);
+ setTimeout(() => {
+ uni.showToast({
+ title: '已核销',
+ icon: 'none'
+ });
+ }, 100);
+ resetGetList();
+ } catch (error) {
+ console.log(error);
+ }
+ uni.hideLoading();
}
- uni.hideLoading();
}
});
}
+// 重置列表请求
+function resetGetList() {
+ listData.page = 1;
+ gbOrderPageAjax();
+}
+
// 获取拼团商品:订单列表
-async function gbOrderPageAjax(page = listData.page, isPull = false) {
+async function gbOrderPageAjax() {
try {
const res = await gbOrderPage({
- page: page,
+ page: listData.page,
size: listData.size,
...queryForm
});
@@ -345,11 +352,11 @@ async function gbOrderPageAjax(page = listData.page, isPull = false) {
defineExpose({
reachBottom,
- gbOrderPageAjax
+ resetGetList
});
onMounted(() => {
- gbOrderPageAjax();
+ resetGetList();
});
diff --git a/pageMarket/groupGoods/index.vue b/pageMarket/groupGoods/index.vue
index 80dc19c..e95bca9 100644
--- a/pageMarket/groupGoods/index.vue
+++ b/pageMarket/groupGoods/index.vue
@@ -32,6 +32,7 @@ import goodsList from './components/goodsList.vue';
import orderList from './components/orderList.vue';
import { upShopConfig } from '@/http/api/ware.js';
import { getShopInfo } from '@/http/api/shop.js';
+import { isMainShop } from '@/store/account.js';
const goodsListRef = ref(null);
const orderListRef = ref(null);
@@ -67,7 +68,23 @@ const form = ref({
watch(
() => form.value.onlineStatus,
(newValue, oldValue) => {
- upShopConfigAjax();
+ if (loading.value == false) {
+ if (newValue == 0) {
+ uni.showModal({
+ title: '注意',
+ content: '关闭拼团商品所有未支付的订单都将自动取消,是否确定关闭?',
+ success: (res) => {
+ if (res.confirm) {
+ upShopConfigAjax();
+ } else {
+ form.value.onlineStatus = 1;
+ }
+ }
+ });
+ } else {
+ upShopConfigAjax();
+ }
+ }
}
);
@@ -79,6 +96,9 @@ async function upShopConfigAjax() {
mask: true
});
const res = await upShopConfig(form.value);
+ if (tabsActive.value == 0) {
+ goodsListRef.value?.resetGetList();
+ }
} catch (error) {
console.log(error);
}
@@ -89,10 +109,10 @@ async function upShopConfigAjax() {
onPullDownRefresh(() => {
switch (tabsActive.value) {
case 0:
- goodsListRef.value?.getGbWarePageAjax(1, true);
+ goodsListRef.value?.resetGetList();
break;
case 1:
- orderListRef.value?.getGbWarePageAjax(1, true);
+ orderListRef.value?.resetGetList();
break;
default:
break;
@@ -114,20 +134,25 @@ onReachBottom(() => {
});
// 获取配置信息
+const loading = ref(true);
async function getShopInfoAjax() {
try {
+ loading.value = true;
const res = await getShopInfo();
form.value.onlineStatus = res.isGroupBuy;
} catch (error) {
console.log(error);
}
+ setTimeout(() => {
+ loading.value = false;
+ }, 500);
}
// 页面显示
onShow(() => {
switch (tabsActive.value) {
case 0:
- goodsListRef.value?.getGbWarePageAjax(1);
+ goodsListRef.value?.resetGetList();
break;
case 1:
break;
diff --git a/pageMarket/groupGoods/selectGoods.vue b/pageMarket/groupGoods/selectGoods.vue
new file mode 100644
index 0000000..749ca48
--- /dev/null
+++ b/pageMarket/groupGoods/selectGoods.vue
@@ -0,0 +1,95 @@
+
+
+
+
+
+ {{ item.name }}
+ ¥{{ returnPrice(item.skuList) }}
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/packagePopularize/addGoods.vue b/pageMarket/packagePopularize/addGoods.vue
index 95fcaf2..26573e8 100644
--- a/pageMarket/packagePopularize/addGoods.vue
+++ b/pageMarket/packagePopularize/addGoods.vue
@@ -8,22 +8,27 @@
可用门店
-
+
+
+
+
+
+
-
+
- 商品名称
+ 套餐名称
-
+
@@ -31,38 +36,38 @@
- 商品描述
+ 套餐描述
-
+
-
+
- 商品图片
+ 套餐图片
*建议优先选择jpg格式,并且最好控制在500kb内
-
+
-
+
原价
-
+
元
@@ -71,14 +76,14 @@
-
+
- 拼团价
+ 价格
-
+
元
@@ -87,46 +92,242 @@
-
-
-
- 成团人数
-
-
-
-
-
-
-
-
-
-
-
- 成团期限(小时)
-
-
-
-
-
-
-
-
-
+
- 限购数量
-
+ 选择商品
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 导入商品
+
+
+
+ 添加商品
+
+
+
+
+
+
+ 名称
+
+
+ 价格
+
+
+ 数量
+
+
+ 操作
+
+
+
+
+
+
+
+
+
+
+ mySetTimeout(() => {
+ val.price = filterNumberInput(e);
+ }, 50)
+ "
+ >
+
+
+
+ mySetTimeout(() => {
+ val.num = filterNumberInput(e, 1);
+ }, 50)
+ "
+ >
+
+
+ 删除
+
+
+
+
+ 请添加商品
+
+
+
+
+ 套餐{{ item.packageProducts.length }}选{{ item.num }}
+
+
+
+ mySetTimeout(() => {
+ item.num = filterNumberInput(e, 1);
+ }, 50)
+ "
+ >
+
+
+
+
+
+
+
+ 添加菜品组
+
+
+
+
+
+
+ 可用周期
+
+
+
+
+
+
+
+
+
+
+
+ 指定时间段
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 其他使用说明
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 分享优惠阶梯
+ 如果没有分享裂变需求可以不设置,最多三级
+
+
+
+ {{ form.price ? '添加方案' : '请添加价格' }}
+
+
+
+
+
+
+
+
+
+ 分享人数
+
+
+ 价格(元)
+
+
+ 操作
+
+
+
+
+
+
+ {{ val.peopleNum }}
+
+
+ {{ val.price }}
+
+
+ 编辑
+ 删除
+
+
+
+
+ 请添加阶梯
+
+
+
+
+
+
+
+
+
+
+
+ 分享期限(小时)
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上架状态
+
+
+
+
+
@@ -135,39 +336,127 @@
*建议优先选择jpg格式,并且最好控制在500kb内
-
+
+
+
+
+
+ {{ stepFormType == 'add' ? '添加阶梯' : '编辑阶梯' }}
+
+
+
+
+
+
+
+ 分享人数
+
+
+
+
+ mySetTimeout(() => {
+ stepForm.peopleNum = filterNumberInput(e, 1);
+ }, 50)
+ "
+ >
+
+ 人
+
+
+
+
+
+
+
+
+
+ 价格
+
+
+
+
+ mySetTimeout(() => {
+ stepForm.price = filterNumberInput(e);
+ }, 50)
+ "
+ >
+
+ 元
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/packagePopularize/components/orderList.vue b/pageMarket/packagePopularize/components/orderList.vue
index 9f2bc3b..bb92f47 100644
--- a/pageMarket/packagePopularize/components/orderList.vue
+++ b/pageMarket/packagePopularize/components/orderList.vue
@@ -9,8 +9,8 @@
shape="circle"
clearable
v-model="queryForm.orderNo"
- @confirm="gbOrderPageAjax(1)"
- @clear="gbOrderPageAjax(1)"
+ @confirm="resetGetList()"
+ @clear="resetGetList()"
>
@@ -28,40 +28,40 @@
- 用户:{{ item.userName }} {{ item.userPhone }}
+ 用户:{{ item.nickname }} {{ item.phone }}
核销码:{{ item.verifyCode }}
-
+
- {{ item.wareJson.wareName }}
- x{{ item.num }}
+ {{ item.packageName }}
+ {{ item.price }}元
- {{ item.payAmount }}元
+ 分享人数:{{ item.shareNum || 0 }}
+ 最终支付:{{ item.payAmount || 0 }}
- 下单时间:{{ item.createTime }}
+ 支付时间:{{ item.payTime }}
核销时间:{{ item.verifyTime }}