|
|
@@ -786,7 +786,8 @@ export default {
|
|
|
|
|
|
saomaPeisong: false,
|
|
|
//画板边长默认是屏幕宽度,正方形画布
|
|
|
- cw: uni.getSystemInfoSync().windowWidth
|
|
|
+ cw: uni.getSystemInfoSync().windowWidth,
|
|
|
+ list2:[]
|
|
|
}
|
|
|
},
|
|
|
onHide() {
|
|
|
@@ -959,42 +960,43 @@ export default {
|
|
|
mask: true // 是否显示透明蒙层,防止触摸穿透
|
|
|
})
|
|
|
var that = this
|
|
|
+ that.list2=[]
|
|
|
that.$Request
|
|
|
- .getT('/app/tbindent/selectTbIndentPage', {
|
|
|
- page: 1,
|
|
|
- limit: 10,
|
|
|
- acquireCode: that.shoudanma
|
|
|
+ .getT(`/app/tbindent/get-by-code/${that.shoudanma}`, {///app/tbindent/selectTbIndentPage
|
|
|
+ // page: 1,
|
|
|
+ // limit: 10,
|
|
|
+ // acquireCode: that.shoudanma
|
|
|
})
|
|
|
.then((res) => {
|
|
|
console.log(res, 'lk')
|
|
|
uni.hideLoading()
|
|
|
if (res.data) {
|
|
|
- if (res.data.list.length > 0) {
|
|
|
- for (var i = 0; i < res.data.list.length; i++) {
|
|
|
- if (res.data.list[i].distancess > 1000) {
|
|
|
- res.data.list[i].distancess = Number(res.data.list[i].distancess / 1000).toFixed(2) + 'km'
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ if (res.data.distancess > 1000) {
|
|
|
+ res.data.distancess = Number(res.data.distancess / 1000).toFixed(2) + 'km'
|
|
|
} else {
|
|
|
- if (res.data.list[i].distancess == '0') {
|
|
|
- res.data.list[i].distancess = '0m'
|
|
|
+ if (res.data.distancess == '0') {
|
|
|
+ res.data.distancess = '0m'
|
|
|
} else {
|
|
|
- res.data.list[i].distancess = Number(res.data.list[i].distancess).toFixed(1) + 'm'
|
|
|
+ res.data.distancess = Number(res.data.distancess).toFixed(1) + 'm'
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (res.data.list[i].distancessd > 1000) {
|
|
|
- res.data.list[i].distancessd = Number(res.data.list[i].distancessd / 1000).toFixed(2) + 'km'
|
|
|
+ if (res.data.distancessd > 1000) {
|
|
|
+ res.data.distancessd = Number(res.data.distancessd / 1000).toFixed(2) + 'km'
|
|
|
} else {
|
|
|
- if (res.data.list[i].distancessd == '0') {
|
|
|
- res.data.list[i].distancessd = '0m'
|
|
|
+ if (res.data.distancessd == '0') {
|
|
|
+ res.data.distancessd = '0m'
|
|
|
} else {
|
|
|
- res.data.list[i].distancessd = Number(res.data.list[i].distancessd).toFixed(1) + 'm'
|
|
|
+ res.data.distancessd = Number(res.data.distancessd).toFixed(1) + 'm'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
var saomajie = []
|
|
|
- saomajie = res.data.list
|
|
|
- this.list2 = res.data.list
|
|
|
+ saomajie.push(res.data)
|
|
|
+ that.list2.push(res.data)
|
|
|
console.log(saomajie, '列表')
|
|
|
if (saomajie[0].indentState == '2' || saomajie[0].indentState == '3') {
|
|
|
//收单
|
|
|
@@ -1039,52 +1041,69 @@ export default {
|
|
|
mask: true // 是否显示透明蒙层,防止触摸穿透
|
|
|
})
|
|
|
var that = this
|
|
|
+ that.list2=[]
|
|
|
var data = {
|
|
|
page: that.page2,
|
|
|
limit: 10,
|
|
|
acquireCode: that.shoudanma
|
|
|
}
|
|
|
console.log(data, 'data')
|
|
|
+ that.list_box = []
|
|
|
that.$Request
|
|
|
- .getT('/app/tbindent/selectTbIndentPage', {
|
|
|
- page: that.page2,
|
|
|
- limit: 10,
|
|
|
- acquireCode: that.shoudanma
|
|
|
+ .getT(`/app/tbindent/get-by-code/${that.shoudanma}`, {///app/tbindent/selectTbIndentPage
|
|
|
+ // page: that.page2,
|
|
|
+ // limit: 10,
|
|
|
+ // acquireCode: that.shoudanma
|
|
|
})
|
|
|
.then((res) => {
|
|
|
console.log(res, 'lk')
|
|
|
uni.hideLoading()
|
|
|
if (res.data) {
|
|
|
- if (res.data.list.length > 0) {
|
|
|
- for (var i = 0; i < res.data.list.length; i++) {
|
|
|
- if (res.data.list[i].distancess > 1000) {
|
|
|
- res.data.list[i].distancess = Number(res.data.list[i].distancess / 1000).toFixed(2) + 'km'
|
|
|
+ if (res.data.length > 0) {
|
|
|
+ for (var i = 0; i < res.data.length; i++) {
|
|
|
+ if (res.data.distancess > 1000) {
|
|
|
+ res.data.distancess = Number(res.data.distancess / 1000).toFixed(2) + 'km'
|
|
|
} else {
|
|
|
- if (res.data.list[i].distancess == '0') {
|
|
|
- res.data.list[i].distancess = '0m'
|
|
|
+ if (res.data.distancess == '0') {
|
|
|
+ res.data.distancess = '0m'
|
|
|
} else {
|
|
|
- res.data.list[i].distancess = Number(res.data.list[i].distancess).toFixed(1) + 'm'
|
|
|
+ res.data.distancess = Number(res.data.distancess).toFixed(1) + 'm'
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (res.data.list[i].distancessd > 1000) {
|
|
|
- res.data.list[i].distancessd = Number(res.data.list[i].distancessd / 1000).toFixed(2) + 'km'
|
|
|
+ if (res.data.distancessd > 1000) {
|
|
|
+ res.data.distancessd = Number(res.data.distancessd / 1000).toFixed(2) + 'km'
|
|
|
} else {
|
|
|
- if (res.data.list[i].distancessd == '0') {
|
|
|
- res.data.list[i].distancessd = '0m'
|
|
|
+ if (res.data.distancessd == '0') {
|
|
|
+ res.data.distancessd = '0m'
|
|
|
} else {
|
|
|
- res.data.list[i].distancessd = Number(res.data.list[i].distancessd).toFixed(1) + 'm'
|
|
|
+ res.data.distancessd = Number(res.data.distancessd).toFixed(1) + 'm'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- that.totalCount2 = res.data.totalCount
|
|
|
- if (that.page2 == 1) {
|
|
|
- that.list_box = res.data.list
|
|
|
+ that.totalCount2 = 1//res.data.totalCount
|
|
|
+ // if (that.page2 == 1) {
|
|
|
+ // that.list_box = res.data
|
|
|
+ that.list_box.push(res.data)
|
|
|
+ // } else {
|
|
|
+ // that.list_box = that.list_box.concat(res.data)
|
|
|
+ // }
|
|
|
+ console.log('list_box', that.list_box)
|
|
|
+
|
|
|
+ var saomajie = []
|
|
|
+ saomajie.push(res.data)
|
|
|
+ that.list2.push(res.data)
|
|
|
+ console.log(saomajie, '列表')
|
|
|
+ if (saomajie[0].indentState == '2' || saomajie[0].indentState == '3') {
|
|
|
+ //收单
|
|
|
+ that.bindorder()
|
|
|
+ } else if (saomajie[0].indentState == '4') {
|
|
|
+ that.saomaPeisong = true
|
|
|
} else {
|
|
|
- that.list_box = that.list_box.concat(res.data.list)
|
|
|
+ that.jiedanNo = true
|
|
|
+ that.shoudanma = ''
|
|
|
}
|
|
|
- console.log('list_box', that.list_box)
|
|
|
} else if (res.msg == '当前订单无法接单') {
|
|
|
this.jiedanNo = true
|
|
|
}
|
|
|
@@ -1278,8 +1297,8 @@ export default {
|
|
|
})
|
|
|
console.log('用户点击确定')
|
|
|
that.$Request
|
|
|
- .postT('/app/tbindent/orderIndentReceiving', {
|
|
|
- acquireCode: that.shoudanma
|
|
|
+ .putJson(`/app/tbindent/receive/${that.shoudanma}`, {///app/tbindent/orderIndentReceiving
|
|
|
+ // acquireCode: that.shoudanma
|
|
|
})
|
|
|
.then((res) => {
|
|
|
console.log(res, 'ppp')
|
|
|
@@ -1828,7 +1847,7 @@ export default {
|
|
|
mask: true // 是否显示透明蒙层,防止触摸穿透
|
|
|
})
|
|
|
this.$Request
|
|
|
- .postJson('/app/tbindent/orderRiderDelivery', {
|
|
|
+ .postJson('/app/tbindent/finish-order', {///app/tbindent/orderRiderDelivery
|
|
|
smsTemplateId: that.duanxin[0].id,
|
|
|
// indentNumber: that.indentNumber,
|
|
|
acquireCode: that.shoudanma
|
|
|
@@ -1856,6 +1875,7 @@ export default {
|
|
|
title: res.msg,
|
|
|
icon: 'none'
|
|
|
})
|
|
|
+ that.list_box = []
|
|
|
// 在toast显示2000毫秒(2秒)后执行操作
|
|
|
setTimeout(function () {
|
|
|
that.sousuoList()
|