Compare commits

...

2 Commits

Author SHA1 Message Date
Lx
695a51b127 0829 司机端流程修改 2025-08-29 17:17:23 +08:00
Lx
2dd271770b 0829 司机端流程修改 2025-08-29 17:16:19 +08:00
5 changed files with 4063 additions and 1117 deletions

View File

@ -3,7 +3,7 @@ module.exports = {
baseUrl: 'https://www.nuoyunr.com/admin-api',
//baseUrl: 'http://192.168.1.4:48080/admin-api',
imagesUrl: 'http://shequ.0315e.com/static/images/pages/',
baseImageUrl: 'https://www.nuoyunr.com/minio',
baseImageUrl: 'https://www.nuoyunr.com/minio/',
wsUrl: 'ws://122.51.230.86:48080',
//wsUrl: 'wss://192.168.1.4:48080/admin-api',
// 应用信息

View File

@ -102,7 +102,7 @@
<text class="xshui">{{item.rescueTime || ''}}</text>
</view>
<view class="dis-tt" v-if="rescueStatus == 2">
<view class="inanniu" @click="dialogToggle(item.rescueDriverId)">
<view class="inanniu" @click="dialogToggle(item.rescueDriverId, item.id)">
<uni-icons type="checkmarkempty" color="#3CBC6F" size="20"></uni-icons>
<text>接受</text>
</view>
@ -118,7 +118,7 @@
</view>
</view>
<view class="dis-tt" v-if="rescueStatus == 3">
<view class="inanniu" @click="diyshow(item.id)">
<!-- <view class="inanniu" @click="diyshow(item.id)">
<uni-icons type="location" color="#3CBC6F" size="20"></uni-icons>
<text>记录</text>
</view>
@ -131,7 +131,7 @@
@click="diyshow2(item.id)">
<uni-icons type="checkmarkempty" color="#3CBC6F" size="20"></uni-icons>
<text>完成</text>
</view>
</view> -->
<view class="anniua" @click="GOdetails(item.id)">
<view class="shiwuimg">
<image src="../../static/images/cldd.png" mode=""></image>
@ -166,8 +166,8 @@
<u-popup :show="show" mode="center" :round="10" @close="close2" @open="open">
<view class="popup-box">
<view class="p-title">描述</view>
<!-- <view class="p-hui">已经到达救援现场</view> -->
<!-- <view class="wrap-du">
<!-- <view class="p-hui">已经到达救援现场</view>
<view class="wrap-du">
<view class="wrap-div" v-for="(item,index) in dulist " :key="index">
<text>{{item.dictLabel}}</text>
</view>
@ -190,6 +190,29 @@
</view>
</view>
</u-popup>
<u-popup :show="acceptShow" mode="center" :round="10" @close="closeAcceptPopup" @open="open" ref="acceptPopup"
:closeOnClickOverlay="false">
<view class="popup-box">
<view class="p-title">接受订单</view>
<view class="huinput">
<text>车辆里程数: </text>
<u--textarea v-model="remark" placeholder="请输入车辆里程数" border="bottom" autoHeight></u--textarea>
</view>
<view class="p-title">车辆里程表图片</view>
<view class="huinput">
<u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple
:maxCount="5"></u-upload>
</view>
<view class="button-group">
<view class="cancel-button" @click="closeAcceptPopup">
<text>取消</text>
</view>
<view class="qzanniu" @click="getdaodaAccept">
<text>确认</text>
</view>
</view>
</view>
</u-popup>
<u-popup :show="show1" mode="center" :round="10" @close="close" @open="open">
<view class="popup-box">
<view class="p-title">金额</view>
@ -254,7 +277,8 @@
import tabBar from '../../components/tabBar/tabBar.vue'
import upload from '@/utils/upload.js'
import {
getToken
getToken,
getUserInfo
} from '@/utils/auth'
const keepAlivePlugin = uni.requireNativePlugin('Ba-KeepAlive')
const jyJPush = uni.requireNativePlugin('JY-JPush');
@ -278,6 +302,7 @@
fileList1: [],
uesrInfo: {},
show: false,
acceptShow: false,
show1: false,
show2: false,
show3: false,
@ -309,6 +334,7 @@
latitude: '',
tabindex: 0,
rescueId: 0,
rescueInfoId: null,
setMoney: '',
title: 'user',
checkedindex: false,
@ -318,6 +344,7 @@
rescueStatus: 2,
dulist: [],
nowPageInterval: null,
driverInfo: [],
keepLive: {
channelId: 'Ba-KeepAlive',
channelName: "Ba-KeepAlive",
@ -333,6 +360,8 @@
this.$startSocketConnect(uni.getStorageSync('driverInfo'))
this.$startMsgSocket(uni.getStorageSync('userId'))
this.driverInfo = uni.getStorageSync('userinfo')
console.log('name', this.driverInfo.nickname)
// #ifdef APP
this.register()
this.jyPushStart()
@ -673,6 +702,96 @@
},
async getdaodaAccept() {
if (this.images.length === 0) {
uni.showToast({
title: '请上传图片再完成',
icon: 'none'
});
return;
}
try {
uni.showLoading({
title: '提交中...',
mask: true
});
const tempImage = JSON.parse(JSON.stringify(this.images));
const data = {
rescueInfoId: this.rescueInfoId,
title: '司机 ' + this.driverInfo.nickname + ' 已接单,正在赶来的路上',
images: tempImage.join(","),
remark: this.remark,
type: 1,
};
//
const location = await this.getLocationSilently();
if (location) {
data.lng = location.longitude;
data.lat = location.latitude;
}
await this.submitAcceptData(data);
uni.hideLoading();
} catch (error) {
uni.hideLoading();
uni.showToast({
title: '提交失败: ' + (error.message || '未知错误'),
icon: 'none'
});
}
},
async getLocationSilently() {
try {
const res = await uni.getLocation({
isHighAccuracy: true
});
return {
longitude: res.longitude,
latitude: res.latitude
};
} catch (error) {
console.warn('获取位置失败:', error);
return null;
}
},
async submitAcceptData(data) {
try {
const res = await request({
url: '/app/driver/uploadDetailByDriver',
method: 'post',
data: data
});
if (res.code == 200) {
this.resetForm();
uni.showToast({
title: '提交成功'
});
this.acceptShow = false;
this.singleList = [];
await this.driverRescuePage();
} else {
throw new Error(res.msg || '提交失败');
}
} catch (error) {
throw error;
}
},
resetForm() {
this.images = [];
this.remark = '';
this.dictLabel = '请选择类型';
this.dictValue = '';
this.fileList1 = [];
},
diyshow(id) {
this.rescueId = id
this.show = true
@ -778,15 +897,16 @@
})
},
dialogToggle(id) {
dialogToggle(id, rescueInfoId) {
this.id = id
this.rescueInfoId = rescueInfoId;
this.$refs.alertDialog.open()
},
inputDialogToggle(id) {
this.id = id
this.$refs.inputDialog.open()
},
dialogConfirm() {
/* dialogConfirm() {
let data = {
rescueDriverId: this.id,
choose: 1,
@ -801,6 +921,47 @@
this.getthreelist()
})
}, */
dialogConfirm() {
let data = {
rescueDriverId: this.id,
choose: 1,
}
request({
url: '/app/driver/driverAccept',
method: 'post',
params: data
}).then((res) => {
if (res.code == 200) {
//
uni.showToast({
title: '接单成功'
});
//
this.singleList = [];
this.getList();
this.getthreelist();
this.driverRescuePage();
}
})
},
closeAcceptPopup() {
/* if (this.images.length === 0) {
uni.showToast({
title: '请上传现场图片',
icon: 'none'
});
return;
}
this.acceptShow = false; */
//
this.images = [];
this.remark = '';
this.fileList1 = [];
//
this.acceptShow = false;
},
dialogClose() {
@ -822,7 +983,6 @@
this.getList()
this.$refs.inputDialog.close()
this.getthreelist()
})
},
@ -918,7 +1078,7 @@
if (!areNotificationsEnabled) {
uni.showModal({
title: '通知权限开启提醒',
content: '您还没有开启通知权限,无法接到消息通知,是否前往设置?',
content: '您还没有开启通知权限,无法接到消息通知,是否前往设置?',
success: function(res) {
if (res.confirm) {
var Intent = plus.android.importClass('android.content.Intent');
@ -962,7 +1122,7 @@
if (isOn == false) {
uni.showModal({
title: '通知权限开启提醒',
content: '您还没有开启通知权限,无法接到消息通知,是否前往设置?',
content: '您还没有开启通知权限,无法接到消息通知,是否前往设置?',
success: function(res) {
if (res.confirm) {
var app = plus.ios.invoke('UIApplication', 'sharedApplication');
@ -1348,7 +1508,40 @@
margin: 15px auto;
}
.button-group {
display: flex;
justify-content: space-between;
margin-top: 20px;
}
.cancel-button {
width: 45%;
height: 40px;
border-radius: 6px;
background: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
color: #333;
font-size: 16px;
font-weight: 700;
border: 1px solid #ddd;
}
.qzanniu {
width: 45%;
height: 40px;
border-radius: 6px;
background: #0D2E8D;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 16px;
font-weight: 700;
}
/* .qzanniu {
width: 100%;
height: 40px;
border-radius: 6px;
@ -1360,5 +1553,5 @@
color: rgb(255, 255, 255);
font-size: 16px;
font-weight: 700;
}
} */
</style>

View File

@ -37,8 +37,9 @@
<text style="color: red;">*</text>
汇报内容
</view>
<u--textarea v-model="report.reportContent" placeholder="请输入内容"
:disabled="!buttonTitleStatus"></u--textarea>
<!-- <u--textarea v-model="report.reportContent" placeholder="请输入内容"
:disabled="!buttonTitleStatus"></u--textarea> -->
<textarea maxlength="-1" auto-height v-model="report.reportContent" placeholder="请输入内容"></textarea>
<view class="x_"></view>
<view class="d_b" @click="buttonTitleStatus && handleUpload()">
<view class="">附件</view>

View File

@ -157,6 +157,7 @@
},
onShow() {
this.getUserinfo()
console.log('userInfo', this.getUserInfo())
},
components: {
tabBar,

File diff suppressed because it is too large Load Diff