feat: 订单详情页接单、拒单;选择上门时间页面调试;icon样式移出默认颜色;
This commit is contained in:
parent
10b0bf4515
commit
cdd2f1211f
|
|
@ -1,14 +1,11 @@
|
|||
.icon-arrow-up-line:before {
|
||||
content: "\e90d";
|
||||
color: #fff;
|
||||
}
|
||||
.icon-progress-2-line:before {
|
||||
content: "\e90e";
|
||||
color: #e18f00;
|
||||
}
|
||||
.icon-reset-left-line:before {
|
||||
content: "\e90c";
|
||||
color: #fff;
|
||||
}
|
||||
.icon-upload-cloud-fill:before {
|
||||
content: "\e90b";
|
||||
|
|
@ -18,11 +15,9 @@
|
|||
}
|
||||
.icon-info:before {
|
||||
content: "\e900";
|
||||
color: #e18f00;
|
||||
}
|
||||
.icon-call:before {
|
||||
content: "\e901";
|
||||
color: #2772f0;
|
||||
}
|
||||
.icon-user:before {
|
||||
content: "\e902";
|
||||
|
|
@ -35,19 +30,15 @@
|
|||
}
|
||||
.icon-flashlight:before {
|
||||
content: "\e905";
|
||||
color: #fff;
|
||||
}
|
||||
.icon-time:before {
|
||||
content: "\e906";
|
||||
color: #2772f0;
|
||||
}
|
||||
.icon-arrow-right-circle:before {
|
||||
content: "\e907";
|
||||
color: #fff;
|
||||
}
|
||||
.icon-checkbox-circle:before {
|
||||
content: "\e908";
|
||||
color: #2772f0;
|
||||
}
|
||||
.icon-checkbox-blank-circle:before {
|
||||
content: "\e909";
|
||||
|
|
|
|||
|
|
@ -45,6 +45,13 @@
|
|||
{
|
||||
"navigationBarTitleText" : "提交"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order/select-time",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "已和客户沟通"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
|||
|
|
@ -18,19 +18,21 @@
|
|||
<text>{{data.order_info.item_title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-row flex-sb line-after">
|
||||
<view class="title flex-l">客户姓名</view>
|
||||
<view class="value flex-r">
|
||||
<text>{{ data.order_info.customer }}</text>
|
||||
<template v-if="data.status !== 0">
|
||||
<view class="item-row flex-sb line-after">
|
||||
<view class="title flex-l">客户姓名</view>
|
||||
<view class="value flex-r">
|
||||
<text>{{ data.order_info.customer }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-row flex-sb">
|
||||
<view class="title flex-l">客户电话</view>
|
||||
<view class="value flex-r value-theme">
|
||||
<me-icon class="icon" type="icon-call" color="var(--themeColor)" size="40rpx"></me-icon>
|
||||
<text>{{ data.order_info.tel }}</text>
|
||||
<view class="item-row flex-sb line-after">
|
||||
<view class="title flex-l">客户电话</view>
|
||||
<view class="value flex-r value-theme">
|
||||
<me-icon class="icon" type="icon-call" color="var(--themeColor)" size="40rpx"></me-icon>
|
||||
<text>{{ data.order_info.tel }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<view class="item-row flex-sb line-after">
|
||||
<view class="title flex-l">预约上门时间</view>
|
||||
<view class="value flex-r">
|
||||
|
|
@ -47,10 +49,14 @@
|
|||
</view>
|
||||
</view>
|
||||
<me-empty-space height="376"></me-empty-space>
|
||||
<view class="bottom">
|
||||
<me-button @click="" active-color="var(--contentBgColor)" text="拒 绝" width="686rpx" text-color="var(--titleColor)"></me-button>
|
||||
|
||||
<me-button @click="submit()" text="确认接单" width="686rpx" icon-type="icon-flashlight" margin-top="32rpx"></me-button>
|
||||
<view class="bottom" v-if="data.status === 0">
|
||||
<me-button @click="rejectOrder()" active-color="var(--contentBgColor)" text="拒 绝" width="686rpx" text-color="var(--titleColor)"></me-button>
|
||||
<me-button @click="acceptOrder()" text="确认接单" width="686rpx" icon-type="icon-flashlight" margin-top="32rpx"></me-button>
|
||||
</view>
|
||||
|
||||
<view class="bottom" v-if="data.status === 10">
|
||||
<me-button @click="selectTime()" text="已和客户沟通" width="686rpx" icon-type="icon-arrow-right-circle" margin-top="32rpx"></me-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -66,6 +72,42 @@ import {ref, reactive, computed, watch, inject} from 'vue'
|
|||
import api from "../../api/api";
|
||||
import enums from "../../utils/enums";
|
||||
|
||||
const selectTime = () => {
|
||||
helpers.jumpToPage('select-time', 'id=' + id.value)
|
||||
}
|
||||
|
||||
const acceptOrder = () => {
|
||||
uni.showModal({
|
||||
title: '接单提示',
|
||||
confirmText: '确认',
|
||||
content: '接单后请及时和客户联系,确认接单?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
api.orderConfirm({type: 'accept', order_dispatch_id: id.value}).then(() => {
|
||||
helpers.showToast('已接单')
|
||||
init()
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const rejectOrder = () => {
|
||||
uni.showModal({
|
||||
title: '拒接提示',
|
||||
confirmText: '确认',
|
||||
content: '确认拒接该单?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
api.orderConfirm({type: 'reject', order_dispatch_id: id.value}).then(() => {
|
||||
helpers.showToast('已拒接')
|
||||
init()
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const submit = () => {
|
||||
helpers.jumpToPage('order-submit')
|
||||
}
|
||||
|
|
|
|||
134
pages/order/select-time.vue
Normal file
134
pages/order/select-time.vue
Normal file
|
|
@ -0,0 +1,134 @@
|
|||
<template>
|
||||
<view class="ctr" v-if="data !== null">
|
||||
<view class="group">
|
||||
<view class="group-name flex-l line-after">
|
||||
<me-icon class="icon" type="icon-info" color="#E18F00" size="40rpx"></me-icon>
|
||||
<text class="text">沟通后请提交信息</text>
|
||||
</view>
|
||||
<view class="item time">
|
||||
<view class="item-row flex-sb">
|
||||
<view class="title flex-l">上门时间</view>
|
||||
<uni-datetime-picker v-model="data.plan_time" type="datetime" :hide-second="true">
|
||||
<view class="value flex-r value-empty" v-if="data.plan_time === ''">点击选择上门时间</view>
|
||||
<view class="value flex-r" v-else>{{ helpers.removeSeconds(data.plan_time) }}</view>
|
||||
</uni-datetime-picker>
|
||||
</view>
|
||||
<view class="desc flex-l">点击时间可更改,请确认和客户沟通的上门时间</view>
|
||||
</view>
|
||||
</view>
|
||||
<me-empty-space height="376"></me-empty-space>
|
||||
<view class="bottom">
|
||||
<me-button @click="submit()" text="确认上门时间" width="686rpx" icon-type="icon-checkbox-circle" margin-top="32rpx"></me-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
import MeIcon from "../../components/me-icon/me-icon.vue";
|
||||
import MeEmptySpace from "../../components/me-empty-space/me-empty-space.vue";
|
||||
import MeButton from "../../components/me-button/me-button.vue";
|
||||
import helpers from "../../utils/helpers";
|
||||
import {ref, reactive, computed, watch, inject} from 'vue'
|
||||
import {onLoad, onShow} from '@dcloudio/uni-app'
|
||||
import api from "../../api/api";
|
||||
|
||||
const planTime = ref('')
|
||||
|
||||
const submit = () => {
|
||||
console.log(data.value)
|
||||
}
|
||||
|
||||
const id = ref(null)
|
||||
onLoad((params) => {
|
||||
id.value = params.id
|
||||
init()
|
||||
})
|
||||
|
||||
const data = ref(null)
|
||||
const init = () => {
|
||||
api.orderInfo({order_dispatch_id: id.value}).then(res => {
|
||||
data.value = res
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ctr {
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
.group {
|
||||
width: 100%;
|
||||
background: var(--containerBgColor);
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx;
|
||||
box-sizing: border-box;
|
||||
margin-top: 32rpx;
|
||||
.group-name {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
position: relative;
|
||||
.text {
|
||||
font-size: 30rpx;
|
||||
color: #E18F00;
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
}
|
||||
.item {
|
||||
width: 100%;
|
||||
}
|
||||
.time {
|
||||
.item-row {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
.title {
|
||||
width: 200rpx;
|
||||
height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
color: var(--titleColor);
|
||||
}
|
||||
.value {
|
||||
width: 446rpx;
|
||||
height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
color: var(--titleColor);
|
||||
}
|
||||
.value-empty {
|
||||
color: var(--summaryColor);
|
||||
}
|
||||
}
|
||||
.desc {
|
||||
width: 100%;
|
||||
min-height: 50rpx;
|
||||
font-size: 28rpx;
|
||||
color: var(--descriptionColor);
|
||||
line-height: 48rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
width: 100%;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 68rpx;
|
||||
background: var(--pageBgColor);
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -15,12 +15,12 @@
|
|||
<view class="list">
|
||||
<view class="order-item" v-for="(item, index) in data.list" :key="index">
|
||||
<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" v-else>平台已收款</view>
|
||||
</view>
|
||||
<view class="content flex-sb">
|
||||
<view class="left">
|
||||
<view class="left" @click="toDetail(item.id)">
|
||||
<view class="address-name flex-l">
|
||||
{{item.order_info.address}}
|
||||
</view>
|
||||
|
|
@ -76,12 +76,16 @@
|
|||
import {onLoad, onShow} from '@dcloudio/uni-app'
|
||||
import {ref, reactive, computed, watch, inject} from 'vue'
|
||||
import MeIcon from "../../components/me-icon/me-icon";
|
||||
import MeEmptySpace from "../../components/me-empty-space/me-empty-space.vue";
|
||||
import MeEmptySpace from "../../components/me-empty-space/me-empty-space";
|
||||
import MeTop from "../../components/me-top/me-top.vue";
|
||||
import api from "../../api/api";
|
||||
import helpers from "../../utils/helpers";
|
||||
import enums from "../../utils/enums";
|
||||
import WorkbenchSkeleton from "./workbench-skeleton.vue";
|
||||
import WorkbenchSkeleton from "./workbench-skeleton";
|
||||
|
||||
const toDetail = (id) => {
|
||||
helpers.jumpToPage('order-info', `id=${id}`)
|
||||
}
|
||||
|
||||
//是否显示骨架屏
|
||||
const isShowSkeleton = computed(() => {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ const enums = {
|
|||
20: '待上门',
|
||||
30: '服务中',
|
||||
60: '已完成',
|
||||
'-10': '已拒接'
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ class helpers {
|
|||
'order-submit': '/pages/order/order-submit',
|
||||
//首页
|
||||
'index': '/pages/index/index',
|
||||
//选择上门时间
|
||||
'select-time': '/pages/order/select-time',
|
||||
}
|
||||
|
||||
url = paths[pathName]
|
||||
|
|
@ -126,5 +128,9 @@ class helpers {
|
|||
static removeCommas(str) {
|
||||
return str.replace(/,/g, '');
|
||||
}
|
||||
|
||||
static removeSeconds(datetimeStr) {
|
||||
return datetimeStr.slice(0, 16);
|
||||
}
|
||||
}
|
||||
export default helpers
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user