diff --git a/src/pages/invitation/applyRecord.vue b/src/pages/invitation/applyRecord.vue
deleted file mode 100644
index 10ebc14..0000000
--- a/src/pages/invitation/applyRecord.vue
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ v.merchantName }}
-
-
- 未支付
- 已支付
- 售后
- 已核销
- 已取消(智能柜)
-
-
-
- 下单时间
- {{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
-
- {{ hooks.useEnum("hardwareRefundStatusEnum", v.refundStatus) }}
-
-
-
- {{ v.productDesc }}
-
- ¥ {{ hooks.useMoney(v.totalPrice) }}
-
-
-
-
-
-
- 核销码
-
-
-
-
-
-
-
-
diff --git a/src/pages/invitation/invitation.vue b/src/pages/invitation/invitation.vue
deleted file mode 100644
index c5fc834..0000000
--- a/src/pages/invitation/invitation.vue
+++ /dev/null
@@ -1,121 +0,0 @@
-
-
-
-
-
- 访客邀约
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提交
-
-
-
-
-
-
diff --git a/src/pages/invitation/invitationRecord.vue b/src/pages/invitation/invitationRecord.vue
deleted file mode 100644
index b6d5430..0000000
--- a/src/pages/invitation/invitationRecord.vue
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ v.merchantName }}
-
-
- 未支付
- 已支付
- 售后
- 已核销
- 已取消(智能柜)
-
-
-
- 下单时间
- {{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
-
- {{ hooks.useEnum("hardwareRefundStatusEnum", v.refundStatus) }}
-
-
-
- {{ v.productDesc }}
-
- ¥ {{ hooks.useMoney(v.totalPrice) }}
-
-
-
-
-
-
- 核销码
-
-
-
-
-
-
-
-
diff --git a/src/pages/tabbar/invitation.vue b/src/pages/tabbar/invitation.vue
index 7eaf64d..3d927be 100644
--- a/src/pages/tabbar/invitation.vue
+++ b/src/pages/tabbar/invitation.vue
@@ -128,14 +128,31 @@ const rules: Record = {
companyName: [{ required: true, message: "请输入来访公司名称" }],
vStartDate: [{ required: true, message: "请选择拜访开始时间" }],
vEndDate: [{ required: true, message: "请选择拜访离开时间" }],
- // deptId: [{ required: true, message: "请选择拜访部门" }],
- // reasonValue: [{ required: true, message: "请选择拜访原因" }],
+ deptId: [{ required: true, message: "请选择拜访部门" }],
+ reasonValue: [{ required: true, message: "请选择拜访原因" }],
}
// 表单提交
const onsubmit = (evt: TM.FORM_SUBMIT_RESULT) => {
console.log("校验结果:", evt)
if (!evt.isPass) return
- uni.showModal({ title: "提示", content: "确认提交吗?", confirmColor: "#0094ff" })
+ uni.showModal({
+ title: "提示",
+ content: "确认提交吗?",
+ confirmColor: "#0094ff",
+ success: async () => {
+ try {
+ const { code, data, msg } = await invitationApi.saveInvitation(form)
+ if (code == 0) {
+ uni.showToast({ title: "提交成功", icon: "success" })
+ uni.switchTab({ url: "/pages/tabbar/invitationRecord" })
+ return
+ }
+ uni.showToast({ title: msg || "提交失败", icon: "none" })
+ } catch (error: any) {
+ uni.showToast({ title: error.message || "提交失败", icon: "none" })
+ }
+ },
+ })
}
diff --git a/src/pages/tabbar/invitationRecord.vue b/src/pages/tabbar/invitationRecord.vue
index a79b335..4a22d0a 100644
--- a/src/pages/tabbar/invitationRecord.vue
+++ b/src/pages/tabbar/invitationRecord.vue
@@ -1,3 +1,137 @@
-
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+ 待审核
+ 待到访
+ 已拒绝
+ 已取消
+ {{ v.vstartDate + " ~ " + v.vendDate }}
+
+
+
+ {{ v.name }}
+ {{ v.mobile }}
+
+ 接待人:{{ v.userName }}
+
+
+
+ 审核通过
+
+
+ 审核拒绝
+
+
+
+
+
+
+
+
diff --git a/src/sheep/api/invitation.ts b/src/sheep/api/invitation.ts
index bced8fd..ef4bd87 100644
--- a/src/sheep/api/invitation.ts
+++ b/src/sheep/api/invitation.ts
@@ -7,11 +7,29 @@ export default {
url: `/integrated/app/visitor/getDictListByType?type=${type}`,
method: "GET",
}),
-}
-// const updateCheckStatus = () => {
-// request({
-// url: `/integrated/visitors/app/updateCheckStatus?id=1950037876011745282&checkStatus=2`,
-// method: "GET",
-// })
-// }
+ // 保存访客邀约
+ saveInvitation: (data: any): Promise =>
+ request({
+ url: `/integrated/visitors/app/saveYY`,
+ method: "POST",
+ data,
+ }),
+
+ // 获取访客邀约列表
+ // type为1:主动申请 type为2:邀约 type为3:后台创建
+ getInvitationRecord: (params: { current: number; size: number; checkStatus?: string; type?: number }): Promise =>
+ request({
+ url: `/integrated/visitors/app/yy/page`,
+ method: "GET",
+ params,
+ }),
+
+ // 更新审核状态通过 2:通过 3:拒绝
+ updateCheckStatus: (params: { id: string; checkStatus: number | string }): Promise =>
+ request({
+ url: `/integrated/visitors/app/updateCheckStatus`,
+ method: "GET",
+ params,
+ }),
+}