Commit c3d7da9c authored by 李俊赕's avatar 李俊赕

edit-gitignore

parents 8f91adc3 7079ba13
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
icon_noData:'https://qn-static.banshouhui.com/empty.png', icon_noData:'https://qn-static.banshouhui.com/empty.png',
//抢单 图标 //抢单 图标
icon_rob:'https://qn-static.banshouhui.com/take_order/icon/rob.png', icon_rob:'https://qn-static.banshouhui.com/take_order/icon/rob.png',
//右箭头 图标
icon_arrow_right:'https://qn-static.banshouhui.com/arrow_right.png',
//登录注册页-- //登录注册页--
//通过code获取用户信息(登录) //通过code获取用户信息(登录)
......
...@@ -14,13 +14,19 @@ ...@@ -14,13 +14,19 @@
}, },
{ {
"path": "pages/take/detail", "path": "pages/take/finish",
"style": { "style": {
"navigationBarTitleText": "接单详情" "navigationBarTitleText": "完工信息"
} }
}, },
{
"path": "pages/take/detail",
"style": {
"navigationBarTitleText": "接单详情"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
...@@ -62,15 +68,7 @@ ...@@ -62,15 +68,7 @@
"navigationBarTitleText": "授权登录" "navigationBarTitleText": "授权登录"
} }
},
{
"path": "pages/take/finish",
"style": {
"navigationBarTitleText": "完工信息"
} }
}
], ],
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,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.status != '已完工'"> <view class="bottomView" v-if="orderInfo.statusText != '已完工'">
<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>
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
export default { export default {
data() { data() {
return { return {
orderId:'',
orderInfo:{}, orderInfo:{},
photoList:[ photoList:[
{image:''},{image:''},{image:''},{image:''}, {image:''},{image:''},{image:''},{image:''},
...@@ -110,6 +111,7 @@ ...@@ -110,6 +111,7 @@
if(e && e.orderId){ if(e && e.orderId){
this.orderId = e.orderId this.orderId = e.orderId
} }
this.domain_name = getApp().globalData.domain_Name this.domain_name = getApp().globalData.domain_Name
//this.orderId = '10704466' //this.orderId = '10704466'
//getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0' //getApp().globalData.token = 'RTOKENc9496ce49b2dc61bbae67968979af4f19e0dfad0'
...@@ -176,11 +178,62 @@ ...@@ -176,11 +178,62 @@
cancelClick: function () { cancelClick: function () {
console.log('退单点击') console.log('退单点击')
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'
+getApp().globalData.token
+'/order/'+this.orderId+'/workerReject',
method: 'POST',
data: {
rejectReason:'不想接单了',
remark:'不想接单了'
},
header:{
'Content-Type': 'application/x-www-form-urlencoded'
},
success: (res) => {
console.log('退单 成功')
console.log(res)
if(res.data.code==200){
uni.showToast({
title:'退单成功',
})
uni.navigateBack({
})
}else{
uni.showToast({
title:res.data.message
})
}
},
fail: (e) => {
console.log('退单 失败')
console.log(e)
uni.showToast({
title:'退单失败',
})
}
})
}, },
finishClick: function () { finishClick: function () {
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/finish' url: '/pages/take/finish'
+'?orderId='+this.orderId
+'&inGuaranteePeriod='+this.orderInfo.inGuaranteePeriod
+'&contactName='+this.orderInfo.contactName
+'&contactMobilephone='+this.orderInfo.contactMobilephone
+'&contactAddress='+this.orderInfo.contactAddress
+'&inGuaranteePeriodText='+this.orderInfo.inGuaranteePeriodText
+'&orderServiceType='+this.orderInfo.orderServiceType,
}) })
}, },
......
<template> <template>
<view class=""> <view class="backView">
<view class="topView"> <view class="topView u-p-b-30">
<view class="nameView"> <view class="itemView u-m-t-30">
<text class="u-font-24 u-m-l-24">联系人:{{orderInfo.name}}</text> <text class="titleText u-m-l-30">联系人:</text>
<text class="u-font-24 u-m-l-24 underLine" @click="phoneCallClick(orderInfo.phone)">{{orderInfo.phone}}</text> <text class="contentText u-m-l-20" v-if="contactName">{{contactName}}</text>
<text class="contentText u-m-l-20 underLine" v-if="contactMobilephone">{{contactMobilephone}}</text>
</view> </view>
<text class="u-font-24 u-m-l-24 u-m-t-24">地址:{{orderInfo.address}}</text> <view class="itemView u-m-t-30">
<view class="typeView"> <text class="titleText u-m-l-30">地址:</text>
<text class="u-font-24 u-m-l-24">类型:({{orderInfo.guard}}) {{orderInfo.type}}</text> <text class="contentText u-m-l-20" v-if="contactAddress">{{contactAddress}}</text>
<text class="u-font-24 u-m-r-24">产品:{{orderInfo.product}}</text>
</view> </view>
<view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">类型:</text>
<text class="contentText u-m-l-20" v-if="inGuaranteePeriodText">({{inGuaranteePeriodText}}) {{orderServiceType}}</text>
</view> </view>
<template v-for="(item,ikey) in orderInfo.typeList">
<view class="clickTypeView" v-if="item.type=='click' || item.type=='scan'" @click="clickTypeClick(item)">
<text class="u-font-24 u-m-l-24">{{item.title}}</text>
<image class="arrowIcon u-m-r-24" src="" mode=""></image>
</view> </view>
<view class="inputTypeView" v-if="item.type=='photo'"> <view class="padding_bottom_180">
<text class="u-font-24 u-m-l-24">{{item.title}}</text> <template v-for="(item,ikey) in orderInfo.fieldsItems">
<input class="input u-m-r-24" type="text" value="" placeholder="请输入内容" /> <view class="clickTypeView"
v-if="
item.fieldsType=='SPECIFICATIONS' ||
item.fieldsType=='PRODUCT_NUMBER' ||
item.fieldsType=='MACHINE_CODE' ||
item.fieldsType=='DATE' ||
item.fieldsType=='SERVICE_MEASURES' ||
item.fieldsType=='WEBPAGE' ||
item.fieldsType=='RADIO' ||
item.fieldsType=='CHECKBOX' ||
item.fieldsType=='RADIO_BIG' ||
item.fieldsType=='CHECKBOX_BIG'
" @click="clickTypeClick(item)">
<view class="itemTitleView borderBottom">
<text class="itemTitle bold">{{item.fieldsTitle}}</text>
<text class="itemRedStar" v-if="item.required">*</text>
</view> </view>
<view class="photoTypeView" v-if="item.type=='photo'"> <view class="clickRightView">
<text class="u-font-24 u-m-l-24 u-m-t-24">{{item.title}}</text> <image class="arrowIcon u-m-r-30" :src="icon_arrow_right" mode=""></image>
<view class="photoBackView u-p-b-24" v-if="item.images.length>0"> <text class="clickContent" v-if="item.fieldsValue">{{item.fieldsValue}}</text>
<view class="photoItemView" @click="photoClick(item)" v-for="(item,ikey) in item.images":key="ikey"> </view>
</view>
<view class="inputTypeView"
v-if="
item.fieldsType=='INTEGER' ||
item.fieldsType=='DECIMAL' ||
item.fieldsType=='DOUBLE' ||
item.fieldsType=='STRING' ||
item.fieldsType=='FILE' ||
item.fieldsType=='ICN'
">
<view class="itemTitleView borderBottom">
<text class="itemTitle bold">{{item.fieldsTitle}}</text>
<text class="itemRedStar" v-if="item.required">*</text>
</view>
<input class="input u-m-r-30" type="text" value="" :placeholder="'请输入'+item.fieldsTitle" />
</view>
<view class="photoTypeView"
v-if="item.fieldsType=='PHOTOS'
">
<view class="itemTitleView borderBottom">
<text class="itemTitle bold">{{item.fieldsTitle}}</text>
<text class="itemRedStar" v-if="item.required">*</text>
</view>
<view class="photoBackView u-p-b-30" v-if="item.fieldsValue">
<view class="photoItemView" @click="photoClick(item)" v-for="(item,ikey) in item.fieldsValue":key="ikey">
<image class="photoImage" :src="item.image" mode="aspectFill"></image> <image class="photoImage" :src="item.image" mode="aspectFill"></image>
</view> </view>
</view> </view>
</view> </view>
<view class="textAreaTypeView bottomPadding" v-if="item.type=='textArea'"> <view class="textAreaTypeView"
<text class="u-font-24 u-m-l-24 u-m-t-24">{{item.title}}</text> v-if="
item.fieldsType=='TEXT'
">
<view class="itemTitleView borderBottom">
<text class="itemTitle bold">{{item.fieldsTitle}}</text>
<text class="itemRedStar" v-if="item.required">*</text>
</view>
<view class="textAreaView"> <view class="textAreaView">
<textarea class="textArea u-m-l-24 u-m-r-24 u-m-t-24 u-m-b-24" value="" placeholder="请输入备注" /> <view class="textAreaBoxView">
<textarea class="textArea" v-model="demandContent" value="" placeholder="请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等" placeholder-style='color:#CCCCCC;font-size:28rpx;' />
</view>
</view> </view>
</view> </view>
</template> </template>
</view>
<view class="bottomView" @click="confirmClick()"> <view class="bottomView" @click="confirmClick()">
<text class="bottomTitle">确认完工</text> <text class="bottomTitle">确认完工</text>
</view> </view>
...@@ -46,41 +95,78 @@ ...@@ -46,41 +95,78 @@
export default { export default {
data() { data() {
return { return {
icon_arrow_right:'',
orderId:'', orderId:'',
inGuaranteePeriod:false, inGuaranteePeriod:false,
orderInfo:{ contactName:'',
name:'梵护博', contactMobilephone:'',
phone:'15811112222', contactAddress:'',
address:'广东省深圳市宝安区新安街道庭威产业园10C', inGuaranteePeriodText:'',
guard:'保内', orderServiceType:'',
type:'维修-调试', orderInfo:{},
product:'小米 新风机',
typeList:[
{title:'产品规格',type:'click'},
{title:'购买日期',type:'click'},
{title:'机身条码',type:'scan'},
{title:'照片',type:'photo',images:[{image:'111'},{image:'222'},{image:'333'},{image:'444'}]},
{title:'备注',type:'textArea'},
{title:'长度',type:'textField'},
]
},
} }
}, },
onLoad(e) { onLoad(e) {
this.orderId = '10704466'
this.inGuaranteePeriod = false this.getTopInfo(e)
this.getConfig() this.getConfig()
this.getCompletionConfigInfo() this.getCompletionConfigInfo()
}, },
methods: { methods: {
getTopInfo: function (e) {
this.icon_arrow_right = getApp().globalData.icon_arrow_right
if(e && e.orderId){
this.orderId = e.orderId
}
if(e && e.inGuaranteePeriod){
this.inGuaranteePeriod = e.inGuaranteePeriod
}
if(e && e.contactName){
this.contactName = e.contactName
}
if(e && e.contactMobilephone){
this.contactMobilephone = e.contactMobilephone
}
if(e && e.contactAddress){
this.contactAddress = e.contactAddress
}
if(e && e.inGuaranteePeriodText){
this.inGuaranteePeriodText = e.inGuaranteePeriodText
}
if(e && e.orderServiceType){
this.orderServiceType = e.orderServiceType
}
//测试
/*
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this.orderId = '10704464'
this.inGuaranteePeriod = true
this.contactName = '小青一号'
this.contactMobilephone = '123123123123'
this.contactAddress = '广东省深圳市宝安区创业一路'
this.inGuaranteePeriodText = '保内'
this.orderServiceType = '维修'
*/
},
getConfig: function () { getConfig: function () {
console.log('获取 完工配置项') console.log('获取 完工配置项')
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/config/' +'/wxh-worker-rest/rest/config/'
+'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +getApp().globalData.token
+'/completion/'+this.orderId +'/completion/'+this.orderId
+'?inGuaranteePeriod='+this.inGuaranteePeriod, +'?inGuaranteePeriod='+this.inGuaranteePeriod,
method: 'GET', method: 'GET',
...@@ -116,11 +202,13 @@ ...@@ -116,11 +202,13 @@
//获取完工页详情 //获取完工页详情
getCompletionConfigInfo: function () { getCompletionConfigInfo: function () {
//http://system.banshouhui.com/wxh-sts-rest/rest/worker/RTOKEN222bdab78b0d2a74f159b640df53180772813250/order/11885887?withMaintainDetailInfo=true&completionConfigInfo=true uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/config/' +'/wxh-worker-rest/rest/config/'
+'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +getApp().globalData.token
+'/completion/'+this.orderId +'/completion/'+this.orderId
+'?inGuaranteePeriod='+this.inGuaranteePeriod, +'?inGuaranteePeriod='+this.inGuaranteePeriod,
method: 'GET', method: 'GET',
...@@ -131,10 +219,12 @@ ...@@ -131,10 +219,12 @@
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
}, },
success: (res) => { success: (res) => {
uni.hideLoading()
console.log('获取完工页详情 成功') console.log('获取完工页详情 成功')
console.log(res) console.log(res)
if(res.data.code==200){ if(res.data.code==200){
this.adjustData(res)
}else{ }else{
uni.showToast({ uni.showToast({
...@@ -147,12 +237,35 @@ ...@@ -147,12 +237,35 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
console.log('获取完工页详情 失败') console.log('获取完工页详情 失败')
console.log(e) console.log(e)
} }
}) })
}, },
//数据处理
adjustData: function (res) {
res.data.data.fieldsItems.forEach(item => {
//照片
if(item.fieldsType == 'PHOTOS'){
console.log('处理前 的 照片数组:')
console.log(item.fieldsValue)
var photoList = [{image:'111'},{image:'222'},{image:'333'},{image:'444'}]
item.fieldsValue = photoList
console.log('处理后 的 照片数组:')
console.log(item.fieldsValue)
}
})
this.orderInfo = res.data.data
},
clickTypeClick: function (item) { clickTypeClick: function (item) {
console.log('点击类 点击') console.log('点击类 点击')
console.log(item.title) console.log(item.title)
...@@ -213,7 +326,7 @@ ...@@ -213,7 +326,7 @@
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/' +'/wxh-worker-rest/rest/'
+'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +getApp().globalData.token
+'/order/'+this.orderId +'/order/'+this.orderId
+'/maintain', +'/maintain',
method: 'POST', method: 'POST',
...@@ -269,7 +382,7 @@ ...@@ -269,7 +382,7 @@
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/' +'/wxh-worker-rest/rest/'
+'RTOKEN52e603131ae93ac83ac0b3628064822690ee4de0' +getApp().globalData.token
+'/order/'+this.orderId +'/order/'+this.orderId
+'/finishedAndConfirm', +'/finishedAndConfirm',
method: 'POST', method: 'POST',
...@@ -315,71 +428,111 @@ ...@@ -315,71 +428,111 @@
</script> </script>
<style> <style>
.topView{ .backView{
background-color: #FFFFFF; background-color: #FAFAFA;
position: absolute;
top: 0;
left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-bottom: 2rpx solid #999999;
} }
.nameView{ .topView{
background-color: #FFFFFF;
width: 100%; width: 100%;
margin-top: 24rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: column;
align-items: center; }
.titleText{
color: #333333;
font-size: 28rpx;
font-weight: bold;
} }
.underLine{ .contentText{
text-decoration:underline; color: #333333;
font-size: 28rpx;
} }
.bottomPadding{ .underLine{
padding-bottom: 144rpx; text-decoration:underline;
} }
.typeView{ .clickTypeView{
background-color: #FFFFFF;
width: 100%; width: 100%;
height: 80rpx; height: 88rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border: 2rpx solid #FAFAFA;
} }
.bottomView{ .itemTitleView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 30%;
height: 110rpx; height: 88rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: center;
border-top: 2rpx solid #999999;
position: fixed;
bottom: 0;
} }
.bottomTitle{ .itemTitle {
font-size: 32rpx; background-color: #FFFFFF;
margin-left: 30rpx;
font-size: 28rpx;
color: #333333;
}
.bold {
font-weight: bold;
}
.itemRedStar {
font-size: 28rpx;
color: #D02B2B;
}
.clickRightView{
background-color: #FFFFFF;
width: 40%;
height: 88rpx;
display: flex;
flex-direction: row-reverse;
align-items: center;
} }
.arrowIcon{ .arrowIcon{
background-color: #999999; background-color: #FFFFFF;
width: 20rpx; width: 16rpx;
height: 50rpx; height: 28rpx;
} }
.clickTypeView{ .clickContent{
margin-right: 20rpx;
font-size: 28rpx;
color: #333333;
}
.inputTypeView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 100%;
height: 80rpx; height: 88rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border: 2rpx solid #999999; border: 2rpx solid #FAFAFA;
}
.input{
background-color: #FFFFFF;
width: 50%;
height: 60rpx;
text-align: right;
} }
.photoTypeView{ .photoTypeView{
...@@ -422,34 +575,86 @@ ...@@ -422,34 +575,86 @@
.textAreaView{ .textAreaView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 100%; width: 100%;
height: 400rpx; height: 196rpx;
display: flex; }
.textAreaBoxView{
background-color: #FFFFFF;
margin-left: 30rpx;
margin-right: 30rpx;
width: 690rpx;
height: 156rpx;
border: 2rpx solid #CCCCCC;
} }
.textArea{ .textArea{
background-color: #FFFFFF; background-color: #FFFFFF;
margin-top: 24rpx;
margin-left: 25rpx;
width: 640rpx;
height: 108rpx;
}
.padding_bottom_180{
padding-bottom: 180rpx;
}
.nameView{
width: 100%; width: 100%;
height: 90%; margin-top: 24rpx;
border: 2rpx solid #999999; display: flex;
flex-direction: row;
align-items: center;
} }
.inputTypeView{ .underLine{
background-color: #FFFFFF; text-decoration:underline;
}
.bottomPadding{
padding-bottom: 144rpx;
}
.typeView{
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
border: 2rpx solid #999999;
} }
.input{ .bottomView{
background-color: #FFFFFF; background-color: #FFFFFF;
width: 50%; width: 100%;
height: 60rpx; height: 110rpx;
text-align: right; display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border-top: 2rpx solid #999999;
position: fixed;
bottom: 0;
}
.bottomTitle{
font-size: 32rpx;
} }
</style> </style>
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
onShow() { onShow() {
//this.getData(); /*
uni.getStorage({ uni.getStorage({
key: 'token', key: 'token',
success: function (res) { success: function (res) {
...@@ -156,10 +156,16 @@ ...@@ -156,10 +156,16 @@
}) })
this.getData() this.getData()
*/
this.getToken()
}, },
async getToken () {
methods: {
async getToken () {
await uni.getStorage({ await uni.getStorage({
key: 'token', key: 'token',
success: function (res) { success: function (res) {
...@@ -172,12 +178,8 @@ ...@@ -172,12 +178,8 @@
}) })
await this.getData() await this.getData()
}, },
methods: {
//获取数据 //获取数据
getData: function () { getData: function () {
...@@ -325,20 +327,23 @@ ...@@ -325,20 +327,23 @@
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId url: '/pages/take/detail'
+'?orderId='+item.orderId,
}) })
} }
} }
if(this.activeTop==1){ if(this.activeTop==1){
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId url: '/pages/take/detail'
+'?orderId='+item.orderId,
}) })
} }
if(this.activeTop==2){ if(this.activeTop==2){
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/detail'+'?orderId='+item.orderId url: '/pages/take/detail'
+'?orderId='+item.orderId,
}) })
} }
......
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