diff --git a/src/App.vue b/src/App.vue index 01059e3..55e3905 100644 --- a/src/App.vue +++ b/src/App.vue @@ -16,54 +16,86 @@ interface TabbarItem { } const tabbar: TabbarItem[] = [ - { - pagePath: "pages/tabbar/canteen", - text: "食堂", - iconPath: "/static/tabbar/canteen.png", - selectedIconPath: "/static/tabbar/canteen-select.png", - launchParam: ["canteen"], - auth: [], - }, - { - pagePath: "pages/tabbar/selfMerchant", - text: "自营商家", - iconPath: "/static/tabbar/selfMerchant.png", - selectedIconPath: "/static/tabbar/selfMerchant-select.png", - launchParam: ["selfMerchant"], - auth: [], - }, - { - pagePath: "pages/tabbar/coopMerchant", - text: "合作商家", - iconPath: "/static/tabbar/coopMerchant.png", - selectedIconPath: "/static/tabbar/coopMerchant-select.png", - launchParam: ["selfMerchant"], - auth: ["user"], - }, - { - pagePath: "pages/tabbar/order", - text: "订单", - iconPath: "/static/tabbar/order.png", - selectedIconPath: "/static/tabbar/order-select.png", - launchParam: ["canteen", "selfMerchant"], - auth: ["user"], - }, - { - pagePath: "pages/tabbar/flowStatistics", - text: "流水统计", - iconPath: "/static/tabbar/order.png", - selectedIconPath: "/static/tabbar/order-select.png", - launchParam: [], - auth: ["merchant"], - }, - { - pagePath: "pages/tabbar/individualOrder", - text: "订单", - iconPath: "/static/tabbar/order.png", - selectedIconPath: "/static/tabbar/order-select.png", - launchParam: [], - auth: ["merchant"], - }, + // { + // pagePath: "pages/tabbar/canteen", + // text: "食堂", + // iconPath: "/static/tabbar/canteen.png", + // selectedIconPath: "/static/tabbar/canteen-select.png", + // launchParam: ["canteen"], + // auth: [], + // }, + // { + // pagePath: "pages/tabbar/selfMerchant", + // text: "自营商家", + // iconPath: "/static/tabbar/selfMerchant.png", + // selectedIconPath: "/static/tabbar/selfMerchant-select.png", + // launchParam: ["selfMerchant"], + // auth: [], + // }, + // { + // pagePath: "pages/tabbar/coopMerchant", + // text: "合作商家", + // iconPath: "/static/tabbar/coopMerchant.png", + // selectedIconPath: "/static/tabbar/coopMerchant-select.png", + // launchParam: ["selfMerchant"], + // auth: ["user"], + // }, + // { + // pagePath: "pages/tabbar/order", + // text: "订单", + // iconPath: "/static/tabbar/order.png", + // selectedIconPath: "/static/tabbar/order-select.png", + // launchParam: ["canteen", "selfMerchant"], + // auth: ["user"], + // }, + // { + // pagePath: "pages/tabbar/flowStatistics", + // text: "流水统计", + // iconPath: "/static/tabbar/order.png", + // selectedIconPath: "/static/tabbar/order-select.png", + // launchParam: [], + // auth: ["merchant"], + // }, + // { + // pagePath: "pages/tabbar/individualOrder", + // text: "订单", + // iconPath: "/static/tabbar/order.png", + // selectedIconPath: "/static/tabbar/order-select.png", + // launchParam: [], + // auth: ["merchant"], + // }, + { + pagePath: "pages/integrated/visitor/index", + text: "访客申请", + iconPath: "/static/tabbar/my.png", + selectedIconPath: "/static/tabbar/my-select.png", + launchParam: ["canteen", "selfMerchant"], + auth: ["user",], + }, + { + pagePath: "pages/integrated/visitor/myvisitor", + text: "申请记录", + iconPath: "/static/tabbar/my.png", + selectedIconPath: "/static/tabbar/my-select.png", + launchParam: ["canteen", "selfMerchant"], + auth: ["user",], + }, + { + pagePath: "pages/integrated/visitor/myyyvisitor", + text: "主动邀约", + iconPath: "/static/tabbar/my.png", + selectedIconPath: "/static/tabbar/my-select.png", + launchParam: ["canteen", "selfMerchant"], + auth: ["user",], + }, + { + pagePath: "pages/integrated/visitor/myyyvisitorlist", + text: "邀约记录", + iconPath: "/static/tabbar/my.png", + selectedIconPath: "/static/tabbar/my-select.png", + launchParam: ["canteen", "selfMerchant"], + auth: ["user",], + }, { pagePath: "pages/tabbar/my", text: "我的", diff --git a/src/pages.json b/src/pages.json index 1724bc9..5c1ec3d 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,451 +1,480 @@ -{ - "easycom": { - "autoscan": true, - "custom": { - "^base-(.*)": "@/sheep/components/base/base-$1/base-$1.vue", - "^crud-(.*)": "@/sheep/components/crud/crud-$1/crud-$1.vue", - "^tm-(.*)": "@/uni_modules/tm-ui/components/tm-$1/tm-$1.vue", - "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue" - } - }, - "pages": [ - { - "path": "pages/tabbar/canteen", - "style": { - "navigationBarTitleText": "食堂", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/selfMerchant", - "style": { - "navigationBarTitleText": "自营商家", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/coopMerchant", - "style": { - "navigationBarTitleText": "合作商家", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/order", - "style": { - "navigationBarTitleText": "订单", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/flowStatistics", - "style": { - "navigationBarTitleText": "流水统计", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/individualOrder", - "style": { - "navigationBarTitleText": "订单", - "disableScroll": true - } - }, - { - "path": "pages/tabbar/my", - "style": { - "navigationBarTitleText": "我的", - "disableScroll": true - } - } - ], - "subPackages": [ - { - "root": "pages/shop", - "pages": [ - { - "path": "detail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "brandDetail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "product-detail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/apply", - "pages": [ - { - "path": "foreign-apply", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "foreign-list", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "foreign-items", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "stride-apply", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "stride-list", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "stride-items", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/boxes", - "pages": [ - { - "path": "apply", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "detail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "list", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "apply-list", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/merchant", - "pages": [ - { - "path": "detail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "food", - "style": { - "navigationBarTitleText": "菜谱", - "navigationBarBackgroundColor": "#1777FF", - "disableScroll": true - } - }, - { - "path": "product-detail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/order", - "pages": [ - { - "path": "detail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/refund", - "pages": [ - { - "path": "apply", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "history", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/test", - "pages": [ - { - "path": "login", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/wallet", - "pages": [ - { - "path": "list", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "detail", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "recharge", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/human-face", - "pages": [ - { - "path": "list", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - }, - { - "path": "apply", - "style": { - "navigationBarTitleText": "", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/user", - "pages": [ - { - "path": "userRole", - "style": { - "navigationBarTitleText": "用户身份", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/pay", - "pages": [ - { - "path": "scanPay", - "style": { - "navigationBarTitleText": "支付", - "disableScroll": true - } - }, - { - "path": "payComplete", - "style": { - "navigationBarTitleText": "支付完成", - "disableScroll": true - } - }, - { - "path": "transferMoney", - "style": { - "navigationBarTitleText": "转账", - "disableScroll": true - } - } - ] - }, - { - "root": "pages/integrated", - "pages": [ - { - "path": "feedback/index", - "style": { - "navigationBarTitleText": "意见反馈" - } - } - ] - }, - { - "root": "pages/integrated", - "pages": [ - { - "path": "visitor/index", - "style": { - "navigationBarTitleText": "访客" - } - } - ] - }, - { - "root": "pages/integrated", - "pages": [ - { - "path": "visitor/myvisitor", - "style": { - "navigationBarTitleText": "访客记录" - } - } - ] - } - ], - "globalStyle": { - "navigationBarTextStyle": "black", - "navigationBarTitleText": "浦江小程序", - "navigationBarBackgroundColor": "#1777FF", - "backgroundColor": "#ecf4f9", - "navigationStyle": "custom" - }, - "tabBar": { - "list": [ - { - "pagePath": "pages/tabbar/canteen", - "text": "", - "iconPath": "", - "selectedIconPath": "" - }, - { - "pagePath": "pages/tabbar/selfMerchant", - "text": "", - "iconPath": "", - "selectedIconPath": "" - }, - { - "pagePath": "pages/tabbar/coopMerchant", - "text": "", - "iconPath": "", - "selectedIconPath": "" - }, - { - "pagePath": "pages/tabbar/order", - "text": "", - "iconPath": "", - "selectedIconPath": "" - }, - { - "pagePath": "pages/tabbar/flowStatistics", - "text": "", - "iconPath": "", - "selectedIconPath": "" - }, - { - "pagePath": "pages/tabbar/individualOrder", - "text": "", - "iconPath": "", - "selectedIconPath": "" - }, - { - "pagePath": "pages/tabbar/my", - "text": "", - "iconPath": "", - "selectedIconPath": "" - } - // { - // "pagePath": "pages/tabbar/canteen", - // "text": "食堂", - // "iconPath": "static/tabbar/canteen.png", - // "selectedIconPath": "static/tabbar/canteen-select.png" - // }, - // { - // "pagePath": "pages/tabbar/selfMerchant", - // "text": "自营商家", - // "iconPath": "static/tabbar/selfMerchant.png", - // "selectedIconPath": "static/tabbar/selfMerchant-select.png" - // }, - // { - // pagePath: "pages/tabbar/coopMerchant", - // text: "合作商家", - // iconPath: "static/tabbar/coopMerchant.png", - // selectedIconPath: "static/tabbar/coopMerchant-select.png", - // }, - // { - // "pagePath": "pages/tabbar/order", - // "text": "订单", - // "iconPath": "static/tabbar/order.png", - // "selectedIconPath": "static/tabbar/order-select.png" - // }, - // { - // "pagePath": "pages/tabbar/flowStatistics", - // "text": "流水统计", - // "iconPath": "static/tabbar/order.png", - // "selectedIconPath": "static/tabbar/order-select.png" - // }, - // { - // "pagePath": "pages/tabbar/individualOrder", - // "text": "订单", - // "iconPath": "static/tabbar/order.png", - // "selectedIconPath": "static/tabbar/order-select.png" - // }, - // { - // "pagePath": "pages/tabbar/my", - // "text": "我的", - // "iconPath": "static/tabbar/my.png", - // "selectedIconPath": "static/tabbar/my-select.png" - // }, - ] - } -} +{ + "easycom": { + "autoscan": true, + "custom": { + "^base-(.*)": "@/sheep/components/base/base-$1/base-$1.vue", + "^crud-(.*)": "@/sheep/components/crud/crud-$1/crud-$1.vue", + "^tm-(.*)": "@/uni_modules/tm-ui/components/tm-$1/tm-$1.vue", + "^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)": "z-paging/components/z-paging$1/z-paging$1.vue" + } + }, + "pages": [ + { + "path": "pages/tabbar/canteen", + "style": { + "navigationBarTitleText": "食堂", + "disableScroll": true + } + }, + { + "path": "pages/tabbar/selfMerchant", + "style": { + "navigationBarTitleText": "自营商家", + "disableScroll": true + } + }, + { + "path": "pages/tabbar/coopMerchant", + "style": { + "navigationBarTitleText": "合作商家", + "disableScroll": true + } + }, + { + "path": "pages/tabbar/order", + "style": { + "navigationBarTitleText": "订单", + "disableScroll": true + } + }, +// { +// "path": "pages/tabbar/flowStatistics", +// "style": { +// "navigationBarTitleText": "流水统计", +// "disableScroll": true +// } +// }, +// { +// "path": "pages/tabbar/individualOrder", +// "style": { +// "navigationBarTitleText": "订单", +// "disableScroll": true +// } +// }, +// { +// "path": "pages/integrated/visitor/myvisitor", +// "style": { +// "navigationBarTitleText": "访客", +// "disableScroll": true +// } +// }, + { + "path": "pages/tabbar/my", + "style": { + "navigationBarTitleText": "我的", + "disableScroll": true + } + } + ], + "subPackages": [ + { + "root": "pages/shop", + "pages": [ + { + "path": "detail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "brandDetail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "product-detail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/apply", + "pages": [ + { + "path": "foreign-apply", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "foreign-list", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "foreign-items", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "stride-apply", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "stride-list", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "stride-items", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/boxes", + "pages": [ + { + "path": "apply", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "detail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "list", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "apply-list", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/merchant", + "pages": [ + { + "path": "detail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "food", + "style": { + "navigationBarTitleText": "菜谱", + "navigationBarBackgroundColor": "#1777FF", + "disableScroll": true + } + }, + { + "path": "product-detail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/order", + "pages": [ + { + "path": "detail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/refund", + "pages": [ + { + "path": "apply", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "history", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/test", + "pages": [ + { + "path": "login", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/wallet", + "pages": [ + { + "path": "list", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "detail", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "recharge", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/human-face", + "pages": [ + { + "path": "list", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + }, + { + "path": "apply", + "style": { + "navigationBarTitleText": "", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/user", + "pages": [ + { + "path": "userRole", + "style": { + "navigationBarTitleText": "用户身份", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/pay", + "pages": [ + { + "path": "scanPay", + "style": { + "navigationBarTitleText": "支付", + "disableScroll": true + } + }, + { + "path": "payComplete", + "style": { + "navigationBarTitleText": "支付完成", + "disableScroll": true + } + }, + { + "path": "transferMoney", + "style": { + "navigationBarTitleText": "转账", + "disableScroll": true + } + } + ] + }, + { + "root": "pages/integrated", + "pages": [ + { + "path": "feedback/index", + "style": { + "navigationBarTitleText": "意见反馈" + } + } + ] + }, + { + "root": "pages/integrated", + "pages": [ + { + "path": "visitor/index", + "style": { + "navigationBarTitleText": "访客" + } + } + ] + }, + { + "root": "pages/integrated", + "pages": [ + { + "path": "visitor/myvisitor", + "style": { + "navigationBarTitleText": "访客记录" + } + } + ] + }, + { + "root": "pages/integrated", + "pages": [ + { + "path": "visitor/myyyvisitor", + "style": { + "navigationBarTitleText": "邀约访客" + } + } + ] + }, + { + "root": "pages/integrated", + "pages": [ + { + "path": "visitor/myyyvisitorlist", + "style": { + "navigationBarTitleText": "邀约记录" + } + } + ] + } + ], + "globalStyle": { + "navigationBarTextStyle": "black", + "navigationBarTitleText": "浦江小程序", + "navigationBarBackgroundColor": "#1777FF", + "backgroundColor": "#ecf4f9", + "navigationStyle": "custom" + }, + "tabBar": { + "list": [ + { + "pagePath": "pages/tabbar/canteen", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/selfMerchant", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/coopMerchant", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/order", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/flowStatistics", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/individualOrder", + "text": "", + "iconPath": "", + "selectedIconPath": "" + }, + { + "pagePath": "pages/tabbar/my", + "text": "", + "iconPath": "", + "selectedIconPath": "" + } + // { + // "pagePath": "pages/tabbar/canteen", + // "text": "食堂", + // "iconPath": "static/tabbar/canteen.png", + // "selectedIconPath": "static/tabbar/canteen-select.png" + // }, + // { + // "pagePath": "pages/tabbar/selfMerchant", + // "text": "自营商家", + // "iconPath": "static/tabbar/selfMerchant.png", + // "selectedIconPath": "static/tabbar/selfMerchant-select.png" + // }, + // { + // pagePath: "pages/tabbar/coopMerchant", + // text: "合作商家", + // iconPath: "static/tabbar/coopMerchant.png", + // selectedIconPath: "static/tabbar/coopMerchant-select.png", + // }, + // { + // "pagePath": "pages/tabbar/order", + // "text": "订单", + // "iconPath": "static/tabbar/order.png", + // "selectedIconPath": "static/tabbar/order-select.png" + // }, + // { + // "pagePath": "pages/tabbar/flowStatistics", + // "text": "流水统计", + // "iconPath": "static/tabbar/order.png", + // "selectedIconPath": "static/tabbar/order-select.png" + // }, + // { + // "pagePath": "pages/tabbar/individualOrder", + // "text": "订单", + // "iconPath": "static/tabbar/order.png", + // "selectedIconPath": "static/tabbar/order-select.png" + // }, + // { + // "pagePath": "pages/tabbar/my", + // "text": "我的", + // "iconPath": "static/tabbar/my.png", + // "selectedIconPath": "static/tabbar/my-select.png" + // }, + ] + } +} diff --git a/src/pages/integrated/visitor/index.vue b/src/pages/integrated/visitor/index.vue index 6cd3cf8..f44c482 100644 --- a/src/pages/integrated/visitor/index.vue +++ b/src/pages/integrated/visitor/index.vue @@ -48,6 +48,7 @@ 公司名称 + * + + 拜访原因* + + + + {{ formData.reasonLabel || '请选择拜访原因' }} + + > + + + + 是否有随行人员 - - 确定 + + + + @@ -290,6 +309,8 @@ const formData = reactive({ vEndDate: '', type: '1', checkStatus: '0', + reasonValue: '', + reasonLabel: '', }) // 随行人员列表 @@ -320,6 +341,9 @@ const selectedUserId = ref('') const selectedUserName = ref('') const searchKeyword = ref('') +// 拜访原因相关 +const reasonList = ref([]) + // 生成未来一周的日期 const dateList = computed(() => { const dates = [] @@ -450,6 +474,10 @@ const handleSubmit = async () => { uni.showToast({ title: '请选择到访时间', icon: 'none' }) return } + if (!formData.reasonValue || !formData.reasonLabel) { + uni.showToast({ title: '请选择拜访原因', icon: 'none' }) + return + } try { const submitData = { @@ -629,9 +657,30 @@ const closeUserPicker = () => { // 记录当前选中的部门ID,用于判断是否需要重新获取用户列表 const currentDeptId = ref('') +// 获取拜访原因列表 +const getReasonList = async () => { + try { + const { code, data } = await visitorApi.getDictListByType('1') + if (code === 0 && data) { + // 将对象转换为数组 + reasonList.value = Object.values(data) + } + } catch (error) { + console.error('获取拜访原因失败:', error) + } +} + +// 拜访原因选择变化 +const onReasonChange = (e: any) => { + const selected = reasonList.value[e.detail.value] + formData.reasonValue = selected.value + formData.reasonLabel = selected.label +} + // 页面加载时获取部门数据 onMounted(() => { getDeptList() + getReasonList() }) @@ -1044,4 +1093,70 @@ onMounted(() => { .bottom-space { height: 180rpx; } + +.picker-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 24rpx 32rpx; + background-color: #f7f7f7; + + text { + font-size: 28rpx; + + &:first-child { + color: #666; + } + + &:last-child { + color: #1989fa; + } + } +} + +.picker-view { + width: 100%; + height: 392rpx; + background-color: #fff; +} + +.picker-item { + line-height: 88rpx; + text-align: center; + font-size: 32rpx; +} + +.placeholder { + color: #999; + + &.active { + color: #333; + } +} + +.arrow { + color: #999; + font-size: 28rpx; +} + +.bottom-safe-area { + padding: 20rpx 32rpx; + padding-bottom: calc(20rpx + constant(safe-area-inset-bottom)); /* iOS 11.0 */ + padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); /* iOS 11.2 */ + background: #fff; +} + +.submit-btn { + width: 100%; + height: 88rpx; + line-height: 88rpx; + background: #1989fa; + color: #fff; + font-size: 32rpx; + border-radius: 44rpx; + + &:active { + opacity: 0.8; + } +} diff --git a/src/pages/integrated/visitor/myvisitor.vue b/src/pages/integrated/visitor/myvisitor.vue index 69bd09f..fdb0d77 100644 --- a/src/pages/integrated/visitor/myvisitor.vue +++ b/src/pages/integrated/visitor/myvisitor.vue @@ -17,45 +17,73 @@ - {{ item.visitTime }} - {{ getStatusText(item.status) }} + {{ formatTime(item.vstartDate, item.vendDate) }} + + {{ getStatusText(item.checkStatus) }} + - 拜访部门: - {{ item.deptName }} + 接待人: + {{ item.userName }} - 拜访人: - {{ item.name }} - - - 手机号: + 联系方式: {{ item.mobile }} + + 预约时间: + {{ formatCreateTime(item.createTime) }} + + + 备注: + {{ item.description }} + + + 审核意见: + {{ item.checkReason }} + - - 取消 + + + 已到访 + 取消 + - 加载中... + 加载中... 没有更多数据了 + + 暂无访客记录 + + + \ No newline at end of file diff --git a/src/pages/integrated/visitor/myyyvisitorlist.vue b/src/pages/integrated/visitor/myyyvisitorlist.vue new file mode 100644 index 0000000..2249e72 --- /dev/null +++ b/src/pages/integrated/visitor/myyyvisitorlist.vue @@ -0,0 +1,472 @@ + + + + + \ No newline at end of file diff --git a/src/pages/tabbar/my.vue b/src/pages/tabbar/my.vue index 2190f32..573fd5d 100644 --- a/src/pages/tabbar/my.vue +++ b/src/pages/tabbar/my.vue @@ -78,6 +78,8 @@ const state = reactive<{ { text: "人脸管理", icon: "/static/icon/service_5.png", router: "/pages/human-face/list" }, { text: "访客", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/index" }, { text: "访客记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myvisitor" }, + { text: "访客邀约", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitor" }, + { text: "邀约记录", icon: "/static/icon/service_5.png", router: "/pages/integrated/visitor/myyyvisitorlist" }, // { text: "意见反馈", icon: "/static/icon/service_5.png", router: "/pages/integrated/feedback/index" } ], appInfo: "", diff --git a/src/sheep/api/integrated/visitors.ts b/src/sheep/api/integrated/visitors.ts index 5c0bcb0..1446360 100644 --- a/src/sheep/api/integrated/visitors.ts +++ b/src/sheep/api/integrated/visitors.ts @@ -22,6 +22,101 @@ const visitorApi = { }, }), + // 获取访客记录列表 + getVisitorList: (params: { + current: number; + size: number; + checkStatus?: string; + }) => + request({ + url: "/integrated/visitors/app/sq/page", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), + + // 取消访客预约 + cancelVisitor: (id: string) => + request({ + url: "/integrated/visitors/app/cancelVisitor", + method: "GET", + params: { id }, + custom: { + showLoading: false, + }, + }), + + // 获取拜访原因字典 + getDictListByType: (type: number) => + request({ + url: '/integrated/visitors/app/getDictListByType', + method: 'GET', + params: { type }, + custom: { + showLoading: false, + }, + }), + + // 保存访客邀约 + saveYY: (data: any) => + request({ + url: "/integrated/visitors/app/saveYY", + method: "POST", + data, + custom: { + showLoading: false, + }, + }), + + // 获取邀约记录列表 + getVisitorYYList: (params: { + current: number; + size: number; + checkStatus?: string; + }) => + request({ + url: "/integrated/visitors/app/yy/page", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), + + // 接受访客邀约 + acceptVisitor: (id: string) => + request({ + url: "/integrated/visitors/app/acceptYY", + method: "GET", + params: { id }, + custom: { + showLoading: false, + }, + }), + + // 拒绝访客邀约 + rejectVisitor: (id: string) => + request({ + url: "/integrated/visitors/app/rejectYY", + method: "GET", + params: { id }, + custom: { + showLoading: false, + }, + }), + + // 更新访客邀约状态 + updateCheckStatus: (params: { id: string; checkStatus: string }) => + request({ + url: "/integrated/visitors/app/updateCheckStatus", + method: "GET", + params, + custom: { + showLoading: false, + }, + }), } export default visitorApi