Commit 576befe7 authored by 和慭琛's avatar 和慭琛

细节优化

parent 13432ee2
...@@ -9,9 +9,14 @@ ...@@ -9,9 +9,14 @@
globalData: { globalData: {
//https://system.banshouhui.com //https://system.banshouhui.com
//https://system.dev.banshouhui.com //https://system.dev.banshouhui.com
//测试环境
domain_Name: 'https://system.dev.banshouhui.com', domain_Name: 'https://system.dev.banshouhui.com',
//http://192.168.0.208:8192 //http://192.168.0.208:8192
//小青本地环境
//domain_Name: 'http://192.168.0.208:37080', //domain_Name: 'http://192.168.0.208:37080',
token:'', token:'',
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502 //RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
......
...@@ -8,14 +8,14 @@ ...@@ -8,14 +8,14 @@
<text class="itemTitle">联系人</text> <text class="itemTitle">联系人</text>
<text class="itemRedStar">*</text> <text class="itemRedStar">*</text>
</view> </view>
<input class="itemInput" v-model="name" type="" value="" placeholder="请输入联系人姓名" placeholder-style='color:#CCCCCC;font-size:32rpx;'/> <input class="itemInput" @input="nameInput" maxlength="50" v-model="name" type="" value="" placeholder="请输入联系人姓名" placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
</view> </view>
<view class="itemView"> <view class="itemView">
<view class="itemTitleView"> <view class="itemTitleView">
<text class="itemTitle">联系电话</text> <text class="itemTitle">联系电话</text>
<text class="itemRedStar">*</text> <text class="itemRedStar">*</text>
</view> </view>
<input class="itemInput" v-model="phone" type="" value="" placeholder="请输入联系电话" placeholder-style='color:#CCCCCC;font-size:32rpx;'/> <input class="itemInput" maxlength="30" v-model="phone" type="" value="" placeholder="请输入联系电话" placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
</view> </view>
<view class="locationView" @click="locationClick()"> <view class="locationView" @click="locationClick()">
<view class="locationTitleView"> <view class="locationTitleView">
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<text class="itemTitle">详细地址</text> <text class="itemTitle">详细地址</text>
<text class="itemRedStar">*</text> <text class="itemRedStar">*</text>
</view> </view>
<input class="itemInput" v-model="address" type="" value="" placeholder="请输入详细服务地址" placeholder-style='color:#CCCCCC;font-size:32rpx;'/> <input class="itemInput" maxlength="200" v-model="address" type="" value="" placeholder="请输入详细服务地址" placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
</view> </view>
<view class="selectItemView"> <view class="selectItemView">
<view class="itemTitleView"> <view class="itemTitleView">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</view> </view>
<view class="textAreaView"> <view class="textAreaView">
<view class="textAreaBoxView"> <view class="textAreaBoxView">
<textarea class="textArea" v-model="demandContent" value="" placeholder="请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等" placeholder-style='color:#CCCCCC;font-size:28rpx;' /> <textarea class="textArea" maxlength="500" v-model="demandContent" value="" placeholder="请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等" placeholder-style='color:#CCCCCC;font-size:28rpx;' />
</view> </view>
</view> </view>
</view> </view>
...@@ -148,6 +148,27 @@ ...@@ -148,6 +148,27 @@
}, },
methods: { methods: {
nameInput(e){
// console.log('联系人 监听:')
// console.log(e.detail.value)
// console.log('name:')
// console.log(this.name)
// if(e.detail.value.length>5){
// uni.showToast({
// icon:'none',
// title:'联系人姓名不能大于50字'
// })
// e.detail.value = e.detail.value.substr(0,5)
// this.name = e.detail.value
// }
// console.log('限制字数后的name:')
// console.log(this.name)
},
//定位点击 //定位点击
locationClick:function(){ locationClick:function(){
let that = this let that = this
...@@ -186,9 +207,49 @@ ...@@ -186,9 +207,49 @@
console.log(this.isAgree) console.log(this.isAgree)
}, },
//服务协议点击 //服务协议 点击
protocolClick: function () { protocolClick: function () {
console.log('服务协议 点击')
uni.showLoading({
title:'加载中'
})
uni.downloadFile({
url: 'https://system.dev.banshouhui.com/pdfjs/web/用户注册协议.pdf',
success: (res) => {
uni.hideLoading()
if (res.statusCode === 200) {
uni.showLoading({
title:'打开中'
})
console.log('下载成功');
var filePath = res.tempFilePath;
uni.openDocument({
filePath:filePath,
success() {
uni.hideLoading()
console.log('打开成功');
},
fail() {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'打开失败'
})
}
})
}
},
fail() {
uni.hideLoading()
uni.showToast({
icon:'none',
title:'打开服务协议失败'
})
}
});
}, },
//查看历史订单 //查看历史订单
......
...@@ -123,6 +123,11 @@ ...@@ -123,6 +123,11 @@
//getApp().globalData.createOrderList //getApp().globalData.createOrderList
//获取下单列表 //获取下单列表
createOrderList: function () { createOrderList: function () {
uni.showLoading({
title:'请稍候'
})
let that = this let that = this
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
...@@ -135,6 +140,7 @@ ...@@ -135,6 +140,7 @@
pageSize:20, pageSize:20,
}, },
success: (res) => { success: (res) => {
uni.hideLoading()
console.log('获取下单列表 成功') console.log('获取下单列表 成功')
console.log(res) console.log(res)
...@@ -170,6 +176,7 @@ ...@@ -170,6 +176,7 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title:'获取下单列表失败' title:'获取下单列表失败'
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
export default { export default {
data() { data() {
return { return {
//domain_name:'http://192.168.0.208:8192', domain_name:'http://192.168.0.208:8192',
isNewUser:false, isNewUser:false,
unionID:'', unionID:'',
openID:'', openID:'',
...@@ -127,6 +127,8 @@ ...@@ -127,6 +127,8 @@
uni.showLoading({ uni.showLoading({
title:'加载中' title:'加载中'
}) })
//getApp().globalData.domain_Name
//domain_name
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+getApp().globalData.getUsersByCode, +getApp().globalData.getUsersByCode,
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">联系人:</text> <text class="titleText u-m-l-30">联系人:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.contactName">{{orderInfo.contactName}}</text> <text class="contentText u-m-l-20" v-if="orderInfo.contactName">{{orderInfo.contactName}}</text>
<text class="contentText u-m-l-20 underLine" v-if="orderInfo.contactMobilephone">{{orderInfo.contactMobilephone}}</text> <text class="contentText u-m-l-20" v-if="orderInfo.contactMobilephone">{{orderInfo.contactMobilephone}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">地址:</text> <text class="titleText u-m-l-30">地址:</text>
...@@ -32,14 +32,14 @@ ...@@ -32,14 +32,14 @@
</view> </view>
<view class="divideLine"></view> <view class="divideLine"></view>
</view> </view>
<view class="willTakeView" v-if="orderInfo.statusText == '待接单'"> <!--view class="willTakeView" v-if="orderInfo.statusText == '待接单'">
<view class="itemView u-m-t-50"> <view class="itemView u-m-t-50">
<text class="titleText u-m-l-30">预约时间:</text> <text class="titleText u-m-l-30">预约时间:</text>
<text class="blueContentText u-m-l-20" v-if="!orderInfo.appointmentDatetime">接单后可预约上门服务时间</text> <text class="blueContentText u-m-l-20" v-if="!orderInfo.appointmentDatetime">接单后可预约上门服务时间</text>
<text class="blueContentText u-m-l-20" v-if="orderInfo.appointmentDatetime">{{formatDate(orderInfo.appointmentDatetime)}}</text> <text class="blueContentText u-m-l-20" v-if="orderInfo.appointmentDatetime">{{formatDate(orderInfo.appointmentDatetime)}}</text>
</view> </view>
<mx-date-picker :show="showPicker" :type="type" :value="value" :show-tips="true" :begin-text="'入住'" :end-text="'离店'" :show-seconds="true" @confirm="onSelected" @cancel="onSelected" /> <mx-date-picker :show="showPicker" :type="type" :value="value" :show-tips="true" :begin-text="'入住'" :end-text="'离店'" :show-seconds="true" @confirm="onSelected" @cancel="onSelected" />
</view> </view-->
<view class="willFinishView" v-if="orderInfo.statusText == '待完工'"> <view class="willFinishView" v-if="orderInfo.statusText == '待完工'">
<view class="itemView u-m-t-50"> <view class="itemView u-m-t-50">
<text class="titleText u-m-l-30">预约时间:</text> <text class="titleText u-m-l-30">预约时间:</text>
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</view> </view>
<view class="photoBackView u-p-b-24" v-if="orderInfo.images"> <view class="photoBackView u-p-b-24" v-if="orderInfo.images">
<view class="photoItemView" v-for="(item,ikey) in photoList":key="ikey"> <view class="photoItemView" v-for="(item,ikey) in photoList":key="ikey">
<image class="photoImage" :src="domain_name +'/wxh-sts-rest' + item.image" mode="aspectFill"></image> <image class="photoImage" :src="item" mode="aspectFill"></image>
</view> </view>
</view> </view>
<view class="itemView u-m-t-30 padding_bottom_180"> <view class="itemView u-m-t-30 padding_bottom_180">
...@@ -150,7 +150,8 @@ ...@@ -150,7 +150,8 @@
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+getApp().globalData.workOrderDetail, +'/wxh-worker-rest/rest/order/revision/applets/'
+getApp().globalData.token+'/order/detail',
method: 'GET', method: 'GET',
data: { data: {
orderId:this.orderId orderId:this.orderId
...@@ -456,7 +457,7 @@ ...@@ -456,7 +457,7 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
...@@ -567,11 +568,11 @@ ...@@ -567,11 +568,11 @@
} }
.photoImage{ .photoImage{
background-color: #FAFAFA; background-color: #F3F3F3;
margin-left: 24rpx; margin-left: 24rpx;
margin-right: 24rpx; margin-right: 24rpx;
margin-top: 24rpx; margin-top: 24rpx;
height: 260rpx; height: 200rpx;
} }
.bottomView{ .bottomView{
......
This diff is collapsed.
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</view> </view>
<view class="noDataView" v-if="activeTop == 1 && unfinishList.length==0"> <view class="noDataView" v-if="activeTop == 1 && unfinishList.length==0">
<image class="noDataIcon" :src="icon_noData" mode=""></image> <image class="noDataIcon" :src="icon_noData" mode=""></image>
<text class="noDataText">暂无数据</text> <text class="noDataText">{{noDataTitle}}</text>
</view> </view>
<view class="itemView" v-if="activeTop == 2" @click="itemClick(item)" v-for="(item,ikey) in finishList":key="ikey"> <view class="itemView" v-if="activeTop == 2" @click="itemClick(item)" v-for="(item,ikey) in finishList":key="ikey">
<view class="nameView"> <view class="nameView">
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</view> </view>
<view class="noDataView" v-if="activeTop == 2 && finishList.length==0"> <view class="noDataView" v-if="activeTop == 2 && finishList.length==0">
<image class="noDataIcon" :src="icon_noData" mode=""></image> <image class="noDataIcon" :src="icon_noData" mode=""></image>
<text class="noDataText">暂无数据</text> <text class="noDataText">{{noDataTitle}}</text>
</view> </view>
</view> </view>
<w-picker <w-picker
...@@ -112,6 +112,7 @@ ...@@ -112,6 +112,7 @@
type: '', type: '',
value: '', value: '',
icon_noData:'', icon_noData:'',
noDataTitle:'暂无数据',
grabList:[], grabList:[],
unfinishList:[], unfinishList:[],
finishList:[], finishList:[],
...@@ -289,11 +290,18 @@ ...@@ -289,11 +290,18 @@
}) })
}, },
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/worker',
//getApp().globalData.workOrderList
//获取工单列表 //获取工单列表
getOrderList: function (type) { getOrderList: function (type) {
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+getApp().globalData.workOrderList, +'/wxh-worker-rest/rest/order/revision/applets/'
+getApp().globalData.token+'/order/worker',
method: 'GET', method: 'GET',
data: { data: {
type:type, type:type,
...@@ -301,9 +309,14 @@ ...@@ -301,9 +309,14 @@
pageSize:10, pageSize:10,
}, },
success: (res) => { success: (res) => {
uni.hideLoading()
console.log('获取工单列表 成功') console.log('获取工单列表 成功')
console.log(res) console.log(res)
if(res.statusCode == 403){
this.noDataTitle = '您没有权限操作'
}
if(res.data.code==200){ if(res.data.code==200){
if(type == 5){ if(type == 5){
this.finishList = res.data.data this.finishList = res.data.data
...@@ -323,6 +336,7 @@ ...@@ -323,6 +336,7 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
uni.showToast({ uni.showToast({
icon:'none', icon:'none',
title:'获取工单列表失败' title:'获取工单列表失败'
...@@ -355,8 +369,33 @@ ...@@ -355,8 +369,33 @@
if(this.activeTop==0){//抢单市场 if(this.activeTop==0){//抢单市场
if(item.statusText=='待抢单'){ if(item.statusText=='待抢单'){
/*
contactName:'',
contactMobilephone:'',
contactAddress:'',
inGuaranteePeriodText:'',
orderServiceType:'',
brandName:'',
categoryName:'',
statusText:'',
serviceContent:'',
createDatetime:'',
*/
uni.navigateTo({ uni.navigateTo({
url: '/pages/take/rob'+'?orderId='+item.orderId url: '/pages/take/rob'
+'?orderId='+item.orderId
+'&contactName='+item.contactName
+'&contactMobilephone='+item.contactMobilephone
+'&contactAddress='+item.contactAddress
+'&inGuaranteePeriodText='+item.inGuaranteePeriodText
+'&orderServiceType='+item.orderServiceType
+'&brandName='+item.brandName
+'&categoryName='+item.categoryName
+'&statusText='+item.statusText
+'&serviceContent='+item.serviceContent
+'&createDatetime='+item.createDatetime
}) })
}else{ }else{
uni.navigateTo({ uni.navigateTo({
...@@ -418,6 +457,9 @@ ...@@ -418,6 +457,9 @@
dateTime = dateTime.replace("/","-") dateTime = dateTime.replace("/","-")
//2020/12/25 15:00:12 //2020/12/25 15:00:12
console.log('预约请求 dateTime'+dateTime) console.log('预约请求 dateTime'+dateTime)
uni.showLoading({
title:'加载中'
})
let that = this let that = this
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
...@@ -435,6 +477,7 @@ ...@@ -435,6 +477,7 @@
'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)
...@@ -456,6 +499,7 @@ ...@@ -456,6 +499,7 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
console.log('预约请求 失败') console.log('预约请求 失败')
console.log(e) console.log(e)
} }
...@@ -495,7 +539,7 @@ ...@@ -495,7 +539,7 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
......
...@@ -113,6 +113,9 @@ ...@@ -113,6 +113,9 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888 // http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888
//左边 获取 故障现象 数据 //左边 获取 故障现象 数据
getLeftData: function () { getLeftData: function () {
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/' +'/wxh-worker-rest/rest/order/'
...@@ -157,6 +160,9 @@ ...@@ -157,6 +160,9 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000 // http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000
//中间 获取 查询故障现象 关联的 故障原因 数据 //中间 获取 查询故障现象 关联的 故障原因 数据
getMidData: function (){ getMidData: function (){
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/' +'/wxh-worker-rest/rest/order/'
...@@ -201,6 +207,11 @@ ...@@ -201,6 +207,11 @@
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001 // http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001
//右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据 //右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据
getRightData: function(){ getRightData: function(){
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/' +'/wxh-worker-rest/rest/order/'
...@@ -246,6 +257,10 @@ ...@@ -246,6 +257,10 @@
//http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888 //http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888
//最终请求 //最终请求
getFinalData: function () { getFinalData: function () {
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/' +'/wxh-worker-rest/rest/order/'
...@@ -324,7 +339,6 @@ ...@@ -324,7 +339,6 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
} }
......
...@@ -3,32 +3,32 @@ ...@@ -3,32 +3,32 @@
<view class="topView"> <view class="topView">
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">联系人:</text> <text class="titleText u-m-l-30">联系人:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.contactName">{{orderInfo.contactName}}</text> <text class="contentText u-m-l-20" v-if="contactName">{{contactName}}</text>
<text class="contentText u-m-l-20 underLine" v-if="orderInfo.contactMobilephone">{{orderInfo.contactMobilephone}}</text> <text class="contentText u-m-l-20 underLine" v-if="contactMobilephone">{{contactMobilephone}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">地址:</text> <text class="titleText u-m-l-30">地址:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.contactAddress">{{orderInfo.contactAddress}}</text> <text class="contentText u-m-l-20" v-if="contactAddress">{{contactAddress}}</text>
</view> </view>
<view class="itemView u-m-t-60"> <view class="itemView u-m-t-60">
<text class="titleText u-m-l-30">类型:</text> <text class="titleText u-m-l-30">类型:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.inGuaranteePeriodText">({{orderInfo.inGuaranteePeriodText}}) {{orderInfo.orderServiceType}}</text> <text class="contentText u-m-l-20" v-if="inGuaranteePeriodText">({{inGuaranteePeriodText}}) {{orderServiceType}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">产品:</text> <text class="titleText u-m-l-30">产品:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.brandName">{{orderInfo.brandName}}-{{orderInfo.categoryName}}</text> <text class="contentText u-m-l-20" v-if="brandName">{{brandName}}-{{categoryName}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">状态:</text> <text class="titleText u-m-l-30">状态:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.statusText">{{orderInfo.statusText}}</text> <text class="contentText u-m-l-20" v-if="statusText">{{statusText}}</text>
</view> </view>
<view class="itemView u-m-t-30"> <view class="itemView u-m-t-30">
<text class="titleText u-m-l-30">描述:</text> <text class="titleText u-m-l-30">描述:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.serviceContent">{{orderInfo.serviceContent}}</text> <text class="contentText u-m-l-20" v-if="serviceContent">{{serviceContent}}</text>
</view> </view>
<view class="itemView u-m-t-60 padding_bottom_180"> <view class="itemView u-m-t-60 padding_bottom_180">
<text class="titleText u-m-l-30">下单时间:</text> <text class="titleText u-m-l-30">下单时间:</text>
<text class="contentText u-m-l-20" v-if="orderInfo.createDatetime">{{orderInfo.createDatetime}}</text> <text class="contentText u-m-l-20" v-if="createDatetime">{{formatDate(createDatetime)}}</text>
</view> </view>
</view> </view>
<view class="bottomView"> <view class="bottomView">
...@@ -59,7 +59,18 @@ ...@@ -59,7 +59,18 @@
popTitle:'', popTitle:'',
popBtnTitle:'', popBtnTitle:'',
userType:0, userType:0,
icon_close:'' icon_close:'',
contactName:'',
contactMobilephone:'',
contactAddress:'',
inGuaranteePeriodText:'',
orderServiceType:'',
brandName:'',
categoryName:'',
statusText:'',
serviceContent:'',
createDatetime:'',
} }
}, },
onLoad(e) { onLoad(e) {
...@@ -67,20 +78,83 @@ ...@@ -67,20 +78,83 @@
if(e && e.orderId){ if(e && e.orderId){
this.orderId = e.orderId this.orderId = e.orderId
} }
this.getTopInfo(e)
//this.orderId ='10704469' //this.orderId ='10704469'
this.icon_rob = getApp().globalData.icon_rob this.icon_rob = getApp().globalData.icon_rob
this.icon_close = getApp().globalData.icon_close this.icon_close = getApp().globalData.icon_close
}, },
onShow() { onShow() {
this.getOrderDetail() //this.getOrderDetail()
}, },
methods: { methods: {
getTopInfo: function (e) {
/*
contactName:'',
contactMobilephone:'',
contactAddress:'',
inGuaranteePeriodText:'',
brandName:'',
categoryName:'',
statusText:'',
serviceContent:'',
createDatetime:'',
*/
if(e && e.contactName && e.contactName.length>0){
this.contactName = e.contactName
}
if(e && e.contactMobilephone && e.contactMobilephone.length>0){
this.contactMobilephone = e.contactMobilephone
}
if(e && e.contactAddress && e.contactAddress.length>0){
this.contactAddress = e.contactAddress
}
if(e && e.inGuaranteePeriodText && e.inGuaranteePeriodText.length>0){
this.inGuaranteePeriodText = e.inGuaranteePeriodText
}
if(e && e.orderServiceType && e.orderServiceType.length>0){
this.orderServiceType = e.orderServiceType
}
if(e && e.brandName && e.brandName.length>0){
this.brandName = e.brandName
}
if(e && e.categoryName && e.categoryName.length>0){
this.categoryName = e.categoryName
}
if(e && e.statusText && e.statusText.length>0){
this.statusText = e.statusText
}
if(e && e.serviceContent && e.serviceContent.length>0){
this.serviceContent = e.serviceContent
}
if(e && e.createDatetime && e.createDatetime.length>0){
this.createDatetime = e.createDatetime
}
},
//获取工单详情 //获取工单详情
getOrderDetail: function () { getOrderDetail: function () {
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+getApp().globalData.workOrderDetail, +getApp().globalData.workOrderDetail,
...@@ -89,6 +163,7 @@ ...@@ -89,6 +163,7 @@
orderId:this.orderId orderId:this.orderId
}, },
success: (res) => { success: (res) => {
uni.hideLoading()
console.log('获取工单详情 成功') console.log('获取工单详情 成功')
console.log(res) console.log(res)
...@@ -106,6 +181,7 @@ ...@@ -106,6 +181,7 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
console.log('获取工单详情 失败') console.log('获取工单详情 失败')
console.log(e) console.log(e)
} }
...@@ -121,6 +197,9 @@ ...@@ -121,6 +197,9 @@
//检查用户状态 //检查用户状态
checkUserStatus: function (item) { checkUserStatus: function (item) {
console.log('检查用户状态') console.log('检查用户状态')
uni.showLoading({
title:'加载中'
})
uni.request({ uni.request({
url: getApp().globalData.domain_Name url: getApp().globalData.domain_Name
+getApp().globalData.checkRobStatus, +getApp().globalData.checkRobStatus,
...@@ -129,6 +208,7 @@ ...@@ -129,6 +208,7 @@
orderId:this.orderId orderId:this.orderId
}, },
success: (res) => { success: (res) => {
uni.hideLoading()
console.log('检查用户状态 成功') console.log('检查用户状态 成功')
console.log(res) console.log(res)
...@@ -146,6 +226,7 @@ ...@@ -146,6 +226,7 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
console.log('检查用户状态 失败') console.log('检查用户状态 失败')
console.log(e) console.log(e)
} }
...@@ -269,6 +350,9 @@ ...@@ -269,6 +350,9 @@
//抢单请求 //抢单请求
////%@/worker/%@/order/%@/accept ////%@/worker/%@/order/%@/accept
robPost: function () { robPost: function () {
uni.showLoading({
title:'请稍候'
})
console.log('抢单请求') console.log('抢单请求')
// /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder // /wxh-worker-rest/rest/order/revision/applets/{token}/order/acceptAppletsOrder
uni.request({ uni.request({
...@@ -284,6 +368,7 @@ ...@@ -284,6 +368,7 @@
'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)
...@@ -304,6 +389,7 @@ ...@@ -304,6 +389,7 @@
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading()
console.log('抢单请求 失败') console.log('抢单请求 失败')
console.log(e) console.log(e)
} }
...@@ -311,6 +397,23 @@ ...@@ -311,6 +397,23 @@
}, },
//时间戳转换成日期时间
formatDate: function(value) {
var date = new Date();
//date.setTime(value);
var month = date.getMonth() + 1;
var hours = date.getHours();
if (hours < 10)
hours = "0" + hours;
var minutes = date.getMinutes();
if (minutes < 10)
minutes = "0" + minutes;
var time = date.getFullYear() + "-" + month + "-" + date.getDate() +
" " + hours + ":" + minutes;
return time;
}
} }
} }
......
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