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

BUG修复

parent 576befe7
......@@ -40,6 +40,10 @@
icon_photo_add:'https://qn-static.banshouhui.com/take_order/icon/photo_add.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获取用户信息(登录)
......
......@@ -62,7 +62,7 @@
{
"path": "pages/take/detail",
"style": {
"navigationBarTitleText": "接单详情"
"navigationBarTitleText": "工单详情"
}
},
......
<template>
<view class="">
<!--view class="topView">
<text class="topTitle">扳手会全国百万师傅为你服务</text>
</view-->
<view class="topIconView">
<image class="topImage" :src="icon_top" mode=""></image>
</view>
<view class="fatDivideLine"></view>
<view class="itemView borderBottom">
<view class="itemTitleView borderBottom">
<text class="itemTitle">联系人</text>
......@@ -76,9 +77,9 @@
</view>
</view>
</view>
<view class="noticeView">
<!--view class="noticeView">
<image class="noticeImage" :src="icon_notice" mode=""></image>
</view>
</view-->
<view class="agreeView">
<image class="agreeIcon" @click="agreeClick(isAgree)" :src="isAgree == true ? icon_agree_yes : icon_agree_no " mode=""></image>
<text class="agreeTitle">我已阅读并同意</text>
......@@ -86,7 +87,9 @@
</view>
<view class="bottomView">
<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>
<!--@click="confirmClick()"-->
<view class="bottomRightView" @click='confirmClick()' >
......@@ -111,8 +114,8 @@
],
activeProduct:'',
serviceTypleList:[
{title:'安装'},{title:'清洗包养'},{title:'维修'},
//,{title:'安装'},{title:'清洗包养'},{title:'维修'}
{title:'安装'},{title:'清洗保养'},{title:'维修'},
//,{title:'安装'},{title:'清洗保养'},{title:'维修'}
],
activeService:'',
demandContent:'',
......@@ -123,7 +126,9 @@
icon_location:'',
icon_notice:'',
icon_agree_yes:'',
icon_agree_no:''
icon_agree_no:'',
icon_top:'',
icon_mine:''
}
},
......@@ -133,6 +138,8 @@
this.icon_notice = getApp().globalData.icon_index_notice
this.icon_agree_yes = getApp().globalData.icon_agree_yes
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 => {
// console.log(data);
......@@ -434,7 +441,10 @@
getSubSubscribeMessage: function (){
let that = this
uni.requestSubscribeMessage({
tmplIds: ['3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU'],
tmplIds: [
'3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU',
'3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU',
'3doUrjIT3-FIfmzsLdBy5MQ5i_q5braPzIbVZRBoEjU'],
success (res) {
console.log('请求订阅信息 成功:')
console.log(res)
......@@ -542,6 +552,28 @@
</script>
<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{
background-color: #FFFFFF;
width: 100%;
......@@ -868,5 +900,25 @@
.grayF3F3{
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>
......@@ -208,7 +208,7 @@
uni.navigateTo({
url: '/pages/take/detail'
+'?orderId='+item.orderId
+'&isFromCreate='+true,
+'&isBottomShow='+false,
})
},
......
......@@ -129,6 +129,7 @@
})
//getApp().globalData.domain_Name
//domain_name
// http://192.168.0.208:8192
uni.request({
url: getApp().globalData.domain_Name
+getApp().globalData.getUsersByCode,
......
......@@ -83,7 +83,7 @@
<text class="contentText u-m-l-20" v-if="orderInfo.guaranteeExplain">{{orderInfo.guaranteeExplain}}</text>
</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()">
<text class="u-font-28 gray66">退单</text>
</view>
......@@ -107,7 +107,7 @@
],
domain_name:'',
bottomTitle:'',
isFromCreate:false,
isBottomShow:true,
showPicker:false,
date: '2019/01/01',
datetime: '2020/12/05 15:00:12',
......@@ -122,8 +122,8 @@
this.orderId = e.orderId
}
if(e && e.isFromCreate){
this.isFromCreate = e.isFromCreate
if(e && e.isBottomShow){
this.isBottomShow = e.isBottomShow
}
......
......@@ -95,7 +95,7 @@
</view>
<view class="textAreaView">
<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>
......@@ -377,12 +377,15 @@
//照片
// && item.fieldValue.length >0
if(
item.fieldsType == 'PHOTOS' &&
item.fieldsValue &&
item.fieldValue.length>0
item.fieldsValue
){
var photoArray = item.fieldValue.split(',')
var photosString = ''
photosString = item.fieldsValue
var photoArray = photosString.split(',')
//var newPhotoArray = []
photoArray.forEach(item => {
......@@ -616,7 +619,7 @@
//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
//getApp().globalData.domain_Name
//
//http://192.168.1.22
//获取 产品型号 数据
getPRODUCT_NUMBERinfo: function () {
uni.request({
......@@ -899,7 +902,7 @@
+/order/+this.orderId
+'/guarantee/image', //仅为示例,非真实的接口地址
filePath: this.photo_tempFilePaths[i],
name: 'file'+i,
name: 'image'+i,
formData: {
//'user': 'test'
},
......@@ -911,7 +914,9 @@
console.log('successCount:'+successCount)
//if(i == (that.photo_tempFilePaths.length-1)){
if (successCount == totalCount){
that.finishConfirm()
//改为先上传照片
//that.finishConfirm()
that.savePhotoValues(uploadFileRes.data)
}
console.log( '第' + i + '张 照片单张上传 成功');
......@@ -929,129 +934,26 @@
}
//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,
},
//保存照片value到配置项里
savePhotoValues: function(photoValue){
for (var i=0;i<this.orderInfo.fieldsItems.length;i++)
{
var item = this.orderInfo.fieldsItems[i]
success: function (uploadFileRes) {
uni.hideLoading();
console.log('照片上传成功')
console.log(uploadFileRes)
that.finishConfirm()
},
fail(e) {
uni.hideLoading();
console.log('照片上传失败:'+e)
uni.showToast({
icon:'none',
title:'照片上传失败'
})
if(item.fieldsType=='PHOTOS'){
item.fieldsValue = photoValue
}
})
*/
/*
//官方仅支持单张上传 循环多张上传
for(let i = 0;i < this.photo_tempFilePaths.length; i++) {
uni.showLoading({
mask: true,
title: '上传中'
});
// if (i>0) {
// deleteIndexs = deleteIndexs + ','+i
// }
//http://system.banshouhui.com/wxh-worker-rest/rest/RTOKEN01d7a2f3de4f86313745d71f2c1be73b8bae7850/order/11885888/guarantee/image
uni.uploadFile({
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()
},
//输入类 事件处理
......@@ -1168,6 +1070,8 @@
confirmClick: function () {
console.log('确认完工 点击')
//this.photoUpload()
this.checkAllRequired()
},
......@@ -1184,11 +1088,27 @@
if(item.required == true){
if(!item.fieldsValue || item.fieldsValue.length==0){
isAllDone = false
uni.showToast({
title:'请填写'+item.fieldsTitle
})
break
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
uni.showToast({
title:'请填写'+item.fieldsTitle
})
break
}
}
}
......@@ -1199,11 +1119,24 @@
return
}
//改为先上传照片 再完工
if(this.photo_tempFilePaths.length>0){
this.photoUpload()
console.log('用户有选图片')
}else{
//处理 数据 上传格式
this.handleAllDataFormatStepOne()
}
//处理 数据 上传格式
this.handleAllDataFormatStepOne()
//this.handleAllDataFormatStepOne()
},
//处理 数据 上传格式 第一步
handleAllDataFormatStepOne: function (){
console.log('处理 数据 上传格式 第一步')
......@@ -1329,11 +1262,12 @@
if(res.statusCode==200){
if(that.photo_tempFilePaths.length>0){
that.photoUpload()
console.log('用户有选图片')
return
}
//改为先上传照片
// if(that.photo_tempFilePaths.length>0){
// that.photoUpload()
// console.log('用户有选图片')
// return
// }
console.log('用户没选图片')
that.finishConfirm()
......@@ -1428,6 +1362,7 @@
})
},
//-------------------------------------------------
/*
getConfig: function () {
console.log('获取 完工配置项')
......
......@@ -255,7 +255,7 @@
method: 'GET',
data: {
pageNumber:0,
pageSize:10,
pageSize:20,
},
success: (res) => {
uni.hideLoading()
......@@ -400,7 +400,8 @@
}else{
uni.navigateTo({
url: '/pages/take/detail'
+'?orderId='+item.orderId,
+'?orderId='+item.orderId
+'$isBottomShow='+false,
})
}
}
......
......@@ -34,9 +34,9 @@
current_measureName:'',
is_mid_show:false,
is_right_show:false,
leftList:[{title:'左左左1'},{title:'左左左很长很长怎么办呢很长很长怎么办呢2'},{title:'左左左3'}],
midList:[{title:'中中中1'},{title:'中中中2'},{title:'中中中很长很长怎么办呢很长很长怎么办呢3'}],
rightList:[{title:'右右右很长很长怎么办呢很长很长怎么办呢1'},{title:'右右右2'},{title:'右右右3'}],
leftList:[],
midList:[],
rightList:[],
}
},
onLoad(e) {
......
......@@ -87,10 +87,32 @@
onShow() {
//this.getOrderDetail()
this.getToken()
},
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) {
/*
......@@ -194,6 +216,9 @@
},
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/check'
//getApp().globalData.checkRobStatus
//检查用户状态
checkUserStatus: function (item) {
console.log('检查用户状态')
......@@ -202,7 +227,8 @@
})
uni.request({
url: getApp().globalData.domain_Name
+getApp().globalData.checkRobStatus,
+'/wxh-worker-rest/rest/order/revision/applets/'
+getApp().globalData.token+'/order/check',
method: 'GET',
data: {
orderId:this.orderId
......@@ -215,9 +241,13 @@
if(res.data.code==200){
this.checkShowModal(res.data.data)
}else{
// uni.showToast({
// icon:'none',
// title:res.data.message
// })
uni.showToast({
icon:'none',
title:res.data.message
title:'检查用户状态失败'
})
......@@ -229,6 +259,10 @@
uni.hideLoading()
console.log('检查用户状态 失败')
console.log(e)
uni.showToast({
icon:'none',
title:'检查用户状态失败'
})
}
})
......@@ -372,15 +406,20 @@
console.log('抢单请求 成功')
console.log(res)
if(res.data.code==200){
if(res.code==200){
uni.showToast({
icon:'none',
title:'抢单成功'
})
uni.navigateBack({})
}else{
// uni.showToast({
// icon:'none',
// title:res.data.message
// })
uni.showToast({
icon:'none',
title:res.data.message
title:res.message
})
......@@ -392,6 +431,10 @@
uni.hideLoading()
console.log('抢单请求 失败')
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