Commit c869735d authored by 和慭琛's avatar 和慭琛

BUG修复

parent 576befe7
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
icon_photo_add:'https://qn-static.banshouhui.com/take_order/icon/photo_add.png', icon_photo_add:'https://qn-static.banshouhui.com/take_order/icon/photo_add.png',
//关闭 图标 //关闭 图标
icon_close:'https://qn-static.banshouhui.com/close.png', icon_close:'https://qn-static.banshouhui.com/close.png',
//顶部 图标
icon_top:'https://qn-static.banshouhui.com/topIcon.png',
//我的 图标
icon_mine:'https://qn-static.banshouhui.com/mine.png',
//登录注册页-- //登录注册页--
//通过code获取用户信息(登录) //通过code获取用户信息(登录)
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
{ {
"path": "pages/take/detail", "path": "pages/take/detail",
"style": { "style": {
"navigationBarTitleText": "接单详情" "navigationBarTitleText": "工单详情"
} }
}, },
......
<template> <template>
<view class=""> <view class="">
<!--view class="topView"> <view class="topIconView">
<text class="topTitle">扳手会全国百万师傅为你服务</text> <image class="topImage" :src="icon_top" mode=""></image>
</view--> </view>
<view class="fatDivideLine"></view>
<view class="itemView borderBottom"> <view class="itemView borderBottom">
<view class="itemTitleView borderBottom"> <view class="itemTitleView borderBottom">
<text class="itemTitle">联系人</text> <text class="itemTitle">联系人</text>
...@@ -76,9 +77,9 @@ ...@@ -76,9 +77,9 @@
</view> </view>
</view> </view>
</view> </view>
<view class="noticeView"> <!--view class="noticeView">
<image class="noticeImage" :src="icon_notice" mode=""></image> <image class="noticeImage" :src="icon_notice" mode=""></image>
</view> </view-->
<view class="agreeView"> <view class="agreeView">
<image class="agreeIcon" @click="agreeClick(isAgree)" :src="isAgree == true ? icon_agree_yes : icon_agree_no " mode=""></image> <image class="agreeIcon" @click="agreeClick(isAgree)" :src="isAgree == true ? icon_agree_yes : icon_agree_no " mode=""></image>
<text class="agreeTitle">我已阅读并同意</text> <text class="agreeTitle">我已阅读并同意</text>
...@@ -86,7 +87,9 @@ ...@@ -86,7 +87,9 @@
</view> </view>
<view class="bottomView"> <view class="bottomView">
<view class="bottomLeftView" @click="recordClick()"> <view class="bottomLeftView" @click="recordClick()">
<text class="u-font-28 Gray666">查看历史订单</text> <!--text class="u-font-28 Gray666">查看历史订单</text-->
<image class="mineIcon" :src="icon_mine" mode=""></image>
<text class="mineText">我的</text>
</view> </view>
<!--@click="confirmClick()"--> <!--@click="confirmClick()"-->
<view class="bottomRightView" @click='confirmClick()' > <view class="bottomRightView" @click='confirmClick()' >
...@@ -111,8 +114,8 @@ ...@@ -111,8 +114,8 @@
], ],
activeProduct:'', activeProduct:'',
serviceTypleList:[ serviceTypleList:[
{title:'安装'},{title:'清洗包养'},{title:'维修'}, {title:'安装'},{title:'清洗保养'},{title:'维修'},
//,{title:'安装'},{title:'清洗包养'},{title:'维修'} //,{title:'安装'},{title:'清洗保养'},{title:'维修'}
], ],
activeService:'', activeService:'',
demandContent:'', demandContent:'',
...@@ -123,7 +126,9 @@ ...@@ -123,7 +126,9 @@
icon_location:'', icon_location:'',
icon_notice:'', icon_notice:'',
icon_agree_yes:'', icon_agree_yes:'',
icon_agree_no:'' icon_agree_no:'',
icon_top:'',
icon_mine:''
} }
}, },
...@@ -133,6 +138,8 @@ ...@@ -133,6 +138,8 @@
this.icon_notice = getApp().globalData.icon_index_notice this.icon_notice = getApp().globalData.icon_index_notice
this.icon_agree_yes = getApp().globalData.icon_agree_yes this.icon_agree_yes = getApp().globalData.icon_agree_yes
this.icon_agree_no = getApp().globalData.icon_agree_no this.icon_agree_no = getApp().globalData.icon_agree_no
this.icon_top = getApp().globalData.icon_top
this.icon_mine = getApp().globalData.icon_mine
// getworkertype('parameter').then(data => { // getworkertype('parameter').then(data => {
// console.log(data); // console.log(data);
...@@ -434,7 +441,10 @@ ...@@ -434,7 +441,10 @@
getSubSubscribeMessage: function (){ getSubSubscribeMessage: function (){
let that = this let that = this
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: ['3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU'], tmplIds: [
'3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU',
'3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU',
'3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU'],
success (res) { success (res) {
console.log('请求订阅信息 成功:') console.log('请求订阅信息 成功:')
console.log(res) console.log(res)
...@@ -542,6 +552,28 @@ ...@@ -542,6 +552,28 @@
</script> </script>
<style> <style>
.topIconView{
background-color: #FFFFFF;
width: 100%;
height: 88rpx;
display: flex;
align-items: center;
justify-content: center;
}
.topImage{
background-color: #FFFFFF;
width: 690rpx;
height: 34rpx;
}
.fatDivideLine{
background-color: #FAFAFA;
width: 100%;
height: 16rpx;
}
.topView{ .topView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 100%;
...@@ -869,4 +901,24 @@ ...@@ -869,4 +901,24 @@
color: #F3F3F3; color: #F3F3F3;
} }
.mineIcon{
background-color: #FAFAFA;
width: 16rpx;
height: 14rpx;
}
.mineText{
color: #666666;
font-size: 28rpx;
margin-left: 12rpx;
}
.coverListView{
background-color: #007AFF;
width: 244rpx;
height: 168rpx;
}
</style> </style>
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail' url: '/pages/take/detail'
+'?orderId='+item.orderId +'?orderId='+item.orderId
+'&isFromCreate='+true, +'&isBottomShow='+false,
}) })
}, },
......
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
}) })
//getApp().globalData.domain_Name //getApp().globalData.domain_Name
//domain_name //domain_name
// http://192.168.0.208:8192
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+getApp().globalData.getUsersByCode, +getApp().globalData.getUsersByCode,
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<text class="contentText u-m-l-20" v-if="orderInfo.guaranteeExplain">{{orderInfo.guaranteeExplain}}</text> <text class="contentText u-m-l-20" v-if="orderInfo.guaranteeExplain">{{orderInfo.guaranteeExplain}}</text>
</view> </view>
</view> </view>
<view class="bottomView" v-if="orderInfo.statusText != '已完工' && isFromCreate == false"> <view class="bottomView" v-if="orderInfo.statusText != '已完工' && isBottomShow == true">
<view class="bottomLeftView" @click="cancelClick()"> <view class="bottomLeftView" @click="cancelClick()">
<text class="u-font-28 gray66">退单</text> <text class="u-font-28 gray66">退单</text>
</view> </view>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
], ],
domain_name:'', domain_name:'',
bottomTitle:'', bottomTitle:'',
isFromCreate:false, isBottomShow:true,
showPicker:false, showPicker:false,
date: '2019/01/01', date: '2019/01/01',
datetime: '2020/12/05 15:00:12', datetime: '2020/12/05 15:00:12',
...@@ -122,8 +122,8 @@ ...@@ -122,8 +122,8 @@
this.orderId = e.orderId this.orderId = e.orderId
} }
if(e && e.isFromCreate){ if(e && e.isBottomShow){
this.isFromCreate = e.isFromCreate this.isBottomShow = e.isBottomShow
} }
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
</view> </view>
<view class="textAreaView"> <view class="textAreaView">
<view class="textAreaBoxView"> <view class="textAreaBoxView">
<textarea class="textArea" @confirm="textAreaInput" maxlength="500" v-model="demandContent" value="" :placeholder="'请输入'+item.fieldsTitle" placeholder-style='color:#CCCCCC;font-size:28rpx;' /> <textarea class="textArea" @input="inputTypeInput($event,item,ikey)" @confirm="textAreaInput" maxlength="500" v-model="demandContent" value="" :placeholder="'请输入'+item.fieldsTitle" placeholder-style='color:#CCCCCC;font-size:28rpx;' />
</view> </view>
</view> </view>
...@@ -377,12 +377,15 @@ ...@@ -377,12 +377,15 @@
//照片 //照片
// && item.fieldValue.length >0
if( if(
item.fieldsType == 'PHOTOS' && item.fieldsType == 'PHOTOS' &&
item.fieldsValue && item.fieldsValue
item.fieldValue.length>0
){ ){
var photoArray = item.fieldValue.split(',')
var photosString = ''
photosString = item.fieldsValue
var photoArray = photosString.split(',')
//var newPhotoArray = [] //var newPhotoArray = []
photoArray.forEach(item => { photoArray.forEach(item => {
...@@ -616,7 +619,7 @@ ...@@ -616,7 +619,7 @@
//http://system.banshouhui.com/wxh-sts-rest/rest/productinfo/category/88/brand/320/product //http://system.banshouhui.com/wxh-sts-rest/rest/productinfo/category/88/brand/320/product
//http://192.168.1.22/wxh-sts-rest/rest/productinfo/category/88/brand/3897/product //http://192.168.1.22/wxh-sts-rest/rest/productinfo/category/88/brand/3897/product
//getApp().globalData.domain_Name //getApp().globalData.domain_Name
// //http://192.168.1.22
//获取 产品型号 数据 //获取 产品型号 数据
getPRODUCT_NUMBERinfo: function () { getPRODUCT_NUMBERinfo: function () {
uni.request({ uni.request({
...@@ -899,7 +902,7 @@ ...@@ -899,7 +902,7 @@
+/order/+this.orderId +/order/+this.orderId
+'/guarantee/image', //仅为示例,非真实的接口地址 +'/guarantee/image', //仅为示例,非真实的接口地址
filePath: this.photo_tempFilePaths[i], filePath: this.photo_tempFilePaths[i],
name: 'file'+i, name: 'image'+i,
formData: { formData: {
//'user': 'test' //'user': 'test'
}, },
...@@ -911,7 +914,9 @@ ...@@ -911,7 +914,9 @@
console.log('successCount:'+successCount) console.log('successCount:'+successCount)
//if(i == (that.photo_tempFilePaths.length-1)){ //if(i == (that.photo_tempFilePaths.length-1)){
if (successCount == totalCount){ if (successCount == totalCount){
that.finishConfirm() //改为先上传照片
//that.finishConfirm()
that.savePhotoValues(uploadFileRes.data)
} }
console.log( '第' + i + '张 照片单张上传 成功'); console.log( '第' + i + '张 照片单张上传 成功');
...@@ -929,131 +934,28 @@ ...@@ -929,131 +934,28 @@
} }
//await that.finishConfirm()
/*
uni.chooseImage({
success: (chooseImageRes) => {
const tempFilePaths = chooseImageRes.tempFilePaths;
for(let i = 0;i < tempFilePaths.length; i++) {
uni.uploadFile({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'+getApp().globalData.token
+/order/+this.orderId
+'/guarantee/image', //仅为示例,非真实的接口地址
filePath: tempFilePaths[i],
name: 'file'+i,
formData: {
//'user': 'test'
}, },
success: (uploadFileRes) => {
if(i == photoNumber-1){
that.finishConfirm()
}
console.log('照片单张上传 成功');
console.log(uploadFileRes.data);
},fail() {
console.log('照片单张上传 失败');
}
});
}
}
})
*/
/*
//单次多张上传 微信不支持
uni.uploadFile({
url : getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'+getApp().globalData.token
+/order/+this.orderId
+'/guarantee/image',
files:this.photo_tempFilePaths,
success: function (uploadFileRes) {
uni.hideLoading();
console.log('照片上传成功')
console.log(uploadFileRes)
that.finishConfirm()
},
fail(e) {
uni.hideLoading();
console.log('照片上传失败:'+e)
uni.showToast({
icon:'none',
title:'照片上传失败'
})
}
})
*/
/*
//官方仅支持单张上传 循环多张上传
for(let i = 0;i < this.photo_tempFilePaths.length; i++) {
uni.showLoading({
mask: true,
title: '上传中'
});
// if (i>0) {
// deleteIndexs = deleteIndexs + ','+i
// }
//保存照片value到配置项里
savePhotoValues: function(photoValue){
for (var i=0;i<this.orderInfo.fieldsItems.length;i++)
{
var item = this.orderInfo.fieldsItems[i]
//http://system.banshouhui.com/wxh-worker-rest/rest/RTOKEN01d7a2f3de4f86313745d71f2c1be73b8bae7850/order/11885888/guarantee/image if(item.fieldsType=='PHOTOS'){
uni.uploadFile({ item.fieldsValue = photoValue
url : getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'+getApp().globalData.token
+/order/+this.orderId
+'/guarantee/image',
filePath: this.photo_tempFilePaths[i],
name: 'image'+i,
formData: {
//deleteIndexs :i
//deleteIndexs = "0,1,2";
//'qiniutoken': resToken.data.token
},
success: function (uploadFileRes) {
uni.hideLoading();
console.log('照片上传成功')
console.log(uploadFileRes)
console.log('photoNumber:'+photoNumber)
console.log('i:'+i)
if(i == photoNumber-1){
that.finishConfirm()
} }
// let upRes = JSON.parse(uploadFileRes.data);
// var photo = {
// image:upRes.data.fullurl,
// }
// that.photoList.push(photo)
},
fail(e) {
uni.hideLoading();
console.log('照片上传失败:'+e)
uni.showToast({
icon:'none',
title:'照片上传失败'
})
} }
});
} //处理 数据 上传格式
this.handleAllDataFormatStepOne()
*/
}, },
//输入类 事件处理 //输入类 事件处理
inputTypeInput: function (e,item,ikey) { inputTypeInput: function (e,item,ikey) {
console.log('更新的选项:') console.log('更新的选项:')
...@@ -1168,6 +1070,8 @@ ...@@ -1168,6 +1070,8 @@
confirmClick: function () { confirmClick: function () {
console.log('确认完工 点击') console.log('确认完工 点击')
//this.photoUpload()
this.checkAllRequired() this.checkAllRequired()
}, },
...@@ -1184,12 +1088,28 @@ ...@@ -1184,12 +1088,28 @@
if(item.required == true){ if(item.required == true){
if(!item.fieldsValue || item.fieldsValue.length==0){ if(!item.fieldsValue || item.fieldsValue.length==0){
if(item.fieldsType=='PHOTOS'){
if(this.photo_tempFilePaths.length==0){
isAllDone = false
uni.showToast({
title:'请选择'+item.fieldsTitle
})
console.log('照片必填 没选照片')
break
}else{
console.log('照片必填 有选照片')
item.fieldsValue = '{}'
}
}else{
isAllDone = false isAllDone = false
uni.showToast({ uni.showToast({
title:'请填写'+item.fieldsTitle title:'请填写'+item.fieldsTitle
}) })
break break
} }
}
} }
...@@ -1199,11 +1119,24 @@ ...@@ -1199,11 +1119,24 @@
return return
} }
//改为先上传照片 再完工
if(this.photo_tempFilePaths.length>0){
this.photoUpload()
console.log('用户有选图片')
}else{
//处理 数据 上传格式 //处理 数据 上传格式
this.handleAllDataFormatStepOne() this.handleAllDataFormatStepOne()
}
//处理 数据 上传格式
//this.handleAllDataFormatStepOne()
}, },
//处理 数据 上传格式 第一步 //处理 数据 上传格式 第一步
handleAllDataFormatStepOne: function (){ handleAllDataFormatStepOne: function (){
console.log('处理 数据 上传格式 第一步') console.log('处理 数据 上传格式 第一步')
...@@ -1329,11 +1262,12 @@ ...@@ -1329,11 +1262,12 @@
if(res.statusCode==200){ if(res.statusCode==200){
if(that.photo_tempFilePaths.length>0){ //改为先上传照片
that.photoUpload() // if(that.photo_tempFilePaths.length>0){
console.log('用户有选图片') // that.photoUpload()
return // console.log('用户有选图片')
} // return
// }
console.log('用户没选图片') console.log('用户没选图片')
that.finishConfirm() that.finishConfirm()
...@@ -1428,6 +1362,7 @@ ...@@ -1428,6 +1362,7 @@
}) })
}, },
//-------------------------------------------------
/* /*
getConfig: function () { getConfig: function () {
console.log('获取 完工配置项') console.log('获取 完工配置项')
......
...@@ -255,7 +255,7 @@ ...@@ -255,7 +255,7 @@
method: 'GET', method: 'GET',
data: { data: {
pageNumber:0, pageNumber:0,
pageSize:10, pageSize:20,
}, },
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading()
...@@ -400,7 +400,8 @@ ...@@ -400,7 +400,8 @@
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail' url: '/pages/take/detail'
+'?orderId='+item.orderId, +'?orderId='+item.orderId
+'$isBottomShow='+false,
}) })
} }
} }
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
current_measureName:'', current_measureName:'',
is_mid_show:false, is_mid_show:false,
is_right_show:false, is_right_show:false,
leftList:[{title:'左左左1'},{title:'左左左很长很长怎么办呢很长很长怎么办呢2'},{title:'左左左3'}], leftList:[],
midList:[{title:'中中中1'},{title:'中中中2'},{title:'中中中很长很长怎么办呢很长很长怎么办呢3'}], midList:[],
rightList:[{title:'右右右很长很长怎么办呢很长很长怎么办呢1'},{title:'右右右2'},{title:'右右右3'}], rightList:[],
} }
}, },
onLoad(e) { onLoad(e) {
......
...@@ -87,10 +87,32 @@ ...@@ -87,10 +87,32 @@
onShow() { onShow() {
//this.getOrderDetail() //this.getOrderDetail()
this.getToken()
}, },
methods: { methods: {
async getToken () {
let that = this
await uni.getStorage({
key: 'token',
success: function (res) {
console.log('抢单页面 本地获取token成功')
console.log(res.data);
getApp().globalData.token = res.data
//that.getData()
},
fail() {
uni.navigateTo({
url:'/pages/login/wxlogin'
})
}
})
//await this.getData()
},
getTopInfo: function (e) { getTopInfo: function (e) {
/* /*
...@@ -194,6 +216,9 @@ ...@@ -194,6 +216,9 @@
}, },
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/check'
//getApp().globalData.checkRobStatus
//检查用户状态 //检查用户状态
checkUserStatus: function (item) { checkUserStatus: function (item) {
console.log('检查用户状态') console.log('检查用户状态')
...@@ -202,7 +227,8 @@ ...@@ -202,7 +227,8 @@
}) })
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+getApp().globalData.checkRobStatus, +'/wxh-worker-rest/rest/order/revision/applets/'
+getApp().globalData.token+'/order/check',
method: 'GET', method: 'GET',
data: { data: {
orderId:this.orderId orderId:this.orderId
...@@ -215,9 +241,13 @@ ...@@ -215,9 +241,13 @@
if(res.data.code==200){ if(res.data.code==200){
this.checkShowModal(res.data.data) this.checkShowModal(res.data.data)
}else{ }else{
// uni.showToast({
// icon:'none',
// title:res.data.message
// })
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title:res.data.message title:'检查用户状态失败'
}) })
...@@ -229,6 +259,10 @@ ...@@ -229,6 +259,10 @@
uni.hideLoading() uni.hideLoading()
console.log('检查用户状态 失败') console.log('检查用户状态 失败')
console.log(e) console.log(e)
uni.showToast({
icon:'none',
title:'检查用户状态失败'
})
} }
}) })
...@@ -372,15 +406,20 @@ ...@@ -372,15 +406,20 @@
console.log('抢单请求 成功') console.log('抢单请求 成功')
console.log(res) console.log(res)
if(res.data.code==200){ if(res.code==200){
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title:'抢单成功' title:'抢单成功'
}) })
uni.navigateBack({})
}else{ }else{
// uni.showToast({
// icon:'none',
// title:res.data.message
// })
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title:res.data.message title:res.message
}) })
...@@ -392,6 +431,10 @@ ...@@ -392,6 +431,10 @@
uni.hideLoading() uni.hideLoading()
console.log('抢单请求 失败') console.log('抢单请求 失败')
console.log(e) console.log(e)
uni.showToast({
icon:'none',
title:'抢单请求失败'
})
} }
}) })
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment