Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
app
/
sales-assist-mobile
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 786617e8
authored
Aug 03, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.0.0' of
http://192.168.3.233:8090/app/sales-assist-mobile
into v1.0.0
2 parents
285c6886
991563c4
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
83 additions
and
104 deletions
api/modules/orders.uts
components/TabBar/tabbarShared.uts
pages.json
pages/common/orderEntry/components/ContractOrder.uvue
pages/common/orderEntry/components/RecentOrderEntry.uvue
pages/common/orderEntry/components/SalesOrder.uvue
pages/common/orderEntry/components/WorkOrder.uvue
pages/common/orderEntry/index.uvue
api/modules/orders.uts
View file @
786617e
import { request } from "@/api/modules/http/http.uts";
/**
*
* 订单列表查询(分页,pageSize=100)。可按门店/客户/状态筛选。
* GET /api/orders
*/
export function getOrdersList(params: UTSJSONObject = {} as UTSJSONObject): Promise<any> {
return request("/orders", params, "GET");
}
components/TabBar/tabbarShared.uts
View file @
786617e
...
@@ -126,7 +126,8 @@ export function navigateToTab(index: number, currentTabIndex: number): void {
...
@@ -126,7 +126,8 @@ export function navigateToTab(index: number, currentTabIndex: number): void {
return;
return;
}
}
if (index == 2) {
if (index == 2) {
uni.navigateTo({ url: "/pages/common/orderEntry/index" });
// uni.navigateTo({ url: "/pages/common/orderEntry/index" });
switchTabPage("pages/common/orderEntry/index");
return;
return;
}
}
if (index == 3) {
if (index == 3) {
...
...
pages.json
View file @
786617e
...
@@ -184,6 +184,12 @@
...
@@ -184,6 +184,12 @@
"selectedIconPath"
:
"static/images/tabbar/home-active.png"
"selectedIconPath"
:
"static/images/tabbar/home-active.png"
},
},
{
{
"pagePath"
:
"pages/common/orderEntry/index"
,
"text"
:
"录单"
,
"iconPath"
:
"static/images/tabbar/home.png"
,
"selectedIconPath"
:
"static/images/tabbar/home-active.png"
},
{
"pagePath"
:
"pages/person/myCenter"
,
"pagePath"
:
"pages/person/myCenter"
,
"text"
:
"我的"
,
"text"
:
"我的"
,
"iconPath"
:
"static/images/tabbar/study.png"
,
"iconPath"
:
"static/images/tabbar/study.png"
,
...
...
pages/common/orderEntry/components/ContractOrder.uvue
View file @
786617e
...
@@ -64,9 +64,6 @@
...
@@ -64,9 +64,6 @@
</view>
</view>
<view class="submit-wrap">
<view class="submit-wrap">
<view class="submit-btn" @click="submitOrder">
<view class="submit-btn" @click="submitOrder">
<view class="check-icon-box">
<text class="check-icon-text">✓</text>
</view>
<text class="submit-btn-text">提交</text>
<text class="submit-btn-text">提交</text>
</view>
</view>
</view>
</view>
...
...
pages/common/orderEntry/components/RecentOrderEntry.uvue
View file @
786617e
...
@@ -27,12 +27,12 @@
...
@@ -27,12 +27,12 @@
<text class="date-month">{{ item.month }}</text>
<text class="date-month">{{ item.month }}</text>
</view>
</view>
<view class="recent-info">
<view class="recent-info">
<text class="info-name">{{ item.
n
ame }}</text>
<text class="info-name">{{ item.
customerN
ame }}</text>
<text class="info-desc">{{ item.
desc
}}</text>
<text class="info-desc">{{ item.
customerPhone
}}</text>
</view>
</view>
<view class="recent-amount">
<view class="recent-amount">
<text class="amount-text">{{ item.
a
mount }}</text>
<text class="amount-text">{{ item.
payA
mount }}</text>
<text class="status-text"
:class="item.statusClass">{{ item.status
}}</text>
<text class="status-text"
>{{ item.statusName
}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -41,96 +41,52 @@
...
@@ -41,96 +41,52 @@
<script setup lang="uts">
<script setup lang="uts">
import { ref, computed } from "vue";
import { ref, computed } from "vue";
import { getOrdersList } from "@/api/modules/orders.uts";
type RecentItem = {
type RecentItem = {
id: string;
orderNo: string;
storeId: number;
customerId: number;
customerName: string;
customerPhone: string;
staffId: string;
sceneId: number | null;
totalAmount: number;
discountAmount: number;
payAmount: number;
status: number;
statusName: string;
payType: number | null;
payTime: string | null;
remark: string | null;
createdAt: string;
items: any[];
day: string;
day: string;
month: string;
month: string;
name: string;
desc: string;
amount: string;
status: string;
statusClass: string;
};
};
const recentList = ref<RecentItem[]>([
const recentList = ref<RecentItem[]>([]);
{
day: "10",
month: "07/10",
name: "刘先生",
desc: "发动机延保3年 · 销售单",
amount: "¥3500",
status: "已完成",
statusClass: "status-done"
},
{
day: "15",
month: "07/15",
name: "黄先生",
desc: "4K行车记录仪 · 销售单",
amount: "¥999",
status: "已完成",
statusClass: "status-done"
},
{
day: "16",
month: "07/15",
name: "先生",
desc: "4K记录仪 · 销售单",
amount: "¥999",
status: "已完成",
statusClass: "status-done"
},
{
day: "17",
month: "07/17",
name: "张先生",
desc: "4K行车记录仪 · 销售单",
amount: "¥999",
status: "已完成",
statusClass: "status-done"
},
{
day: "18",
month: "07/18",
name: "李先生",
desc: "4K行车记录仪 · 销售单",
amount: "¥999",
status: "已完成",
statusClass: "status-done"
},
{
day: "19",
month: "07/19",
name: "王先生",
desc: "4K行车记录仪 · 销售单",
amount: "¥999",
status: "已完成",
statusClass: "status-done"
},
{
day: "20",
month: "07/20",
name: "张先生",
desc: "4K行车记录仪 · 销售单",
amount: "¥999",
status: "已完成",
statusClass: "status-done"
},
{
day: "21",
month: "07/21",
name: "张先生",
desc: "4K行车记录仪 · 销售单",
amount: "¥999",
status: "已完成",
statusClass: "status-done"
},
]);
function goAll(): void {
function goAll(): void {
uni.showToast({ title: "查看全部", icon: "none" });
uni.showToast({ title: "查看全部", icon: "none" });
}
}
function onRecentClick(item: RecentItem): void {
function onRecentClick(item: RecentItem): void {
uni.showToast({ title: `
${item.name} ${item.desc}
`, icon: "none" });
uni.showToast({ title: `
1
`, icon: "none" });
}
}
const getRecentList = async (): Promise<void> => {
try {
const data = await getOrdersList() as RecentItem[];
for (let i = 0; i < data.length; i++) {
data[i].day = data[i].createdAt.split("T")[0].split("-")[2];
data[i].month = data[i].createdAt.split("T")[0].split("-")[1] + "/" + data[i].day;
}
recentList.value = data;
} catch (error) {
console.error("获取最近录单列表失败:", error);
}
};
onMounted(() => {
getRecentList();
});
</script>
</script>
<style scoped lang="scss">
<style scoped lang="scss">
...
...
pages/common/orderEntry/components/SalesOrder.uvue
View file @
786617e
...
@@ -48,9 +48,6 @@
...
@@ -48,9 +48,6 @@
</view>
</view>
<view class="submit-wrap">
<view class="submit-wrap">
<view class="submit-btn" @click="submitOrder">
<view class="submit-btn" @click="submitOrder">
<view class="check-icon-box">
<text class="check-icon-text">✓</text>
</view>
<text class="submit-btn-text">提交</text>
<text class="submit-btn-text">提交</text>
</view>
</view>
</view>
</view>
...
...
pages/common/orderEntry/components/WorkOrder.uvue
View file @
786617e
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<text class="form-label">预约时间</text>
<text class="form-label">预约时间</text>
<view class="form-select" @click="openTimePicker">
<view class="form-select" @click="openTimePicker">
<text class="form-select-text" :class="{ placeholder: form.appointmentTime == '' }">
<text class="form-select-text" :class="{ placeholder: form.appointmentTime == '' }">
{{ form.appointmentTime == "" ? "
yyyy-mm日 --:--
" : form.appointmentTime }}
{{ form.appointmentTime == "" ? "
请选择预约时间
" : form.appointmentTime }}
</text>
</text>
<uni-icons type="calendar" size="14" color="#999999"></uni-icons>
<uni-icons type="calendar" size="14" color="#999999"></uni-icons>
</view>
</view>
...
@@ -56,9 +56,6 @@
...
@@ -56,9 +56,6 @@
</view>
</view>
<view class="submit-wrap">
<view class="submit-wrap">
<view class="submit-btn" @click="submitOrder">
<view class="submit-btn" @click="submitOrder">
<view class="check-icon-box">
<text class="check-icon-text">✓</text>
</view>
<text class="submit-btn-text">提交</text>
<text class="submit-btn-text">提交</text>
</view>
</view>
</view>
</view>
...
...
pages/common/orderEntry/index.uvue
View file @
786617e
<template>
<template>
<layout-root :page-vars="pageVars">
<!-- <layout-root :page-vars="pageVars"> -->
<TabBarShell ref="shellRef" :active-tab-index="1" :page-vars="pageVars as UTSJSONObject">
<view class="navbar-wrapper">
<view class="navbar-wrapper">
<app-navbar
<!--
<app-navbar
:fixed="false"
:fixed="false"
:placeholder="false"
:placeholder="false"
title="录单"
title="录单"
...
@@ -10,12 +11,16 @@
...
@@ -10,12 +11,16 @@
:auto-back="false"
:auto-back="false"
:safe-area-inset-top="false"
:safe-area-inset-top="false"
@leftClick="back"
@leftClick="back"
/
>
/> --
>
</view>
</view>
<view class="order-entry-container" :style="contentStyle">
<view class="order-entry-container" :style="contentStyle">
<view class="tab-box">
<view class="tab-box">
<view v-for="(tab, idx) in tabs" :key="idx" :class="['tab-item', tabActiveIndex == idx ? 'active-tab' : '']" @click="onTabChange(idx)">
<view
v-for="(tab, idx) in tabs"
:key="idx"
:class="['tab-item', tabActiveIndex == idx ? 'active-tab' : '']"
@click="onTabChange(idx)"
>
<un-icon
<un-icon
:label="tab.name"
:label="tab.name"
:name="tab.iconType"
:name="tab.iconType"
...
@@ -31,10 +36,13 @@
...
@@ -31,10 +36,13 @@
<RecentOrderEntry />
<RecentOrderEntry />
</scroll-view>
</scroll-view>
</view>
</view>
</layout-root>
</TabBarShell>
<!-- </layout-root> -->
</template>
</template>
<script setup lang="uts">
<script setup lang="uts">
import TabBarShell from "@/components/TabBar/TabBarShell.uvue";
import pageVars from "./styles/index.vars";
import pageVars from "./styles/index.vars";
import { ref, computed, getCurrentInstance, onMounted, nextTick, onResize } from "vue";
import { ref, computed, getCurrentInstance, onMounted, nextTick, onResize } from "vue";
import { calcWindowTopInsetPx } from "@/utils/safe-area.uts";
import { calcWindowTopInsetPx } from "@/utils/safe-area.uts";
...
@@ -54,11 +62,17 @@ const navbarHeight = ref(0);
...
@@ -54,11 +62,17 @@ const navbarHeight = ref(0);
const windowHeight = ref(uni.getSystemInfoSync().windowHeight);
const windowHeight = ref(uni.getSystemInfoSync().windowHeight);
const statusBarHeight = ref(0);
const statusBarHeight = ref(0);
const contentStyle = computed((): string => {
const contentStyle = computed((): string => {
return `height: ${windowHeight.value - navbarHeight.value - statusBarHeight.value}px`;
return `height: ${windowHeight.value - statusBarHeight.value}px`;
// return `height: ${windowHeight.value - navbarHeight.value - statusBarHeight.value}px`;
});
});
function measureNavbarHeight(): void {
function measureNavbarHeight(): void {
uni.createSelectorQuery().in(currentInstance!.proxy).select('.navbar-wrapper').boundingClientRect().exec((ret) => {
uni
.createSelectorQuery()
.in(currentInstance!.proxy)
.select(".navbar-wrapper")
.boundingClientRect()
.exec((ret) => {
if (ret.length > 0) {
if (ret.length > 0) {
navbarHeight.value = (ret[0] as NodeInfo).height!;
navbarHeight.value = (ret[0] as NodeInfo).height!;
}
}
...
@@ -66,8 +80,8 @@ function measureNavbarHeight(): void {
...
@@ -66,8 +80,8 @@ function measureNavbarHeight(): void {
}
}
onMounted(() => {
onMounted(() => {
statusBarHeight.value = calcWindowTopInsetPx(uni.getWindowInfo());
nextTick(() => {
nextTick(() => {
statusBarHeight.value = calcWindowTopInsetPx(uni.getWindowInfo());
measureNavbarHeight();
measureNavbarHeight();
});
});
});
});
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment