feat: 师傅备注
This commit is contained in:
parent
4bb1fcc37c
commit
51c192017b
|
|
@ -103,6 +103,12 @@ class Api {
|
||||||
let url = `${config.host}/worker/order_abnormal/create`;
|
let url = `${config.host}/worker/order_abnormal/create`;
|
||||||
return fetch.request('postFrom', url, data, true)
|
return fetch.request('postFrom', url, data, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 保存师傅备注
|
||||||
|
static saveWorkerRemark(data) {
|
||||||
|
let url = `${config.host}/worker/order_dispatch/saveWorkerRemark`;
|
||||||
|
return fetch.request('postFrom', url, data, true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Api
|
export default Api
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,13 @@
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : "上报异常"
|
"navigationBarTitleText" : "上报异常"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/order/worker-remark",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "工单备注"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,16 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="info" v-if="data.status !== enums.ORDER_DISPATCH_STATUS.STATUS_TOGET">
|
||||||
|
<view class="item-multi-line">
|
||||||
|
<view class="title flex-l title-class">我的备注 <text v-if="data.worker_remark" class="description flex-l">仅自己可见,点击备注可修改</text></view>
|
||||||
|
<view @click="updateWorkerRemark()">
|
||||||
|
<view class="value flex-l placeholder-class" v-if="data.worker_remark === ''">您可在此处输入备注信息,该备注信息仅自己可见</view>
|
||||||
|
<view class="value flex-l" v-else>{{ data.worker_remark }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 已拒接-->
|
<!-- 已拒接-->
|
||||||
<view class="info" v-if="data.status === enums.ORDER_DISPATCH_STATUS.STATUS_REFUSED">
|
<view class="info" v-if="data.status === enums.ORDER_DISPATCH_STATUS.STATUS_REFUSED">
|
||||||
<view class="item-multi-line">
|
<view class="item-multi-line">
|
||||||
|
|
@ -170,6 +180,11 @@ const openLocation = () => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新师傅备注
|
||||||
|
const updateWorkerRemark = () => {
|
||||||
|
helpers.jumpToPage('worker-remark', `id=${id.value}&worker_remark=${data.value.worker_remark}`)
|
||||||
|
}
|
||||||
|
|
||||||
//上报异常
|
//上报异常
|
||||||
const reportOrderException = (orderId) => {
|
const reportOrderException = (orderId) => {
|
||||||
helpers.jumpToPage('report-order-exception', `order_id=${orderId}`)
|
helpers.jumpToPage('report-order-exception', `order_id=${orderId}`)
|
||||||
|
|
@ -350,6 +365,13 @@ const previewImage = (url) => {
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: var(--summaryColor);
|
color: var(--summaryColor);
|
||||||
|
.description {
|
||||||
|
margin-left: 8rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: var(--descriptionColor);
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.value {
|
.value {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
<view class="textarea">
|
<view class="textarea">
|
||||||
<view class="title flex-l">异常说明</view>
|
<view class="title flex-l">异常说明</view>
|
||||||
<view class="value">
|
<view class="value">
|
||||||
<textarea v-if="orderInfo.length === 0" :disable-default-padding="true" class="input-textarea" v-model="submitData.detail" placeholder-class="placeholder-class" placeholder="请输入异常说明(200字以内)"/>
|
<textarea maxlength="200" v-if="orderInfo.length === 0" :disable-default-padding="true" class="input-textarea" v-model="submitData.detail" placeholder-class="placeholder-class" placeholder="请输入异常说明(200字以内)"/>
|
||||||
<textarea v-else disabled="disabled" :disable-default-padding="true" class="input-textarea" v-model="orderInfo.detail" placeholder-class="placeholder-class" placeholder="请输入异常说明(200字以内)"/>
|
<textarea maxlength="200" v-else disabled="disabled" :disable-default-padding="true" class="input-textarea" v-model="orderInfo.detail" placeholder-class="placeholder-class" placeholder="请输入异常说明(200字以内)"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
88
pages/order/worker-remark.vue
Normal file
88
pages/order/worker-remark.vue
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
<template>
|
||||||
|
<view class="ctr">
|
||||||
|
<view class="form-group">
|
||||||
|
<view class="textarea">
|
||||||
|
<view class="title flex-l">备注信息</view>
|
||||||
|
<view class="value">
|
||||||
|
<textarea maxlength="500" :disable-default-padding="true" class="input-textarea" v-model="submitData.worker_remark" placeholder-class="placeholder-class" placeholder="您可在此处输入备注信息,该备注信息仅自己可见(500字以内)"/>
|
||||||
|
</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 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} from 'vue'
|
||||||
|
import {onLoad} from '@dcloudio/uni-app'
|
||||||
|
import api from "../../api/api";
|
||||||
|
import {throttle} from "../../utils/throttle";
|
||||||
|
|
||||||
|
//提交
|
||||||
|
const submit = throttle(() => {
|
||||||
|
uni.showLoading({
|
||||||
|
title: '保存中'
|
||||||
|
});
|
||||||
|
|
||||||
|
submitData.order_dispatch_id = orderDispatchId.value
|
||||||
|
api.saveWorkerRemark(submitData).then(() => {
|
||||||
|
uni.hideLoading();
|
||||||
|
uni.showToast({
|
||||||
|
title: '已保存',
|
||||||
|
icon: "success"
|
||||||
|
})
|
||||||
|
}).catch(() => {})
|
||||||
|
})
|
||||||
|
|
||||||
|
const orderDispatchId = ref(null)
|
||||||
|
onLoad((params) => {
|
||||||
|
orderDispatchId.value = params.id
|
||||||
|
submitData.worker_remark = params.worker_remark
|
||||||
|
})
|
||||||
|
|
||||||
|
//提交数据
|
||||||
|
const submitData = reactive({
|
||||||
|
worker_remark: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.ctr {
|
||||||
|
padding: 0 32rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 100vh;
|
||||||
|
.value {
|
||||||
|
height: 300rpx !important;
|
||||||
|
}
|
||||||
|
.bottom {
|
||||||
|
width: 100%;
|
||||||
|
padding-top: 20rpx;
|
||||||
|
padding-bottom: 68rpx;
|
||||||
|
background: var(--pageBgColor);
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -245,7 +245,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.placeholder-class {
|
.placeholder-class {
|
||||||
color: var(--descriptionColor);
|
color: var(--descriptionColor) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-class {
|
||||||
|
color: var(--titleColor) !important;
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
swiper .wx-swiper-dots .wx-swiper-dot{
|
swiper .wx-swiper-dots .wx-swiper-dot{
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
.desc {
|
.desc {
|
||||||
margin-left: 8rpx;
|
margin-left: 8rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
font-size: 28rpx;
|
font-size: 30rpx;
|
||||||
color: var(--descriptionColor);
|
color: var(--descriptionColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ class helpers {
|
||||||
'complete-service': '/pages/order/complete-service',
|
'complete-service': '/pages/order/complete-service',
|
||||||
//上报异常
|
//上报异常
|
||||||
'report-order-exception': '/pages/order/report-order-exception',
|
'report-order-exception': '/pages/order/report-order-exception',
|
||||||
|
//更新师傅备注
|
||||||
|
'worker-remark': '/pages/order/worker-remark',
|
||||||
}
|
}
|
||||||
|
|
||||||
url = paths[pathName]
|
url = paths[pathName]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user