Commit aac25a0a authored by Morson's avatar Morson

删除调试代码

修复拒单问题
parent 6d9a8b82
......@@ -47,7 +47,7 @@ let orderApiFun = function(vm){
let traceAndAppointment = async (params = {}, orderId) => await vm.$u.post('/wxh-worker-rest/rest/order/traceAndAppointment/trace/V2/' + vm.vuex_token + `/`+orderId, params)
/* 师傅拒单 */
let rejectOrder = async (params = {}, orderId) => await vm.$u.get(prefix + vm.vuex_token + `/order/${orderId}/workerReject/V2`, params)
let rejectOrder = async (params = {}, orderId) => await vm.$u.post(prefix + vm.vuex_token + `/order/${orderId}/workerReject/V2`, params, formType)
/**
......
......@@ -216,7 +216,6 @@
}
},
created() {
console.log('+++++++++++')
/*
orderStatus:
待接单 orderStatus<31 工单状态小于31
......@@ -252,7 +251,6 @@
}
this.timeout = this.orderData.currentOverTime < new Date().getTime()
this.timestamp = Math.round(Math.abs(this.orderData.currentOverTime - new Date().getTime()) / 1000)
console.log('++++++', this.timestamp)
},
methods: {
handleClick() {
......
......@@ -186,11 +186,9 @@
this.initSettleInfo();
},
handleClick(orderId) { // 点击了cell
console.log('点击了cell')
this.viewOderItem(orderId)
},
handleAction(orderId) { // 点击了按钮
console.log('点击了按钮')
this.viewOderItem(orderId)
},
viewOderItem(orderId) { // 跳转工单详情页面
......@@ -233,7 +231,6 @@
});
},
loadOrderList() {
console.log('-----------准备加载推荐列表-----------')
this.search.pageNumber += 1
let self = this;
// 加载订单列表
......@@ -250,7 +247,6 @@
if (res.data.list) {
self.orderList.push(...res.data.list);
}
console.log('this.orderlist;', this.orderList)
self.currentLoadStatus = res.data.total > self.orderList.length && (res.data.list || []).length == self.search.pageSize ? 'loadmore' : 'nomore'
} else {
......@@ -331,7 +327,6 @@
var self = this; // 加载订单列表
self.$u.api.listOrderCount().then((res) => {
if (res.code == 200) {
console.log("===", res.data)
if (res.data) {
var count = 0
for (var i in res.data) {
......
......@@ -140,7 +140,6 @@
}
},
noMore() {
console.log('nomore:', this.orderList.length == 0 && this.pageNumber != 0)
return this.orderList.length == 0 && this.loaded
},
noOrderCustomStyle() {
......@@ -203,7 +202,6 @@
},
reachBottom(e) {
console.log('-------底部-------', this.loadStatus)
if (this.loadStatus != 'loadmore') return
this.loadStatus == 'loading'
this.getOrderList(this.currentIndex)
......@@ -283,7 +281,6 @@
var self = this; // 加载订单列表
self.$u.api.listOrderCount().then((res) => {
if (res.code == 200) {
console.log("===", res.data)
if (res.data) {
self.list.forEach(item => {
if (item.name === '待预约') {
......@@ -329,7 +326,6 @@
this.filish(item)
return
}
console.log('click cell')
this.viewOderItem(item.orderId)
},
filish(item){
......@@ -343,7 +339,6 @@
})
},
handleAction(item) {
console.log('click button')
if(item.orderStatus===86 || item.orderStatus===88){
this.filish(item)
return
......
......@@ -237,7 +237,6 @@
},
onLoad(option) {
// 生命周期函数--监听页面加载
console.log("option", option)
if (option && option.id) {
this.orderId = option.id
}
......@@ -306,7 +305,6 @@
// }
// ,
// complete: function(res) {
// console.log('-------complete-----', res)
// if (res.errMsg.indexOf('auth') != -1) {
// uni.showModal({
// title: '提示',
......@@ -348,13 +346,7 @@
let self = this
var data={}
if(this.submitType === "workerAppointment"){
self.$u.api.contactTime(data,this.order.orderId).then((res)=>{
if (res.code == 200) {
console.log("===", res.data)
} else {
console.log(res.message);
}
})
self.$u.api.contactTime(data,this.order.orderId)
}
},
handleClickRight(active) {
......@@ -371,7 +363,6 @@
this.takeStatus = true
},
closeTake(img) {
console.log("image",img)
this.takeStatus = false
// 获取返回的图片 ,如果返回的图片存在则直接异常签约,成功后跳转到去完工页面,
if(img){ // 拍照完成
......@@ -444,7 +435,6 @@
},
weekChange(data){
// 点击下一周
console.log(data,'week-data')
if (data && data.time) {
let num = data.num
let time = data.time
......@@ -486,7 +476,6 @@
},
dateChange(data){
// 点击日期选择
console.log(data,'dateChange')
let self = this
self.appointmentDatetime = data.item.day
self.dateItem = data.item
......@@ -501,7 +490,6 @@
},
timeChange(data){
// 时间段选择变化
console.log(data,'timeChange')
this.appointmentDatetimeRange = data.item
},
addressToCoordinate(){
......@@ -754,7 +742,6 @@
if(!currentOverTime){
return 0
}
console.log('--------', Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000))
return Math.round(Math.abs(this.order.currentOverTime - new Date().getTime()) / 1000);
},
timeOutChange(currentOverTime){
......
......@@ -50,7 +50,7 @@
rejectReason: '',
remark: ''
},
count: 3, // 剩余次数
count: 0, // 剩余次数
};
},
computed: {
......@@ -62,15 +62,15 @@
PopView
},
onLoad(e) {
if(e) {
if(e.orderId) {
this.orderId = e.orderId
} else if(e.count) {
if(e && e.orderId) {
this.orderId = e.orderId
if(e.count) {
this.count = e.count
} else {
this.getRejectCount()
}
}
if(!this.count) {
this.getRejectCount()
} else {
this.$u.toast("本月无拒单机会,请联系客服")
}
},
methods: {
......@@ -116,18 +116,9 @@
let res = await self.$u.api.rejectOrder(self.formData, self.orderId)
self.submiting = false
if(res && res.code == 200) {
let data = res.data
if(data.code == 200) {
uni.showToast({
title: "拒单成功",
})
} else {
let message = '本月无拒单机会,请联系客服'
uni.showToast({
icon: 'none',
title: message,
})
}
uni.showToast({
title: res.message || res.data || '拒单成功',
})
}
},
}
......
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