Accept Merge Request #134: (feature/dgg -> develop)
Merge Request: dev Created By: @大狗哥 Accepted By: @大狗哥 URL: https://g-bcrc3009.coding.net/p/allocatr/d/wanyu_frontend/git/merge/134
This commit is contained in:
commit
84844fbc70
|
|
@ -104,6 +104,12 @@ class Api {
|
|||
return fetch.request('postFrom', url, data, true)
|
||||
}
|
||||
|
||||
// 更新进度
|
||||
static updateProgress(data) {
|
||||
let url = `${config.host}/worker/order_dispatch/updateProgress`;
|
||||
return fetch.request('postFrom', url, data, true)
|
||||
}
|
||||
|
||||
// 保存师傅备注
|
||||
static saveWorkerRemark(data) {
|
||||
let url = `${config.host}/worker/order_dispatch/saveWorkerRemark`;
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ let accountInfo = wx.getAccountInfoSync();
|
|||
let envVersion = accountInfo.miniProgram.envVersion
|
||||
|
||||
//手动指定版本
|
||||
// envVersion = 'trial'
|
||||
envVersion = 'trial'
|
||||
|
||||
let hosts = {
|
||||
"develop": 'http://wanyu.test',
|
||||
"trial": 'https://www.yilingjiang.com',
|
||||
"release": 'https://release',
|
||||
"release": 'https://www.yilingjiang.com',
|
||||
}
|
||||
|
||||
let host = hosts[envVersion]
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ class Fetch {
|
|||
}
|
||||
},
|
||||
fail(err) {
|
||||
helpers.showToast(err.errMsg)
|
||||
helpers.showToast('网络异常')
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,57 +1,59 @@
|
|||
.icon-progress-2-line:before {
|
||||
.icon-copy:before {
|
||||
content: "\e900";
|
||||
}
|
||||
.icon-money-cny-circle-line:before {
|
||||
content: "\e901";
|
||||
}
|
||||
.icon-user:before {
|
||||
content: "\e902";
|
||||
}
|
||||
.icon-upload-cloud-fill:before {
|
||||
content: "\e903";
|
||||
}
|
||||
.icon-time:before {
|
||||
content: "\e904";
|
||||
}
|
||||
.icon-reset-left-line:before {
|
||||
content: "\e905";
|
||||
}
|
||||
.icon-reset-left-fill:before {
|
||||
content: "\e906";
|
||||
}
|
||||
.icon-navigation:before {
|
||||
content: "\e907";
|
||||
}
|
||||
.icon-logout:before {
|
||||
content: "\e908";
|
||||
}
|
||||
.icon-info:before {
|
||||
content: "\e909";
|
||||
}
|
||||
.icon-flashlight:before {
|
||||
content: "\e90a";
|
||||
}
|
||||
.icon-edit-line:before {
|
||||
content: "\e902";
|
||||
}
|
||||
.icon-user:before {
|
||||
content: "\e903";
|
||||
}
|
||||
.icon-upload-cloud-fill:before {
|
||||
content: "\e904";
|
||||
}
|
||||
.icon-time:before {
|
||||
content: "\e905";
|
||||
}
|
||||
.icon-reset-left-line:before {
|
||||
content: "\e906";
|
||||
}
|
||||
.icon-reset-left-fill:before {
|
||||
content: "\e907";
|
||||
}
|
||||
.icon-progress-2-line:before {
|
||||
content: "\e908";
|
||||
}
|
||||
.icon-navigation:before {
|
||||
content: "\e909";
|
||||
}
|
||||
.icon-logout:before {
|
||||
content: "\e90a";
|
||||
}
|
||||
.icon-info:before {
|
||||
content: "\e90b";
|
||||
}
|
||||
.icon-close-circle-fill:before {
|
||||
.icon-flashlight:before {
|
||||
content: "\e90c";
|
||||
}
|
||||
.icon-checkbox-circle:before {
|
||||
.icon-close-circle-fill:before {
|
||||
content: "\e90d";
|
||||
}
|
||||
.icon-checkbox-blank-circle:before {
|
||||
.icon-checkbox-circle:before {
|
||||
content: "\e90e";
|
||||
}
|
||||
.icon-call:before {
|
||||
.icon-checkbox-blank-circle:before {
|
||||
content: "\e90f";
|
||||
}
|
||||
.icon-arrow-up-line:before {
|
||||
.icon-call:before {
|
||||
content: "\e910";
|
||||
}
|
||||
.icon-arrow-right:before {
|
||||
.icon-arrow-up-line:before {
|
||||
content: "\e911";
|
||||
}
|
||||
.icon-arrow-right-circle:before {
|
||||
.icon-arrow-right:before {
|
||||
content: "\e912";
|
||||
}
|
||||
.icon-arrow-right-circle:before {
|
||||
content: "\e913";
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -88,6 +88,13 @@
|
|||
{
|
||||
"navigationBarTitleText" : "隐私协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/order/update-progress",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "更新施工进度"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
|
|
|||
|
|
@ -14,9 +14,6 @@
|
|||
<view class="address-name flex-l" v-if="item.order_info.address !== ''">
|
||||
{{item.order_info.address}}
|
||||
</view>
|
||||
<view class="address flex-l">
|
||||
{{helpers.removeCommas(item.order_info.area.merge_name)}}
|
||||
</view>
|
||||
<view class="time-ctr flex-l" v-if="item.order_info.plan_time !== null">
|
||||
<me-icon type="icon-time" color="var(--themeColor)" size="40rpx"></me-icon>
|
||||
<text class="time">{{helpers.formatDate(item.order_info.plan_time)}}</text>
|
||||
|
|
@ -30,7 +27,7 @@
|
|||
<view class="distance flex-c" v-else>{{formatDistance(item.order_info.lat, item.order_info.lng)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="discount flex-l" @click="toDetail(item.id)" v-if="item.order_info.receive_type === 1">已支付订金:{{item.order_info.online_amount}}元抵扣{{item.order_info.discount_amount}}元</view>
|
||||
<view class="discount flex-l" @click="toDetail(item.id)" v-if="item.order_info.coupon !== null">已支付订金:{{item.order_info.coupon.threshold}}元抵扣{{item.order_info.coupon.discount_value}}元</view>
|
||||
<view class="btn-ctr flex-sb">
|
||||
<me-button @click="acceptOrder(index, item.id)" text="确认接单" width="460rpx" icon-type="icon-flashlight"></me-button>
|
||||
<me-button @click="rejectOrder(index, item.id)" active-color="var(--contentBgColor)" text="拒 接" width="166rpx" text-color="var(--titleColor)"></me-button>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="upload()" class="up-ctr flex-direction-column" hover-class="auto-mask-layer-radius4"
|
||||
<view v-if="images.length < 10" @click="upload()" class="up-ctr flex-direction-column" hover-class="auto-mask-layer-radius4"
|
||||
hover-start-time="0" hover-stay-time="50">
|
||||
<me-icon class="icon" type="icon-upload-cloud-fill" color="var(--summaryColor)" size="36rpx"></me-icon>
|
||||
<view class="up flex-c">点击上传</view>
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@
|
|||
<view @click="helpers.previewImage(imgUrl)" class="img-ctr" :style="{marginRight: (index+1) % 4 === 0 ? '0' : '55rpx'}">
|
||||
<image class="img" mode="aspectFit" :src="imgUrl"></image>
|
||||
</view>
|
||||
<view class="del" @click="delImg(index)">
|
||||
<view class="del" @click="delImg('complete_images', index)">
|
||||
<me-icon class="icon" type="icon-close-circle-fill" color="var(--importantColor)" size="40rpx"></me-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="upload('complete')" class="up-ctr flex-direction-column" hover-class="auto-mask-layer-radius4"
|
||||
<view v-if="submitData.complete_images.length < 10" @click="upload('complete')" class="up-ctr flex-direction-column" hover-class="auto-mask-layer-radius4"
|
||||
hover-start-time="0" hover-stay-time="50">
|
||||
<me-icon class="icon" type="icon-upload-cloud-fill" color="var(--summaryColor)" size="36rpx"></me-icon>
|
||||
<view class="up flex-c">点击上传</view>
|
||||
|
|
@ -28,19 +28,59 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-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="[submitData.is_material_used === 1 ? 'line-after' : '', 'item', 'input', 'flex-sb']" @click="selectIsMaterialUsed">
|
||||
<view class="title flex-l">是否使用材料</view>
|
||||
<view class="select-ctr flex-r select">{{submitData.is_material_used === 1 ? '已使用' : '未使用'}}<me-icon class="icon" type="icon-arrow-right" color="var(--contentBgColor)" size="56rpx"></me-icon></view>
|
||||
</view>
|
||||
<template v-if="submitData.is_material_used === 1">
|
||||
<view class="item input flex-sb line-after">
|
||||
<view class="title flex-l">材料成本</view>
|
||||
<view class="input-ctr">
|
||||
<input type="digit" v-model="submitData.material_cost" class="uni-input" placeholder-class="placeholder-class" placeholder="请输入金额"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item upload">
|
||||
<view class="info flex-l">
|
||||
<view class="title flex-l">材料凭证</view>
|
||||
<view class="desc flex-l">请上传凭证图片(最多 10 张)</view>
|
||||
</view>
|
||||
<view class="imgs-ctr">
|
||||
<view class="img-item" v-for="(imgUrl, index) in submitData.material_images" :key="index">
|
||||
<view @click="helpers.previewImage(imgUrl)" class="img-ctr" :style="{marginRight: (index+1) % 4 === 0 ? '0' : '55rpx'}">
|
||||
<image class="img" mode="aspectFit" :src="imgUrl"></image>
|
||||
</view>
|
||||
<view class="del" @click="delImg('material_images', index)">
|
||||
<me-icon class="icon" type="icon-close-circle-fill" color="var(--importantColor)" size="40rpx"></me-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="submitData.material_images.length < 10" @click="upload('material_images')" class="up-ctr flex-direction-column" hover-class="auto-mask-layer-radius4"
|
||||
hover-start-time="0" hover-stay-time="50">
|
||||
<me-icon class="icon" type="icon-upload-cloud-fill" color="var(--summaryColor)" size="36rpx"></me-icon>
|
||||
<view class="up flex-c">点击上传</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
<view class="form-group" v-if="data.order_info.receive_type === 1">
|
||||
<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 input flex-sb line-after" v-if="data.order_info.receive_type === 1">
|
||||
<view class="item input flex-sb line-after" v-if="data.order_info.coupon !== null">
|
||||
<view class="title flex-l">优惠信息</view>
|
||||
<view class="uni-input flex-r">{{data.order_info.online_amount}}元抵扣{{data.order_info.discount_amount}}元</view>
|
||||
<view class="uni-input flex-r">{{data.order_info.coupon.threshold}}元抵扣{{data.order_info.coupon.discount_value}}元</view>
|
||||
</view>
|
||||
<view class="item input flex-sb line-after" @click="selectFinalPaymentMethod()">
|
||||
<view class="title flex-l">收款方式</view>
|
||||
<view v-if="submitData.final_payment_method === null" class="select-ctr flex-r">请选择收款方式</view>
|
||||
<view v-else class="select-ctr flex-r select">{{submitData.final_payment_method === 1 ? '线下尾款' : '线上尾款'}}</view>
|
||||
<view v-if="submitData.final_payment_method === null" class="select-ctr flex-r">请选择收款方式<me-icon class="icon" type="icon-arrow-right" color="var(--contentBgColor)" size="56rpx"></me-icon></view>
|
||||
<view v-else class="select-ctr flex-r select">{{submitData.final_payment_method === 1 ? '线下尾款' : '线上尾款'}}<me-icon class="icon" type="icon-arrow-right" color="var(--contentBgColor)" size="56rpx"></me-icon></view>
|
||||
</view>
|
||||
<!-- 线下收款需选择尾款收款方-->
|
||||
<view v-if="submitData.final_payment_method === 1" class="item input flex-sb line-after" @click="selectOfflineTotalType()">
|
||||
|
|
@ -96,6 +136,18 @@ import api from "../../api/api";
|
|||
import {throttle} from "../../utils/throttle";
|
||||
import enums from "../../utils/enums";
|
||||
|
||||
const selectIsMaterialUsed = () => {
|
||||
uni.showActionSheet({
|
||||
itemList: ['未使用', '已使用'],
|
||||
success: function (res) {
|
||||
submitData.is_material_used = res.tapIndex;
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传完成图片
|
||||
* @param type 上传类型:complete=完成图片,collectPayment=收款图片
|
||||
|
|
@ -139,6 +191,10 @@ const upload = (type) => {
|
|||
submitData.complete_images.push(fullUrl)
|
||||
}
|
||||
|
||||
if (type === 'material_images') {
|
||||
submitData.material_images.push(fullUrl)
|
||||
}
|
||||
|
||||
if (type === 'collectPayment') {
|
||||
submitData.payment_image = fullUrl
|
||||
}
|
||||
|
|
@ -159,8 +215,8 @@ const upload = (type) => {
|
|||
}
|
||||
|
||||
//删除完成图片
|
||||
const delImg = (idx) => {
|
||||
submitData.complete_images.splice(idx, 1)
|
||||
const delImg = (type, idx) => {
|
||||
submitData[type].splice(idx, 1)
|
||||
helpers.showToast('图片已删除')
|
||||
}
|
||||
|
||||
|
|
@ -188,6 +244,7 @@ const submit = throttle(() => {
|
|||
|
||||
let data = helpers.deepObj(submitData)
|
||||
data.complete_images = (submitData.complete_images).join(',')
|
||||
data.material_images = (submitData.material_images).join(',')
|
||||
data.order_dispatch_id = id.value
|
||||
|
||||
api.completeService(data).then(() => {
|
||||
|
|
@ -231,6 +288,9 @@ const submitData = reactive({
|
|||
amount: '',//收款金额
|
||||
payment_image: '',//收款图片
|
||||
receive_type: null,//收款类型:1=定金,2=全款
|
||||
is_material_used: 0,//是否使用材料:0=未使用,1=已使用
|
||||
material_cost: null,//材料成本
|
||||
material_images: [],//材料凭证
|
||||
})
|
||||
|
||||
const selectFinalPaymentMethod = () => {
|
||||
|
|
@ -268,6 +328,19 @@ const validate = () => {
|
|||
return true
|
||||
}
|
||||
|
||||
// 使用材料
|
||||
if (submitData.is_material_used === 1) {
|
||||
if (submitData.material_cost === null) {
|
||||
helpers.showToast('请输入材料成本')
|
||||
return false
|
||||
}
|
||||
|
||||
if (submitData.material_images.length === 0) {
|
||||
helpers.showToast('请上传材料凭证图片')
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
if (submitData.final_payment_method === null) {
|
||||
helpers.showToast('请选择收款方式')
|
||||
return false
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@
|
|||
</view>
|
||||
|
||||
<view class="info">
|
||||
<view class="item-row flex-sb line-after">
|
||||
<view class="title flex-l">工单号</view>
|
||||
<view class="value flex-r value-theme" @click="helpers.copy(data.order_info.order_no)">
|
||||
<text>{{ data.order_info.order_no }}</text>
|
||||
<me-icon class="icon" type="icon-copy" color="var(--themeColor)" size="36rpx"></me-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-row flex-sb line-after">
|
||||
<view class="title flex-l">当前状态</view>
|
||||
<view class="value flex-r order-status">
|
||||
|
|
@ -66,7 +73,7 @@
|
|||
<view class="value flex-l">{{helpers.removeCommas(data.order_info.area.merge_name)}}{{ data.order_info.address }}</view>
|
||||
</view>
|
||||
<view class="item-multi-line line-after">
|
||||
<view class="title flex-l">详情</view>
|
||||
<view class="title flex-l">订单详情</view>
|
||||
<view class="value flex-l">{{data.order_info.detail ? data.order_info.detail : '暂无详情'}}</view>
|
||||
</view>
|
||||
<view class="images line-after" v-if="data.order_info.images.length > 0">
|
||||
|
|
@ -78,7 +85,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="item-multi-line line-after">
|
||||
<view class="title flex-l">客户备注</view>
|
||||
<view class="title flex-l">平台备注</view>
|
||||
<view class="value flex-l">{{data.order_info.remark ? data.order_info.remark : '无备注信息'}}</view>
|
||||
</view>
|
||||
<view class="report-order-exception flex-c" v-if="canReportOrderException">
|
||||
|
|
@ -131,11 +138,33 @@
|
|||
</view>
|
||||
</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.is_material_used === 1 ? '已使用' : '未使用' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<template v-if="data.order_info.is_material_used === 1">
|
||||
<view class="item-row flex-sb line-after">
|
||||
<view class="title flex-l">材料成本</view>
|
||||
<view class="value flex-r">
|
||||
<text>¥{{ data.order_info.material_cost }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="line-after images">
|
||||
<view class="title flex-l">材料凭证</view>
|
||||
<view class="imgs-ctr">
|
||||
<view @click="helpers.previewImage(imgUrl)" v-for="(imgUrl, index) in data.order_info.material_images" :key="index" class="img-ctr" :style="{marginRight: (index+1) % 5 === 0 ? '0' : '36rpx'}">
|
||||
<image class="img" mode="aspectFit" :src="imgUrl"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-if="data.order_info.receive_type === 1">
|
||||
<view class="item-row flex-sb line-after" v-if="data.order_info.receive_type === 1">
|
||||
<view class="item-row flex-sb line-after" v-if="data.order_info.coupon !== null">
|
||||
<view class="title flex-l">优惠信息</view>
|
||||
<view class="value flex-r">
|
||||
<text>{{data.order_info.online_amount}}元抵扣{{data.order_info.discount_amount}}元</text>
|
||||
<text>{{data.order_info.coupon.threshold}}元抵扣{{data.order_info.coupon.discount_value}}元</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-row flex-sb line-after" v-if="data.offline_total_type !== 0">
|
||||
|
|
@ -182,6 +211,7 @@
|
|||
|
||||
<!-- 完成服务-->
|
||||
<view class="bottom" v-if="data.status === enums.ORDER_DISPATCH_STATUS.STATUS_CLOCK">
|
||||
<me-button @click="updateProgress()" active-color="var(--importantColor)" text="更新施工进度" width="686rpx" custom-icon-color="var(--titleColor)"></me-button>
|
||||
<me-button @click="completeService()" text="完成服务" width="686rpx" icon-type="icon-arrow-right-circle" margin-top="32rpx"></me-button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -198,9 +228,19 @@ import {ref, computed} from 'vue'
|
|||
import api from "../../api/api";
|
||||
import enums from "../../utils/enums";
|
||||
|
||||
const updateProgress = () => {
|
||||
helpers.jumpToPage('update-progress', 'id=' + id.value)
|
||||
}
|
||||
|
||||
//是否可上报异常,未接单和已拒接的无法上报
|
||||
const canReportOrderException = computed(() => {
|
||||
return data.value.status !== enums.ORDER_DISPATCH_STATUS.STATUS_TOGET && data.value.status !== enums.ORDER_DISPATCH_STATUS.STATUS_REFUSED
|
||||
const excludedStatuses = [
|
||||
enums.ORDER_DISPATCH_STATUS.STATUS_TOGET,
|
||||
enums.ORDER_DISPATCH_STATUS.STATUS_REFUSED,
|
||||
enums.ORDER_DISPATCH_STATUS.STATUS_FINISH
|
||||
];
|
||||
|
||||
return !excludedStatuses.includes(data.value.status);
|
||||
})
|
||||
|
||||
const changePlanTime = (time) => {
|
||||
|
|
@ -387,13 +427,13 @@ const getOrderStatusText = (status) => {
|
|||
height: 80rpx;
|
||||
position: relative;
|
||||
.title {
|
||||
width: 200rpx;
|
||||
width: 190rpx;
|
||||
height: 100%;
|
||||
font-size: 30rpx;
|
||||
color: var(--summaryColor);
|
||||
}
|
||||
.value {
|
||||
width: 446rpx;
|
||||
width: 456rpx;
|
||||
height: 100%;
|
||||
font-size: 30rpx;
|
||||
color: var(--titleColor);
|
||||
|
|
|
|||
|
|
@ -4,8 +4,10 @@
|
|||
<picker @change="bindPickerChange" range-key="title" :range="typeList">
|
||||
<view class="item input flex-sb line-after">
|
||||
<view class="title flex-l">异常原因</view>
|
||||
<view v-if="submitData.abnormal_id === 0" class="select-ctr flex-r">请选择异常原因</view>
|
||||
<view v-else class="select-ctr flex-r select">{{typeList[typeListIndex].title}}</view>
|
||||
<view v-if="submitData.abnormal_id === 0" class="select-ctr flex-r">请选择异常原因
|
||||
<me-icon type="icon-arrow-right" color="var(--contentBgColor)" size="56rpx"></me-icon>
|
||||
</view>
|
||||
<view v-else class="select-ctr flex-r select">{{ abnormalTitle }}<me-icon type="icon-arrow-right" color="var(--contentBgColor)" size="56rpx"></me-icon></view>
|
||||
</view>
|
||||
</picker>
|
||||
|
||||
|
|
@ -18,7 +20,7 @@
|
|||
</view>
|
||||
<me-empty-space height="376"></me-empty-space>
|
||||
<view class="bottom">
|
||||
<me-button @click="submit()" text="立即上报" width="686rpx" icon-type="icon-arrow-up-line" margin-top="32rpx"></me-button>
|
||||
<me-button @click="submit()" :text="submitText" width="686rpx" icon-type="icon-arrow-up-line" margin-top="32rpx"></me-button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -28,10 +30,11 @@
|
|||
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 {ref, reactive, computed} from 'vue'
|
||||
import {onLoad} from '@dcloudio/uni-app'
|
||||
import api from "../../api/api";
|
||||
import {throttle} from "../../utils/throttle";
|
||||
import MeIcon from "../../components/me-icon/me-icon.vue";
|
||||
|
||||
const bindPickerChange = (e) => {
|
||||
typeListIndex.value = e.detail.value;
|
||||
|
|
@ -40,6 +43,23 @@ const bindPickerChange = (e) => {
|
|||
|
||||
const typeListIndex = ref(0)
|
||||
|
||||
const abnormalTitle = computed(() => {
|
||||
if (submitData.abnormal_id === 0 || typeList.value === null) {
|
||||
return ''
|
||||
}
|
||||
|
||||
const match = typeList.value.find(item => item.id === submitData.abnormal_id)
|
||||
return match ? match.title : ''
|
||||
})
|
||||
|
||||
const submitText = computed(() => {
|
||||
if (orderInfo.value === null) {
|
||||
return '立即上报'
|
||||
}
|
||||
|
||||
return '再次上报'
|
||||
})
|
||||
|
||||
//提交
|
||||
const submit = throttle(() => {
|
||||
if (!validate()) {
|
||||
|
|
@ -78,7 +98,18 @@ const submit = throttle(() => {
|
|||
});
|
||||
})
|
||||
|
||||
const orderInfo = ref(null)
|
||||
const init = () => {
|
||||
api.orderAbnormalInfo({order_id: orderId.value}).then(res => {
|
||||
if (res.id !== undefined) {
|
||||
orderInfo.value = res
|
||||
submitData.abnormal_id = orderInfo.value.abnormal_id
|
||||
submitData.detail = orderInfo.value.detail
|
||||
}
|
||||
|
||||
helpers.delayHideLoading()
|
||||
}).catch(() => {})
|
||||
|
||||
api.findExceptionTypeList().then(res => {
|
||||
typeList.value = res
|
||||
}).catch(() => {}).finally(() => {
|
||||
|
|
|
|||
163
pages/order/update-progress.vue
Normal file
163
pages/order/update-progress.vue
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
<template>
|
||||
<view class="ctr">
|
||||
<view class="form-group">
|
||||
<view class="item input flex-sb line-after" @click="selectIsFinishToday">
|
||||
<view class="title flex-l">今日完成</view>
|
||||
<view class="select-ctr flex-r select">{{ submitData.is_finish_today === 0 ? '今日不能完工' : '今日能完工'}}<me-icon class="icon" type="icon-arrow-right" color="var(--contentBgColor)" size="56rpx"></me-icon></view>
|
||||
</view>
|
||||
<view :class="[submitData.is_finish_today == 0 ? 'line-after' : '', 'item', 'time']">
|
||||
<view class="item-row flex-sb">
|
||||
<view class="title flex-l">完工时间</view>
|
||||
<uni-datetime-picker v-model="submitData.estimated_finish_time" :start="Date.now()" type="datetime" :hide-second="true">
|
||||
<view class="value flex-r value-empty" v-if="submitData.estimated_finish_time === null">点击选择完工时间</view>
|
||||
<view class="value flex-r" v-else>{{ helpers.removeSeconds(submitData.estimated_finish_time) }}</view>
|
||||
</uni-datetime-picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="textarea" v-if="submitData.is_finish_today == 0">
|
||||
<view class="title flex-l">当前施工进度</view>
|
||||
<view class="value">
|
||||
<textarea maxlength="200" :disable-default-padding="true" class="input-textarea" v-model="submitData.work_progress" placeholder-class="placeholder-class" placeholder="请简要描述当前的施工进度,方便平台知晓服(200字以内)"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<me-empty-space height="376"></me-empty-space>
|
||||
<view class="bottom">
|
||||
<me-button @click="submit()" text="更 新" width="686rpx" icon-type="icon-arrow-up-line" 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, computed} from 'vue'
|
||||
import {onLoad} from '@dcloudio/uni-app'
|
||||
import api from "../../api/api";
|
||||
import {throttle} from "../../utils/throttle";
|
||||
import MeIcon from "../../components/me-icon/me-icon.vue";
|
||||
|
||||
const selectIsFinishToday = () => {
|
||||
uni.showActionSheet({
|
||||
itemList: ['今日不能完工', '今日能完工'],
|
||||
success: function (res) {
|
||||
submitData.is_finish_today = res.tapIndex
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//提交
|
||||
const submit = throttle(() => {
|
||||
if (!validate()) {
|
||||
return false
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
title: '提示信息',
|
||||
confirmText: '确认',
|
||||
content: '确认更新进度?',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.showLoading({
|
||||
title: '提交中'
|
||||
});
|
||||
|
||||
submitData.order_dispatch_id = id.value
|
||||
|
||||
api.updateProgress(submitData).then(() => {
|
||||
helpers.delayHideLoading()
|
||||
uni.showModal({
|
||||
title: '提示信息',
|
||||
showCancel: false,
|
||||
content: '进度已更新',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateBack();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
init()
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
const init = () => {
|
||||
api.orderInfo({order_dispatch_id: id.value}).then(res => {
|
||||
submitData.is_finish_today = res.is_finish_today
|
||||
submitData.estimated_finish_time = res.estimated_finish_time
|
||||
submitData.work_progress = res.work_progress
|
||||
|
||||
helpers.delayHideLoading()
|
||||
}).catch(() => {})
|
||||
}
|
||||
|
||||
const id = ref(null)
|
||||
onLoad((params) => {
|
||||
id.value = params.id
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
})
|
||||
init()
|
||||
})
|
||||
|
||||
//提交数据
|
||||
const submitData = reactive({
|
||||
is_finish_today: 1,
|
||||
estimated_finish_time: null,
|
||||
work_progress: '',
|
||||
})
|
||||
|
||||
//验证提交数据
|
||||
const validate = () => {
|
||||
if (submitData.estimated_finish_time === null) {
|
||||
helpers.showToast('请选择完成时间')
|
||||
return false
|
||||
}
|
||||
|
||||
if (submitData.is_finish_today === 0 && submitData.work_progress === '') {
|
||||
helpers.showToast('请输入当前施工进度')
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ctr {
|
||||
padding: 0 32rpx;
|
||||
box-sizing: border-box;
|
||||
height: 100vh;
|
||||
.bottom {
|
||||
width: 100%;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 68rpx;
|
||||
background: var(--pageBgColor);
|
||||
box-sizing: border-box;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -21,11 +21,12 @@
|
|||
<view class="btn-area flex-c">
|
||||
<view hover-class="auto-mask-layer-radius8" hover-start-time="0" hover-stay-time="50">
|
||||
<button v-show="!isLogin" @click="login()" type="default" class="login flex-c"
|
||||
>微信一键登录</button>
|
||||
>登 录</button>
|
||||
<button v-show="isLogin" open-type="getPhoneNumber" @getphonenumber="bindPhoneNumber" class="login flex-c" type="default"
|
||||
>绑定手机号</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="hint flex-c">该服务仅限超邦手师傅使用</view>
|
||||
</view>
|
||||
<view class="visitor-ctr flex-c">
|
||||
<view class="visitor flex-c" @click="visitor()" hover-class="auto-mask-layer-radius8" hover-start-time="0" hover-stay-time="50">体验一下</view>
|
||||
|
|
@ -187,6 +188,14 @@ page {
|
|||
.login-area {
|
||||
width: 100%;
|
||||
margin-top: 264rpx;
|
||||
.hint {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: var(--descriptionColor);
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
.agreement {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
|
|
|
|||
|
|
@ -30,9 +30,8 @@
|
|||
<view class="address-ctr flex-sb">
|
||||
<view class="left">
|
||||
<view class="detail flex-l" v-if="item.order_info.address !== ''">{{item.order_info.address}}</view>
|
||||
<view class="area flex-l">{{helpers.removeCommas(item.order_info.area.merge_name)}}</view>
|
||||
</view>
|
||||
<view class="right" @click.stop="helpers.openLocation(item.order_info.lat, item.order_info.lng)">
|
||||
<view class="right" v-if="item.status !== enums.ORDER_DISPATCH_STATUS.STATUS_FINISH" @click.stop="helpers.openLocation(item.order_info.lat, item.order_info.lng)">
|
||||
<view class="icon-ctr flex-c">
|
||||
<me-icon type="icon-navigation" color="var(--descriptionColor)" size="60rpx"></me-icon>
|
||||
</view>
|
||||
|
|
@ -53,7 +52,7 @@
|
|||
<view class="name flex-l" v-if="item.order_info.receive_type === 1">上门报价</view>
|
||||
<view class="name flex-l" v-else>平台已收款</view>
|
||||
</view>
|
||||
<view class="right flex-r" @click.stop="helpers.makePhoneCall(item.order_info.tel)">
|
||||
<view v-if="item.status !== enums.ORDER_DISPATCH_STATUS.STATUS_FINISH" class="right flex-r" @click.stop="helpers.makePhoneCall(item.order_info.tel)">
|
||||
<me-icon type="icon-call" color="var(--themeColor)" size="44rpx"></me-icon>
|
||||
<view class="name flex-l">联系客户</view>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
}
|
||||
}
|
||||
.time {
|
||||
position: relative;
|
||||
.item-row {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
|
|
@ -131,7 +132,7 @@
|
|||
min-height: 100rpx;
|
||||
position: relative;
|
||||
.title {
|
||||
width: 200rpx;
|
||||
width: 260rpx;
|
||||
height: 100rpx;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
|
|
@ -156,6 +157,7 @@
|
|||
line-height: 48rpx;
|
||||
padding: 16rpx 0;
|
||||
box-sizing: border-box;
|
||||
margin-right: -20rpx;
|
||||
}
|
||||
.select {
|
||||
color: var(--titleColor);
|
||||
|
|
|
|||
1
svg_icons/copy.svg
Normal file
1
svg_icons/copy.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><defs><clipPath id="master_svg0_4011_4445"><rect x="0" y="0" width="18" height="18" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_4011_4445)"><g><path d="M15.0703,12.625L13.31861,12.625Q13.26937,12.625,13.22107,12.6346Q13.17277,12.6442,13.12727,12.6631Q13.08177,12.6819,13.04083,12.7093Q12.99988,12.7366,12.96506,12.7714Q12.93024,12.8063,12.90288,12.8472Q12.87552,12.8882,12.856670000000001,12.9337Q12.83783,12.9792,12.82822,13.0275Q12.81861,13.0758,12.81861,13.125Q12.81861,13.1742,12.82822,13.2225Q12.83783,13.2708,12.856670000000001,13.3163Q12.87552,13.3618,12.90288,13.4028Q12.93024,13.4437,12.96506,13.4786Q12.99988,13.5134,13.04083,13.5407Q13.08177,13.5681,13.12727,13.5869Q13.17277,13.6058,13.22107,13.6154Q13.26937,13.625,13.31861,13.625L15.0703,13.625Q15.7143,13.625,16.169600000000003,13.1696Q16.625,12.7143,16.625,12.0703L16.625,2.92969Q16.625,2.285715,16.169600000000003,1.8303578Q15.7143,1.375,15.0703,1.375L5.92969,1.375Q5.285715,1.375,4.8303575,1.8303575Q4.375,2.285715,4.375,2.92969L4.375,4.661849999999999Q4.375,4.7111,4.384607,4.75939Q4.394215,4.80769,4.41306,4.85319Q4.431906,4.89869,4.459265,4.93963Q4.486625,4.98058,4.521447,5.0154Q4.556269,5.0502199999999995,4.597215,5.07758Q4.638161,5.10494,4.683658,5.12379Q4.729155,5.1426300000000005,4.7774549,5.15224Q4.8257543,5.161849999999999,4.875,5.161849999999999Q4.9242457,5.161849999999999,4.9725451,5.15224Q5.020845,5.1426300000000005,5.066342,5.12379Q5.111839,5.10494,5.152785,5.07758Q5.193731,5.0502199999999995,5.228553,5.0154Q5.263375,4.98058,5.290735,4.93963Q5.318094,4.89869,5.33694,4.85319Q5.355785,4.80769,5.365393,4.75939Q5.375,4.7111,5.375,4.661849999999999L5.375,2.92969Q5.375,2.375,5.92969,2.375L15.0703,2.375Q15.625,2.375,15.625,2.92969L15.625,12.0703Q15.625,12.625,15.0703,12.625Z" fill-rule="evenodd" fill="#2772F0" fill-opacity="1"/></g><g><path d="M13.625,15.0703L13.625,5.92969Q13.625,5.285715,13.1696,4.8303578Q12.7143,4.375,12.0703,4.375L2.92969,4.375Q2.285715,4.375,1.8303575,4.8303575Q1.375,5.285715,1.375,5.92969L1.375,15.0703Q1.375,15.7143,1.8303574,16.169600000000003Q2.285715,16.625,2.92969,16.625L12.0703,16.625Q12.7143,16.625,13.1696,16.169600000000003Q13.625,15.7143,13.625,15.0703ZM12.0703,5.375Q12.625,5.375,12.625,5.92969L12.625,15.0703Q12.625,15.625,12.0703,15.625L2.92969,15.625Q2.375,15.625,2.375,15.0703L2.375,5.92969Q2.375,5.375,2.92969,5.375L12.0703,5.375Z" fill-rule="evenodd" fill="#2772F0" fill-opacity="1"/></g></g></svg>
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
|
|
@ -33,6 +33,8 @@ class helpers {
|
|||
'user-agreement': '/pages/user/user-agreement',
|
||||
//隐私政策
|
||||
'privacy-policy': '/pages/user/privacy-policy',
|
||||
//更新进度
|
||||
'update-progress': '/pages/order/update-progress',
|
||||
}
|
||||
|
||||
url = paths[pathName]
|
||||
|
|
@ -194,5 +196,24 @@ class helpers {
|
|||
});
|
||||
}
|
||||
|
||||
static copy = (content) => {
|
||||
if (!content) {
|
||||
helpers.showToast('复制的内容不能为空')
|
||||
return
|
||||
}
|
||||
|
||||
// 复制内容,必须字符串,数字需要转换为字符串
|
||||
content = typeof content === 'string' ? content : content.toString()
|
||||
uni.setClipboardData({
|
||||
data: content,
|
||||
success: function() {
|
||||
helpers.showToast('复制成功')
|
||||
},
|
||||
fail:function(){
|
||||
helpers.showToast('复制失败')
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
export default helpers
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user