feat:车辆管理
This commit is contained in:
1 parent
fef4fbca2e
commit
c86d29bd8d
13 files changed
+300
-164
No files matched your search
+18
-1
@@ -512,6 +512,23 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/car",
|
||||
"pages": [
|
||||
{
|
||||
"path": "userCar/apply",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请车辆"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "userCar/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的车辆"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
@@ -597,4 +614,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ onLoad((options: any) => {
|
||||
getDetail()
|
||||
}
|
||||
})
|
||||
onShow(() => {})
|
||||
onShow(() => { })
|
||||
|
||||
const getDetail = async () => {
|
||||
if (isEmpty(state.detailId)) return
|
||||
@@ -88,18 +88,14 @@ const doSubmit = async () => {
|
||||
<view class="card p-x-30rpx p-y-40rpx">
|
||||
<tm-form ref="applyFormRef" v-model="applyForm" :rules="applyFormRules" direction="vertical">
|
||||
<tm-form-item name="displayTimeRangeStr" label="使用时间" :showBottom="false">
|
||||
<tm-between-time
|
||||
start="2020-1-1"
|
||||
end="2030-1-1"
|
||||
:quickDate="[]"
|
||||
v-model="applyForm.displayTimeRange"
|
||||
v-model:model-str="applyForm.displayTimeRangeStr"
|
||||
format="YYYY-MM-DD"
|
||||
>
|
||||
<tm-between-time start="2020-1-1" end="2030-1-1" :quickDate="[]"
|
||||
v-model="applyForm.displayTimeRange" v-model:model-str="applyForm.displayTimeRangeStr"
|
||||
format="YYYY-MM-DD">
|
||||
<view :style="{ pointerEvents: state.detailType == 'view' ? 'auto' : 'none' }">
|
||||
<tm-input v-model="applyForm.displayTimeRangeStr" disabled placeholder="请选择使用时间..">
|
||||
<template v-slot:rightIcon>
|
||||
<text v-if="state.detailType != 'view'" class="p-0.5rem color-#b1b1b1 iconfont icon-xiangxiajiantouxiao"></text>
|
||||
<text v-if="state.detailType != 'view'"
|
||||
class="p-0.5rem color-#b1b1b1 iconfont icon-xiangxiajiantouxiao"></text>
|
||||
</template>
|
||||
</tm-input>
|
||||
</view>
|
||||
@@ -107,31 +103,20 @@ const doSubmit = async () => {
|
||||
</tm-form-item>
|
||||
<view class="h-30rpx" />
|
||||
<tm-form-item name="count" label="申请数量" :showBottom="false">
|
||||
<tm-input
|
||||
v-model="applyForm.count"
|
||||
type="number"
|
||||
:disabled="state.detailType == 'view'"
|
||||
:showClear="state.detailType != 'view'"
|
||||
placeholder="请输入申请数量.."
|
||||
/>
|
||||
<tm-input v-model="applyForm.count" type="number" :disabled="state.detailType == 'view'"
|
||||
:showClear="state.detailType != 'view'" placeholder="请输入申请数量.." />
|
||||
</tm-form-item>
|
||||
<view class="h-30rpx" />
|
||||
<tm-form-item name="remark" label="备注" :required="false" :showBottom="false">
|
||||
<tm-input
|
||||
v-model="applyForm.remark"
|
||||
type="textarea"
|
||||
:disabled="state.detailType == 'view'"
|
||||
<tm-input v-model="applyForm.remark" type="textarea" :disabled="state.detailType == 'view'"
|
||||
:showClear="state.detailType != 'view'"
|
||||
:placeholder="state.detailType == 'view' ? '' : '请输入备注..'"
|
||||
></tm-input>
|
||||
:placeholder="state.detailType == 'view' ? '' : '请输入备注..'"></tm-input>
|
||||
</tm-form-item>
|
||||
</tm-form>
|
||||
</view>
|
||||
<view
|
||||
v-if="state.detailType != 'view'"
|
||||
<view v-if="state.detailType != 'view'"
|
||||
class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-t-60rpx sub-text-30 color-white!"
|
||||
@tap="doSubmit"
|
||||
>
|
||||
@tap="doSubmit">
|
||||
提交
|
||||
</view>
|
||||
</crud-layout>
|
||||
|
||||
@@ -27,7 +27,7 @@ const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa)
|
||||
}
|
||||
|
||||
onLoad(() => {})
|
||||
onLoad(() => { })
|
||||
onShow(() => {
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
@@ -55,20 +55,9 @@ const doCard = (v: any) => {
|
||||
|
||||
<template>
|
||||
<crud-layout title="外来人员就餐" 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"
|
||||
>
|
||||
<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">
|
||||
@@ -76,7 +65,8 @@ const doCard = (v: any) => {
|
||||
</view>
|
||||
</template>
|
||||
<view class="h-20rpx" />
|
||||
<view class="flex-col card p-x-20rpx p-y-30rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i" @tap="doCard(v)">
|
||||
<view class="flex-col card p-x-20rpx p-y-30rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i"
|
||||
@tap="doCard(v)">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="sub-text-30">电子餐券</view>
|
||||
<view class="flex-row items-center">
|
||||
@@ -127,7 +117,9 @@ const doCard = (v: any) => {
|
||||
</view>
|
||||
</view>
|
||||
<template #bottom>
|
||||
<view class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-t-60rpx sub-text-30 color-white!" @tap="doApply">
|
||||
<view
|
||||
class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-t-60rpx sub-text-30 color-white!"
|
||||
@tap="doApply">
|
||||
申请
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue"
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app"
|
||||
|
||||
import { hooks, router } from "@@/index"
|
||||
import { userCarApi } from "@@/api"
|
||||
import { serviceEnum } from "@/sheep/constant"
|
||||
|
||||
const { carTypeEnum } = serviceEnum
|
||||
|
||||
const applyFormRef = ref<any>(null)
|
||||
|
||||
const visitorReasonList = ref<Array<{ title: string; id: string }>>(Object.keys(carTypeEnum).map((key) => ({
|
||||
title: carTypeEnum[key],
|
||||
id: key,
|
||||
})))
|
||||
|
||||
const applyForm = reactive<any>({
|
||||
id: "",
|
||||
carType: "",
|
||||
carTypeStr: "",
|
||||
carNumber: "",
|
||||
})
|
||||
|
||||
|
||||
const applyFormRules = reactive<any>({
|
||||
carTypeStr: [{ required: true, message: "请选择车辆类型" }],
|
||||
carNumber: [{ required: true, message: "请输入车牌号" }],
|
||||
})
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
// 默认第一个
|
||||
if (!applyForm.carType) {
|
||||
const target = visitorReasonList.value[0]
|
||||
applyForm.carType = target.id
|
||||
applyForm.carTypeStr = target.title
|
||||
}
|
||||
})
|
||||
onShow(() => {
|
||||
})
|
||||
|
||||
// 选择车俩类型
|
||||
const carNumberPickerConfirm = (e) => {
|
||||
const target = visitorReasonList.value.find((item) => item.id == e[0])
|
||||
if (!target) return
|
||||
applyForm.carType = target.id
|
||||
applyForm.carTypeStr = target.title
|
||||
}
|
||||
|
||||
const doSubmit = async () => {
|
||||
applyFormRef.value.submit()
|
||||
const { isPass } = applyFormRef.value.validate()
|
||||
if (!isPass) return
|
||||
try {
|
||||
uni.showLoading({ title: "申请中...", mask: false })
|
||||
const _pa = {
|
||||
...applyForm
|
||||
}
|
||||
const { data, code }: any = await userCarApi.apply(_pa)
|
||||
if (code != 0) throw new Error()
|
||||
uni.hideLoading()
|
||||
uni.showToast({ title: "申请成功", icon: "none" })
|
||||
router.back()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
uni.hideLoading()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout title="申请车辆" bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
<view class="card p-x-30rpx p-y-40rpx">
|
||||
<tm-form ref="applyFormRef" v-model="applyForm" :rules="applyFormRules" direction="vertical">
|
||||
<tm-form-item name="carTypeStr" label="车辆类型" :showBottom="false">
|
||||
<tm-picker @confirm="carNumberPickerConfirm" :list="visitorReasonList">
|
||||
<tm-input :modelValue="applyForm.carTypeStr" placeholder="请选择车辆类型" style="pointer-events: none">
|
||||
</tm-input>
|
||||
</tm-picker>
|
||||
</tm-form-item>
|
||||
<tm-form-item name="carNumber" label="车牌号" :showBottom="false">
|
||||
<tm-input v-model="applyForm.carNumber" placeholder="请输入" show-char-count></tm-input>
|
||||
</tm-form-item>
|
||||
</tm-form>
|
||||
</view>
|
||||
<view class=" bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-t-60rpx sub-text-30 color-white!"
|
||||
@tap="doSubmit">
|
||||
提交
|
||||
</view>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep() {
|
||||
.tmFormItemLabel {
|
||||
padding-bottom: 10rpx !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,81 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue"
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app"
|
||||
|
||||
import { hooks, router } from "@@/index"
|
||||
import { userCarApi } from "@@/api"
|
||||
import { serviceEnum } from "@/sheep/constant"
|
||||
|
||||
import { filePath } from "@@/utils/file"
|
||||
|
||||
const { carTypeEnum } = serviceEnum
|
||||
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
pagesize: 10,
|
||||
},
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, userCarApi.page, null, "data.records")
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa)
|
||||
}
|
||||
|
||||
|
||||
onLoad(() => { })
|
||||
onShow(() => {
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
}
|
||||
})
|
||||
|
||||
const doApply = () => {
|
||||
router.jump("/pages/car/userCar/apply")
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout title="我的车辆" 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">
|
||||
<view class="h-20rpx" />
|
||||
<view class="position-relative card p-x-20rpx p-y-30rpx m-b-20rpx overflow-hidden"
|
||||
v-for="(v, i) in pageHook.list" :key="v.id">
|
||||
<view class="flex justify-between items-center m-t-20rpx">
|
||||
<view>
|
||||
<!-- 私家车 -->
|
||||
<tm-tag v-if="v.carType == 1" size="m">{{ carTypeEnum[v.carType] }}</tm-tag>
|
||||
<!-- 公车 -->
|
||||
<tm-tag v-if="v.carType == 2" size="m">{{ carTypeEnum[v.carType] }}</tm-tag>
|
||||
<!-- 军车 -->
|
||||
<tm-tag v-if="v.carType == 3" size="m">{{ carTypeEnum[v.carType] }}</tm-tag>
|
||||
<!-- 警车 -->
|
||||
<tm-tag v-if="v.carType == 4" size="m">{{ carTypeEnum[v.carType] }}</tm-tag>
|
||||
</view>
|
||||
<view class="flex items-center" @tap.stop="hooks.useCopy(v.carNumber)">
|
||||
<text class="main-text-28 m-r-6rpx">{{ v.carNumber }}</text>
|
||||
<text v-if="v.carNumber" class="iconfont icon-fuzhi" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-end m-t-10rpx">
|
||||
<text class="second-text-26">{{ v.createTime }}</text>
|
||||
</view>
|
||||
<view class="position-absolute right-0 top-0 sub-text-24 color-white!">
|
||||
<view class="p-x-8rpx p-y-6rpx bg-green rounded-bl-16rpx" v-if="v.enableStatus == 1">已启用</view>
|
||||
<view class="p-x-8rpx p-y-6rpx bg-red rounded-bl-16rpx" v-if="v.enableStatus == 0">已禁用</view>
|
||||
</view>
|
||||
</view>
|
||||
<template #bottom>
|
||||
<view
|
||||
class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-t-60rpx sub-text-30 color-white!"
|
||||
@tap="doApply">
|
||||
申请
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
</template>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
</template>
|
||||
@@ -19,7 +19,7 @@ const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa)
|
||||
}
|
||||
|
||||
onLoad(() => {})
|
||||
onLoad(() => { })
|
||||
onShow(() => {
|
||||
if (pageRef.value) {
|
||||
pageRef.value.reload(false)
|
||||
@@ -49,20 +49,9 @@ const doDel = (id: string) => {
|
||||
|
||||
<template>
|
||||
<crud-layout title="人脸管理" 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"
|
||||
>
|
||||
<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">
|
||||
<view class="h-20rpx" />
|
||||
<view class="flex-col card p-x-20rpx p-y-30rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="v.id">
|
||||
<view class="flex items-center justify-between second-text-26">
|
||||
@@ -81,7 +70,9 @@ const doDel = (id: string) => {
|
||||
</view>
|
||||
</view>
|
||||
<template #bottom>
|
||||
<view v-if="false" class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-t-60rpx sub-text-30 color-white!" @tap="doAdd">
|
||||
<view v-if="false"
|
||||
class="bg-#0094ff p-y-20rpx text-center rounded-40rpx m-x-30rpx m-t-60rpx sub-text-30 color-white!"
|
||||
@tap="doAdd">
|
||||
添加
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
|
||||
@@ -19,26 +19,16 @@
|
||||
<span>拜访开始时间 </span>
|
||||
<tm-icon name="arrow-right-s-line" />
|
||||
</template>
|
||||
<tm-input
|
||||
:modelValue="form.vStartDate"
|
||||
placeholder="请选择拜访开始时间"
|
||||
style="pointer-events: none"
|
||||
disabled
|
||||
color="transparent"
|
||||
/>
|
||||
<tm-input :modelValue="form.vStartDate" placeholder="请选择拜访开始时间" style="pointer-events: none"
|
||||
disabled color="transparent" />
|
||||
</tm-form-item>
|
||||
<tm-form-item name="vEndDate" label="拜访离开时间 >" @click="endDatePicker('vEndDate')">
|
||||
<template #label>
|
||||
<span>拜访离开时间 </span>
|
||||
<tm-icon name="arrow-right-s-line" />
|
||||
</template>
|
||||
<tm-input
|
||||
:modelValue="form.vEndDate"
|
||||
placeholder="请选择拜访离开时间"
|
||||
style="pointer-events: none"
|
||||
disabled
|
||||
color="transparent"
|
||||
/>
|
||||
<tm-input :modelValue="form.vEndDate" placeholder="请选择拜访离开时间" style="pointer-events: none" disabled
|
||||
color="transparent" />
|
||||
</tm-form-item>
|
||||
|
||||
<!-- <tm-form-item name="deptId" label="拜访部门">
|
||||
@@ -74,31 +64,13 @@
|
||||
</tm-form>
|
||||
</tm-sheet>
|
||||
|
||||
<tm-drawer
|
||||
title="请选择时间"
|
||||
:showClose="true"
|
||||
:showFooter="false"
|
||||
size="auto"
|
||||
placement="bottom"
|
||||
v-model:show="showDatePicker"
|
||||
:duration="100"
|
||||
zIndex="100"
|
||||
>
|
||||
<tm-drawer title="请选择时间" :showClose="true" :showFooter="false" size="auto" placement="bottom"
|
||||
v-model:show="showDatePicker" :duration="100" zIndex="100">
|
||||
<time-range-picker @confirm="onDatePickerConfirm" @cancel="showDatePicker = false" />
|
||||
</tm-drawer>
|
||||
|
||||
<tm-modal
|
||||
v-model:show="modalShow"
|
||||
:overlayClick="false"
|
||||
title="提示"
|
||||
position="bottom"
|
||||
height="auto"
|
||||
:showCancel="true"
|
||||
cancelText="取消"
|
||||
confirmText="确定"
|
||||
@confirm="confirmSubmit"
|
||||
@cancel="modalShow = false"
|
||||
>
|
||||
<tm-modal v-model:show="modalShow" :overlayClick="false" title="提示" position="bottom" height="auto"
|
||||
:showCancel="true" cancelText="取消" confirmText="确定" @confirm="confirmSubmit" @cancel="modalShow = false">
|
||||
<view class="text-center"><tm-text font-size="30" color="#999999">确认提交吗?</tm-text></view>
|
||||
</tm-modal>
|
||||
|
||||
|
||||
+11
-10
@@ -3,13 +3,10 @@
|
||||
<tm-sticky>
|
||||
<tm-sticky-header>
|
||||
<view class="flex-row items-center bg-#ECF4F9 py-3">
|
||||
<image
|
||||
v-if="state.userInfo?.sysUser?.avatar"
|
||||
class="w-100rpx h-100rpx rounded-full"
|
||||
:src="filePath(state.userInfo.sysUser.avatar)"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<image v-else class="w-100rpx h-100rpx rounded-full" src="/static/icon/default-avatar.png" mode="aspectFill" />
|
||||
<image v-if="state.userInfo?.sysUser?.avatar" class="w-100rpx h-100rpx rounded-full"
|
||||
:src="filePath(state.userInfo.sysUser.avatar)" mode="aspectFill" />
|
||||
<image v-else class="w-100rpx h-100rpx rounded-full" src="/static/icon/default-avatar.png"
|
||||
mode="aspectFill" />
|
||||
<view class="m-l-30rpx" v-if="state.userInfo?.sysUser?.userId">
|
||||
<view class="flex-row items-center">
|
||||
<text class="sub-text-30">{{ state.userInfo?.sysUser?.name }}</text>
|
||||
@@ -25,7 +22,8 @@
|
||||
</tm-sticky-header>
|
||||
|
||||
<view class="m-t-10rpx rounded-20rpx shadow-main p-30rpx p-b-40rpx bg-white!">
|
||||
<view class="service_item flex-row items-center justify-between" v-for="(v, i) in state.menuList" :key="i" @tap="onTabMenu(v)">
|
||||
<view class="service_item flex-row items-center justify-between" v-for="(v, i) in state.menuList"
|
||||
:key="i" @tap="onTabMenu(v)">
|
||||
<view class="flex-row-center">
|
||||
<image class="w-40rpx h-40rpx" :src="v.icon" mode="aspectFill" />
|
||||
<text class="sub-text-28 m-l-20rpx">{{ v.text }}</text>
|
||||
@@ -35,13 +33,15 @@
|
||||
</view>
|
||||
|
||||
<view v-if="isDevEnv()" class="flex-col-center m-t-40rpx m-x-30rpx">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff" @tap="doLogout">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff"
|
||||
@tap="doLogout">
|
||||
退出登录
|
||||
</view>
|
||||
</view>
|
||||
<view class="h-30rpx" />
|
||||
<view v-if="state.appInfo == APPENV.SH" class="flex-col-center m-t-40rpx m-x-30rpx">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff" @tap="doChangeRole">
|
||||
<view class="w-full text-center sub-text-28 p-y-20rpx rounded-40rpx border-solid border border-#0094ff"
|
||||
@tap="doChangeRole">
|
||||
切换角色
|
||||
</view>
|
||||
</view>
|
||||
@@ -86,6 +86,7 @@ const state = reactive<{
|
||||
{ text: "扫一扫", icon: "/static/icon/scan.png", router: "" },
|
||||
{ text: "钱包管理", icon: "/static/icon/service_3.png", router: "/pages/wallet/list" },
|
||||
{ text: "人脸管理", icon: "/static/icon/service_5.png", router: "/pages/human-face/list" },
|
||||
// { text: "车辆管理", icon: "/static/icon/service_6.png", router: "/pages/car/userCar/list" },
|
||||
{ text: "清除缓存", icon: "/static/icon/clear-storage.png", router: "" },
|
||||
],
|
||||
appInfo: "",
|
||||
|
||||
+20
-56
@@ -29,7 +29,7 @@ const freezeForm = reactive<any>({
|
||||
remark: "",
|
||||
})
|
||||
|
||||
onLoad(() => {})
|
||||
onLoad(() => { })
|
||||
onShow(async () => {
|
||||
const isLogin = await hooks.useCheckLogin()
|
||||
if (!isLogin) return
|
||||
@@ -140,35 +140,22 @@ const doTransferMoney = (v: any) => {
|
||||
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<z-paging
|
||||
ref="pageRef"
|
||||
height="100%"
|
||||
:fixed="false"
|
||||
v-model="pageHook.list"
|
||||
:default-page-size="5"
|
||||
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"
|
||||
>
|
||||
<z-paging ref="pageRef" height="100%" :fixed="false" v-model="pageHook.list" :default-page-size="5"
|
||||
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">
|
||||
<view class="h-30rpx" />
|
||||
<view
|
||||
class="card flex-col rounded-20rpx p-x-30rpx p-y-20rpx m-b-30rpx"
|
||||
v-for="(v, i) in pageHook.list"
|
||||
:key="i"
|
||||
@tap="router.jump('/pages/wallet/detail', { id: v.id })"
|
||||
>
|
||||
<view class="card flex-col rounded-20rpx p-x-30rpx p-y-20rpx m-b-30rpx" v-for="(v, i) in pageHook.list"
|
||||
:key="i" @tap="router.jump('/pages/wallet/detail', { id: v.id })">
|
||||
<view class="flex-col">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center">
|
||||
<text v-if="v.cardNumber" class="second-text-28">卡号: {{ v.cardNumber }}</text>
|
||||
</view>
|
||||
<view class="second-text-50">
|
||||
<text v-if="v.cardNumber" class="iconfont icon-fuzhi" @tap.stop="hooks.useCopy(v.cardNumber)" />
|
||||
<text v-if="v.walletTypeUniqueCode != '2'" class="m-l-20rpx iconfont icon-erweima" @tap.stop="doPreviewQrCode(v)" />
|
||||
<text v-if="v.cardNumber" class="iconfont icon-fuzhi"
|
||||
@tap.stop="hooks.useCopy(v.cardNumber)" />
|
||||
<text v-if="v.walletTypeUniqueCode != '2'" class="m-l-20rpx iconfont icon-erweima"
|
||||
@tap.stop="doPreviewQrCode(v)" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="v.cardNumber" class="h-1px m-t-10rpx bg-#999 bg-opacity-5" />
|
||||
@@ -191,14 +178,12 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="flex-row items-center justify-end space-x-20rpx m-t-10rpx">
|
||||
<!-- <view v-if="v.walletTypeUniqueCode == 1 && !v.cardNumber" class="botder_btn" @tap.stop="openBindDialog(v)">绑定</view> -->
|
||||
<view v-if="v.isRule == '1'" class="botder_btn" @tap.stop="doTransferMoney(v)">转账</view>
|
||||
<view v-if="v.walletTypeUniqueCode == 1 && v.cardNumber && v.isFreeze != 1" class="botder_btn" @tap.stop="openFreezeDialog(v)">
|
||||
<view v-if="v.walletTypeUniqueCode == 1 && v.cardNumber && v.isFreeze != 1" class="botder_btn"
|
||||
@tap.stop="openFreezeDialog(v)">
|
||||
申请冻结
|
||||
</view>
|
||||
<view
|
||||
v-if="false && v.walletTypeUniqueCode == 2"
|
||||
class="botder_btn"
|
||||
@tap.stop="router.jump('/pages/wallet/recharge', { id: v.id })"
|
||||
>
|
||||
<view v-if="false && v.walletTypeUniqueCode == 2" class="botder_btn"
|
||||
@tap.stop="router.jump('/pages/wallet/recharge', { id: v.id })">
|
||||
去充值
|
||||
</view>
|
||||
</view>
|
||||
@@ -206,15 +191,8 @@ const doTransferMoney = (v: any) => {
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showBindDialog"
|
||||
:overlayClick="false"
|
||||
title="绑定饭卡"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="40%"
|
||||
>
|
||||
<tm-drawer z-index="100" v-model:show="state.showBindDialog" :overlayClick="false" title="绑定饭卡" :show-close="true"
|
||||
position="bottom" size="40%">
|
||||
<view class="h-50rpx" />
|
||||
<tm-form ref="bindFormRef" v-model="bindForm" :rules="bindFormRules">
|
||||
<tm-form-item name="cardNumber" :showLabel="false" :showBottom="false">
|
||||
@@ -224,15 +202,8 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="h-50rpx" />
|
||||
<view class="bg-#0094ff p-y-20rpx text-center rounded-40rpx sub-text-30 color-white!" @tap="doBind">绑定</view>
|
||||
</tm-drawer>
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showFreezeDialog"
|
||||
:overlayClick="false"
|
||||
title="申请冻结"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="40%"
|
||||
>
|
||||
<tm-drawer z-index="100" v-model:show="state.showFreezeDialog" :overlayClick="false" title="申请冻结" :show-close="true"
|
||||
position="bottom" size="40%">
|
||||
<view class="h-50rpx" />
|
||||
<tm-form ref="bindFormRef" v-model="freezeForm">
|
||||
<tm-form-item name="remark" :showLabel="false" :showBottom="false">
|
||||
@@ -242,15 +213,8 @@ const doTransferMoney = (v: any) => {
|
||||
<view class="h-50rpx" />
|
||||
<view class="bg-#0094ff p-y-20rpx text-center rounded-40rpx sub-text-30 color-white!" @tap="doFreeze">冻结</view>
|
||||
</tm-drawer>
|
||||
<tm-drawer
|
||||
z-index="100"
|
||||
v-model:show="state.showQrCodeDialog"
|
||||
:overlayClick="false"
|
||||
title="钱包二维码"
|
||||
:show-close="true"
|
||||
position="bottom"
|
||||
size="50%"
|
||||
>
|
||||
<tm-drawer z-index="100" v-model:show="state.showQrCodeDialog" :overlayClick="false" title="钱包二维码"
|
||||
:show-close="true" position="bottom" size="50%">
|
||||
<view class="flex-col-center">
|
||||
<view class="h-80rpx" />
|
||||
<canvas canvas-id="qrcodeId" class="size-200px" />
|
||||
|
||||
@@ -38,4 +38,6 @@ export { default as noticeApi } from "./notice"
|
||||
|
||||
export { default as invitationApi } from "./invitation"
|
||||
|
||||
export { default as totalApi } from "./total"
|
||||
export { default as totalApi } from "./total"
|
||||
|
||||
export { default as userCarApi } from "./userCar"
|
||||
@@ -0,0 +1,22 @@
|
||||
import request from "@/sheep/utils/request"
|
||||
|
||||
export default {
|
||||
/**
|
||||
* 申请车
|
||||
*/
|
||||
apply: (data: any) =>
|
||||
request({
|
||||
url: `/admin/sysUserCar/app/create`,
|
||||
method: "POST",
|
||||
data,
|
||||
}),
|
||||
/**
|
||||
* 车列表
|
||||
*/
|
||||
page: (data: any) =>
|
||||
request({
|
||||
url: `/admin/sysUserCar/app/page`,
|
||||
method: "POST",
|
||||
data,
|
||||
}),
|
||||
}
|
||||
@@ -36,6 +36,13 @@ const hardwareRefundStatusEnum = {
|
||||
30: "售后失败",
|
||||
}
|
||||
|
||||
const carTypeEnum = {
|
||||
1: "私家车",
|
||||
2: "公车",
|
||||
3: "军车",
|
||||
4: "警车",
|
||||
}
|
||||
|
||||
const boxesBxStatusEnum = {
|
||||
"0": "今日空闲",
|
||||
"1": "今日部分空闲",
|
||||
@@ -49,4 +56,5 @@ export default {
|
||||
boxesBxStatusEnum,
|
||||
hardwareSaleStatusEnum,
|
||||
hardwareRefundStatusEnum,
|
||||
carTypeEnum,
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Reference in new issue
Block a user