|
@@ -260,16 +260,26 @@
|
|
|
console.log(this.detailData, "行政区划分")
|
|
|
this.shippingNoteInfos[0].shippingNoteNumber = this.detailData.orderNo, //运单号
|
|
|
this.shippingNoteInfos[0].serialNumber = "0000", //分单号
|
|
|
- this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.publishTaskInfo.sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.publishTaskInfo.unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLongitude = this.detailData.loadingLatitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLatitude = this.detailData.loadingLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLongitude = this.detailData.publishTaskInfo.unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLatitude = this.detailData.publishTaskInfo.unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].startLocationText = this.detailData.sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].endLocationText = this.detailData.unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
- this.shippingNoteInfos[0].vehicleNumber = this.detailData.carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
|
|
|
- this.shippingNoteInfos[0].driverName = this.detailData.driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
|
|
|
+ this.shippingNoteInfos[0].startCountrySubdivisionCode = this.detailData.publishTaskInfo
|
|
|
+ .sendAdCode, //起点位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endCountrySubdivisionCode = this.detailData.publishTaskInfo
|
|
|
+ .unsendAdCode, //到达位置行政区划代码,调 用 start/stop/pause/restart 时 必填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLongitude = this.detailData
|
|
|
+ .loadingLatitude, //起点位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLatitude = this.detailData
|
|
|
+ .loadingLatitude, //起点位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLongitude = this.detailData.publishTaskInfo
|
|
|
+ .unsendLongitude, //到达位置经度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLatitude = this.detailData.publishTaskInfo
|
|
|
+ .unsendLatitude, //到达位置纬度,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].startLocationText = this.detailData
|
|
|
+ .sendCity, //起点地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].endLocationText = this.detailData
|
|
|
+ .unloadCity, //到达地址文字描述,调用 start/stop/pause/restart 时必 填,调用 send 非必填
|
|
|
+ this.shippingNoteInfos[0].vehicleNumber = this.detailData
|
|
|
+ .carNumber, //车牌号,SDK 回调返回,调 用 start/stop/pause/restart/必 填,send 时非必填
|
|
|
+ this.shippingNoteInfos[0].driverName = this.detailData
|
|
|
+ .driverName, //司机姓名,SDK 回调返回, 调用 start/stop/pause/restart/ 必填,send 时非必填
|
|
|
this.shippingNoteInfos[0].interval = "5000" //请求时间间隔,SDK 回调返 回(单位 ms)
|
|
|
|
|
|
//}],//运单信息列表,一辆车运单数最大支持数为 10
|
|
@@ -277,7 +287,8 @@
|
|
|
let that = this
|
|
|
console.log("start this.shippingNoteInfos")
|
|
|
console.log(this.shippingNoteInfos)
|
|
|
- sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos,
|
|
|
+ var shippingNoteInfos = this.shippingNoteInfos
|
|
|
+ sdkwx.start(this.detailData.carNo, this.firstAuthentication.driverName, remark, shippingNoteInfos,
|
|
|
function(res) {
|
|
|
if (res.type == "onSuccess") {
|
|
|
//成功
|
|
@@ -312,16 +323,21 @@
|
|
|
let that = this
|
|
|
console.log("send this.shippingNoteInfos")
|
|
|
console.log(this.shippingNoteInfos)
|
|
|
- sdkwx.send(this.detailData.carNo, this.firstAuthentication.driverName, remark, this.shippingNoteInfos,
|
|
|
+ var shippingNoteInfos = this.shippingNoteInfos;
|
|
|
+ sdkwx.send(this.detailData.carNo, this.firstAuthentication.driverName, remark, shippingNoteInfos,
|
|
|
function(res) {
|
|
|
console.log('发送定位', res);
|
|
|
+ var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
|
if (res.type == "onSuccess") {
|
|
|
- var shippingNoteInfos = res.data[0]; //运单信息列表
|
|
|
- let dateTtime = Number(shippingNoteInfos.interval + 1000)
|
|
|
- console.log("开始定时", dateTtime)
|
|
|
- that.timer = setTimeout(() => {
|
|
|
- that.send()
|
|
|
- }, dateTtime);
|
|
|
+
|
|
|
+ if (shippingNoteInfos) {
|
|
|
+ let dateTime = Number(shippingNoteInfos.interval + 1000)
|
|
|
+ console.log("定时开始", dateTime)
|
|
|
+ that.timer = setTimeout(() => {
|
|
|
+ //TODO
|
|
|
+ that.send()
|
|
|
+ }, dateTime);
|
|
|
+ }
|
|
|
} else if (res.type == "onFailure") {
|
|
|
var errorCode = res.data.errorCode; //错误码
|
|
|
var errorMsg = res.data.errorMsg; //错误描述
|