访客申请 访客记录 访客邀约 邀约记录 页面
This commit is contained in:
1 parent
c809bdb7e7
commit
30148345f7
8 files changed
+506
-25
No files matched your search
@@ -377,6 +377,35 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/visitor",
|
||||
"pages": [
|
||||
{
|
||||
"path": "apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客申请"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "applyRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请记录"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "invitation",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客邀约"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "invitationRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "邀约记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/integrated",
|
||||
"pages": [
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<template>
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
<tm-sheet :margin="[0, 20]">
|
||||
<tm-sheet :margin="[0]">
|
||||
<view class="flex-row items-center justify-center flex-wrap">
|
||||
<view class="w-half flex justify-center py-2 rounded-1">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200" @click="router.jump('/pages/visitor/apply')">
|
||||
<image class="w-80 h-80 px-2 pt-2" src="@/static/page/货柜详情.svg" />
|
||||
<tm-text font-size="32">访客申请</tm-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-half flex justify-center py-2 rounded-1">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200" @click="router.jump('/pages/visitor/applyRecord')">
|
||||
<image class="w-80 h-80 px-2 pt-2" src="@/static/page/货柜详情.svg" />
|
||||
<tm-text font-size="32">申请记录</tm-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-half flex justify-center py-2 rounded-1">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200" @click="router.jump('/pages/visitor/invitation')">
|
||||
<image class="w-80 h-80 px-2 pt-2" src="@/static/page/货柜详情.svg" />
|
||||
<tm-text font-size="32">访客邀约</tm-text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-half flex justify-center py-2 rounded-1">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200">
|
||||
<view class="w-half text-center rounded-1 active:bg-#e8e8e8 duration-200" @click="router.jump('/pages/visitor/invitationRecord')">
|
||||
<image class="w-80 h-80 px-2 pt-2" src="@/static/page/货柜详情.svg" />
|
||||
<tm-text font-size="32">邀约记录</tm-text>
|
||||
</view>
|
||||
@@ -46,22 +46,4 @@ onLoad(() => {
|
||||
const app = getApp()
|
||||
app._initTabbar()
|
||||
})
|
||||
|
||||
// 货柜详情
|
||||
const doDetail = (id: string) => {
|
||||
if (!id) return
|
||||
router.jump("/pages/cabinet/cabinetDetail", { id }, 1)
|
||||
}
|
||||
|
||||
// 商品补货
|
||||
const replenishment = (id: string) => {
|
||||
if (!id) return
|
||||
router.jump("/pages/cabinet/replenishment", { id }, 1)
|
||||
}
|
||||
|
||||
// 商品上架
|
||||
const openPutaway = (id: string) => {
|
||||
if (!id) return
|
||||
router.jump("/pages/cabinet/putaway", { id }, 1)
|
||||
}
|
||||
</script>
|
||||
@@ -30,7 +30,7 @@ const doSubmit = async () => {
|
||||
const userInfoKey = constant.storageConstant.USERINFO
|
||||
uni.removeStorageSync(tokenKey)
|
||||
uni.showLoading({ title: "登录中...", mask: true })
|
||||
const res = await userApi.login({
|
||||
const res: any = await userApi.login({
|
||||
...applyForm,
|
||||
grant_type: "password",
|
||||
scope: "server",
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
<template>
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
|
||||
<tm-sheet margin="[0, 20]">
|
||||
<view class="mx-auto text-center text-lg">访客申请</view>
|
||||
<tm-text color="#999999" class="bg-#FFF7E6 p-1 pl-2 my-1">!访客需要填写一下验证信息</tm-text>
|
||||
<tm-form @submit="onsubmit" v-model="form" :rules="rules">
|
||||
<tm-form-item name="username" label="您的姓名">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="姓名" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="联系方式">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="联系方式" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="公司名称">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="公司名称" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="pingtai" label="拜访原因">
|
||||
<tm-picker
|
||||
v-model="form.pingtai"
|
||||
v-model:modelStr="_pingtaistr"
|
||||
rangText="name"
|
||||
:list="[
|
||||
{ id: 1, name: '1111' },
|
||||
{ id: 2, name: '2222' },
|
||||
{ id: 3, name: '3333' },
|
||||
]"
|
||||
>
|
||||
<tm-input :modelValue="_pingtaistr" placeholder="请选择拜访原因" style="pointer-events: none" disabled color="transparent">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-icon name="arrow-right-s-line"></tm-icon>
|
||||
</template>
|
||||
</tm-input>
|
||||
</tm-picker>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="随行人员">
|
||||
<view class="flex">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="姓名" />
|
||||
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="手机号" />
|
||||
</view>
|
||||
<view class="flex">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="姓名" />
|
||||
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="手机号" />
|
||||
</view>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="车牌号">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="车牌号" />
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="车牌号" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="pingtai" label="到访单位">
|
||||
<tm-picker
|
||||
v-model="form.pingtai"
|
||||
v-model:modelStr="_pingtaistr"
|
||||
rangText="name"
|
||||
:list="[
|
||||
{ id: 1, name: '1111' },
|
||||
{ id: 2, name: '2222' },
|
||||
{ id: 3, name: '3333' },
|
||||
]"
|
||||
>
|
||||
<tm-input :modelValue="_pingtaistr" placeholder="请选择到访单位" style="pointer-events: none" disabled color="transparent">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-icon name="arrow-right-s-line"></tm-icon>
|
||||
</template>
|
||||
</tm-input>
|
||||
</tm-picker>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="接待人">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="接待人" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="time" label="到访时间">
|
||||
<tm-picker-date v-model="form.time" v-model:modelStr="_timestr" type="minute" start="2020-01-01 00:00" end="2080-01-01 23:59">
|
||||
<tm-input :modelValue="form.time" placeholder="请选择到访时间" style="pointer-events: none" disabled color="transparent">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-icon name="arrow-right-s-line"></tm-icon>
|
||||
</template>
|
||||
</tm-input>
|
||||
</tm-picker-date>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="textarea" label="备注">
|
||||
<tm-input v-model="form.textarea" :maxlength="100" placeholder="请输入" type="textarea" show-char-count color="transparent">
|
||||
</tm-input>
|
||||
</tm-form-item>
|
||||
|
||||
<hr class="mb-4" />
|
||||
<tm-button form-type="submit" block>提交</tm-button>
|
||||
</tm-form>
|
||||
</tm-sheet>
|
||||
|
||||
<view class="h-30rpx" />
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue"
|
||||
|
||||
const form = ref({
|
||||
username: "",
|
||||
price: "",
|
||||
checkbox: [] as string[],
|
||||
radio: "",
|
||||
time: "2024-6-5",
|
||||
pingtai: [] as string[],
|
||||
store: 0,
|
||||
score: 0,
|
||||
textarea: "",
|
||||
})
|
||||
|
||||
const _timestr = ref(form.value.time)
|
||||
const _pingtaistr = ref("")
|
||||
|
||||
const rules: Record<string, TM.FORM_RULE[]> = {
|
||||
username: [{ required: true, message: "姓名2到5个字符", rule: /^.{2,5}$/ }],
|
||||
address: [
|
||||
{ required: true, message: "地址不能为空" },
|
||||
{ required: true, message: "长度要小于3", max: 2 },
|
||||
],
|
||||
price: [{ required: true, message: "价格要大于等于99", type: "number", min: 99 }],
|
||||
checkbox: [{ required: true }],
|
||||
radio: [{ required: true }],
|
||||
time: [{ required: true, type: "date" }],
|
||||
pingtai: [{ required: true }],
|
||||
store: [{ required: true, min: 1, max: 100, message: "介于1-100之间" }],
|
||||
score: [{ required: true, min: 5, max: 5, message: "必须打5分哦" }],
|
||||
textarea: [{ required: true, max: 100, message: "请输入内容" }],
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const onsubmit = (evt: TM.FORM_SUBMIT_RESULT) => {
|
||||
console.log("校验结果:", evt)
|
||||
if (!evt.isPass) return
|
||||
uni.showModal({ title: "提示", content: "确认提交吗?", confirmColor: "#0094ff" })
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,107 @@
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<template #top>
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-16rpx px-20rpx">
|
||||
<z-tabs :list="tabs" @change="doTab" />
|
||||
</view>
|
||||
</template>
|
||||
<view class="h-20rpx" />
|
||||
<view class="flex-col justify-center card p-3 m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-110rpx h-110rpx rounded-8rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="main-text-28">{{ v.merchantName }}</view>
|
||||
<!-- <view class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" /> -->
|
||||
</view>
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">已支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs">售后</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 20" size="xs">已核销</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 30" color="info" size="xs">已取消(智能柜)</tm-tag>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between m-t-5rpx">
|
||||
<view class="second-text-20">
|
||||
<text>下单时间</text>
|
||||
<text class="m-l-10rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</text>
|
||||
</view>
|
||||
<view class="second-text-22">{{ hooks.useEnum("hardwareRefundStatusEnum", v.refundStatus) }}</view>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between m-t-5rpx">
|
||||
<view class="sub-text-24">
|
||||
<text v-if="v.payType == '9'">{{ v.productDesc }}</text>
|
||||
</view>
|
||||
<view class="main-text-30 color-red! text-right">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-center ml-[120rpx]">
|
||||
<view v-if="['5', '10'].includes(v.orderStatus)" class="w-500rpx flex-row items-center justify-end">
|
||||
<!-- <view v-if="v.orderStatus == 5 && v.orderType == 2" class="botder_btn" @tap.stop="doRefund(v)">退款</view> -->
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="m-l-20rpx botder_btn">核销码</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue"
|
||||
import { onShow } from "@dcloudio/uni-app"
|
||||
import { hooks } from "@@/index"
|
||||
import { filePath } from "@@/utils/file"
|
||||
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
|
||||
|
||||
const tabs = [
|
||||
{ id: null, name: "全部", disabled: false },
|
||||
{ id: 1, name: "待核销", disabled: false },
|
||||
{ id: 5, name: "待到访", disabled: false },
|
||||
{ id: 10, name: "已到访", disabled: false },
|
||||
{ id: 20, name: "已取消", disabled: false },
|
||||
]
|
||||
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
orderStatus: tabs[0].id,
|
||||
},
|
||||
})
|
||||
|
||||
onShow(async () => {
|
||||
const isLogin = await hooks.useCheckLogin()
|
||||
if (!isLogin) return
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
}
|
||||
})
|
||||
|
||||
const doTab = (e: any) => {
|
||||
const target = tabs[e]
|
||||
state.pa.orderStatus = target.id
|
||||
pageRef.value.reload(true)
|
||||
}
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, async () => [], null, "data.records")
|
||||
const query = (page: number, pagesize: number) => {
|
||||
const isLogin = hooks.useStaticCheckLogin()
|
||||
if (!isLogin) return
|
||||
pageHook.startPage(page, pagesize, false, state.pa)
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,121 @@
|
||||
<template>
|
||||
<crud-layout mainIsScroll bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
|
||||
<tm-sheet margin="[0, 20]">
|
||||
<view class="mx-auto text-center text-lg">访客邀约</view>
|
||||
<tm-form @submit="onsubmit" v-model="form" :rules="rules">
|
||||
<tm-form-item name="username" label="访客姓名">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="访客姓名" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="访客手机号">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="访客手机号" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="来访公司名称">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="来访公司名称" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="pingtai" label="拜访原因">
|
||||
<tm-picker
|
||||
v-model="form.pingtai"
|
||||
v-model:modelStr="_pingtaistr"
|
||||
rangText="name"
|
||||
:list="[
|
||||
{ id: 1, name: '1111' },
|
||||
{ id: 2, name: '2222' },
|
||||
{ id: 3, name: '3333' },
|
||||
]"
|
||||
>
|
||||
<tm-input :modelValue="_pingtaistr" placeholder="请选择拜访原因" style="pointer-events: none" disabled color="transparent">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-icon name="arrow-right-s-line"></tm-icon>
|
||||
</template>
|
||||
</tm-input>
|
||||
</tm-picker>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="time" label="到访时间">
|
||||
<tm-picker-date v-model="form.time" v-model:modelStr="_timestr" type="minute" start="2020-01-01 00:00" end="2080-01-01 23:59">
|
||||
<tm-input :modelValue="form.time" placeholder="请选择到访时间" style="pointer-events: none" disabled color="transparent">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-icon name="arrow-right-s-line"></tm-icon>
|
||||
</template>
|
||||
</tm-input>
|
||||
</tm-picker-date>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="pingtai" label="拜访部门">
|
||||
<tm-picker
|
||||
v-model="form.pingtai"
|
||||
v-model:modelStr="_pingtaistr"
|
||||
rangText="name"
|
||||
:list="[
|
||||
{ id: 1, name: '1111' },
|
||||
{ id: 2, name: '2222' },
|
||||
{ id: 3, name: '3333' },
|
||||
]"
|
||||
>
|
||||
<tm-input :modelValue="_pingtaistr" placeholder="请选择拜访部门" style="pointer-events: none" disabled color="transparent">
|
||||
<template v-slot:rightIcon>
|
||||
<tm-icon name="arrow-right-s-line"></tm-icon>
|
||||
</template>
|
||||
</tm-input>
|
||||
</tm-picker>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="username" label="随行人员">
|
||||
<view class="flex">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="姓名" />
|
||||
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="手机号" />
|
||||
</view>
|
||||
<view class="flex">
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="姓名" />
|
||||
|
||||
<tm-input color="transparent" v-model="form.username" placeholder="手机号" />
|
||||
</view>
|
||||
</tm-form-item>
|
||||
|
||||
<tm-button form-type="submit" block>提交</tm-button>
|
||||
</tm-form>
|
||||
</tm-sheet>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue"
|
||||
|
||||
const form = ref({
|
||||
username: "",
|
||||
price: "",
|
||||
checkbox: [] as string[],
|
||||
radio: "",
|
||||
time: "2024-6-5",
|
||||
pingtai: [] as string[],
|
||||
store: 0,
|
||||
score: 0,
|
||||
textarea: "",
|
||||
})
|
||||
|
||||
const _timestr = ref(form.value.time)
|
||||
const _pingtaistr = ref("")
|
||||
|
||||
const rules: Record<string, TM.FORM_RULE[]> = {
|
||||
username: [{ required: true, message: "姓名2到5个字符", rule: /^.{2,5}$/ }],
|
||||
address: [
|
||||
{ required: true, message: "地址不能为空" },
|
||||
{ required: true, message: "长度要小于3", max: 2 },
|
||||
],
|
||||
price: [{ required: true, message: "价格要大于等于99", type: "number", min: 99 }],
|
||||
checkbox: [{ required: true }],
|
||||
radio: [{ required: true }],
|
||||
time: [{ required: true, type: "date" }],
|
||||
pingtai: [{ required: true }],
|
||||
store: [{ required: true, min: 1, max: 100, message: "介于1-100之间" }],
|
||||
score: [{ required: true, min: 5, max: 5, message: "必须打5分哦" }],
|
||||
textarea: [{ required: true, max: 100, message: "请输入内容" }],
|
||||
}
|
||||
|
||||
// 表单提交
|
||||
const onsubmit = (evt: TM.FORM_SUBMIT_RESULT) => {
|
||||
console.log("校验结果:", evt)
|
||||
if (!evt.isPass) return
|
||||
uni.showModal({ title: "提示", content: "确认提交吗?", confirmColor: "#0094ff" })
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="10"
|
||||
safe-area-inset-bottom
|
||||
:loading-more-enabled="true"
|
||||
:show-scrollbar="false"
|
||||
@query="query"
|
||||
:auto-clean-list-when-reload="false"
|
||||
:auto-scroll-to-top-when-reload="false"
|
||||
@scroll="pageHook.scroll"
|
||||
>
|
||||
<template #top>
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-16rpx px-20rpx">
|
||||
<z-tabs :list="tabs" @change="doTab" />
|
||||
</view>
|
||||
</template>
|
||||
<view class="h-20rpx" />
|
||||
<view class="flex-col justify-center card p-3 m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-110rpx h-110rpx rounded-8rpx" :src="filePath(v.logoPic)" mode="aspectFill" />
|
||||
<view class="flex-1 m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="main-text-28">{{ v.merchantName }}</view>
|
||||
<!-- <view class="m-l-15rpx color-#999 font-size-26rpx! iconfont icon-youjiantou" /> -->
|
||||
</view>
|
||||
<tm-tag v-if="v.orderStatus == 1" color="info" size="xs">未支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 5" color="success" size="xs">已支付</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 10" color="error" size="xs">售后</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 20" size="xs">已核销</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 30" color="info" size="xs">已取消(智能柜)</tm-tag>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between m-t-5rpx">
|
||||
<view class="second-text-20">
|
||||
<text>下单时间</text>
|
||||
<text class="m-l-10rpx">{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}</text>
|
||||
</view>
|
||||
<view class="second-text-22">{{ hooks.useEnum("hardwareRefundStatusEnum", v.refundStatus) }}</view>
|
||||
</view>
|
||||
<view class="flex-row items-center justify-between m-t-5rpx">
|
||||
<view class="sub-text-24">
|
||||
<text v-if="v.payType == '9'">{{ v.productDesc }}</text>
|
||||
</view>
|
||||
<view class="main-text-30 color-red! text-right">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex items-center ml-[120rpx]">
|
||||
<view v-if="['5', '10'].includes(v.orderStatus)" class="w-500rpx flex-row items-center justify-end">
|
||||
<!-- <view v-if="v.orderStatus == 5 && v.orderType == 2" class="botder_btn" @tap.stop="doRefund(v)">退款</view> -->
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="m-l-20rpx botder_btn">核销码</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue"
|
||||
import { onShow } from "@dcloudio/uni-app"
|
||||
import { hooks } from "@@/index"
|
||||
import { filePath } from "@@/utils/file"
|
||||
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
|
||||
|
||||
const tabs = [
|
||||
{ id: null, name: "全部", disabled: false },
|
||||
{ id: 1, name: "待审核", disabled: false },
|
||||
{ id: 5, name: "待到访", disabled: false },
|
||||
{ id: 20, name: "已取消", disabled: false },
|
||||
]
|
||||
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
orderStatus: tabs[0].id,
|
||||
},
|
||||
})
|
||||
|
||||
onShow(async () => {
|
||||
const isLogin = await hooks.useCheckLogin()
|
||||
if (!isLogin) return
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
}
|
||||
})
|
||||
|
||||
const doTab = (e: any) => {
|
||||
const target = tabs[e]
|
||||
state.pa.orderStatus = target.id
|
||||
pageRef.value.reload(true)
|
||||
}
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, async () => [], null, "data.records")
|
||||
const query = (page: number, pagesize: number) => {
|
||||
const isLogin = hooks.useStaticCheckLogin()
|
||||
if (!isLogin) return
|
||||
pageHook.startPage(page, pagesize, false, state.pa)
|
||||
}
|
||||
</script>
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { defineProps, withDefaults, watch, ref, reactive, onMounted } from "vue"
|
||||
import { watch, reactive, onMounted } from "vue"
|
||||
import { router } from "@@/index"
|
||||
|
||||
export type Props = {
|
||||
|
||||
Reference in new issue
Block a user