Commit a312c8f224379fd1b265110fac3ab9009085c5e4
1 parent
beae4449
Exists in
master
and in
1 other branch
fix: 宁夏邮政定制
Showing
5 changed files
with
216 additions
and
19 deletions
Show diff stats
pages.json
| @@ -118,6 +118,12 @@ | @@ -118,6 +118,12 @@ | ||
| 118 | "style": { | 118 | "style": { |
| 119 | "navigationBarTitleText": "填写备注" | 119 | "navigationBarTitleText": "填写备注" |
| 120 | } | 120 | } |
| 121 | + }, | ||
| 122 | + { | ||
| 123 | + "path": "pages/order/goods-info", | ||
| 124 | + "style": { | ||
| 125 | + "navigationBarTitleText": "货物信息" | ||
| 126 | + } | ||
| 121 | },{ | 127 | },{ |
| 122 | "path": "pages/order/insurance", | 128 | "path": "pages/order/insurance", |
| 123 | "style": { | 129 | "style": { |
pages/global/search-common.vue
pages/order/add.vue
| @@ -24,26 +24,29 @@ | @@ -24,26 +24,29 @@ | ||
| 24 | <u-form-item label="卸货地址" required @click="() => selectAddress(1)"> | 24 | <u-form-item label="卸货地址" required @click="() => selectAddress(1)"> |
| 25 | <u-input v-model="form.waypoints[1].address" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled /> | 25 | <u-input v-model="form.waypoints[1].address" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled /> |
| 26 | </u-form-item> | 26 | </u-form-item> |
| 27 | - </view> | ||
| 28 | - <view class="card"> | ||
| 29 | - <u-form-item label="货物名称" required @click="choseGoodsName"> | ||
| 30 | - <u-input v-model="form.goodsName" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled /> | ||
| 31 | - </u-form-item> | ||
| 32 | - <u-form-item v-if="showGoodsValue" label="货物价值" required> | ||
| 33 | - <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入" @change="computedService"> | ||
| 34 | - <template slot="suffix">元</template> | ||
| 35 | - </u-input> | ||
| 36 | - </u-form-item> | ||
| 37 | - <u-form-item label="货物件数"> | ||
| 38 | - <u-input v-model="form.goodsPiece" border="none" type="digit" placeholder="请输入,选填" /> | ||
| 39 | - </u-form-item> | ||
| 40 | - <u-form-item label="货物吨数" required> | ||
| 41 | - <u-input v-model="form.goodsWeight" border="none" type="digit" placeholder="请输入" @change="computedPaid" /> | ||
| 42 | - </u-form-item> | ||
| 43 | - <u-form-item label="货物方数"> | ||
| 44 | - <u-input v-model="form.goodsVolume" border="none" type="digit" placeholder="请输入,选填" /> | 27 | + <u-form-item label="货物信息" required @click="selectGoodsInfo"> |
| 28 | + <u-input v-model="form.goodsInfo" border="none" suffix-icon="arrow-right" placeholder="请输入" disabledColor="#ffffff" disabled /> | ||
| 45 | </u-form-item> | 29 | </u-form-item> |
| 46 | </view> | 30 | </view> |
| 31 | + <!-- <view class="card">--> | ||
| 32 | + <!-- <u-form-item label="货物名称" required @click="choseGoodsName">--> | ||
| 33 | + <!-- <u-input v-model="form.goodsName" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled />--> | ||
| 34 | + <!-- </u-form-item>--> | ||
| 35 | + <!-- <u-form-item v-if="showGoodsValue" label="货物价值" required>--> | ||
| 36 | + <!-- <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入" @change="computedService">--> | ||
| 37 | + <!-- <template slot="suffix">元</template>--> | ||
| 38 | + <!-- </u-input>--> | ||
| 39 | + <!-- </u-form-item>--> | ||
| 40 | + <!-- <u-form-item label="货物件数">--> | ||
| 41 | + <!-- <u-input v-model="form.goodsPiece" border="none" type="digit" placeholder="请输入,选填" />--> | ||
| 42 | + <!-- </u-form-item>--> | ||
| 43 | + <!-- <u-form-item label="货物吨数" required>--> | ||
| 44 | + <!-- <u-input v-model="form.goodsWeight" border="none" type="digit" placeholder="请输入" @change="computedPaid" />--> | ||
| 45 | + <!-- </u-form-item>--> | ||
| 46 | + <!-- <u-form-item label="货物方数">--> | ||
| 47 | + <!-- <u-input v-model="form.goodsVolume" border="none" type="digit" placeholder="请输入,选填" />--> | ||
| 48 | + <!-- </u-form-item>--> | ||
| 49 | + <!-- </view>--> | ||
| 47 | <view class="card" v-if="form.priceType === 'TON'"> | 50 | <view class="card" v-if="form.priceType === 'TON'"> |
| 48 | <u-form-item label="计价方式"> | 51 | <u-form-item label="计价方式"> |
| 49 | <render-dict style="color: #2b2a27" :value="form.priceType" dict="FREIGHT_GOODS_SOURCE_PRICE_TYPE"></render-dict> | 52 | <render-dict style="color: #2b2a27" :value="form.priceType" dict="FREIGHT_GOODS_SOURCE_PRICE_TYPE"></render-dict> |
| @@ -206,6 +209,7 @@ | @@ -206,6 +209,7 @@ | ||
| 206 | </template> | 209 | </template> |
| 207 | <script> | 210 | <script> |
| 208 | import { urlParam } from '@/utils/param'; | 211 | import { urlParam } from '@/utils/param'; |
| 212 | +import { mapGetters } from 'vuex'; | ||
| 209 | import dayjs from 'dayjs'; | 213 | import dayjs from 'dayjs'; |
| 210 | import payee from '../../components/card/payee.vue'; | 214 | import payee from '../../components/card/payee.vue'; |
| 211 | import PopupPlatenumber from '../../components/popup/popup-platenumber.vue'; | 215 | import PopupPlatenumber from '../../components/popup/popup-platenumber.vue'; |
| @@ -237,6 +241,7 @@ export default { | @@ -237,6 +241,7 @@ export default { | ||
| 237 | loadTime: '', | 241 | loadTime: '', |
| 238 | projectName: '', | 242 | projectName: '', |
| 239 | customerOrderCode: '', | 243 | customerOrderCode: '', |
| 244 | + goodsInfo: '', | ||
| 240 | goodsName: '', | 245 | goodsName: '', |
| 241 | goodsValue: '', | 246 | goodsValue: '', |
| 242 | goodsPiece: '', | 247 | goodsPiece: '', |
| @@ -271,6 +276,7 @@ export default { | @@ -271,6 +276,7 @@ export default { | ||
| 271 | }; | 276 | }; |
| 272 | }, | 277 | }, |
| 273 | computed: { | 278 | computed: { |
| 279 | + ...mapGetters(['freightInfo']), | ||
| 274 | isCollect() { | 280 | isCollect() { |
| 275 | return this.currentFreight.collectByOtherFlag || false; | 281 | return this.currentFreight.collectByOtherFlag || false; |
| 276 | }, | 282 | }, |
| @@ -287,6 +293,9 @@ export default { | @@ -287,6 +293,9 @@ export default { | ||
| 287 | showGoodsValue() { | 293 | showGoodsValue() { |
| 288 | return this.currentFreight ? this.currentFreight.driverSecurityServiceFlag || this.currentFreight.securityServiceFlag : false; | 294 | return this.currentFreight ? this.currentFreight.driverSecurityServiceFlag || this.currentFreight.securityServiceFlag : false; |
| 289 | }, | 295 | }, |
| 296 | + ningXiaYouZhengFlag() { | ||
| 297 | + return this.freightInfo.enterpriseName === '中国邮政速递物流股份有限公司宁夏物流运营分公司' && this.form.projectName === 'JYYJ'; | ||
| 298 | + }, | ||
| 290 | }, | 299 | }, |
| 291 | onLoad(option) { | 300 | onLoad(option) { |
| 292 | // 从抢单来的数据 | 301 | // 从抢单来的数据 |
| @@ -468,6 +477,39 @@ export default { | @@ -468,6 +477,39 @@ export default { | ||
| 468 | this.setFormValue(detail); | 477 | this.setFormValue(detail); |
| 469 | }); | 478 | }); |
| 470 | }, | 479 | }, |
| 480 | + selectGoodsInfo() { | ||
| 481 | + uni.navigateTo({ | ||
| 482 | + url: `/pages/order/goods-info`, | ||
| 483 | + events: { | ||
| 484 | + submitData: option => { | ||
| 485 | + this.form = { | ||
| 486 | + ...this.form, | ||
| 487 | + ...option, | ||
| 488 | + }; | ||
| 489 | + this.computedPaid(); | ||
| 490 | + this.computedService(); | ||
| 491 | + let goodsInfo = []; | ||
| 492 | + if (this.form.goodsName) { | ||
| 493 | + goodsInfo.push(this.form.goodsName); | ||
| 494 | + } | ||
| 495 | + if (this.form.goodsPiece) { | ||
| 496 | + goodsInfo.push(this.form.goodsPiece + '件'); | ||
| 497 | + } | ||
| 498 | + if (this.form.goodsWeight) { | ||
| 499 | + goodsInfo.push(this.form.goodsWeight + '吨'); | ||
| 500 | + } | ||
| 501 | + if (this.form.goodsVolume) { | ||
| 502 | + goodsInfo.push(this.form.goodsVolume + '方'); | ||
| 503 | + } | ||
| 504 | + this.form.goodsInfo = goodsInfo.join(','); | ||
| 505 | + uni.navigateBack(); | ||
| 506 | + }, | ||
| 507 | + }, | ||
| 508 | + success: res => { | ||
| 509 | + res.eventChannel.emit('data', { form: this.form, showGoodsValue: this.showGoodsValue, ningXiaYouZhengFlag: this.ningXiaYouZhengFlag }); | ||
| 510 | + }, | ||
| 511 | + }); | ||
| 512 | + }, | ||
| 471 | selectRemark() { | 513 | selectRemark() { |
| 472 | uni.$once('select-remark', remark => { | 514 | uni.$once('select-remark', remark => { |
| 473 | this.form.remark = remark || ''; | 515 | this.form.remark = remark || ''; |
pages/order/detail.vue
| @@ -324,6 +324,7 @@ | @@ -324,6 +324,7 @@ | ||
| 324 | </Page> | 324 | </Page> |
| 325 | </template> | 325 | </template> |
| 326 | <script> | 326 | <script> |
| 327 | +import { mapGetters } from 'vuex'; | ||
| 327 | import FieldCopy from '../../components/field/field-copy.vue'; | 328 | import FieldCopy from '../../components/field/field-copy.vue'; |
| 328 | import Payee from '../../components/card/payee.vue'; | 329 | import Payee from '../../components/card/payee.vue'; |
| 329 | import USteps from '../../uni_modules/uview-ui/components/u-steps/u-steps.vue'; | 330 | import USteps from '../../uni_modules/uview-ui/components/u-steps/u-steps.vue'; |
| @@ -367,6 +368,7 @@ export default { | @@ -367,6 +368,7 @@ export default { | ||
| 367 | }; | 368 | }; |
| 368 | }, | 369 | }, |
| 369 | computed: { | 370 | computed: { |
| 371 | + ...mapGetters(['freightInfo']), | ||
| 370 | amountList() { | 372 | amountList() { |
| 371 | let list = this.item.orderFeePayPlanList; | 373 | let list = this.item.orderFeePayPlanList; |
| 372 | if (!list || list.length === 0) return []; | 374 | if (!list || list.length === 0) return []; |
| @@ -401,6 +403,13 @@ export default { | @@ -401,6 +403,13 @@ export default { | ||
| 401 | // 自动计算货到 | 403 | // 自动计算货到 |
| 402 | return 'OUT_INVITE_ARRIVAL' === this.currentFreight?.autoComputeFeeType; | 404 | return 'OUT_INVITE_ARRIVAL' === this.currentFreight?.autoComputeFeeType; |
| 403 | }, | 405 | }, |
| 406 | + // 获取价值 | ||
| 407 | + showGoodsValue() { | ||
| 408 | + return this.currentFreight ? this.currentFreight.driverSecurityServiceFlag || this.currentFreight.securityServiceFlag : false; | ||
| 409 | + }, | ||
| 410 | + ningXiaYouZhengFlag() { | ||
| 411 | + return this.freightInfo.enterpriseName === '中国邮政速递物流股份有限公司宁夏物流运营分公司' && this.item.projectName === 'JYYJ'; | ||
| 412 | + }, | ||
| 404 | }, | 413 | }, |
| 405 | onLoad(options) { | 414 | onLoad(options) { |
| 406 | if (options.code) { | 415 | if (options.code) { |
| @@ -472,11 +481,24 @@ export default { | @@ -472,11 +481,24 @@ export default { | ||
| 472 | }, | 481 | }, |
| 473 | toChangeGoods() { | 482 | toChangeGoods() { |
| 474 | uni.navigateTo({ | 483 | uni.navigateTo({ |
| 475 | - url: '/pages/order/change-goods?code=' + this.item.code, | 484 | + url: '/pages/order/goods-info', |
| 476 | events: { | 485 | events: { |
| 477 | refreshData: () => { | 486 | refreshData: () => { |
| 478 | this.initData(this.item.code); | 487 | this.initData(this.item.code); |
| 479 | }, | 488 | }, |
| 489 | + submitData: form => { | ||
| 490 | + uni.$u.api.freightOrder.modifyGoods({ code: this.item.code, ...form }).then(res => { | ||
| 491 | + if (res.success) { | ||
| 492 | + uni.showToast({ title: '操作成功', icon: 'none' }); | ||
| 493 | + this.initData(this.item.code); | ||
| 494 | + // this.getOpenerEventChannel().emit('refreshData'); | ||
| 495 | + setTimeout(() => uni.navigateBack(), 500); | ||
| 496 | + } | ||
| 497 | + }); | ||
| 498 | + }, | ||
| 499 | + }, | ||
| 500 | + success: res => { | ||
| 501 | + res.eventChannel.emit('data', { form: this.item, showGoodsValue: this.showGoodsValue, ningXiaYouZhengFlag: this.ningXiaYouZhengFlag }); | ||
| 480 | }, | 502 | }, |
| 481 | }); | 503 | }); |
| 482 | }, | 504 | }, |
| @@ -0,0 +1,120 @@ | @@ -0,0 +1,120 @@ | ||
| 1 | +<template> | ||
| 2 | + <Page name="goods-info" flank> | ||
| 3 | + <template #content> | ||
| 4 | + <u-form :model="form" ref="uForm" labelWidth="100"> | ||
| 5 | + <view class="card"> | ||
| 6 | + <u-form-item label="货物名称" required @click="choseGoodsName"> | ||
| 7 | + <u-input v-model="form.goodsName" border="none" suffix-icon="arrow-right" placeholder="请选择" disabledColor="#ffffff" disabled /> | ||
| 8 | + </u-form-item> | ||
| 9 | + <u-form-item v-if="showGoodsValue" label="货物价值" required> | ||
| 10 | + <u-input v-model="form.goodsValue" border="none" type="digit" placeholder="请输入"> | ||
| 11 | + <template slot="suffix">元</template> | ||
| 12 | + </u-input> | ||
| 13 | + </u-form-item> | ||
| 14 | + <u-form-item label="货物件数"> | ||
| 15 | + <u-input v-model="form.goodsPiece" border="none" type="digit" placeholder="请输入,选填" /> | ||
| 16 | + </u-form-item> | ||
| 17 | + <u-form-item label="货物吨数" required> | ||
| 18 | + <u-input v-model="form.goodsWeight" border="none" type="digit" placeholder="请输入" /> | ||
| 19 | + </u-form-item> | ||
| 20 | + <u-form-item label="货物方数"> | ||
| 21 | + <u-input v-model="form.goodsVolume" border="none" type="digit" placeholder="请输入,选填" /> | ||
| 22 | + </u-form-item> | ||
| 23 | + <u-form-item label="发货单位" :required="ningXiaYouZhengFlag"> | ||
| 24 | + <u-input v-model="form.dispatchUnit" border="none" placeholder="请输入" /> | ||
| 25 | + </u-form-item> | ||
| 26 | + <u-form-item label="合同号" :required="ningXiaYouZhengFlag"> | ||
| 27 | + <u-input v-model="form.customerContractNo" border="none" placeholder="请输入" /> | ||
| 28 | + </u-form-item> | ||
| 29 | + <u-form-item label="运输班次号" :required="ningXiaYouZhengFlag"> | ||
| 30 | + <u-input v-model="form.transportShiftNo" border="none" placeholder="请输入" /> | ||
| 31 | + </u-form-item> | ||
| 32 | + </view> | ||
| 33 | + </u-form> | ||
| 34 | + </template> | ||
| 35 | + <template #footer> | ||
| 36 | + <u-button type="primary" @click="onSubmit">确定</u-button> | ||
| 37 | + </template> | ||
| 38 | + </Page> | ||
| 39 | +</template> | ||
| 40 | +<script> | ||
| 41 | +import { urlParam } from '@/utils/param'; | ||
| 42 | + | ||
| 43 | +export default { | ||
| 44 | + name: 'goods-info', | ||
| 45 | + data() { | ||
| 46 | + return { | ||
| 47 | + showGoodsValue: '', | ||
| 48 | + ningXiaYouZhengFlag: '', | ||
| 49 | + projectCode: '', | ||
| 50 | + form: { | ||
| 51 | + goodsName: '', | ||
| 52 | + goodsValue: '', | ||
| 53 | + goodsPiece: '', | ||
| 54 | + goodsWeight: '', | ||
| 55 | + goodsVolume: '', | ||
| 56 | + dispatchUnit: '', | ||
| 57 | + customerContractNo: '', | ||
| 58 | + transportShiftNo: '', | ||
| 59 | + }, | ||
| 60 | + }; | ||
| 61 | + }, | ||
| 62 | + onLoad(option) { | ||
| 63 | + const eventChannel = this.getOpenerEventChannel(); | ||
| 64 | + eventChannel.on('data', data => { | ||
| 65 | + this.showGoodsValue = data.showGoodsValue || false; | ||
| 66 | + this.ningXiaYouZhengFlag = data.ningXiaYouZhengFlag || false; | ||
| 67 | + this.setHisData(data.form); | ||
| 68 | + this.projectCode = data.form.projectCode || ''; | ||
| 69 | + }); | ||
| 70 | + }, | ||
| 71 | + methods: { | ||
| 72 | + setHisData(v) { | ||
| 73 | + Object.keys(this.form).forEach(k => { | ||
| 74 | + this.form[k] = v[k] || ''; | ||
| 75 | + }); | ||
| 76 | + }, | ||
| 77 | + choseGoodsName() { | ||
| 78 | + uni.$off('select-common'); | ||
| 79 | + uni.$once('select-common', option => { | ||
| 80 | + this.form.goodsName = option.name; | ||
| 81 | + }); | ||
| 82 | + uni.navigateTo({ | ||
| 83 | + url: `/pages/global/search-common${urlParam({ | ||
| 84 | + mode: 'select', | ||
| 85 | + url: 'goodsName', | ||
| 86 | + title: '货物名称', | ||
| 87 | + label: 'name', | ||
| 88 | + value: '', | ||
| 89 | + params: `{"projectCode":"${this.projectCode}"}`, | ||
| 90 | + })}`, | ||
| 91 | + }); | ||
| 92 | + }, | ||
| 93 | + onSubmit() { | ||
| 94 | + this.getOpenerEventChannel().emit('submitData', this.form); | ||
| 95 | + // setTimeout(() => uni.navigateBack(), 500); | ||
| 96 | + }, | ||
| 97 | + }, | ||
| 98 | +}; | ||
| 99 | +</script> | ||
| 100 | + | ||
| 101 | +<style lang="scss"> | ||
| 102 | +.page-goods-info { | ||
| 103 | + &__footer { | ||
| 104 | + background: $color-white; | ||
| 105 | + } | ||
| 106 | + .card { | ||
| 107 | + color: #999999; | ||
| 108 | + background-color: $color-white; | ||
| 109 | + border-radius: $radius-md; | ||
| 110 | + box-shadow: $shadow-normal; | ||
| 111 | + .u-form-item { | ||
| 112 | + padding-left: $padding-md !important; | ||
| 113 | + padding-right: $padding-sm !important; | ||
| 114 | + } | ||
| 115 | + .u-form-item + .u-form-item { | ||
| 116 | + border-top: 1px solid #f6f6f6; | ||
| 117 | + } | ||
| 118 | + } | ||
| 119 | +} | ||
| 120 | +</style> |