111
This commit is contained in:
1 parent
7d450caf77
commit
983674cfc9
29 files changed
+913
-49
No files matched your search
@@ -59,6 +59,7 @@
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-4020920240930001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4020920240930001",
|
||||
"@vue/compiler-core": "^3.5.11",
|
||||
"@zebra-ui/swiper": "^2.2.8",
|
||||
"dayjs": "^1.11.13",
|
||||
"luch-request": "^3.1.1",
|
||||
"pinia": "^2.2.6",
|
||||
|
||||
Generated
+8
@@ -53,6 +53,9 @@ dependencies:
|
||||
'@vue/compiler-core':
|
||||
specifier: ^3.5.11
|
||||
version: 3.5.12
|
||||
'@zebra-ui/swiper':
|
||||
specifier: ^2.2.8
|
||||
version: 2.2.8
|
||||
dayjs:
|
||||
specifier: ^1.11.13
|
||||
version: 1.11.13
|
||||
@@ -3868,6 +3871,11 @@ packages:
|
||||
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
|
||||
dev: true
|
||||
|
||||
/@zebra-ui/swiper@2.2.8:
|
||||
resolution: {integrity: sha512-ujS0xKzEieFg59Wjz1fOtqeZthoMOgTZrFdN7c8Tq/qrIjKst6JGd35qg5/tvK4v9idtmywK4Dzp77go3LolKQ==}
|
||||
engines: {HBuilderX: ^3.1.0}
|
||||
dev: false
|
||||
|
||||
/abab@2.0.6:
|
||||
resolution: {integrity: sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==}
|
||||
deprecated: Use your platform's native atob() and btoa() methods instead
|
||||
|
||||
+16
@@ -15,4 +15,20 @@ onHide(() => {
|
||||
<style lang="scss">
|
||||
@import "@/sheep/scss/global.scss";
|
||||
@import url(@/uni_modules/tm-ui/css/remixicon.min.css);
|
||||
|
||||
.prefix_title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 8rpx;
|
||||
height: 24rpx;
|
||||
background: #0094ff;
|
||||
border-radius: 4rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -84,6 +84,44 @@
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "stride-items",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/merchant",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "product-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/order",
|
||||
"pages": [
|
||||
{
|
||||
"path": "detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"disableScroll": true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -9,9 +9,15 @@ const state = reactive<any>({
|
||||
|
||||
})
|
||||
const applyForm = reactive<any>({
|
||||
count: 1,
|
||||
remark: "",
|
||||
})
|
||||
const applyFormRules = reactive<any>({
|
||||
count: [
|
||||
{ required: true, message: '请输入申请数量' },
|
||||
{ required: true, min: 1, message: '最少申请1张' },
|
||||
{ required: true, max: 20, message: '最多申请20张' },
|
||||
]
|
||||
})
|
||||
onLoad(() => {
|
||||
|
||||
@@ -29,6 +35,7 @@ const doSubmit = async () => {
|
||||
try {
|
||||
uni.showLoading({ title: '申请中...', mask: false });
|
||||
const _pa = {
|
||||
count: applyForm.count,
|
||||
remark: applyForm.remark,
|
||||
}
|
||||
const { data, code }: any = await applyApi.strideApply(_pa)
|
||||
@@ -49,6 +56,10 @@ const doSubmit = async () => {
|
||||
<crud-layout title="外来人员就餐" bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
<tm-form ref="applyFormRef" v-model="applyForm" :rules="applyFormRules" direction="vertical">
|
||||
<tm-form-item name="count" label="申请数量" :showBottom="false">
|
||||
<tm-input v-model="applyForm.count" type="number" showClear 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" showClear placeholder="请输入备注.."></tm-input>
|
||||
</tm-form-item>
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { isEmpty } from 'radash'
|
||||
|
||||
import { hooks, router } from "@@/index"
|
||||
import { applyApi } from "@@/api"
|
||||
|
||||
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
|
||||
|
||||
const data = {
|
||||
tabs: ['待审核', '已通过', '已拒绝'],
|
||||
}
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
id: null,
|
||||
pagesize: 99,
|
||||
},
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, applyApi.foreignItems, null, 'data')
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
}
|
||||
|
||||
onLoad((options: any) => {
|
||||
if (!isEmpty(options.id)) {
|
||||
state.pa.id = options.id
|
||||
}
|
||||
});
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
|
||||
const doTab = (e: any) => {
|
||||
if (state.pa.status != e + 1) {
|
||||
state.pa.status = e + 1
|
||||
pageRef.value.reload(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</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="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">
|
||||
<template #top>
|
||||
<view class="h-30rpx" />
|
||||
</template>
|
||||
<view class="flex-col card p-x-20rpx p-y-30rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="">
|
||||
<tm-tag v-if="v.status == 1" size="m" color="info">未使用</tm-tag>
|
||||
<tm-tag v-if="v.status == 2" size="m" color="success">已使用</tm-tag>
|
||||
<view class="m-t-10rpx sub-text-26">
|
||||
<text>{{ v.userNameStr }}</text>
|
||||
<text class="m-l-10rpx">{{ v.userMobile }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<image class="w-100rpx h-100rpx" :src="v.code" mode="aspectFill" />
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -54,6 +54,7 @@ const doApply = async () => {
|
||||
<z-tabs :list="data.tabs" @change="doTab" />
|
||||
</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">
|
||||
</view>
|
||||
<template #bottom>
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
|
||||
import { hooks, router } from "@@/index"
|
||||
import { merchantApi } from "@@/api"
|
||||
|
||||
const state = reactive<any>({
|
||||
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
});
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,132 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { isEmpty } from "radash"
|
||||
|
||||
import { hooks } from "@@/index"
|
||||
import { merchantApi, foodApi } from "@@/api"
|
||||
|
||||
import ProductRow from './components/product-row.vue'
|
||||
|
||||
|
||||
const data = {
|
||||
|
||||
}
|
||||
const state = reactive<any>({
|
||||
detailId: null,
|
||||
detail: {},
|
||||
})
|
||||
|
||||
onLoad((options: any) => {
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id
|
||||
getDetail()
|
||||
}
|
||||
});
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
|
||||
const getDetail = async () => {
|
||||
const _pa = { id: state.detailId }
|
||||
const { data } = await merchantApi.detail(_pa)
|
||||
state.detail = data
|
||||
}
|
||||
|
||||
const getShopCar = async () => {
|
||||
const _pa = {}
|
||||
const { data } = await foodApi.getShopCar(_pa)
|
||||
}
|
||||
|
||||
const updateShopCar = async () => {
|
||||
const _pa = {}
|
||||
const { data } = await foodApi.updateShopCar(_pa)
|
||||
}
|
||||
|
||||
const getClassify = async () => {
|
||||
const _pa = {}
|
||||
const { data } = await foodApi.classify(_pa)
|
||||
}
|
||||
|
||||
const getPorduct = async () => {
|
||||
const _pa = {}
|
||||
const { data } = await foodApi.product(_pa)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout bg="/static/page/blue-bg.png">
|
||||
<!-- start 简介 start -->
|
||||
<view class="h-10rpx" />
|
||||
<view flex-row card p-20rpx>
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="state.detail.logo" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center sub-text-36">
|
||||
<text>{{ state.detail.name }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<tm-tag size="s">{{ state.detail.deptStr }}</tm-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>营业时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(state.detail.applianceStartTime, "{h}:{i}") }}
|
||||
~
|
||||
{{ hooks.useTime(state.detail.applianceEndTime, "{h}:{i}") }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>食堂地址</text>
|
||||
<text class="m-l-10rpx">{{ state.detail.addressDes }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- end 简介 end -->
|
||||
<!-- start 功能 start -->
|
||||
<view class="h-10rpx" />
|
||||
<view class="flex-row items-center justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="flex-row-center">
|
||||
<view class="flex-row-center w-50rpx h-50rpx bg-#167aff rounded-full">
|
||||
<text class="font-size-28rpx! color-white iconfont icon-dianhua" />
|
||||
</view>
|
||||
<text class="m-l-20rpx sub-text-30">联系食堂</text>
|
||||
</view>
|
||||
<view class="w-1px h-30rpx bg-#515151" />
|
||||
<view class="flex-row-center">
|
||||
<view class="flex-row-center w-50rpx h-50rpx bg-#167aff rounded-full">
|
||||
<text class="font-size-28rpx! color-white iconfont icon-yuding" />
|
||||
</view>
|
||||
<text class="m-l-20rpx sub-text-28">包厢预定</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- end 功能 end -->
|
||||
|
||||
<!-- start 轮播 start -->
|
||||
<!-- <view class="h-10rpx" /> -->
|
||||
<!-- end 轮播 end -->
|
||||
|
||||
<!-- start 商品 start -->
|
||||
<view class="h-10rpx" />
|
||||
|
||||
<view>
|
||||
<view>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view>
|
||||
|
||||
</view>
|
||||
<!-- end 商品 end -->
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
|
||||
import { hooks } from "@@/index"
|
||||
import { foodApi } from "@@/api"
|
||||
|
||||
const data = {
|
||||
|
||||
}
|
||||
const state = reactive<any>({
|
||||
pa: {
|
||||
status: 1,
|
||||
},
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
});
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单详情" bg="/static/page/blue-bg.png">
|
||||
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -0,0 +1,71 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { isEmpty } from 'radash'
|
||||
|
||||
import { hooks } from "@@/index"
|
||||
import { productApi } from "@@/api"
|
||||
|
||||
import zSwiper from "@zebra-ui/swiper/components/z-swiper/z-swiper.vue"
|
||||
import zSwiperItem from "@zebra-ui/swiper/components/z-swiper-item/z-swiper-item.vue"
|
||||
|
||||
const data = {
|
||||
list: [
|
||||
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe1.jpg',
|
||||
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe2.jpg',
|
||||
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe3.jpg',
|
||||
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe4.jpg',
|
||||
'https://cdn.zebraui.com/zebra-ui/images/swipe-demo/swipe5.jpg',
|
||||
]
|
||||
}
|
||||
const state = reactive<any>({
|
||||
detailId: null,
|
||||
})
|
||||
|
||||
onLoad((options: any) => {
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id
|
||||
}
|
||||
});
|
||||
onShow(() => {
|
||||
getDetail()
|
||||
})
|
||||
|
||||
const getDetail = async () => {
|
||||
const _pa = { id: state.detailId }
|
||||
const { data } = await productApi.get(_pa)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单详情" tabBarType="just-flot-back" bg="/static/page/blue-bg.png">
|
||||
<z-swiper v-model="data.list">
|
||||
<z-swiper-item v-for="(v, i) in data.list" :key="i">
|
||||
<image class="w-100vw" :src="v" mode="aspectFill" />
|
||||
</z-swiper-item>
|
||||
</z-swiper>
|
||||
<view class="p-x-15rpx">
|
||||
<view class="flex-row items-center justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view></view>
|
||||
<view></view>
|
||||
</view>
|
||||
<view class="h-15rpx" />
|
||||
<view class="flex-row items-center justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="prefix_title">评价</view>
|
||||
</view>
|
||||
<view class="h-15rpx" />
|
||||
<view class="flex-row items-center justify-between card p-y-20rpx p-x-30rpx">
|
||||
<view class="prefix_title">详情</view>
|
||||
</view>
|
||||
</view>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
:deep() {
|
||||
.layout_main>scroll-view {
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,140 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { isEmpty } from "radash"
|
||||
|
||||
import { hooks, constant, router } from "@@/index"
|
||||
import { orderApi } from "@@/api"
|
||||
|
||||
const data = {
|
||||
|
||||
}
|
||||
const state = reactive<any>({
|
||||
detailId: null,
|
||||
detail: {},
|
||||
shopCarList: [],
|
||||
})
|
||||
|
||||
onLoad((options: any) => {
|
||||
if (!isEmpty(options.id)) {
|
||||
state.detailId = options.id
|
||||
}
|
||||
});
|
||||
onShow(() => {
|
||||
getDetail()
|
||||
getShopCarList()
|
||||
})
|
||||
|
||||
const getDetail = async () => {
|
||||
if (isEmpty(state.detailId)) return
|
||||
const _pa = { id: state.detailId };
|
||||
const { data } = await orderApi.detail(_pa)
|
||||
state.detail = data
|
||||
}
|
||||
|
||||
const getShopCarList = async () => {
|
||||
if (isEmpty(state.detailId)) return
|
||||
const _pa = { orderId: state.detailId };
|
||||
const { data } = await orderApi.shopCarList(_pa)
|
||||
state.shopCarList = data
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<crud-layout title="订单详情" bg="/static/page/blue-bg.png">
|
||||
<view class="h-30rpx" />
|
||||
<view class="relative flex-col justify-center overflow-hidden card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<image class="absolute top--20rpx right--60rpx w-160rpx h-160rpx" src="/static/icon/guarantee.png"
|
||||
mode="widthFix" />
|
||||
<view class="sub-text-32">订单信息</view>
|
||||
<view class="m-t-15rpx">
|
||||
<view class="info_cell">
|
||||
<view>用户</view>
|
||||
<view>{{ state.detail.username }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>手机号</view>
|
||||
<view>{{ state.detail.userMobile }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>商户</view>
|
||||
<view>{{ state.detail.merchantStr }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>部门</view>
|
||||
<view>{{ state.detail.deptName }}</view>
|
||||
</view>
|
||||
<view class="m-t-15rpx h-1px bg-#515151 bg-opacity-5" />
|
||||
<view class="info_cell">
|
||||
<view>订单号</view>
|
||||
<view>{{ state.detail.id }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>下单时间</view>
|
||||
<view>{{ hooks.useTime(state.detail.createTime, "") }}</view>
|
||||
</view>
|
||||
<view class="info_cell">
|
||||
<view>支付方式</view>
|
||||
<view>
|
||||
{{ hooks.useEnum("hardwareOrderTypeEnum", state.detail.orderType) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-col justify-center card p-x-20rpx p-y-30rpx m-b-20rpx">
|
||||
<view class="sub-text-32">商品费用</view>
|
||||
<view class="m-t-15rpx">
|
||||
<view class="flex-row items-start justify-between" v-for="(v, i) in state.shopCarList" :key="i"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: v.productId })">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-160rpx h-160rpx" :src="v.productPic" mode="aspectFill" />
|
||||
<view class="flex-col m-l-15rpx second-text-26">
|
||||
<view class="sub-text-28">{{ v.productName }}</view>
|
||||
<view class="m-t-5rpx">¥ {{ hooks.useMoney(v.productPrice) }}</view>
|
||||
<view class="m-t-5rpx">x {{ v.productCount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-row-center">
|
||||
<view class="sub-text-32">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-y-15rpx h-1px bg-#515151 bg-opacity-5" />
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="sub-text-32">实付款</view>
|
||||
<view class="flex-row items-end">
|
||||
<view class="sub-text-28">¥</view>
|
||||
<view class="m-l-5rpx sub-text-32">{{ hooks.useMoney(state.detail.practicalTotalPrice) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.info_cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:not(:first-child) {
|
||||
margin-top: 15rpx;
|
||||
}
|
||||
|
||||
&>view {
|
||||
color: #515151;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
|
||||
&>view:nth-child(1) {
|
||||
width: 130rpx;
|
||||
}
|
||||
|
||||
&>view:nth-child(2) {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,10 +3,17 @@ import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
|
||||
import { hooks } from "@@/index"
|
||||
import { merchantApi } from "@@/api"
|
||||
import { foodApi } from "@@/api"
|
||||
|
||||
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
|
||||
|
||||
const data = {
|
||||
tabs: ['早餐', '午餐', '晚餐'],
|
||||
}
|
||||
const state = reactive<any>({
|
||||
|
||||
pa: {
|
||||
status: 1,
|
||||
},
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
@@ -17,24 +24,35 @@ onShow(() => {
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.merchantList, null, 'data')
|
||||
const pageHook = hooks.usePage(pageRef, foodApi.page, null, 'data.list')
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
}
|
||||
|
||||
const doTab = (e: any) => {
|
||||
if (state.pa.status != e + 1) {
|
||||
state.pa.status = e + 1
|
||||
pageRef.value.reload(true)
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<crud-layout>
|
||||
|
||||
|
||||
<crud-layout title="每日菜谱" 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">
|
||||
<template #top>
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-16rpx px-20rpx">
|
||||
<z-tabs :list="data.tabs" @change="doTab" />
|
||||
</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">
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
|
||||
import { hooks } from "@@/index"
|
||||
import { hooks, router } from "@@/index"
|
||||
import { merchantApi } from "@@/api"
|
||||
|
||||
const state = reactive<any>({
|
||||
@@ -17,24 +17,48 @@ onShow(() => {
|
||||
})
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.merchantList, null, 'data')
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.page, null, 'data.list')
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<crud-layout>
|
||||
|
||||
|
||||
<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">
|
||||
<template #top>
|
||||
</template>
|
||||
<view class="flex-row card p-20rpx m-b-20rpx" v-for="(v, i) in pageHook.list" :key="i"
|
||||
@tap="router.jump('/pages/merchant/detail', { id: v.id })">
|
||||
<image class="w-160rpx h-160rpx rounded-12rpx" :src="v.logo" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row-center sub-text-34">
|
||||
<text> {{ v.name }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<tm-tag size="s">{{ v.deptStr }}</tm-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="m-t-10rpx second-text-28">
|
||||
<text>营业时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(v.applianceStartTime, "{h}:{i}") }}
|
||||
~
|
||||
{{ hooks.useTime(v.applianceEndTime, "{h}:{i}") }}
|
||||
</text>
|
||||
</view>
|
||||
<view v-if="v.addressDes" class="m-t-10rpx second-text-28">
|
||||
<text>食堂地址</text>
|
||||
<text class="m-l-10rpx">{{ v.addressDes }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
|
||||
+101
-9
@@ -2,11 +2,24 @@
|
||||
import { ref, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
|
||||
import { hooks } from "@@/index"
|
||||
import { merchantApi } from "@@/api"
|
||||
import { hooks, router } from "@@/index"
|
||||
import { orderApi } from "@@/api"
|
||||
|
||||
import zTabs from "@@/components/other/z-tabs/z-tabs.vue"
|
||||
|
||||
const data = {
|
||||
tabs: [
|
||||
{ id: null, name: '全部', disabled: false },
|
||||
{ id: 1, name: '未支付', disabled: false },
|
||||
{ id: 5, name: '待核销', disabled: false },
|
||||
{ id: 10, name: '已核销', disabled: false },
|
||||
{ id: 15, name: '已退款', disabled: false },
|
||||
]
|
||||
}
|
||||
const state = reactive<any>({
|
||||
|
||||
pa: {
|
||||
orderStatus: null,
|
||||
},
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
@@ -15,27 +28,106 @@ onLoad(() => {
|
||||
onShow(() => {
|
||||
|
||||
})
|
||||
const doTab = (e: any) => {
|
||||
const target = data.tabs[e];
|
||||
state.pa.orderStatus = target.id
|
||||
pageRef.value.reload(true)
|
||||
}
|
||||
|
||||
const pageRef = ref<any>(null)
|
||||
const pageHook = hooks.usePage(pageRef, merchantApi.merchantList, null, 'data')
|
||||
const pageHook = hooks.usePage(pageRef, orderApi.page, null, 'data.list')
|
||||
const query = (page: number, pagesize: number) => {
|
||||
pageHook.startPage(page, pagesize, false, state.pa);
|
||||
}
|
||||
|
||||
const doToDetail = (v: any) => {
|
||||
router.jump("/pages/order/detail", { id: v.id })
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
<template>
|
||||
<crud-layout>
|
||||
|
||||
|
||||
<crud-layout title="订单" 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">
|
||||
<template #top>
|
||||
<view class="h-30rpx" />
|
||||
<view class="bg-white rounded-16rpx px-20rpx">
|
||||
<z-tabs :list="data.tabs" @change="doTab" />
|
||||
</view>
|
||||
</template>
|
||||
<view class="h-20rpx" />
|
||||
<view class="flex-col justify-center card p-x-15rpx p-y-25rpx m-b-20rpx" v-for="(v, i) in pageHook.list"
|
||||
:key="i" @tap="doToDetail(v)">
|
||||
<view class="flex-row items-center">
|
||||
<image class="w-80rpx h-80rpx rounded-8rpx" :src="v.merchantLogo" mode="aspectFill" />
|
||||
<view class="flex-1 flex-col m-l-20rpx">
|
||||
<view class="flex-row items-center justify-between">
|
||||
<view class="flex-row items-center">
|
||||
<view class="main-text-28">{{ v.merchantStr }}</view>
|
||||
<view class="m-l-15rpx color-#515151 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" size="xs">已核销</tm-tag>
|
||||
<tm-tag v-if="v.orderStatus == 15" color="error" size="xs">已退款</tm-tag>
|
||||
</view>
|
||||
<view class="m-t-5rpx">
|
||||
<view class="second-text-26">
|
||||
<text>下单时间</text>
|
||||
<text class="m-l-10rpx">
|
||||
{{ hooks.useTime(v.createTime, "{y}-{m}-{d} {h}:{i}:{s}") }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative h-180rpx m-t-20rpx">
|
||||
<view class="absolute top-0 right-0 bottom-0 left-0 h-180rpx">
|
||||
<scroll-view scroll-x class="flex-row-center whitespace-nowrap">
|
||||
<view class="flex-row items-center">
|
||||
<view class="inline-flex! flex-col justify-center h-180rpx m-r-20rpx"
|
||||
v-for="(pV, pI) in v.shopCarList" :key="pI"
|
||||
@tap.stop="router.jump('/pages/merchant/product-detail', { id: pV.productId })">
|
||||
<image class="w-160rpx h-120rpx rounded-8rpx" :src="pV.productPic"
|
||||
mode="aspectFill" />
|
||||
<view class="w-160rpx m-t-10rpx sub-text-28 show-line">
|
||||
{{ pV.productName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="inline-flex! h-180rpx">
|
||||
<view class="w-160rpx h-full" />
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view
|
||||
class="absolute top-0 right-0 bottom-0 z-10 flex-col items-end w-160rpx p-x-20rpx bg-white bg-opacity-95">
|
||||
<view class="main-text-30">¥ {{ hooks.useMoney(v.totalPrice) }}</view>
|
||||
<view class="m-t-10rpx second-text-26">共 {{ v.shopCarList.length }} 件</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="[5, 10].includes(v.orderStatus)" class="flex-row items-center justify-end p-t-20rpx">
|
||||
<view v-if="v.orderStatus == 10" class="botder_btn">评价</view>
|
||||
<view v-if="v.orderStatus == 5 && v.orderType == 2" class="m-l-20rpx botder_btn"
|
||||
@tap.stop="hooks.usePreviewImage(v.orderTypeExtendReserve.qrCode)">
|
||||
核销码
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
</crud-layout>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.botder_btn {
|
||||
border: 1px solid #515151;
|
||||
color: #515151;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 8rpx 15rpx;
|
||||
}
|
||||
</style>
|
||||
+47
-1
@@ -1,3 +1,49 @@
|
||||
import request from "@/sheep/utils/request";
|
||||
|
||||
export default {};
|
||||
export default {
|
||||
page: (params: any) =>
|
||||
request({
|
||||
url: `/food/api/selectTimeFood`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
classify: (params: any) =>
|
||||
request({
|
||||
url: `/onlinefood/category/listFood`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
product: (params: any) =>
|
||||
request({
|
||||
url: `/onlinefood/category/list`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
getShopCar: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/car/get`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
updateShopCar: (data: any) =>
|
||||
request({
|
||||
url: `/hardware/car/save-or-upload`,
|
||||
method: "POST",
|
||||
data,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
};
|
||||
@@ -1,10 +1,20 @@
|
||||
import request from "@/sheep/utils/request";
|
||||
|
||||
export default {
|
||||
merchantList: () =>
|
||||
page: (params: any) =>
|
||||
request({
|
||||
url: "/merchant/manage/page-join",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
detail: (params: any) =>
|
||||
request({
|
||||
url: "/merchant/manage/get",
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
|
||||
+29
-1
@@ -1,3 +1,31 @@
|
||||
import request from "@/sheep/utils/request";
|
||||
|
||||
export default {};
|
||||
export default {
|
||||
page: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/order/page-join`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
detail: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/order/get-join`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
shopCarList: (params: any) =>
|
||||
request({
|
||||
url: `/hardware/car/get-by-order-id`,
|
||||
method: "GET",
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
};
|
||||
@@ -1,3 +1,11 @@
|
||||
import request from "@/sheep/utils/request";
|
||||
|
||||
export default {};
|
||||
export default {
|
||||
get: (params) => {
|
||||
return request({
|
||||
url: "/product/spu/get-detail",
|
||||
method: "GET",
|
||||
params,
|
||||
});
|
||||
},
|
||||
};
|
||||
@@ -40,9 +40,11 @@ function getNavTop() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="navbar" :style="{ top: getNavTop() }" v-if="showLeft && !isTabbar" @tap="doBackClick">
|
||||
<text class="sicon-back icon" v-if="isHistiry" />
|
||||
<text class="sicon-home icon" v-else />
|
||||
<view class="navbar" :style="{ top: getNavTop() }">
|
||||
<view class="navbar_center" v-if="showLeft && !isTabbar" @tap="doBackClick">
|
||||
<text class="sicon-back icon" v-if="isHistiry" />
|
||||
<text class="sicon-home icon" v-else />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -50,19 +52,26 @@ function getNavTop() {
|
||||
.navbar {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
|
||||
border-radius: 28rpx;
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
height: 44px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
&_center {
|
||||
background: #fff;
|
||||
box-shadow: 0px 0px 4rpx rgba(51, 51, 51, 0.08), 0px 4rpx 6rpx 2rpx rgba(102, 102, 102, 0.12);
|
||||
border-radius: 28rpx;
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 100;
|
||||
|
||||
&>.icon {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -70,7 +70,7 @@ function initBackStyle() {
|
||||
case "default":
|
||||
break;
|
||||
case "just-flot-back":
|
||||
state.visble.topSafe = false
|
||||
state.visble.topSafe = true
|
||||
state.visble.topNav = false
|
||||
break;
|
||||
default:
|
||||
@@ -135,7 +135,7 @@ page {
|
||||
}
|
||||
|
||||
&_header {
|
||||
z-index: 1;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
&_main {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export { default as imgConstant } from "./img-constant";
|
||||
|
||||
export { default as serviceEnum } from "./service-enum";
|
||||
|
||||
export { default as storageConstant } from "./storage-constant";
|
||||
@@ -0,0 +1,29 @@
|
||||
const hardwareOrderStatusEnum = {
|
||||
1: "创建订单(未支付)",
|
||||
5: "已经支付",
|
||||
10: "退款",
|
||||
15: "已核销",
|
||||
};
|
||||
|
||||
const hardwareOrderTypeEnum = {
|
||||
1: "线下购买",
|
||||
2: "线上订餐",
|
||||
3: "外来人员",
|
||||
4: "跨单位",
|
||||
};
|
||||
|
||||
const hardwarePayTypeEnum = {
|
||||
1: "钱包支付",
|
||||
2: "钱包二维码支付",
|
||||
3: "钱包饭卡支付",
|
||||
4: "人脸识别支付",
|
||||
5: "跨单位二维码支付",
|
||||
6: "外来人员二维码支付",
|
||||
7: "线上订餐二维码支付",
|
||||
};
|
||||
|
||||
export default {
|
||||
hardwareOrderStatusEnum,
|
||||
hardwareOrderTypeEnum,
|
||||
hardwarePayTypeEnum,
|
||||
};
|
||||
@@ -1,3 +1,7 @@
|
||||
export * from "./use-enum";
|
||||
|
||||
export * from "./use-img";
|
||||
|
||||
export * from "./use-page";
|
||||
|
||||
export * from "./use-unit";
|
||||
@@ -0,0 +1,11 @@
|
||||
import { isEmpty } from "radash";
|
||||
|
||||
import { serviceEnum } from "../constant/index";
|
||||
|
||||
export const useEnum = (
|
||||
key: string | undefined,
|
||||
value: string | number | undefined
|
||||
) => {
|
||||
if (isEmpty(key) || isEmpty(value)) return "";
|
||||
return serviceEnum[key!][value];
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
export const usePreviewImage = (str: string | undefined) => {
|
||||
if (str == undefined) return;
|
||||
let urlList = str.split(",");
|
||||
uni.previewImage({
|
||||
urls: urlList,
|
||||
});
|
||||
};
|
||||
@@ -1,9 +1,9 @@
|
||||
@font-face {
|
||||
font-family: "iconfont";
|
||||
/* Project id 4740692 */
|
||||
src: url('//at.alicdn.com/t/c/font_4740692_ozdkialdak.woff2?t=1731275285379') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4740692_ozdkialdak.woff?t=1731275285379') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4740692_ozdkialdak.ttf?t=1731275285379') format('truetype');
|
||||
src: url('//at.alicdn.com/t/c/font_4740692_4h93hfstead.woff2?t=1731328362704') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_4740692_4h93hfstead.woff?t=1731328362704') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_4740692_4h93hfstead.ttf?t=1731328362704') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@@ -14,6 +14,14 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-dianhua:before {
|
||||
content: "\e614";
|
||||
}
|
||||
|
||||
.icon-yuding:before {
|
||||
content: "\e649";
|
||||
}
|
||||
|
||||
.icon-xiangxiajiantouxiao:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
+21
-3
@@ -58,6 +58,15 @@ export default {
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^second-text-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"font-size": `${d}rpx`,
|
||||
"font-weight": 500,
|
||||
color: "#515151",
|
||||
"line-height": `1.4em`,
|
||||
}),
|
||||
],
|
||||
[
|
||||
"card",
|
||||
{
|
||||
@@ -72,14 +81,23 @@ export default {
|
||||
"box-shadow": "0rpx 0rpx 4rpx 0rpx rgba(0, 0, 0, 0.1)",
|
||||
},
|
||||
],
|
||||
[
|
||||
/^show-line$/,
|
||||
([, d]) => ({
|
||||
overflow: "hidden",
|
||||
"white-space": "nowrap",
|
||||
"text-overflow": "ellipsis",
|
||||
}),
|
||||
],
|
||||
[
|
||||
/^show-line-(\d+)$/,
|
||||
([, d]) => ({
|
||||
"text-overflow": "ellipsis",
|
||||
display: "-webkit-box !important",
|
||||
overflow: "hidden",
|
||||
display: "-webkit-box",
|
||||
"-webkit-box-orient": "vertical",
|
||||
"text-overflow": "ellipsis !important",
|
||||
"word-break": "break-all",
|
||||
"-webkit-line-clamp": d,
|
||||
"-webkit-box-orient": "vertical !important",
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
Reference in new issue
Block a user