Commit 4064fd15fdd46cc977714a56e860adfdf40ad462
1 parent
cc0e5a5e
Exists in
master
and in
1 other branch
fix: 发车到达-异常提示,再来一单收款人
Showing
4 changed files
with
60 additions
and
17 deletions
Show diff stats
common/api.js
| @@ -127,8 +127,8 @@ module.exports = (vm) => { | @@ -127,8 +127,8 @@ module.exports = (vm) => { | ||
| 127 | downloadStartCar: params => vm.$u.http.get( freightAPI + '/freightOrder/orderDepartAndArriveDownload', params), // 模板下载 | 127 | downloadStartCar: params => vm.$u.http.get( freightAPI + '/freightOrder/orderDepartAndArriveDownload', params), // 模板下载 |
| 128 | importStartCar: params => vm.$u.http.get( freightAPI + '/freightOrder/importOrderDepartAndArrive', params), // 导入 | 128 | importStartCar: params => vm.$u.http.get( freightAPI + '/freightOrder/importOrderDepartAndArrive', params), // 导入 |
| 129 | import: params => vm.$u.http.get( freightAPI + '/freightOrder/import', params), // 导入 | 129 | import: params => vm.$u.http.get( freightAPI + '/freightOrder/import', params), // 导入 |
| 130 | - depart: params => vm.$u.http.post( freightAPI + '/freightOrder/depart', params), // 发车 | ||
| 131 | - arrive: params => vm.$u.http.post( freightAPI + '/freightOrder/arrive', params), // 到达 | 130 | + depart: params => vm.$u.http.post( freightAPI + '/freightOrder/depart', params,{custom: {toast:true}}), // 发车 |
| 131 | + arrive: params => vm.$u.http.post( freightAPI + '/freightOrder/arrive', params,{custom: {toast:true}}), // 到达 | ||
| 132 | sign: params => vm.$u.http.get( freightAPI + '/freightOrder/sign', params), // 签收 | 132 | sign: params => vm.$u.http.get( freightAPI + '/freightOrder/sign', params), // 签收 |
| 133 | cancel: params => vm.$u.http.post( freightAPI + '/freightOrder/cancel', params), // 取消 | 133 | cancel: params => vm.$u.http.post( freightAPI + '/freightOrder/cancel', params), // 取消 |
| 134 | delete: params => vm.$u.http.post( freightAPI + '/freightOrder/delete', params), // 删除 | 134 | delete: params => vm.$u.http.post( freightAPI + '/freightOrder/delete', params), // 删除 |
pages/order/add.vue
| @@ -281,9 +281,32 @@ export default { | @@ -281,9 +281,32 @@ export default { | ||
| 281 | initData(code) { | 281 | initData(code) { |
| 282 | uni.$u.api.freightOrder.getDetail({ code }).then(res => { | 282 | uni.$u.api.freightOrder.getDetail({ code }).then(res => { |
| 283 | let detail = res.result || {}; | 283 | let detail = res.result || {}; |
| 284 | - ['goodsName', 'waypoints', 'allowDriverSeeFreightAmountNode', 'projectCode', 'projectName'].forEach(key => { | 284 | + ['goodsName', 'waypoints', 'allowDriverSeeFreightAmountNode', 'projectCode', 'projectName', 'remark', 'goodsPiece', 'goodsWeight', 'goodsVolume'].forEach(key => { |
| 285 | this.form[key] = detail[key]; | 285 | this.form[key] = detail[key]; |
| 286 | }); | 286 | }); |
| 287 | + if (detail.vehicleLicenseNum) { | ||
| 288 | + this.typeCar = 'licenseNumber'; | ||
| 289 | + this.form.licenseNumber = detail.vehicleLicenseNum; | ||
| 290 | + this.vehicleChange(detail.vehicleLicenseNum); | ||
| 291 | + } | ||
| 292 | + if (detail.trailerLicenseNum) { | ||
| 293 | + setTimeout(() => { | ||
| 294 | + this.typeCar = 'trailerNumber'; | ||
| 295 | + this.form.trailerNumber = detail.trailerLicenseNum; | ||
| 296 | + this.vehicleChange(detail.trailerLicenseNum); | ||
| 297 | + }, 500); | ||
| 298 | + } | ||
| 299 | + this.form.mobile = detail.driverMobile; | ||
| 300 | + this.form.driverId = detail.driverId; | ||
| 301 | + this.form.driverName = detail.driverName; | ||
| 302 | + this.form.driverMobile = detail.driverMobile; | ||
| 303 | + this.payeeModel = { | ||
| 304 | + driverId: detail.payeeId, | ||
| 305 | + dueBank: detail.dueBank, | ||
| 306 | + openingBank: detail.openingBank, | ||
| 307 | + dueBankCardNo: detail.dueBankCardNo, | ||
| 308 | + }; | ||
| 309 | + this.$refs.payee.setItem(this.payeeModel); | ||
| 287 | this.computedDistance(); | 310 | this.computedDistance(); |
| 288 | }); | 311 | }); |
| 289 | }, | 312 | }, |
pages/order/arrival-car.vue
| @@ -26,6 +26,7 @@ | @@ -26,6 +26,7 @@ | ||
| 26 | <template #footer> | 26 | <template #footer> |
| 27 | <u-button type="primary" @tap="submit">确认到达</u-button> | 27 | <u-button type="primary" @tap="submit">确认到达</u-button> |
| 28 | </template> | 28 | </template> |
| 29 | + <u-toast ref="uToast"></u-toast> | ||
| 29 | <u-datetime-picker :show="showLoadTime" :value="loadTimeDef" @cancel="showLoadTime = false" @close="showLoadTime = false" @confirm="loadTimeFormat"></u-datetime-picker> | 30 | <u-datetime-picker :show="showLoadTime" :value="loadTimeDef" @cancel="showLoadTime = false" @close="showLoadTime = false" @confirm="loadTimeFormat"></u-datetime-picker> |
| 30 | </Page> | 31 | </Page> |
| 31 | </template> | 32 | </template> |
| @@ -87,13 +88,22 @@ export default { | @@ -87,13 +88,22 @@ export default { | ||
| 87 | uni.showToast({ title: '到达时间不能小于发车时间', icon: 'none' }); | 88 | uni.showToast({ title: '到达时间不能小于发车时间', icon: 'none' }); |
| 88 | return; | 89 | return; |
| 89 | } | 90 | } |
| 90 | - uni.$u.api.freightOrder.arrive({ codeList: [this.item.code], ...this.form }).then(res => { | ||
| 91 | - if (res.success) { | ||
| 92 | - uni.showToast({ title: '操作成功', icon: 'none' }); | ||
| 93 | - this.getOpenerEventChannel().emit('refreshData'); | ||
| 94 | - setTimeout(() => uni.navigateBack(), 500); | ||
| 95 | - } | ||
| 96 | - }); | 91 | + uni.$u.api.freightOrder |
| 92 | + .arrive({ codeList: [this.item.code], ...this.form }) | ||
| 93 | + .then(res => { | ||
| 94 | + if (res.success) { | ||
| 95 | + uni.showToast({ title: '操作成功', icon: 'none' }); | ||
| 96 | + this.getOpenerEventChannel().emit('refreshData'); | ||
| 97 | + setTimeout(() => uni.navigateBack(), 500); | ||
| 98 | + } | ||
| 99 | + }) | ||
| 100 | + .catch(e => { | ||
| 101 | + this.loading = false; | ||
| 102 | + this.$refs.uToast.show({ | ||
| 103 | + type: 'default', | ||
| 104 | + message: e, | ||
| 105 | + }); | ||
| 106 | + }); | ||
| 97 | }, | 107 | }, |
| 98 | }, | 108 | }, |
| 99 | }; | 109 | }; |
pages/order/start-car.vue
| @@ -22,6 +22,7 @@ | @@ -22,6 +22,7 @@ | ||
| 22 | <template #footer> | 22 | <template #footer> |
| 23 | <u-button type="primary" @tap="submit">确认发车</u-button> | 23 | <u-button type="primary" @tap="submit">确认发车</u-button> |
| 24 | </template> | 24 | </template> |
| 25 | + <u-toast ref="uToast"></u-toast> | ||
| 25 | </Page> | 26 | </Page> |
| 26 | </template> | 27 | </template> |
| 27 | 28 | ||
| @@ -71,13 +72,22 @@ export default { | @@ -71,13 +72,22 @@ export default { | ||
| 71 | uni.showToast({ title: '发车时间不能大于当前时间', icon: 'none' }); | 72 | uni.showToast({ title: '发车时间不能大于当前时间', icon: 'none' }); |
| 72 | return; | 73 | return; |
| 73 | } | 74 | } |
| 74 | - uni.$u.api.freightOrder.depart({ codeList: [this.item.code], ...this.form }).then(res => { | ||
| 75 | - if (res.success) { | ||
| 76 | - uni.showToast({ title: '操作成功', icon: 'none' }); | ||
| 77 | - this.getOpenerEventChannel().emit('refreshData'); | ||
| 78 | - setTimeout(() => uni.navigateBack(), 500); | ||
| 79 | - } | ||
| 80 | - }); | 75 | + uni.$u.api.freightOrder |
| 76 | + .depart({ codeList: [this.item.code], ...this.form }) | ||
| 77 | + .then(res => { | ||
| 78 | + if (res.success) { | ||
| 79 | + uni.showToast({ title: '操作成功', icon: 'none' }); | ||
| 80 | + this.getOpenerEventChannel().emit('refreshData'); | ||
| 81 | + setTimeout(() => uni.navigateBack(), 500); | ||
| 82 | + } | ||
| 83 | + }) | ||
| 84 | + .catch(e => { | ||
| 85 | + this.loading = false; | ||
| 86 | + this.$refs.uToast.show({ | ||
| 87 | + type: 'default', | ||
| 88 | + message: e, | ||
| 89 | + }); | ||
| 90 | + }); | ||
| 81 | }, | 91 | }, |
| 82 | }, | 92 | }, |
| 83 | }; | 93 | }; |