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

第三轮提测

parent d8b0352f
......@@ -50,7 +50,15 @@
/* ios打包配置 */
"ios" : {},
/* SDK配置 */
"sdkConfigs" : {}
"sdkConfigs" : {
"geolocation" : {
"amap" : {
"__platform__" : [ "ios", "android" ],
"appkey_ios" : "",
"appkey_android" : ""
}
}
}
}
},
/* 快应用特有相关 */
......@@ -61,7 +69,12 @@
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "需要获得位置权限以方便用户定位下单地址"
}
}
},
"mp-alipay" : {
"usingComponents" : true
......@@ -72,7 +85,7 @@
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics": {
"enable": false
"uniStatistics" : {
"enable" : false
}
}
......@@ -24,7 +24,8 @@
{
"path": "pages/take/index",
"style": {
"navigationBarTitleText": "接单"
"navigationBarTitleText": "接单",
"enablePullDownRefresh": true
}
},
......@@ -80,7 +81,8 @@
{
"path": "pages/index/record",
"style": {
"navigationBarTitleText": "下的单"
"navigationBarTitleText": "下的单",
"enablePullDownRefresh": true
}
},
......
......@@ -9,14 +9,14 @@
<text class="itemTitle">联系人</text>
<text class="itemRedStar">*</text>
</view>
<input class="itemInput" @input="nameInput" maxlength="50" v-model="name" type="" value="" placeholder="请输入联系人姓名" placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
<input class="itemInput" @input="nameInput" maxlength="20" v-model="name" type="" value="" placeholder="请输入联系人姓名" placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
</view>
<view class="itemView">
<view class="itemTitleView">
<text class="itemTitle">联系电话</text>
<text class="itemRedStar">*</text>
</view>
<input class="itemInput" maxlength="30" v-model="phone" type="" value="" placeholder="请输入联系电话" placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
<input class="itemInput" maxlength="15" v-model="phone" type="" value="" placeholder="请输入联系电话" placeholder-style='color:#CCCCCC;font-size:32rpx;'/>
</view>
<view class="locationView" @click="locationClick()">
<view class="locationTitleView">
......@@ -72,7 +72,7 @@
</view>
<view class="textAreaView">
<view class="textAreaBoxView">
<textarea class="textArea" maxlength="500" v-model="demandContent" value="" placeholder="请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等" placeholder-style='color:#CCCCCC;font-size:28rpx;' />
<textarea class="textArea" maxlength="200" v-model="demandContent" value="" placeholder="请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等" placeholder-style='color:#CCCCCC;font-size:28rpx;' />
</view>
</view>
</view>
......@@ -107,7 +107,7 @@
location:'',
address:'',
productTypeList:[
{title:'家用电器'},{title:'居家用品'}
{title:'智能家居'},{title:'家用电器'}
],
activeProduct:'',
serviceTypleList:[
......@@ -147,7 +147,7 @@
onShow() {
//this.getWorkerType()
//this.getPerson()
this.isClean = true
//this.isClean = true
this.checkClean()
//getApp().initAPIneedToken
......@@ -248,6 +248,10 @@
success() {
uni.hideLoading()
console.log('打开成功');
uni.showToast({
icon:'none',
title:'打开成功'
})
},
fail() {
uni.hideLoading()
......@@ -354,13 +358,13 @@
//非空判断
checkAllInput: function () {
this.isAllInput = false
console.log('下单前的 联系人:'+this.name+'字符串长度:'+this.name.length)
console.log('下单前的 联系人电话:'+this.phone)
console.log('下单前的 地址:'+this.address)
console.log('下单前的 产品类型:'+this.activeProduct)
console.log('下单前的 服务类型:'+this.activeService)
console.log('下单前的 服务需求:'+this.demandContent)
console.log('下单前的 联系人电话:'+this.phone+'字符串长度:'+this.phone.length)
console.log('下单前的 地址:'+this.address+'字符串长度:'+this.address.length)
console.log('下单前的 产品类型:'+this.activeProduct+'字符串长度:'+this.activeProduct.length)
console.log('下单前的 服务类型:'+this.activeService+'字符串长度:'+this.activeService.length)
console.log('下单前的 服务需求:'+this.demandContent+'字符串长度:'+this.demandContent.length)
if(this.name.length>0
&& this.phone.length>0
//&& this.location.length>0
......@@ -376,6 +380,7 @@
//客户报单接口
createAppletsOrder: async function() {
console.log('是否已填所有必填项:'+this.isAllInput)
console.log('联系人:'+this.name)
console.log('联系电话:'+this.phone)
console.log('地址:'+this.address)
......@@ -388,6 +393,8 @@
//getApp().globalData.createAppletsOrder
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/createAppletsOrder'
let that = this
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/revision/applets/'
......@@ -426,7 +433,11 @@
title:res.data.message//'下单成功'
})
this.showSubscribeModal()
setTimeout(function() {
//that.isClean = true
that.showSubscribeModal()
}, 1000);
}else{
uni.showToast({
......
......@@ -10,7 +10,7 @@
<view class="activeItemBottom" v-if="activeTop == 1"></view>
</view>
</view>
<view class="listView">
<view class="listView .bottom_padding_120">
<view class="itemView" @click="itemClick(item)" v-if="activeTop == 0" v-for="(item,ikey) in unfinishList":key="ikey">
<view class="nameView">
<view class="nameLeftView">
......@@ -23,7 +23,7 @@
<view class="itemBottomView" v-if="item.maintainWorkerName || item.statusText">
<view class="workerView">
<text class="workerNameText" v-if="item.maintainWorkerName">师傅:{{item.maintainWorkerName}}</text>
<text class="workerPhoneText" v-if="item.maintainWorkerPhone" @click="callClick(item.maintainWorkerPhone)">{{item.maintainWorkerPhone}}</text>
<text class="workerPhoneText" v-if="item.maintainWorkerPhone" @click.stop="callClick(item.maintainWorkerPhone)">{{item.maintainWorkerPhone}}</text>
</view>
<view class="statusView" v-if="item.statusText">
<text class="statusText" v-if="item.statusText">{{item.statusText}}</text>
......@@ -74,7 +74,8 @@
unfinishList:[],
finishList:[],
icon_noData:'',
TimeID:-1
TimeID:-1,
pageNumber:0
}
},
onLoad() {
......@@ -94,6 +95,17 @@
this.getToken()
},
async onPullDownRefresh() {
await this.createOrderList()
uni.stopPullDownRefresh()
},
//底部加载更多
onReachBottom() {
this.pageNumber = this.pageNumber + 1
this.createOrderList()
},
methods: {
......@@ -137,7 +149,7 @@
method: 'GET',
data: {
type:this.activeTop,
pageNumber:0,
pageNumber:this.pageNumber,
pageSize:20,
},
success: (res) => {
......@@ -154,16 +166,7 @@
if(res.data.code==200){
console.log('code=200')
//未完工
if(that.activeTop == 0){
console.log('未完工')
that.unfinishList=res.data.data
}
//已完工
if(that.activeTop == 1){
console.log('已完工')
that.finishList=res.data.data
}
this.handleList(res)
}else{
uni.showToast({
......@@ -188,6 +191,58 @@
})
},
//数组赋值
handleList: function (res) {
//未完工
if(this.activeTop == 0){
console.log('未完工')
if(this.unfinishList.length==0){
this.unfinishList = res.data.data.list
}else{
if(this.unfinishList.length = res.data.data.total){
uni.showToast({
icon:'none',
title:'没有更多数据了'
})
}else{
var newList = this.unfinishList;
newList = newList.concat(res.data.data.list)
this.unfinishList = newList
}
}
}
//已完工
if(this.activeTop == 1){
console.log('已完工')
if(this.finishList.length==0){
this.finishList = res.data.data.list
}else{
if(this.finishList.length = res.data.data.total){
uni.showToast({
icon:'none',
title:'没有更多数据了'
})
}else{
var newList = this.finishList;
newList = newList.concat(res.data.data.list)
this.finishList = newList
}
}
}
},
//顶部点击
topClick: function (active) {
if(this.activeTop!=active){
......@@ -426,6 +481,10 @@
font-size: 28rpx;
}
.bottom_padding_120{
padding-bottom: 120rpx;
}
.bottomView{
background-color: #2272FF;
width: 100%;
......
......@@ -55,6 +55,12 @@
this.activeService = e.activeService
}
},
onBackPress() {
console.log('返回按钮')
this.oneMoreClick()
},
methods: {
//拨打客服 点击
......
......@@ -111,7 +111,6 @@
title:'加载中'
})
//getApp().globalData.domain_Name
//domain_name
// http://192.168.0.208:8192
uni.request({
url: getApp().globalData.domain_Name
......
......@@ -40,7 +40,7 @@
<view class="itemView u-m-t-30" v-if="orderInfo.maintainWorkerName">
<text class="titleText u-m-l-30">接单师傅:</text>
<text class="contentText u-m-l-20">{{orderInfo.maintainWorkerName}}</text>
<text class="blueContentText underLine u-m-l-20" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text>
<text class="blueContentText underLine u-m-l-20" @click="phoneCallClick(orderInfo.maintainWorkerPhone)" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text>
</view>
<view class="itemView u-m-t-30 padding_bottom_130" v-if="orderInfo.allocateWorkerDatetime">
<text class="titleText u-m-l-30">接单时间:</text>
......@@ -51,7 +51,7 @@
<view class="itemView u-m-t-50" v-if="orderInfo.maintainWorkerName">
<text class="titleText u-m-l-30">接单师傅:</text>
<text class="contentText u-m-l-20">{{orderInfo.maintainWorkerName}}</text>
<text class="blueContentText underLine u-m-l-20" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text>
<text class="blueContentText underLine u-m-l-20" @click="phoneCallClick(orderInfo.maintainWorkerPhone)" v-if="orderInfo.maintainWorkerPhone">{{orderInfo.maintainWorkerPhone}}</text>
</view>
<view class="itemView u-m-t-30 u-p-b-50" v-if="orderInfo.allocateWorkerDatetime">
<text class="titleText u-m-l-30">接单时间:</text>
......@@ -67,7 +67,7 @@
</view>
<view class="photoBackView u-p-b-24" v-if="orderInfo.images">
<view class="photoItemView" v-for="(item,ikey) in photoList":key="ikey">
<image class="photoImage" :src="item" mode="aspectFill"></image>
<image class="photoImage" @click="photoClick(item,ikey)" :src="item" mode="aspectFill"></image>
</view>
</view>
<view class="itemView u-m-t-30 padding_bottom_180" v-if="orderInfo.guaranteeExplain">
......@@ -83,6 +83,17 @@
<text class="bottomTitle whiteColor">{{bottomTitle}}</text>
</view>
</view>
<w-picker
:visible.sync="isCancelShow"
mode="selector"
value=""
default-type="label"
:default-props="cancel_defaultProps"
:options="cancelReasonList"
@confirm="cancelReasonOnConfirm($event,'selector')"
@cancel="cancelReasonOnCancel"
ref="selector"
></w-picker>
</view>
</template>
......@@ -105,7 +116,25 @@
datetime: '2020/12/05 15:00:12',
type: '',
value: '',
TimeID:-1
TimeID:-1,
//退单弹窗相关
isCancelShow:false,
result:{
result:""
},
cancel_defaultProps:{
label:"title",
value:"type"
},
cancelReasonList:[
{title:'保外报价不修',type:0},
{title:'机器正常/自行处理',type:1},
{title:'用户没时间',type:2},
{title:'用户信息错/乱/不全',type:3},
{title:'重复单',type:4},
{title:'单派错了',type:5},
],
}
},
......@@ -219,6 +248,32 @@
})
},
//照片 点击
photoClick: function (item,ikey) {
console.log('照片 点击')
console.log(item)
console.log(ikey)
clearTimeout(this.TimeID);
this.TimeID = setTimeout(() => {
console.log('照片点击')
console.log(item)
console.log(ikey)
this.previewImage(item,ikey)
}, 1000);
},
//照片预览
previewImage: function(item,ikey){
console.log('照片预览')
uni.previewImage({
urls: [item],
current:ikey-1
});
},
//底部按钮标题
setBottomTitle: function(res){
......@@ -340,60 +395,87 @@
this.TimeID = setTimeout(() => {
console.log('退单点击')
uni.showLoading({
title:'请稍候'
})
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) => {
uni.hideLoading()
console.log('退单 成功')
console.log(res)
if(res.data.code==200){
uni.showToast({
icon:'none',
title:'退单成功',
})
uni.navigateBack({
})
}else{
uni.showToast({
icon:'none',
title:res.data.message
})
}
this.isCancelShow = true
}, 1000);
},
//退单原因 确认选择
cancelReasonOnConfirm(res,type){
this.result=res;
console.log('退单原因 确认选择')
console.log(res.result)
console.log(res.value)
this.cancelPost(res.result)
},
//退单原因 取消选择
cancelReasonOnCancel(){
console.log('退单原因 取消选择')
},
//退单请求
cancelPost: function (rejectReason) {
uni.showLoading({
title:'请稍候'
})
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/'
+getApp().globalData.token
+'/order/'+this.orderId+'/workerReject',
method: 'POST',
data: {
rejectReason:rejectReason,
remark:''
},
header:{
'Content-Type': 'application/x-www-form-urlencoded'
},
success: (res) => {
uni.hideLoading()
console.log('退单 成功')
console.log(res)
if(res.data.code==200){
uni.showToast({
icon:'none',
title:'退单成功',
})
setTimeout(function() {
uni.navigateBack({})
}, 1000);
},
fail: (e) => {
uni.hideLoading()
console.log('退单 失败')
console.log(e)
}else{
uni.showToast({
icon:'none',
title:'退单失败',
title:res.data.message
})
}
})
}, 1000);
},
fail: (e) => {
uni.hideLoading()
console.log('退单 失败')
console.log(e)
uni.showToast({
icon:'none',
title:'退单失败',
})
}
})
},
......
......@@ -95,7 +95,7 @@
</view>
<view class="textAreaView">
<view class="textAreaBoxView">
<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;' />
<textarea class="textArea" @input="inputTypeInput($event,item,ikey)" @confirm="textAreaInput" maxlength="200" v-model="demandContent" value="" :placeholder="'请输入'+item.fieldsTitle" placeholder-style='color:#CCCCCC;font-size:28rpx;' />
</view>
</view>
......
......@@ -26,6 +26,9 @@
<text class="addressText" v-if="item.contactAddress">{{item.contactAddress}}</text>
<view class="itemBottomView" v-if="item.statusText">
<view class="robTypeView">
<text class="typeText" v-if="item.inGuaranteePeriodText">({{item.inGuaranteePeriodText}})-{{item.orderServiceType}}</text>
</view>
<view class="robStatusView" v-if="item.statusText">
<text class="statusText" v-if="item.statusText">{{item.statusText}}</text>
</view>
......@@ -49,7 +52,7 @@
<text class="typeText">({{item.inGuaranteePeriodText}})-{{item.orderServiceType}}</text>
<text class="bookText underLine" @click.stop="onShowDatePicker('datetime',item)" v-if="item.appointmentDatetime">{{formatDate(item.appointmentDatetime)}}</text>
<text class="bookText underLine" @click.stop="onShowDatePicker('datetime',item)" v-if="!item.appointmentDatetime">未预约</text>
<text class="statusText" v-if="item.statusText">{{item.statusText}}</text>
<text :class="item.statusText == '待完工' ? 'statusText redColor' : 'statusText'" v-if="item.statusText">{{item.statusText}}</text>
</view>
<view class="divideLine u-m-t-30"></view>
<mx-date-picker :show="showPicker" :type="type" :value="value" :show-tips="true" :begin-text="'入住'" :end-text="'离店'" :show-seconds="true" @confirm="onSelected" @cancel="onSelected" />
......@@ -134,7 +137,9 @@
],
currentOrderType: 0,
currentOrderTypeTitle:'全部',
TimeID:-1
TimeID:-1,
pageNumber:0,
pageSize:20
}
},
......@@ -159,7 +164,17 @@
},
async onPullDownRefresh() {
await this.getData()
uni.stopPullDownRefresh()
},
//底部加载更多
onReachBottom() {
this.pageNumber = this.pageNumber + 1
console.log('底部加载更多 pageNumber'+ this.pageNumber)
this.getData()
},
methods: {
......@@ -187,11 +202,31 @@
topClick: function (active) {
if(this.activeTop!=active){
this.activeTop = active
this.pageNumber = 0
//中间未完工
if(active == 1){
this.isOrderTypeShow = true
this.isOrderTypeShow = false
this.grabList.length = 0
this.finishList.length = 0
}
//抢单广场
if(active == 0){
this.unfinishList.length = 0
this.finishList.length = 0
}
//已完工
if(active == 2){
this.grabList.length = 0
this.unfinishList.length = 0
}
......@@ -212,6 +247,9 @@
this.currentOrderTypeTitle = res.result
this.currentOrderType = res.value
this.pageNumber = 0
this.unfinishList.length = 0
this.getData()
......@@ -263,8 +301,8 @@
+getApp().globalData.token+'/order/grabbing',
method: 'GET',
data: {
pageNumber:0,
pageSize:20,
pageNumber:this.pageNumber,
pageSize:this.pageSize,
},
success: (res) => {
uni.hideLoading()
......@@ -279,7 +317,9 @@
}
if(res.data.code==200){
this.grabList = res.data.data
this.handleRobList(res)
}else{
uni.showToast({
icon:'none',
......@@ -299,14 +339,34 @@
})
},
//数组赋值
handleRobList: function (res) {
if(this.grabList.length==0){
this.grabList = res.data.data.list
}else{
if(this.grabList.length = res.data.data.total){
uni.showToast({
icon:'none',
title:'没有更多数据了'
})
}else{
var newList = this.grabList;
newList = newList.concat(res.data.data.list)
this.grabList = newList
}
}
},
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/worker',
//getApp().globalData.workOrderList
//获取工单列表
getOrderList: function (type) {
// uni.showLoading({
// title:'加载中'
// })
uni.showLoading({
title:'加载中'
})
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/order/revision/applets/'
......@@ -314,8 +374,8 @@
method: 'GET',
data: {
type:type,
pageNumber:0,
pageSize:20,
pageNumber:this.pageNumber,
pageSize:this.pageSize,
},
success: (res) => {
uni.hideLoading()
......@@ -327,11 +387,9 @@
}
if(res.data.code==200){
if(type == 5){
this.finishList = res.data.data
}else{
this.unfinishList = res.data.data
}
this.handleOrderList(type,res)
}else{
uni.showToast({
......@@ -356,6 +414,56 @@
})
},
//数组赋值
handleOrderList: function (type,res) {
//已完工
if(type == 5){
console.log('已完工')
if(this.finishList.length==0){
this.finishList = res.data.data.list
}else{
if(this.finishList.length = res.data.data.total){
uni.showToast({
icon:'none',
title:'没有更多数据了'
})
}else{
var newList = this.finishList;
newList = newList.concat(res.data.data.list)
this.finishList = newList
}
}
}else{
console.log('中间')
if(this.unfinishList.length==0){
this.unfinishList = res.data.data.list
}else{
if(this.unfinishList.length = res.data.data.total){
uni.showToast({
icon:'none',
title:'没有更多数据了'
})
}else{
var newList = this.unfinishList;
newList = newList.concat(res.data.data.list)
this.unfinishList = newList
}
}
}
},
bookClick: function (item) {
......@@ -398,11 +506,11 @@
})
}else{
uni.navigateTo({
url: '/pages/take/detail'
+'?orderId='+item.orderId
+'$isBottomShow='+false,
})
// uni.navigateTo({
// url: '/pages/take/detail'
// +'?orderId='+item.orderId
// +'&isBottomShow='+false,
// })
}
}
......@@ -500,8 +608,11 @@
icon:'none',
title:'预约成功'
})
console.log('是不是预约成功了?')
that.getOrderList(0)
setTimeout(function() {
that.getOrderList(0)
}, 1000);
}else{
uni.showToast({
icon:'none',
......@@ -578,6 +689,7 @@
.topView{
display: flex;
flex-direction: row;
}
.topItemView{
......@@ -750,6 +862,13 @@
align-items: flex-end;
}
.robTypeView{
width: 50%;
height: 80rpx;
display: flex;
align-items: flex-end;
}
.typeText{
margin-left: 30rpx;
font-size: 28rpx;
......@@ -803,4 +922,8 @@
font-size: 28rpx;
}
.redColor{
color: #D73400;
}
</style>
......@@ -8,7 +8,7 @@
</view>
<view class="listView border_right_2" v-if="is_mid_show">
<view class="itemView" @click="itemClick(1,item)" v-for="(item,ikey) in midList":key="ikey">
<text :class="current_causeId == item.causeId ? 'selectedTitle' : 'itemTitle' ">{{item.symptomsName}}</text>
<text :class="current_causeId == item.causeId ? 'selectedTitle' : 'itemTitle' ">{{item.causeName}}</text>
<image class="arrowIcon" :src="icon_arrow_right" mode=""></image>
</view>
</view>
......
......@@ -255,7 +255,7 @@
// })
uni.showToast({
icon:'none',
title:'检查用户状态失败'
title:res.data.message
})
......@@ -269,7 +269,7 @@
console.log(e)
uni.showToast({
icon:'none',
title:'检查用户状态失败'
title:res.data.message
})
}
})
......@@ -306,7 +306,7 @@
//3技能不匹配
if(data==3){
content = '无法抢单!您的技能不匹配'
content = '无法抢单!您的区域或技能不符合工单要求'
confirmText = '联系客服400-8834-123'
}
......@@ -420,16 +420,20 @@
console.log('抢单请求 成功')
console.log(res)
if(res.code==200){
if(res.data.code==200){
uni.showToast({
icon:'none',
title:'抢单成功'
})
uni.navigateTo({
url: '/pages/take/detail'
+'?orderId='+this.orderId,
})
setTimeout(function() {
uni.navigateTo({
url: '/pages/take/detail'
+'?orderId='+this.orderId,
})
}, 1000);
}else{
// uni.showToast({
......@@ -590,6 +594,7 @@
.popTitle{
font-size: 32rpx;
font-weight: bold;
text-align: center;
}
.popBtn{
......
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