feat: 订单详情
This commit is contained in:
parent
99bcb178a6
commit
10b0bf4515
|
|
@ -55,6 +55,12 @@ class Api {
|
||||||
let url = `${config.host}/worker/order_dispatch/countWorkbenchOrder`;
|
let url = `${config.host}/worker/order_dispatch/countWorkbenchOrder`;
|
||||||
return fetch.request('GET', url, {}, true)
|
return fetch.request('GET', url, {}, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 订单详情
|
||||||
|
static orderInfo(data) {
|
||||||
|
let url = `${config.host}/worker/order_dispatch/info`;
|
||||||
|
return fetch.request('GET', url, data, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Api
|
export default Api
|
||||||
|
|
|
||||||
16
pages.json
16
pages.json
|
|
@ -1,13 +1,5 @@
|
||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
|
||||||
"path" : "pages/workbench/workbench",
|
|
||||||
"style" :
|
|
||||||
{
|
|
||||||
"navigationBarTitleText" : "",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path" : "pages/index/index",
|
"path" : "pages/index/index",
|
||||||
"style" :
|
"style" :
|
||||||
|
|
@ -16,6 +8,14 @@
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/workbench/workbench",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path" : "pages/user/login",
|
"path" : "pages/user/login",
|
||||||
"style" :
|
"style" :
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,14 @@
|
||||||
<IndexSkeleton v-if="data.is_show_skeleton"></IndexSkeleton>
|
<IndexSkeleton v-if="data.is_show_skeleton"></IndexSkeleton>
|
||||||
<view v-else class="ctr">
|
<view v-else class="ctr">
|
||||||
<view class="fixed-top">
|
<view class="fixed-top">
|
||||||
<me-top :title="data.isPullDownRefresh ? '刷新中…' : '接单大厅'"></me-top>
|
<me-top title="接单大厅"></me-top>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<me-empty-space :height="listMarginTop"></me-empty-space>
|
<me-empty-space :height="listMarginTop"></me-empty-space>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view class="order-item" v-for="(item, index) in data.list" :key="index">
|
<view class="order-item" v-for="(item, index) in data.list" :key="index">
|
||||||
<view class="top flex-sb">
|
<view class="top flex-sb">
|
||||||
<view class="type flex-l">{{item.order_info.item_title}}</view>
|
<view class="type flex-l" @click="toDetail(item.id)">{{item.order_info.item_title}}</view>
|
||||||
<view class="price flex-r important-color" v-if="item.order_info.receive_type === 1">上门报价</view>
|
<view class="price flex-r important-color" v-if="item.order_info.receive_type === 1">上门报价</view>
|
||||||
<view class="price flex-r" v-else>平台已收款</view>
|
<view class="price flex-r" v-else>平台已收款</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -1,48 +1,49 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="ctr">
|
<view class="ctr" v-if="data !== null">
|
||||||
<view class="price-ctr">
|
<view class="price-ctr">
|
||||||
<view class="price flex-c">平台已收款</view>
|
<view class="price flex-c" v-if="data.order_info.receive_type === 1">上门报价</view>
|
||||||
<view class="desc flex-c">服务价格</view>
|
<view class="price flex-c" v-else>平台已收款</view>
|
||||||
|
<view class="desc flex-c">{{ getPriceDescText() }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info">
|
<view class="info">
|
||||||
<view class="item-row flex-sb line-after">
|
<view class="item-row flex-sb line-after">
|
||||||
<view class="title flex-l">当前状态</view>
|
<view class="title flex-l">当前状态</view>
|
||||||
<view class="value flex-r order-status">
|
<view class="value flex-r order-status">
|
||||||
<text>待接单</text>
|
<text>{{getOrderStatusText(data.status)}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-row flex-sb line-after">
|
<view class="item-row flex-sb line-after">
|
||||||
<view class="title flex-l">服务类型</view>
|
<view class="title flex-l">服务类型</view>
|
||||||
<view class="value flex-r">
|
<view class="value flex-r">
|
||||||
<text>日常保洁</text>
|
<text>{{data.order_info.item_title}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-row flex-sb line-after">
|
<view class="item-row flex-sb line-after">
|
||||||
<view class="title flex-l">客户姓名</view>
|
<view class="title flex-l">客户姓名</view>
|
||||||
<view class="value flex-r">
|
<view class="value flex-r">
|
||||||
<text>倪运昊</text>
|
<text>{{ data.order_info.customer }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-row flex-sb">
|
<view class="item-row flex-sb">
|
||||||
<view class="title flex-l">客户电话</view>
|
<view class="title flex-l">客户电话</view>
|
||||||
<view class="value flex-r value-theme">
|
<view class="value flex-r value-theme">
|
||||||
<me-icon class="icon" type="icon-call" color="var(--themeColor)" size="40rpx"></me-icon>
|
<me-icon class="icon" type="icon-call" color="var(--themeColor)" size="40rpx"></me-icon>
|
||||||
<text>18628195903</text>
|
<text>{{ data.order_info.tel }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-row flex-sb line-after">
|
<view class="item-row flex-sb line-after">
|
||||||
<view class="title flex-l">预约上门时间</view>
|
<view class="title flex-l">预约上门时间</view>
|
||||||
<view class="value flex-r">
|
<view class="value flex-r">
|
||||||
<text>2025年03月22日21:01</text>
|
<text>{{data.order_info.plan_time}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-multi-line line-after">
|
<view class="item-multi-line line-after">
|
||||||
<view class="title flex-l">客户地址</view>
|
<view class="title flex-l">客户地址</view>
|
||||||
<view class="value flex-l">浙江省瑞安市迎宾路58号海洋家属楼506号517房</view>
|
<view class="value flex-l">{{helpers.removeCommas(data.order_info.area.merge_name) + data.order_info.address}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-multi-line">
|
<view class="item-multi-line">
|
||||||
<view class="title flex-l">客户备注</view>
|
<view class="title flex-l">客户备注</view>
|
||||||
<view class="value flex-l">千古江山,英雄无觅孙仲谋处。舞榭歌台,风流总被雨打风吹去。斜阳草树,寻常巷陌,人道寄奴曾住。想当年,金戈铁马,气吞万里如虎。</view>
|
<view class="value flex-l">{{data.remark ? data.remark : '无备注信息'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<me-empty-space height="376"></me-empty-space>
|
<me-empty-space height="376"></me-empty-space>
|
||||||
|
|
@ -60,10 +61,50 @@ import MeIcon from "../../components/me-icon/me-icon.vue";
|
||||||
import MeEmptySpace from "../../components/me-empty-space/me-empty-space.vue";
|
import MeEmptySpace from "../../components/me-empty-space/me-empty-space.vue";
|
||||||
import MeButton from "../../components/me-button/me-button.vue";
|
import MeButton from "../../components/me-button/me-button.vue";
|
||||||
import helpers from "../../utils/helpers";
|
import helpers from "../../utils/helpers";
|
||||||
|
import {onLoad, onShow} from '@dcloudio/uni-app'
|
||||||
|
import {ref, reactive, computed, watch, inject} from 'vue'
|
||||||
|
import api from "../../api/api";
|
||||||
|
import enums from "../../utils/enums";
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
helpers.jumpToPage('order-submit')
|
helpers.jumpToPage('order-submit')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const id = ref(null)
|
||||||
|
onLoad((params) => {
|
||||||
|
id.value = params.id
|
||||||
|
})
|
||||||
|
|
||||||
|
onShow(() => {
|
||||||
|
init()
|
||||||
|
})
|
||||||
|
|
||||||
|
const data = ref(null)
|
||||||
|
const init = () => {
|
||||||
|
api.orderInfo({order_dispatch_id: id.value}).then(res => {
|
||||||
|
data.value = res
|
||||||
|
}).catch(() => {})
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取价格描述文案
|
||||||
|
const getPriceDescText = () => {
|
||||||
|
let orderInfo = data.value
|
||||||
|
if (orderInfo.order_info.receive_type === 2) {
|
||||||
|
return '服务价格'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (orderInfo.status === 60) {
|
||||||
|
let tailText = orderInfo.total > 0 ? '线下收款¥' + orderInfo.total : '线上收款¥' + orderInfo.online_total
|
||||||
|
return `服务价格(订金¥${orderInfo.order_info.online_amount}+${tailText})`
|
||||||
|
}
|
||||||
|
|
||||||
|
return `服务价格(已收订金¥${orderInfo.order_info.online_amount})`
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取订单状态文本
|
||||||
|
const getOrderStatusText = (status) => {
|
||||||
|
return enums.WORKBENCH_STATUS_TEXT[status]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -72,7 +113,7 @@ const submit = () => {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
.price-ctr {
|
.price-ctr {
|
||||||
height: 200rpx;
|
min-height: 200rpx;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 32rpx 20rpx;
|
padding: 32rpx 20rpx;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
@ -85,7 +126,7 @@ const submit = () => {
|
||||||
}
|
}
|
||||||
.desc {
|
.desc {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 56rpx;
|
min-height: 56rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: var(--summaryColor);
|
color: var(--summaryColor);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user