feat(order): add order detail and list pages with components for order management

- Implemented order detail page with components for displaying order status, user info, and refund options.
- Created order list page with pagination and order cards for displaying all orders.
- Added styles for order detail and list pages.
- Developed a prompt document outlining component requirements for the order management system.
- Introduced a new Card component for quick booking with a responsive design.
- Enhanced Tabs component for better navigation between different categories.
- Integrated z-paging for efficient data loading and management in order and quick booking lists.
- Added service order card component for displaying service requests with call functionality.
- Updated main CSS for improved viewport handling.
This commit is contained in:
duanshuwen
2026-05-26 15:38:33 +08:00
parent fa76435e38
commit ad93ca5e8e
194 changed files with 17069 additions and 2 deletions

View File

@@ -0,0 +1,132 @@
<template>
<div class="create-service-order">
<div
class="w-full bg-white border-box border-ff overflow-hidden rounded-20"
>
<div
class="border-box order-header w-vw flex flex-items-center flex-justify-between bg-theme-color-50"
>
<spanclass="font-size-18 font-500 color-171717 text-left ml-12">
{{ isCallSuccess ? "反馈已创建" : "反馈意见" }}
</text>
<img
class="header-icon"
src="https://oss.nianxx.cn/mp/static/version_101/home/feedback.png"
/>
</div>
<div v-if="!isCallSuccess" class="border-box p-12">
<div
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
>
<spanclass="font-500 line-height-22 mr-20">联系电话</text>
<input placeholder="请填写联系电话" v-model="contactPhone" />
</div>
<div
class="bg-F5F7FA border-box p-12 rounded-10 font-size-14 font-500 color-171717 mb-12"
>
<div class="font-500 line-height-22 mb-12">意见内容</div>
<textarea
class="h-80"
placeholder="请输入反馈意见"
placeholder-class="font-size-14 font-400"
maxlength="100"
v-model="contactText"
/>
</div>
<div
class="btn rounded-50 color-white bg-button flex flex-items-center flex-justify-center"
@click="handleCall"
>
立即提交
</div>
</div>
<div v-else class="border-box left flex-full p-12">
<div class="font-size-12 color-525866 line-height-20 mb-4">
联系方式: {{ contactPhone }}
</div>
<div class="font-size-12 color-525866 line-height-20 ellipsis-2">
意见内容: {{ contactText }}
</div>
</div>
<div class="footer-help flex flex-items-center pl-12 mb-12">
<img class="help-icon mr-4" src="./images/icon_volume.png" />
<spanclass="font-size-12 font-500 color-FA7319">
{{ appName }}收到您的意见将第一时间为您处理!
</text>
</div>
</div>
</div>
</template>
<script setup>
import { ref, onMounted, nextTick, computed } from "vue";
import { SCROLL_TO_BOTTOM } from "@/constant/constant";
import { getCurrentConfig } from "@/constant/base";
import { submitFeedback } from "@/request/api/FeedbackApi";
const contactPhone = ref("");
const contactText = ref("");
const isCallSuccess = ref(false); // 呼叫成功状态
const appName = computed(() => getCurrentConfig().name);
const handleCall = async () => {
if (!contactPhone.value.trim()) {
uni.showToast({ title: "请填写联系电话", icon: "none" });
return;
}
if (!contactText.value.trim()) {
uni.showToast({ title: "请填写意见内容", icon: "none" });
return;
}
sendFeedback();
};
/// 提交反馈意见
const sendFeedback = async () => {
try {
const res = await submitFeedback({
userPhone: contactPhone.value,
content: contactText.value,
});
if (res.code === 0) {
// 设置成功状态
isCallSuccess.value = true;
uni.showToast({
title: "反馈意见成功",
icon: "success",
});
} else {
uni.showToast({
title: res.message || "反馈意见失败",
icon: "none",
});
}
} catch (error) {
console.error("反馈意见失败:", error);
uni.showToast({
title: "网络错误,请重试",
icon: "none",
});
}
};
onMounted(() => {
nextTick(() => {
setTimeout(() => {
uni.$emit(SCROLL_TO_BOTTOM, true);
}, 200);
});
});
</script>
<style scoped lang="scss">
@import "./styles/index.scss";
</style>