diff --git a/src/api/coup/group.js b/src/api/coup/group.js new file mode 100644 index 0000000..4fccbd6 --- /dev/null +++ b/src/api/coup/group.js @@ -0,0 +1,278 @@ +import request from "@/utils/request.js"; +import request_php from "@/utils/request-php.js"; + +/** + * 团购卷订单列表(分页) + * @param {*} data + * @returns + */ +export function searchstorestatus(type) { + return request_php({ + method: "post", + headers: { + clint_type: type + }, + url: "/meituan/searchstorestatus" + }); +} + +/** + * 团购卷订单列表(分页) + * @param {*} data + * @returns + */ +export function groupOrderlist(data) { + return request({ + method: "post", + url: "/groupOrder/list", + data, + }); +} + +/** + * 团购卷核销前回显 + * @param {*} params + * @returns + */ +export function groupOrderorderInfo(params) { + return request({ + method: "get", + url: "/groupOrder/orderInfo", + params, + }); +} + +/** + * 团购卷核销(仅核销待使用订单) + * @param {*} params + * @returns + */ +export function groupOrdergroupScan(params) { + return request({ + method: "get", + url: "/groupOrder/groupScan", + params, + }); +} + +/** + * 退单 + * @param {*} data + * @returns + */ +export function returnGpOrder(data) { + return request({ + method: "post", + url: "/pay/returnGpOrder", + data, + }); +} + +// 注意 抖音核销使用的请求为PHP服务 request_php + +/** + * 获取uisdk 绑定 链接 + * @param {*} data + * @returns + */ +export function getuisdk(data) { + return request_php({ + method: "post", + headers: { + clint_type: 2 + }, + url: "/douyin/getuisdk", + data, + }); +} + +/** + * 会员签入 + * @param {*} data + * @returns + */ +export function douyincheckIn(data) { + return request_php({ + method: "post", + url: "douyin/checkIn", + data, + }); +} + +/** + * 团购核销准备 + * @param {*} data + * @returns + */ +export function douyinfulfilmentcertificateprepare(data) { + return request_php({ + method: "post", + url: "douyin/fulfilmentcertificateprepare", + data, + }); +} + +/** + * 团购核销 + * @param {*} data + * @returns + */ +export function douyincertificateprepare(data) { + return request_php({ + method: "post", + url: "douyin/certificateprepare", + data, + }); +} + +/** + * 团购核销记录 + * @param {*} data + * @returns + */ +export function douyinorderlist(data) { + return request_php({ + method: "post", + url: "douyin/orderlist", + data, + }); +} + +/** + * 团购核销撤销 + * @param {*} data + * @returns + */ +export function douyinfulfilmentcertificatecancel(data) { + return request_php({ + method: "post", + url: "douyin/fulfilmentcertificatecancel", + data, + }); +} + +/** + * 门店列表 + * @param {*} data + * @returns + */ +export function douyinstorelist(data) { + return request_php({ + method: "post", + url: "douyin/storelist", + data, + }); +} + +/** + * 绑定门店 + * @param {*} data + * @returns + */ +export function douyinbindstore(data) { + return request_php({ + method: "post", + url: "douyin/bindstore", + data, + }); +} + +/** + * 登出团购 + * @param {*} data + * @returns + */ +export function tglogout(data) { + return request_php({ + method: "post", + url: "user/logout", + data, + }); +} + +/** + * 美团团购核销 + * 绑定-获取绑定状态 + * @param {*} data + * @returns + */ +export function thirdPartyCoupon_state(data) { + return request_php({ + method: "post", + url: "/meituan/searchstorestatus", + data, + }); +} + +/** + * 美团团购核销 + * 绑定-获取绑定url + * @param {*} data + * @returns + */ +export function thirdPartyCoupon_bindUrl(data) { + return request_php({ + method: "post", + headers: { + clint_type: 1 + }, + url: "/meituan/getuisdkurl", + data, + }); +} + +/** + * 美团团购核销 + * 团购券-获取可用券 + * @param {*} data + * @returns + */ +export function thirdPartyCoupon_list(data) { + return request_php({ + method: "post", + url: "/meituan/fulfilmentcertificateprepare", + data, + }); +} + +/** + * 美团团购核销 + * 执行核销 + * @param {*} data + * @returns + */ +export function certificateprepare(data) { + return request_php({ + method: "post", + url: "/meituan/certificateprepare", + data, + }); +} + +/** + * 美团团购核销 + * 团购核销记录 + * @param {*} data + * @returns + */ +export function meituan_orderlist(data) { + return request_php({ + method: "post", + url: "/meituan/orderlist", + data, + }); +} + +/** + * 美团团购核销 + * 团购撤销 + * @param {*} data + * @returns + */ +export function meituan_fulfilmentcertificatecancel(data) { + return request_php({ + method: "post", + url: "/meituan/fulfilmentcertificatecancel", + data, + }); +} diff --git a/src/assets/icon_scan.png b/src/assets/icon_scan.png new file mode 100644 index 0000000..c98bf5f Binary files /dev/null and b/src/assets/icon_scan.png differ diff --git a/src/views/dingding/components/detailDialog.vue b/src/views/dingding/components/detailDialog.vue index 1fe23aa..f2cc959 100644 --- a/src/views/dingding/components/detailDialog.vue +++ b/src/views/dingding/components/detailDialog.vue @@ -51,6 +51,11 @@ import { ref } from 'vue' import { attendanceDetail } from '@/api/coupon/index' +const props = defineProps({ + startTime: '', + endTime: '' +}) + const visible = ref(false) const detail = ref({ @@ -79,7 +84,9 @@ async function attendanceDetailAjax() { try { loading.value = true const res = await attendanceDetail({ - userId: row.value.userId + userId: row.value.userId, + startTime: props.startTime, + endTime: props.endTime }) detail.value = res } catch (error) { diff --git a/src/views/dingding/index.vue b/src/views/dingding/index.vue index c2e0793..5b16ac2 100644 --- a/src/views/dingding/index.vue +++ b/src/views/dingding/index.vue @@ -42,7 +42,7 @@ --> - + diff --git a/src/views/marketing_center/data.js b/src/views/marketing_center/data.js index 378a87e..ba9e7b1 100644 --- a/src/views/marketing_center/data.js +++ b/src/views/marketing_center/data.js @@ -12,6 +12,229 @@ export const userTypes = [ value: "vip", }, ]; + +// 新版菜单 +export const newMenus = [ + { + name: '顾客中心', + intro: '以顾客为核心统一管理', + childrenList: [ + { + name: "超级会员", + icon: "cjhy", + pathName: "superVip", + intro: "用户会员管理设置" + }, + ] + }, + { + name: '拉新拓客', + intro: '协助商家拉来新客户,拓展客户群体', + childrenList: [ + { + name: "分销", + icon: "zhcz", + pathName: "distribution_page", + intro: "用户成为业务员,可促进消费" + }, + { + name: "套餐推广", + icon: "tctg", + pathName: "", + intro: "下单通过用户邀请好友减免金额的方式裂变宣传套餐加购", + }, + { + name: "新客立减", + icon: "xklj", + pathName: "newUserDiscount", + intro: "首单下单减免金额" + }, + { + name: "商品拼团", + icon: "sppt", + pathName: "", + intro: "拼团" + }, + ] + }, + { + name: '拉高客单价', + intro: '提高每一位顾客单次购买的金额', + childrenList: [ + { + name: "满减活动", + icon: "mjhd", pathName: "discount_activity", + intro: "达到指定支付金额享受减价" + }, + { + name: "点餐智能推荐", + icon: "dczntj", + pathName: "order_recommendation", + intro: "进入点单页X秒未点自动推荐商品,此推荐设置启用即生效", + }, + { + name: "限时折扣", + icon: "xszk", + pathName: "discount_limit", + intro: "批量设置商品折扣" + }, + { + name: "弹窗广告", + icon: "tcgg", + pathName: "", + intro: "设置弹窗广告" + }, + ] + }, + { + name: '提升复购率', + intro: '提升客户再次购买的概率和频次', + childrenList: [ + { + name: "积分锁客", + icon: "jfsk", + pathName: "points", + intro: "设置充值消费的N倍,当前订单立即免单", + }, + { + name: "消费返现", + icon: "xffx", + pathName: "cashback", + intro: "用户下单后返现一定的金额到余额,可促进复购", + }, + { + name: "消费赠券", + icon: "xfzq", + pathName: "consume_ticket", + intro: "达到指定消费金额赠送优惠券", + }, + { + name: "私域引流", + icon: "syyl", + pathName: "drainage", + intro: "可设置用户下单成功后的群二维码", + }, + { + name: "生日有礼", + icon: "sryl", + pathName: "birthdayGift", + intro: "用户生日管理设置" + }, + { + name: "推送活动消息", + icon: "tshdxx", + pathName: "", + intro: "给用户推送服务通知" + } + ] + }, + { + name: '增加现金流', + intro: '增加商家特定时期内实际可支配的现金流入', + childrenList: [ + { + name: "霸王餐", + icon: "bwc", + pathName: "king_dine", + intro: "设置充值消费的N倍,当前订单立即免单", + }, + { + name: "智慧充值", + icon: "zhcz", + pathName: "wisdom_recharge", + intro: "允许客户充值并使用余额支付", + }, + { + name: "充值兑换码", + icon: "czdhm", + pathName: "recharge_exchange", + intro: "兑换码直充余额,可当作礼品赠送", + }, + { + name: "券兑换码", + icon: "qdhm", + pathName: "coupon_exchange_code", + intro: "可添加多券组合兑换" + }, + ] + }, + { + name: '优惠券体系', + intro: '完整且系统化的优惠体系', + childrenList: [ + { + name: "折扣券", + icon: "zkq", + pathName: "rebate_coupon", + intro: "下单享折扣但折扣的金额将在券中抵扣。", + }, + { + name: "满减券", + icon: "mjq", + pathName: "discount_coupon", + intro: + "用户满足指定金额后,可使用优惠券立减相应金额,如:设置满100-50券,符合要求的订单满100元后,立减50元。", + }, + { + name: "商品兑换券", + icon: "spdhq", + pathName: "product_redemption", + intro: "设置可兑换成商品的券", + }, + { + name: "买一送一券", + icon: "myzy", + pathName: "buy_one", + intro: "针对营销活动买一送一设置券品", + }, + { + name: "第二件半价券", + icon: "dejbjq", + pathName: "half_price", + intro: "设置第二件半价券", + }, + { + name: "免配送费券", + icon: "mfpsq", + pathName: "", + intro: "可设置一张免除订单配送费的券", + }, + { + name: "固定价格券", + icon: "gdjkq", + pathName: "", + intro: + "设置该券后,允许用户以固定价格兑换指定商品,如:设置一个固定价格9.9的券,商品20元,用户使用券后只需要9.9元兑换该商品。", + }, + { + name: "超值券包", + icon: "czqb", + pathName: "", + intro: "下单加购" + }, + ] + }, + { + name: '消息推送功能', + intro: '推送商家/平台优惠活动消息的方式', + childrenList: [ + { + name: "短信推送", + icon: "dxts", + pathName: "note_push", + intro: "给用户推送服务通知" + }, + { + name: "微信公众号", + icon: "wxgzh", + pathName: "official_accounts", + intro: + "授权微信公众号后,让你能够在后台查看和维护公众号的粉丝;同时你的店铺也有出现关注公众号的入口。", + }, + ] + } +] + export const returnUserType = (type) => { return userTypes.find((item) => item.value === type)?.label; }; diff --git a/src/views/marketing_center/list.vue b/src/views/marketing_center/list.vue index 7f3a6ee..3e002d9 100644 --- a/src/views/marketing_center/list.vue +++ b/src/views/marketing_center/list.vue @@ -15,7 +15,7 @@ -
+
@@ -46,6 +46,7 @@ import { ref } from 'vue' import defaultIcon from "@/assets/logo.png"; import { ElMessage } from "element-plus"; +import { newMenus } from './data.js' const iconSize = ref({ width: '55px', @@ -53,233 +54,16 @@ const iconSize = ref({ }) function showChildrenHandle(index) { - menusActive.value = index - childrenShow.value = true + // menusActive.value = index + // childrenShow.value = true + router.push({ + name: 'marketing_children_page', + query: { + index: index + } + }) } -const childrenShow = ref(false) -const menusActive = ref(0) -const newMenus = ref([ - { - name: '顾客中心', - intro: '以顾客为核心统一管理', - childrenList: [ - { - name: "超级会员", - icon: "cjhy", - pathName: "superVip", - intro: "用户会员管理设置" - }, - ] - }, - { - name: '拉新拓客', - intro: '协助商家拉来新客户,拓展客户群体', - childrenList: [ - { - name: "分销", - icon: "zhcz", - pathName: "distribution_page", - intro: "用户成为业务员,可促进消费" - }, - { - name: "套餐推广", - icon: "tctg", - pathName: "", - intro: "下单通过用户邀请好友减免金额的方式裂变宣传套餐加购", - }, - { - name: "新客立减", - icon: "xklj", - pathName: "newUserDiscount", - intro: "首单下单减免金额" - }, - { - name: "商品拼团", - icon: "sppt", - pathName: "", - intro: "拼团" - }, - ] - }, - { - name: '拉高客单价', - intro: '提高每一位顾客单次购买的金额', - childrenList: [ - { - name: "满减活动", - icon: "mjhd", pathName: "discount_activity", - intro: "达到指定支付金额享受减价" - }, - { - name: "点餐智能推荐", - icon: "dczntj", - pathName: "order_recommendation", - intro: "进入点单页X秒未点自动推荐商品,此推荐设置启用即生效", - }, - { - name: "限时折扣", - icon: "xszk", - pathName: "discount_limit", - intro: "批量设置商品折扣" - }, - { - name: "弹窗广告", - icon: "tcgg", - pathName: "", - intro: "设置弹窗广告" - }, - ] - }, - { - name: '提升复购率', - intro: '提升客户再次购买的概率和频次', - childrenList: [ - { - name: "积分锁客", - icon: "jfsk", - pathName: "points", - intro: "设置充值消费的N倍,当前订单立即免单", - }, - { - name: "消费返现", - icon: "xffx", - pathName: "cashback", - intro: "用户下单后返现一定的金额到余额,可促进复购", - }, - { - name: "消费赠券", - icon: "xfzq", - pathName: "consume_ticket", - intro: "达到指定消费金额赠送优惠券", - }, - { - name: "私域引流", - icon: "syyl", - pathName: "drainage", - intro: "可设置用户下单成功后的群二维码", - }, - { - name: "生日有礼", - icon: "sryl", - pathName: "birthdayGift", - intro: "用户生日管理设置" - }, - { - name: "推送活动消息", - icon: "tshdxx", - pathName: "", - intro: "给用户推送服务通知" - } - ] - }, - { - name: '增加现金流', - intro: '增加商家特定时期内实际可支配的现金流入', - childrenList: [ - { - name: "霸王餐", - icon: "bwc", - pathName: "king_dine", - intro: "设置充值消费的N倍,当前订单立即免单", - }, - { - name: "智慧充值", - icon: "zhcz", - pathName: "wisdom_recharge", - intro: "允许客户充值并使用余额支付", - }, - { - name: "充值兑换码", - icon: "czdhm", - pathName: "recharge_exchange", - intro: "兑换码直充余额,可当作礼品赠送", - }, - { - name: "券兑换码", - icon: "qdhm", - pathName: "coupon_exchange_code", - intro: "可添加多券组合兑换" - }, - ] - }, - { - name: '优惠券体系', - intro: '完整且系统化的优惠体系', - childrenList: [ - { - name: "折扣券", - icon: "zkq", - pathName: "rebate_coupon", - intro: "下单享折扣但折扣的金额将在券中抵扣。", - }, - { - name: "满减券", - icon: "mjq", - pathName: "discount_coupon", - intro: - "用户满足指定金额后,可使用优惠券立减相应金额,如:设置满100-50券,符合要求的订单满100元后,立减50元。", - }, - { - name: "商品兑换券", - icon: "spdhq", - pathName: "product_redemption", - intro: "设置可兑换成商品的券", - }, - { - name: "买一送一券", - icon: "myzy", - pathName: "buy_one", - intro: "针对营销活动买一送一设置券品", - }, - { - name: "第二件半价券", - icon: "dejbjq", - pathName: "half_price", - intro: "设置第二件半价券", - }, - { - name: "免配送费券", - icon: "mfpsq", - pathName: "", - intro: "可设置一张免除订单配送费的券", - }, - { - name: "固定价格券", - icon: "gdjkq", - pathName: "", - intro: - "设置该券后,允许用户以固定价格兑换指定商品,如:设置一个固定价格9.9的券,商品20元,用户使用券后只需要9.9元兑换该商品。", - }, - { - name: "超值券包", - icon: "czqb", - pathName: "", - intro: "下单加购" - }, - ] - }, - { - name: '消息推送功能', - intro: '推送商家/平台优惠活动消息的方式', - childrenList: [ - { - name: "短信推送", - icon: "dxts", - pathName: "note_push", - intro: "给用户推送服务通知" - }, - { - name: "微信公众号", - icon: "wxgzh", - pathName: "official_accounts", - intro: - "授权微信公众号后,让你能够在后台查看和维护公众号的粉丝;同时你的店铺也有出现关注公众号的入口。", - }, - ] - } -]) - const router = useRouter(); const to = (item) => { if (!item.pathName) { diff --git a/src/views/marketing_center/marketing_children_page.vue b/src/views/marketing_center/marketing_children_page.vue new file mode 100644 index 0000000..da138a7 --- /dev/null +++ b/src/views/marketing_center/marketing_children_page.vue @@ -0,0 +1,182 @@ + + + + + diff --git a/src/views/order/group-purchase.vue b/src/views/order/group-purchase.vue index b45901c..a2da669 100644 --- a/src/views/order/group-purchase.vue +++ b/src/views/order/group-purchase.vue @@ -112,7 +112,7 @@ + + \ No newline at end of file diff --git a/src/views/shop/groupBuying/components/refundDialog.vue b/src/views/shop/groupBuying/components/refundDialog.vue new file mode 100644 index 0000000..e076e12 --- /dev/null +++ b/src/views/shop/groupBuying/components/refundDialog.vue @@ -0,0 +1,111 @@ + + + + + \ No newline at end of file diff --git a/src/views/shop/groupBuying/components/scanGroup.vue b/src/views/shop/groupBuying/components/scanGroup.vue new file mode 100644 index 0000000..db90af2 --- /dev/null +++ b/src/views/shop/groupBuying/components/scanGroup.vue @@ -0,0 +1,514 @@ + + + + + + + \ No newline at end of file diff --git a/src/views/shop/groupBuying/index.vue b/src/views/shop/groupBuying/index.vue index 7d23e7f..32e6a7b 100644 --- a/src/views/shop/groupBuying/index.vue +++ b/src/views/shop/groupBuying/index.vue @@ -1,3 +1,669 @@ + + + + \ No newline at end of file diff --git a/src/views/tool/Instead/components/popup-quan-hexiao.vue b/src/views/tool/Instead/components/popup-quan-hexiao.vue index 7eb28cd..43f1276 100644 --- a/src/views/tool/Instead/components/popup-quan-hexiao.vue +++ b/src/views/tool/Instead/components/popup-quan-hexiao.vue @@ -3,42 +3,31 @@
- + {{ item.text }}
-
- +
取消 - 确定 + 确定
- @@ -51,6 +40,7 @@ import tiktokIcon from "@/assets/icons/douyin.png"; const user = useUserStore(); import * as $Api from "@/api/coup/index.js"; +import { searchstorestatus, thirdPartyCoupon_bindUrl, getuisdk } from '@/api/coup/group' import orderApi from "@/api/order/order"; import bindShop from "./douyin-quan-bind-shop.vue"; import chooseGoods from "./choose-quan-goods.vue"; @@ -94,10 +84,14 @@ export default { pays: [ { text: "美团", + clint_type: 1, + status: 0, icon: meituanIcon, }, { text: "抖音", + clint_type: 2, + status: 0, icon: tiktokIcon, }, ], @@ -117,6 +111,44 @@ export default { }, }, methods: { + // 查询抖音/美团绑定的状态 + async searchstorestatus() { + try { + const { mt_status, dy_status } = await searchstorestatus(this.pays[this.paysSel].clint_type) + // console.log('查询抖音/美团绑定的状态', mt_status, dy_status); + + this.pays.forEach(item => { + if (item.clint_type == 1) { + item.status = mt_status + } + if (item.clint_type == 2) { + item.status = dy_status + } + }) + + if (this.pays[this.paysSel].clint_type == 1 && this.pays[this.paysSel].status == 0) { + // 如果没有绑定,先提示用户去绑定 + const res = await thirdPartyCoupon_bindUrl() + ElMessageBox.confirm('您的店铺还未绑定美团,请绑定后操作!', '注意', { + confirmButtonText: '去绑定' + }).then(() => { + window.open(res) + }).catch(() => { }) + } + + if (this.pays[this.paysSel].clint_type == 2 && this.pays[this.paysSel].status == 0) { + // 如果没有抖音,先提示用户去绑定 + const res = await getuisdk() + ElMessageBox.confirm('您的店铺还未绑定抖音,请绑定后操作!', '注意', { + confirmButtonText: '去绑定' + }).then(() => { + window.open(res) + }).catch(() => { }) + } + } catch (error) { + console.log(error); + } + }, refChooseGoodsOpen(data, types) { this.$refs.refChooseGoods.open(data, types); }, @@ -152,6 +184,8 @@ export default { this.$nextTick(() => { this.$refs.refInputCode.focus(); //获取焦点 }); + + this.searchstorestatus() }, async confirm() { @@ -189,7 +223,7 @@ export default { window.open(res2); } }) - .catch(() => {}); + .catch(() => { }); return; } const res1 = await $Api.$meituan_fulfilmentcertificateprepare({ @@ -215,6 +249,8 @@ export default { setTimeout(() => { this.$refs.refInputCode.focus(); }, 100); + + this.searchstorestatus() }, close() { this.show = false; @@ -241,22 +277,28 @@ export default { height: 164px; overflow: hidden; } + .openSwitch { display: flex; justify-content: center; } + .flex { display: flex; } + .justify-center { justify-content: center; } + :deep(.el-form) { width: 200px; } + :deep(.el-alert) { width: inherit; } + .flex-col { flex-direction: column; }