Commit 637bbf9cca9d0407e15e5f0ea5f19715b96bca3d
1 parent
7bce5260
Exists in
master
and in
1 other branch
fix: 货源
Showing
17 changed files
with
636 additions
and
318 deletions
Show diff stats
common/api.js
| @@ -150,6 +150,8 @@ module.exports = (vm) => { | @@ -150,6 +150,8 @@ module.exports = (vm) => { | ||
| 150 | modifyGoods: params => vm.$u.http.post( freightAPI + '/freightOrder/maModifyGoods', params), // 更改货物信息 | 150 | modifyGoods: params => vm.$u.http.post( freightAPI + '/freightOrder/maModifyGoods', params), // 更改货物信息 |
| 151 | adjustAmount: params => vm.$u.http.post( freightAPI + '/freightOrder/maAdjustAmount', params), // 更改运费 | 151 | adjustAmount: params => vm.$u.http.post( freightAPI + '/freightOrder/maAdjustAmount', params), // 更改运费 |
| 152 | modifyReceiptAttachment: params => vm.$u.http.post( freightAdmin + '/woss/freightOrder/modifyReceiptAttachment', params), // 修改回单附件 | 152 | modifyReceiptAttachment: params => vm.$u.http.post( freightAdmin + '/woss/freightOrder/modifyReceiptAttachment', params), // 修改回单附件 |
| 153 | + modifyDepartureWeightAttachment: params => vm.$u.http.post( freightAPI + '/freightOrder/modifyReceiptAttachment', params), // 修改装车磅单 | ||
| 154 | + modifyArrivalWeightAttachment: params => vm.$u.http.post( freightAPI + '/freightOrder/modifyReceiptAttachment', params), // 修改卸车磅单 | ||
| 153 | count: params => vm.$u.http.post( freightAPI + '/freightOrder/count', params), // 状态数量 | 155 | count: params => vm.$u.http.post( freightAPI + '/freightOrder/count', params), // 状态数量 |
| 154 | getDetail: params => vm.$u.http.get( freightAPI + '/freightOrder/getDetail', {params}), // 订单详情 | 156 | getDetail: params => vm.$u.http.get( freightAPI + '/freightOrder/getDetail', {params}), // 订单详情 |
| 155 | checkDepartureTime: params => vm.$u.http.get( freightAPI + '/freightOrder/checkDepartureTime', params), // 校验选择的运单发车时间是否一致 | 157 | checkDepartureTime: params => vm.$u.http.get( freightAPI + '/freightOrder/checkDepartureTime', params), // 校验选择的运单发车时间是否一致 |
| @@ -175,6 +177,7 @@ module.exports = (vm) => { | @@ -175,6 +177,7 @@ module.exports = (vm) => { | ||
| 175 | count: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/count', {params}), | 177 | count: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/count', {params}), |
| 176 | getDetail: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/getDetail', {params}), | 178 | getDetail: params => vm.$u.http.get( freightAPI + '/freightGoodsSourceV2/getDetail', {params}), |
| 177 | add: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/add', data,{custom: {toast:true}}), | 179 | add: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/add', data,{custom: {toast:true}}), |
| 180 | + addOrder: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/addOrder', data,{custom: {toast:true}}), | ||
| 178 | modify: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/modify', data), | 181 | modify: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/modify', data), |
| 179 | complete: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/complete', data), | 182 | complete: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/complete', data), |
| 180 | cancel: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/cancel', data), | 183 | cancel: data => vm.$u.http.post( freightAPI + '/freightGoodsSourceV2/cancel', data), |
iconfont/iconfont.css
| @@ -370,9 +370,58 @@ | @@ -370,9 +370,58 @@ | ||
| 370 | content: "\e722"; | 370 | content: "\e722"; |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | -.icon-radio-no:before { | 373 | +.icon-secure:before { |
| 374 | content: "\e723"; | 374 | content: "\e723"; |
| 375 | } | 375 | } |
| 376 | -.icon-radio-chose:before { | 376 | + |
| 377 | +.icon-kanban1:before { | ||
| 377 | content: "\e724"; | 378 | content: "\e724"; |
| 378 | } | 379 | } |
| 380 | + | ||
| 381 | +.icon-kanban2:before { | ||
| 382 | + content: "\e725"; | ||
| 383 | +} | ||
| 384 | + | ||
| 385 | +.icon-kanban3:before { | ||
| 386 | + content: "\e726"; | ||
| 387 | +} | ||
| 388 | + | ||
| 389 | +.icon-sign:before { | ||
| 390 | + content: "\e727"; | ||
| 391 | +} | ||
| 392 | +.icon-bulk-order:before { | ||
| 393 | + content: "\e728"; | ||
| 394 | +} | ||
| 395 | +.icon-customer:before { | ||
| 396 | + content: "\e731"; | ||
| 397 | +} | ||
| 398 | +.icon-loadtime:before { | ||
| 399 | + content: "\e733"; | ||
| 400 | +} | ||
| 401 | +.icon-quotation:before { | ||
| 402 | + content: "\e735"; | ||
| 403 | +} | ||
| 404 | +.icon-cartype:before { | ||
| 405 | + content: "\e730"; | ||
| 406 | +} | ||
| 407 | +.icon-car-inviter:before { | ||
| 408 | + content: "\e734"; | ||
| 409 | +} | ||
| 410 | +.icon-location:before { | ||
| 411 | + content: "\e732"; | ||
| 412 | +} | ||
| 413 | +.icon-star-fill:before { | ||
| 414 | + content: "\e736"; | ||
| 415 | +} | ||
| 416 | +.icon-radio-chose:before { | ||
| 417 | + content: "\e739"; | ||
| 418 | +} | ||
| 419 | +.icon-radio-no:before { | ||
| 420 | + content: "\e740"; | ||
| 421 | +} | ||
| 422 | +.icon-switch-vertical:before { | ||
| 423 | + content: "\e741"; | ||
| 424 | +} | ||
| 425 | +.icon-pay-rmb:before { | ||
| 426 | + content: "\e741"; | ||
| 427 | +} |
iconfont/iconfont.ttf
No preview for this file type
pages/goodSource/card.vue
| 1 | <template> | 1 | <template> |
| 2 | - <view class="card" @click="toDetail"> | 2 | + <view class="card"> |
| 3 | <view class="card-header"> | 3 | <view class="card-header"> |
| 4 | <view class="title"> | 4 | <view class="title"> |
| 5 | <view class="order-no"> | 5 | <view class="order-no"> |
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | <view class="v-t-img"> | 21 | <view class="v-t-img"> |
| 22 | <image src="@/static/svgs/user.svg" /> | 22 | <image src="@/static/svgs/user.svg" /> |
| 23 | </view> | 23 | </view> |
| 24 | - <text>{{ item.customerName }}</text> | 24 | + <text>{{ item.projectName }}</text> |
| 25 | </view> | 25 | </view> |
| 26 | <view class="v-t"> | 26 | <view class="v-t"> |
| 27 | <text style="white-space: nowrap; overflow: hidden; color: #999; max-width: 50vw; text-overflow: ellipsis"> {{ formatSpecification }}/{{ formatVanType }} </text> | 27 | <text style="white-space: nowrap; overflow: hidden; color: #999; max-width: 50vw; text-overflow: ellipsis"> {{ formatSpecification }}/{{ formatVanType }} </text> |
| @@ -57,8 +57,8 @@ | @@ -57,8 +57,8 @@ | ||
| 57 | }}</text> | 57 | }}</text> |
| 58 | </text> | 58 | </text> |
| 59 | </view> | 59 | </view> |
| 60 | - <view v-if="item.priceType === 'TON'" class="task-2"> 剩余{{ item.remainGoodsWeight || item.goodsWeight }}吨 </view> | ||
| 61 | - <view v-if="item.priceType === 'VEHICLE'" class="task-2"> 还需要{{ item.remainVehicleNumber || item.vehicleNumber }}车 </view> | 60 | + <view v-if="item.priceType === 'TON'" class="task-2"> 剩余{{ item.remainGoodsWeight }}吨 </view> |
| 61 | + <view v-if="item.priceType === 'VEHICLE'" class="task-2"> 还需要{{ item.remainVehicleNumber }}车 </view> | ||
| 62 | </view> | 62 | </view> |
| 63 | </view> | 63 | </view> |
| 64 | <view v-if="!onlyShow" class="cc-operate"> | 64 | <view v-if="!onlyShow" class="cc-operate"> |
| @@ -76,10 +76,10 @@ | @@ -76,10 +76,10 @@ | ||
| 76 | <zb-tooltip placement="bottom" :visible="visible" @update:visible="e => (visible = e)"> | 76 | <zb-tooltip placement="bottom" :visible="visible" @update:visible="e => (visible = e)"> |
| 77 | <template #content> | 77 | <template #content> |
| 78 | <view class="more-action"> | 78 | <view class="more-action"> |
| 79 | - <view v-if="['MATCHING'].includes(item.status)" @click="modifyGoodSource"> 修改货源 </view> | ||
| 80 | - <view v-if="['MATCHING', 'COMPLETED'].includes(item.status)" @click="cancelGoodSource"> 取消货源 </view> | ||
| 81 | - <view v-if="['MATCHING'].includes(item.status)" @click="endGoodSource"> 结束找车 </view> | ||
| 82 | - <view v-if="['CANCELLED'].includes(item.status)" @click="deleteGoodSource"> 删除货源 </view> | 79 | + <view v-if="$permission('/freightGoodsSource/modify') && ['MATCHING'].includes(item.status)" @click="modifyGoodSource"> 修改货源 </view> |
| 80 | + <view v-if="$permission('/freightGoodsSource/cancel') && ['MATCHING', 'COMPLETED'].includes(item.status)" @click="cancelGoodSource"> 取消货源 </view> | ||
| 81 | + <view v-if="$permission('/freightGoodsSource/complete') && ['MATCHING'].includes(item.status)" @click="endGoodSource"> 结束找车 </view> | ||
| 82 | + <view v-if="$permission('/freightGoodsSource/delete') && ['CANCELLED'].includes(item.status)" @click="deleteGoodSource"> 删除货源 </view> | ||
| 83 | </view> | 83 | </view> |
| 84 | </template> | 84 | </template> |
| 85 | <view class="button"> | 85 | <view class="button"> |
| @@ -152,11 +152,6 @@ export default { | @@ -152,11 +152,6 @@ export default { | ||
| 152 | qrShow() { | 152 | qrShow() { |
| 153 | this.$emit('qrShow', this.item.code, this.item); | 153 | this.$emit('qrShow', this.item.code, this.item); |
| 154 | }, | 154 | }, |
| 155 | - // 详情 | ||
| 156 | - toDetail() { | ||
| 157 | - if (this.onlyShow) return; | ||
| 158 | - uni.navigateTo({ url: `/pages/bulkOrder/bulk-order-detail?code=${this.item.code}` }); | ||
| 159 | - }, | ||
| 160 | // 抢单记录 | 155 | // 抢单记录 |
| 161 | toGrabPage() { | 156 | toGrabPage() { |
| 162 | uni.navigateTo({ url: `/pages/goodSource/grab-record?goodsSourceCode=${this.item.code}` }); | 157 | uni.navigateTo({ url: `/pages/goodSource/grab-record?goodsSourceCode=${this.item.code}` }); |
pages/goodSource/grab-record.vue
| @@ -5,31 +5,34 @@ | @@ -5,31 +5,34 @@ | ||
| 5 | <view class="line"></view> | 5 | <view class="line"></view> |
| 6 | <view class="quick-tag"> | 6 | <view class="quick-tag"> |
| 7 | <view class="quick-tag-group"> | 7 | <view class="quick-tag-group"> |
| 8 | - <view class="quick-tag-item" :class="searchForm.projectCode ? 'active' : ''" @click="selectQuickTag({ key: 'projectCode', value: searchForm.projectCode })"> | ||
| 9 | - <text>{{ searchForm.projectName || '车牌号' }}</text> | ||
| 10 | - <view class="sx-img"> | ||
| 11 | - <image v-if="searchForm.projectCode" class="sx-image" :src="formatImagePath('active-down')"></image> | ||
| 12 | - <image v-else class="sx-image" :src="formatImagePath('down')"></image> | 8 | + <view class="quick-tag-item" :class="searchForm.vehicleLicenseNum ? 'active' : ''" @click="onSelectPlate"> |
| 9 | + <text>{{ searchForm.vehicleLicenseNum || '车牌号' }}</text> | ||
| 10 | + <view @click.stop="clearSearchForm('vehicleLicenseNum')" v-if="searchForm.vehicleLicenseNum" style="position: absolute; right: 0"> | ||
| 11 | + <u-icon name="close-circle"></u-icon> | ||
| 13 | </view> | 12 | </view> |
| 14 | - <view style="position: absolute; top: 0; right: 0"> | ||
| 15 | - <u-icon name="close"></u-icon> | 13 | + <view v-else class="sx-img"> |
| 14 | + <image class="sx-image" :src="formatImagePath('down')"></image> | ||
| 16 | </view> | 15 | </view> |
| 17 | </view> | 16 | </view> |
| 18 | - <view class="quick-tag-item" :class="searchForm.startCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'startCityCode', value: searchForm.startCityCode })"> | ||
| 19 | - <text>{{ searchForm.startCityName || '司机姓名' }}</text> | ||
| 20 | - <view class="sx-img"> | ||
| 21 | - <image v-if="searchForm.startCityCode" class="sx-image" :src="formatImagePath('active-down')"></image> | ||
| 22 | - <image v-else class="sx-image" :src="formatImagePath('down')"></image> | 17 | + <view class="quick-tag-item" :class="searchForm.driverName ? 'active' : ''" @click="selectQuickTag({ key: 'driverName', value: searchForm.driverName })"> |
| 18 | + <text>{{ searchForm.driverName || '司机姓名' }}</text> | ||
| 19 | + <view @click.stop="clearSearchForm('driverName')" v-if="searchForm.driverName" style="position: absolute; right: 0"> | ||
| 20 | + <u-icon name="close-circle"></u-icon> | ||
| 21 | + </view> | ||
| 22 | + <view v-else class="sx-img"> | ||
| 23 | + <image class="sx-image" :src="formatImagePath('down')"></image> | ||
| 23 | </view> | 24 | </view> |
| 24 | </view> | 25 | </view> |
| 25 | - <view class="quick-tag-item" :class="searchForm.endCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'endCityCode', value: searchForm.endCityCode })"> | ||
| 26 | - <text>{{ searchForm.endCityName || '司机手机' }}</text> | ||
| 27 | - <view class="sx-img"> | ||
| 28 | - <image v-if="searchForm.endCityCode" class="sx-image" :src="formatImagePath('active-down')"></image> | ||
| 29 | - <image v-else class="sx-image" :src="formatImagePath('down')"></image> | 26 | + <view class="quick-tag-item" :class="searchForm.driverMobile ? 'active' : ''" @click="selectQuickTag({ key: 'driverMobile', value: searchForm.driverMobile })"> |
| 27 | + <text>{{ searchForm.driverMobile || '司机手机' }}</text> | ||
| 28 | + <view @click.stop="clearSearchForm('driverMobile')" v-if="searchForm.driverMobile" style="position: absolute; right: 0"> | ||
| 29 | + <u-icon name="close-circle"></u-icon> | ||
| 30 | + </view> | ||
| 31 | + <view v-else class="sx-img"> | ||
| 32 | + <image class="sx-image" :src="formatImagePath('down')"></image> | ||
| 30 | </view> | 33 | </view> |
| 31 | </view> | 34 | </view> |
| 32 | - <view>抢单时间<zui-icon name="enter"></zui-icon></view> | 35 | + <view @click="sortChange"><text style="color: #999; margin-right: 6rpx">抢单时间</text><zui-icon name="switch-vertical"></zui-icon></view> |
| 33 | </view> | 36 | </view> |
| 34 | </view> | 37 | </view> |
| 35 | </template> | 38 | </template> |
| @@ -37,13 +40,11 @@ | @@ -37,13 +40,11 @@ | ||
| 37 | <List ref="list" v-model="list" :loading.sync="loading" :api="searchAPI"> | 40 | <List ref="list" v-model="list" :loading.sync="loading" :api="searchAPI"> |
| 38 | <view v-for="(form, index) in list" :key="index"> | 41 | <view v-for="(form, index) in list" :key="index"> |
| 39 | <view class="card"> | 42 | <view class="card"> |
| 40 | - <view-item title="订单号" :value="form.code"> | ||
| 41 | - <view style="flex: 1; display: flex; justify-content: space-between"> | ||
| 42 | - <view>{{ form.code }}</view> | ||
| 43 | - <view :style="{ color: statusMap[form.status], display: 'flex' }"> | ||
| 44 | - <render-dict :value="form.status" dict="FREIGHT_GOODS_SOURCE_BIDDING_STATUS"></render-dict> | ||
| 45 | - </view> | ||
| 46 | - </view> | 43 | + <view style="position: absolute; top: 24rpx; right: 24rpx" :style="{ color: statusMap[form.status] }"> |
| 44 | + <render-dict :value="form.status" dict="FREIGHT_GOODS_SOURCE_BIDDING_STATUS"></render-dict> | ||
| 45 | + </view> | ||
| 46 | + <view-item title="订单号" v-if="form.code"> | ||
| 47 | + <field-copy class="color-blue" :value="form.code" v-if="form.code">{{ form.code }} </field-copy> | ||
| 47 | </view-item> | 48 | </view-item> |
| 48 | <view-item title="抢单司机"> | 49 | <view-item title="抢单司机"> |
| 49 | <field-call :value="form.driverMobile"> | 50 | <field-call :value="form.driverMobile"> |
| @@ -57,7 +58,7 @@ | @@ -57,7 +58,7 @@ | ||
| 57 | <text> | 58 | <text> |
| 58 | <render-dict :value="form.vanType" dict="VEHICLE_COMPARTMENT_TYPE"></render-dict> | 59 | <render-dict :value="form.vanType" dict="VEHICLE_COMPARTMENT_TYPE"></render-dict> |
| 59 | </text> | 60 | </text> |
| 60 | - <text>/{{ form.vehicleLicenseNum }}</text> | 61 | + <text>{{ form.vehicleLicenseNum }}</text> |
| 61 | <text v-if="form.trailerLicenseNum">/{{ form.trailerLicenseNum }}</text> | 62 | <text v-if="form.trailerLicenseNum">/{{ form.trailerLicenseNum }}</text> |
| 62 | </view-item> | 63 | </view-item> |
| 63 | <view-item title="抢单时间" :value="form.biddingTime"></view-item> | 64 | <view-item title="抢单时间" :value="form.biddingTime"></view-item> |
| @@ -65,16 +66,31 @@ | @@ -65,16 +66,31 @@ | ||
| 65 | <text>{{ form.biddingWeight || '--' }}吨</text> | 66 | <text>{{ form.biddingWeight || '--' }}吨</text> |
| 66 | </view-item> | 67 | </view-item> |
| 67 | <view class="buts"> | 68 | <view class="buts"> |
| 68 | - <view>总运费:{{ form.paidAmount }}</view> | ||
| 69 | - <template v-if="form.status === 'WAIT_ASSIGN'"> | ||
| 70 | - <zui-button class="zui-button" @click="(cancelCode = form.code), (cancelRemark = ''), (cancelShow = true)">取消</zui-button> | ||
| 71 | - <zui-button class="zui-button" type="ghost" theme="primary" @click="() => toSubmit(form)">确认</zui-button> | ||
| 72 | - </template> | 69 | + <view |
| 70 | + >总运费:<text class="color-red">{{ form.paidAmount }}</text | ||
| 71 | + >元</view | ||
| 72 | + > | ||
| 73 | + <view style="display: flex; gap: 24rpx; justify-content: space-between" v-if="form.status === 'WAIT_ASSIGN'"> | ||
| 74 | + <zui-button v-if="$permission('/freightGoodsSource/cancelBidding')" class="zui-button" @click="(cancelCode = form.code), (cancelRemark = ''), (cancelShow = true)" | ||
| 75 | + >取消</zui-button | ||
| 76 | + > | ||
| 77 | + <zui-button v-if="$permission('/freightGoodsSource/addOrder')" theme="primary" @click="() => toSubmit(form)">成交指派</zui-button> | ||
| 78 | + </view> | ||
| 73 | </view> | 79 | </view> |
| 74 | </view> | 80 | </view> |
| 75 | </view> | 81 | </view> |
| 76 | </List> | 82 | </List> |
| 77 | - <u-modal :show="cancelShow" title="取消原因" @cancel="cancelShow = false" @confirm="confirmCancel" showConfirmButton> | 83 | + <u-modal |
| 84 | + :show="driverSearchShow" | ||
| 85 | + :title="driverSearchKey === 'driverName' ? '司机姓名' : '司机手机'" | ||
| 86 | + @cancel="driverSearchShow = false" | ||
| 87 | + show-cancel-button | ||
| 88 | + @confirm="driverConfirm" | ||
| 89 | + @close="driverSearchShow = false" | ||
| 90 | + > | ||
| 91 | + <u-input v-model="driverStr"> </u-input> | ||
| 92 | + </u-modal> | ||
| 93 | + <u-modal :show="cancelShow" title="取消原因" @cancel="cancelShow = false" @confirm="confirmCancel" show-cancel-button> | ||
| 78 | <u-input v-model="cancelRemark" placeholder="取消原因"></u-input> | 94 | <u-input v-model="cancelRemark" placeholder="取消原因"></u-input> |
| 79 | </u-modal> | 95 | </u-modal> |
| 80 | <popup-platenumber v-model="platenumberVisible" :plate="searchForm.vehicleCode" @cancel="platenumberVisible = false" @confirm="onPlatenumberSelect" /> | 96 | <popup-platenumber v-model="platenumberVisible" :plate="searchForm.vehicleCode" @cancel="platenumberVisible = false" @confirm="onPlatenumberSelect" /> |
| @@ -83,13 +99,18 @@ | @@ -83,13 +99,18 @@ | ||
| 83 | </template> | 99 | </template> |
| 84 | 100 | ||
| 85 | <script> | 101 | <script> |
| 86 | -import MIX_ORIGIN from '@/mixins/origin'; | 102 | +import page from '@/mixins/page'; |
| 87 | import { mapGetters } from 'vuex'; | 103 | import { mapGetters } from 'vuex'; |
| 88 | - | 104 | +import FieldCopy from '@/components/field/field-copy.vue'; |
| 105 | +import dayjs from 'dayjs'; | ||
| 89 | export default { | 106 | export default { |
| 90 | - mixins: [MIX_ORIGIN], | 107 | + components: { FieldCopy }, |
| 108 | + mixins: [page], | ||
| 91 | data() { | 109 | data() { |
| 92 | return { | 110 | return { |
| 111 | + driverSearchShow: false, | ||
| 112 | + driverSearchKey: '', | ||
| 113 | + driverStr: '', | ||
| 93 | cancelShow: false, | 114 | cancelShow: false, |
| 94 | cancelCode: '', | 115 | cancelCode: '', |
| 95 | cancelRemark: '', | 116 | cancelRemark: '', |
| @@ -110,11 +131,10 @@ export default { | @@ -110,11 +131,10 @@ export default { | ||
| 110 | }, | 131 | }, |
| 111 | platenumberVisible: false, | 132 | platenumberVisible: false, |
| 112 | searchForm: { | 133 | searchForm: { |
| 113 | - vehicleCode: '', | ||
| 114 | - loadFlag: '', | ||
| 115 | - unloadFlag: '', | ||
| 116 | - waybillCode: '', | ||
| 117 | - waybillStatus: '', | 134 | + vehicleLicenseNum: '', |
| 135 | + driverName: '', | ||
| 136 | + driverMobile: '', | ||
| 137 | + sortFlag: false, | ||
| 118 | }, | 138 | }, |
| 119 | }; | 139 | }; |
| 120 | }, | 140 | }, |
| @@ -135,6 +155,10 @@ export default { | @@ -135,6 +155,10 @@ export default { | ||
| 135 | }, | 155 | }, |
| 136 | }, | 156 | }, |
| 137 | methods: { | 157 | methods: { |
| 158 | + clearSearchForm(label) { | ||
| 159 | + this.searchForm = Object.assign(this.searchForm, { [label]: '' }); | ||
| 160 | + this.onSearch(); | ||
| 161 | + }, | ||
| 138 | // 打开车牌选择 | 162 | // 打开车牌选择 |
| 139 | onSelectPlate() { | 163 | onSelectPlate() { |
| 140 | this.platenumberVisible = true; | 164 | this.platenumberVisible = true; |
| @@ -142,14 +166,29 @@ export default { | @@ -142,14 +166,29 @@ export default { | ||
| 142 | // 选中车牌 | 166 | // 选中车牌 |
| 143 | onPlatenumberSelect(value) { | 167 | onPlatenumberSelect(value) { |
| 144 | this.platenumberVisible = false; | 168 | this.platenumberVisible = false; |
| 145 | - this.searchForm.vehicleCode = value; | 169 | + this.searchForm.vehicleLicenseNum = value; |
| 146 | this.onSearch({ showLoading: true }); | 170 | this.onSearch({ showLoading: true }); |
| 147 | }, | 171 | }, |
| 172 | + selectQuickTag({ key, value }) { | ||
| 173 | + this.driverStr = value; | ||
| 174 | + this.driverSearchKey = key; | ||
| 175 | + this.driverSearchShow = true; | ||
| 176 | + }, | ||
| 177 | + driverConfirm() { | ||
| 178 | + this.driverSearchShow = false; | ||
| 179 | + this.searchForm = Object.assign(this.searchForm, { [this.driverSearchKey]: this.driverStr }); | ||
| 180 | + this.onSearch(); | ||
| 181 | + }, | ||
| 182 | + sortChange() { | ||
| 183 | + this.searchForm = Object.assign(this.searchForm, { sortFlag: !this.searchForm.sortFlag }); | ||
| 184 | + this.onSearch(); | ||
| 185 | + }, | ||
| 148 | // 查询数据 | 186 | // 查询数据 |
| 149 | searchAPI(params) { | 187 | searchAPI(params) { |
| 150 | this.getCount(); | 188 | this.getCount(); |
| 151 | return uni.$u.api.freightGoodsSourceV2.biddingPage({ | 189 | return uni.$u.api.freightGoodsSourceV2.biddingPage({ |
| 152 | ...params, | 190 | ...params, |
| 191 | + ...this.searchForm, | ||
| 153 | status: this.orderStatus, | 192 | status: this.orderStatus, |
| 154 | goodsSourceCode: this.goodsSourceCode, | 193 | goodsSourceCode: this.goodsSourceCode, |
| 155 | }); | 194 | }); |
| @@ -170,20 +209,51 @@ export default { | @@ -170,20 +209,51 @@ export default { | ||
| 170 | }, | 209 | }, |
| 171 | // 确认-发布需求 | 210 | // 确认-发布需求 |
| 172 | toSubmit(item) { | 211 | toSubmit(item) { |
| 212 | + let form = { | ||
| 213 | + ...item, | ||
| 214 | + goodsWeight: item.biddingWeight, | ||
| 215 | + goodsSourceCode: item.goodsSourceCode, | ||
| 216 | + goodsSourceBiddingCode: item.code, | ||
| 217 | + loadTime: dayjs(item.biddingTime).add(3, 'hour').format('YYYY-MM-DD HH:mm:ss'), | ||
| 218 | + waypoints: [ | ||
| 219 | + { | ||
| 220 | + cityCode: item.startCityCode, | ||
| 221 | + areaCode: item.startAreaCode, | ||
| 222 | + address: item.startAddress, | ||
| 223 | + lng: item.startLng, | ||
| 224 | + lat: item.startLat, | ||
| 225 | + }, | ||
| 226 | + { | ||
| 227 | + cityCode: item.endCityCode, | ||
| 228 | + areaCode: item.endAreaCode, | ||
| 229 | + address: item.endAddress, | ||
| 230 | + lng: item.endLng, | ||
| 231 | + lat: item.endLat, | ||
| 232 | + }, | ||
| 233 | + ], | ||
| 234 | + }; | ||
| 173 | uni.navigateTo({ | 235 | uni.navigateTo({ |
| 174 | url: `/pages/order/add?eventCode=${item.code}`, | 236 | url: `/pages/order/add?eventCode=${item.code}`, |
| 175 | success(res) { | 237 | success(res) { |
| 176 | - res.eventChannel.emit('get-item', item); | 238 | + res.eventChannel.emit('get-item', form); |
| 177 | }, | 239 | }, |
| 178 | }); | 240 | }); |
| 179 | }, | 241 | }, |
| 180 | // 取消 | 242 | // 取消 |
| 181 | confirmCancel() { | 243 | confirmCancel() { |
| 182 | if (this.loading) return; | 244 | if (this.loading) return; |
| 183 | - uni.$u.api.freightGoodsSourceV2.cancelBidding({ cancelReason: this.cancelRemark, code: this.cancelCode }).then(res => { | ||
| 184 | - uni.showToast({ title: '取消成功', icon: 'none' }); | ||
| 185 | - this.onSearch({ showLoading: true }); | ||
| 186 | - }); | 245 | + this.loading = true; |
| 246 | + uni.$u.api.freightGoodsSourceV2 | ||
| 247 | + .cancelBidding({ cancelReason: this.cancelRemark, code: this.cancelCode }) | ||
| 248 | + .then(res => { | ||
| 249 | + this.cancelShow = false; | ||
| 250 | + this.loading = false; | ||
| 251 | + uni.showToast({ title: '取消成功', icon: 'none' }); | ||
| 252 | + this.onSearch({ showLoading: true }); | ||
| 253 | + }) | ||
| 254 | + .catch(() => { | ||
| 255 | + this.loading = false; | ||
| 256 | + }); | ||
| 187 | }, | 257 | }, |
| 188 | }, | 258 | }, |
| 189 | }; | 259 | }; |
| @@ -212,8 +282,11 @@ export default { | @@ -212,8 +282,11 @@ export default { | ||
| 212 | padding-left: $padding-xs !important; | 282 | padding-left: $padding-xs !important; |
| 213 | padding-right: $padding-xs !important; | 283 | padding-right: $padding-xs !important; |
| 214 | overflow-y: auto; | 284 | overflow-y: auto; |
| 285 | + justify-content: space-between; | ||
| 286 | + gap: 15rpx; | ||
| 215 | 287 | ||
| 216 | .quick-tag-item { | 288 | .quick-tag-item { |
| 289 | + flex: 1; | ||
| 217 | flex-shrink: 0; | 290 | flex-shrink: 0; |
| 218 | min-width: 158upx; | 291 | min-width: 158upx; |
| 219 | height: 58upx; | 292 | height: 58upx; |
| @@ -229,7 +302,7 @@ export default { | @@ -229,7 +302,7 @@ export default { | ||
| 229 | box-sizing: border-box; | 302 | box-sizing: border-box; |
| 230 | position: relative; | 303 | position: relative; |
| 231 | &:not(:last-child) { | 304 | &:not(:last-child) { |
| 232 | - margin-right: 18upx; | 305 | + //margin-right: 18upx; |
| 233 | } | 306 | } |
| 234 | 307 | ||
| 235 | &.active { | 308 | &.active { |
| @@ -267,21 +340,23 @@ export default { | @@ -267,21 +340,23 @@ export default { | ||
| 267 | padding: 22rpx !important; | 340 | padding: 22rpx !important; |
| 268 | 341 | ||
| 269 | .card { | 342 | .card { |
| 270 | - padding: 24rpx 12rpx 24rpx 0; | 343 | + padding: 24rpx 0 24rpx 0; |
| 271 | margin-bottom: 20rpx; | 344 | margin-bottom: 20rpx; |
| 272 | background: white; | 345 | background: white; |
| 273 | border-radius: 20rpx; | 346 | border-radius: 20rpx; |
| 347 | + position: relative; | ||
| 274 | .view-item { | 348 | .view-item { |
| 275 | display: flex; | 349 | display: flex; |
| 350 | + margin-bottom: 20rpx; | ||
| 351 | + font-size: 26rpx; | ||
| 276 | .view-item__label { | 352 | .view-item__label { |
| 277 | padding-left: 26rpx; | 353 | padding-left: 26rpx; |
| 278 | color: #999999; | 354 | color: #999999; |
| 279 | - width: 185rpx; | 355 | + width: 170rpx; |
| 280 | } | 356 | } |
| 281 | .view-item__value { | 357 | .view-item__value { |
| 282 | flex: 1; | 358 | flex: 1; |
| 283 | color: #2b2a27; | 359 | color: #2b2a27; |
| 284 | - padding-left: 32rpx; | ||
| 285 | padding-right: 5rpx; | 360 | padding-right: 5rpx; |
| 286 | display: flex; | 361 | display: flex; |
| 287 | flex-wrap: wrap; | 362 | flex-wrap: wrap; |
| @@ -291,12 +366,12 @@ export default { | @@ -291,12 +366,12 @@ export default { | ||
| 291 | margin-bottom: 30rpx; | 366 | margin-bottom: 30rpx; |
| 292 | } | 367 | } |
| 293 | .buts { | 368 | .buts { |
| 369 | + font-size: 30rpx; | ||
| 370 | + padding-left: 30rpx; | ||
| 371 | + padding-right: 24rpx; | ||
| 294 | display: flex; | 372 | display: flex; |
| 295 | - justify-content: flex-end; | ||
| 296 | - | ||
| 297 | - .zui-button + .zui-button { | ||
| 298 | - margin-left: 20rpx; | ||
| 299 | - } | 373 | + justify-content: space-between; |
| 374 | + align-items: center; | ||
| 300 | } | 375 | } |
| 301 | } | 376 | } |
| 302 | } | 377 | } |
pages/goodSource/index.vue
| @@ -7,29 +7,35 @@ | @@ -7,29 +7,35 @@ | ||
| 7 | <view class="quick-tag-group"> | 7 | <view class="quick-tag-group"> |
| 8 | <view class="quick-tag-item" :class="searchForm.projectCode ? 'active' : ''" @click="selectQuickTag({ key: 'projectCode', value: searchForm.projectCode })"> | 8 | <view class="quick-tag-item" :class="searchForm.projectCode ? 'active' : ''" @click="selectQuickTag({ key: 'projectCode', value: searchForm.projectCode })"> |
| 9 | <text>{{ searchForm.projectName || '所属项目' }}</text> | 9 | <text>{{ searchForm.projectName || '所属项目' }}</text> |
| 10 | - <view class="sx-img"> | ||
| 11 | - <image v-if="searchForm.projectCode" class="sx-image" :src="formatImagePath('active-down')"></image> | ||
| 12 | - <image v-else class="sx-image" :src="formatImagePath('down')"></image> | 10 | + <view @click.stop="clearProject" v-if="searchForm.projectCode" style="position: absolute; right: 0"> |
| 11 | + <u-icon name="close-circle"></u-icon> | ||
| 13 | </view> | 12 | </view> |
| 14 | - <view style="position: absolute; top: 0; right: 0"> | ||
| 15 | - <u-icon name="close"></u-icon> | 13 | + <view v-else class="sx-img"> |
| 14 | + <!-- <image class="sx-image" :src="formatImagePath('active-down')"></image>--> | ||
| 15 | + <image class="sx-image" :src="formatImagePath('down')"></image> | ||
| 16 | </view> | 16 | </view> |
| 17 | </view> | 17 | </view> |
| 18 | <view class="quick-tag-item" :class="searchForm.startCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'startCityCode', value: searchForm.startCityCode })"> | 18 | <view class="quick-tag-item" :class="searchForm.startCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'startCityCode', value: searchForm.startCityCode })"> |
| 19 | <text>{{ searchForm.startCityName || '始发地' }}</text> | 19 | <text>{{ searchForm.startCityName || '始发地' }}</text> |
| 20 | - <view class="sx-img"> | ||
| 21 | - <image v-if="searchForm.startCityCode" class="sx-image" :src="formatImagePath('active-down')"></image> | ||
| 22 | - <image v-else class="sx-image" :src="formatImagePath('down')"></image> | 20 | + <view @click.stop="clearStartCity" v-if="searchForm.startCityCode" style="position: absolute; right: 0"> |
| 21 | + <u-icon name="close-circle"></u-icon> | ||
| 22 | + </view> | ||
| 23 | + <view v-else class="sx-img"> | ||
| 24 | + <!-- <image v-if="searchForm.startCityCode" class="sx-image" :src="formatImagePath('active-down')"></image>--> | ||
| 25 | + <image class="sx-image" :src="formatImagePath('down')"></image> | ||
| 23 | </view> | 26 | </view> |
| 24 | </view> | 27 | </view> |
| 25 | <view class="quick-tag-item" :class="searchForm.endCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'endCityCode', value: searchForm.endCityCode })"> | 28 | <view class="quick-tag-item" :class="searchForm.endCityCode ? 'active' : ''" @click="selectQuickTag({ key: 'endCityCode', value: searchForm.endCityCode })"> |
| 26 | <text>{{ searchForm.endCityName || '目的地' }}</text> | 29 | <text>{{ searchForm.endCityName || '目的地' }}</text> |
| 27 | - <view class="sx-img"> | ||
| 28 | - <image v-if="searchForm.endCityCode" class="sx-image" :src="formatImagePath('active-down')"></image> | ||
| 29 | - <image v-else class="sx-image" :src="formatImagePath('down')"></image> | 30 | + <view @click.stop="clearEndCity" v-if="searchForm.endCityCode" style="position: absolute; right: 0"> |
| 31 | + <u-icon name="close-circle"></u-icon> | ||
| 32 | + </view> | ||
| 33 | + <view v-else class="sx-img"> | ||
| 34 | + <!-- <image v-if="searchForm.endCityCode" class="sx-image" :src="formatImagePath('active-down')"></image>--> | ||
| 35 | + <image class="sx-image" :src="formatImagePath('down')"></image> | ||
| 30 | </view> | 36 | </view> |
| 31 | </view> | 37 | </view> |
| 32 | - <view>发布时间<zui-icon name="enter"></zui-icon></view> | 38 | + <view @click="sortChange"><text style="color: #999; margin-right: 6rpx">发布时间</text><zui-icon name="switch-vertical"></zui-icon></view> |
| 33 | </view> | 39 | </view> |
| 34 | <!-- <view class="quick-screen" @click="openFilter">--> | 40 | <!-- <view class="quick-screen" @click="openFilter">--> |
| 35 | <!-- <image class="search-image" :src="formatImagePath('search')"></image>--> | 41 | <!-- <image class="search-image" :src="formatImagePath('search')"></image>--> |
| @@ -45,9 +51,8 @@ | @@ -45,9 +51,8 @@ | ||
| 45 | <Empty tips="暂无数据" /> | 51 | <Empty tips="暂无数据" /> |
| 46 | </template> | 52 | </template> |
| 47 | </List> | 53 | </List> |
| 48 | - <view class="add-order" @tap="toAddPage('')"> | 54 | + <view v-if="$permission('/freightGoodsSource/add')" class="add-order" @tap="toAddPage('')"> |
| 49 | <zui-icon name="add" color="#fff" size="30px"></zui-icon> | 55 | <zui-icon name="add" color="#fff" size="30px"></zui-icon> |
| 50 | - <!-- <image class="sx-image" src="/static/addOrder.png"></image>--> | ||
| 51 | </view> | 56 | </view> |
| 52 | </template> | 57 | </template> |
| 53 | <u-popup :show="popShow" @close="closePop" closeable> | 58 | <u-popup :show="popShow" @close="closePop" closeable> |
| @@ -59,9 +64,9 @@ | @@ -59,9 +64,9 @@ | ||
| 59 | </view> | 64 | </view> |
| 60 | </view> | 65 | </view> |
| 61 | </u-popup> | 66 | </u-popup> |
| 62 | - <u-popup :show="qrShow" @close="qrShow = false" mode="center" closeable> | 67 | + <u-popup :show="qrShow" @close="qrShow = false" mode="center" :closeable="false" :safe-area-inset-bottom="false"> |
| 63 | <l-painter ref="painter" :board="poster"></l-painter> | 68 | <l-painter ref="painter" :board="poster"></l-painter> |
| 64 | - <view style="margin-top: 30upx"> | 69 | + <view style="margin: 30upx"> |
| 65 | <u-button type="primary" @click="saveQrImage">保存</u-button> | 70 | <u-button type="primary" @click="saveQrImage">保存</u-button> |
| 66 | </view> | 71 | </view> |
| 67 | </u-popup> | 72 | </u-popup> |
| @@ -96,6 +101,7 @@ export default { | @@ -96,6 +101,7 @@ export default { | ||
| 96 | endCityCode: '', | 101 | endCityCode: '', |
| 97 | endCityName: '', | 102 | endCityName: '', |
| 98 | status: '', | 103 | status: '', |
| 104 | + sortFlag: false, | ||
| 99 | }, | 105 | }, |
| 100 | activeTab: 0, | 106 | activeTab: 0, |
| 101 | count: {}, | 107 | count: {}, |
| @@ -128,6 +134,22 @@ export default { | @@ -128,6 +134,22 @@ export default { | ||
| 128 | this.list = []; | 134 | this.list = []; |
| 129 | this.onSearch(); | 135 | this.onSearch(); |
| 130 | }, | 136 | }, |
| 137 | + clearProject() { | ||
| 138 | + this.searchForm = Object.assign(this.searchForm, { projectCode: '', projectName: '' }); | ||
| 139 | + this.onSearch(); | ||
| 140 | + }, | ||
| 141 | + clearStartCity() { | ||
| 142 | + this.searchForm = Object.assign(this.searchForm, { startCityCode: '', startCityName: '' }); | ||
| 143 | + this.onSearch(); | ||
| 144 | + }, | ||
| 145 | + clearEndCity() { | ||
| 146 | + this.searchForm = Object.assign(this.searchForm, { endCityCode: '', endCityName: '' }); | ||
| 147 | + this.onSearch(); | ||
| 148 | + }, | ||
| 149 | + sortChange() { | ||
| 150 | + this.searchForm = Object.assign(this.searchForm, { sortFlag: !this.searchForm.sortFlag }); | ||
| 151 | + this.onSearch(); | ||
| 152 | + }, | ||
| 131 | selectQuickTag({ key, value }) { | 153 | selectQuickTag({ key, value }) { |
| 132 | this.searchForm = Object.assign(this.searchForm, { [key]: value }); | 154 | this.searchForm = Object.assign(this.searchForm, { [key]: value }); |
| 133 | if (key == 'startCityCode') { | 155 | if (key == 'startCityCode') { |
| @@ -267,29 +289,25 @@ export default { | @@ -267,29 +289,25 @@ export default { | ||
| 267 | toDetail(code) { | 289 | toDetail(code) { |
| 268 | uni.navigateTo({ url: '/pages/goodSource/detail?code=' + code }); | 290 | uni.navigateTo({ url: '/pages/goodSource/detail?code=' + code }); |
| 269 | }, | 291 | }, |
| 270 | - qrCodeShow(code, data) { | 292 | + qrCodeShow(code) { |
| 271 | if (this.loading) return; | 293 | if (this.loading) return; |
| 272 | this.loading = true; | 294 | this.loading = true; |
| 273 | - this.qrShow = true; | ||
| 274 | - uni.$u.api.freightOrder | ||
| 275 | - .getSensitiveByOrderCode({ orderCode: code }) | ||
| 276 | - .then(res => { | ||
| 277 | - if (res.success) { | ||
| 278 | - uni.$u.api.freightOrder | ||
| 279 | - .buildMaQrcode({ orderCode: code }) | ||
| 280 | - .then(res2 => { | ||
| 281 | - this.loading = false; | ||
| 282 | - if (res2.success) { | ||
| 283 | - this.poster = this.getPoster(res.result, data, res2.result); | ||
| 284 | - console.info(this.poster); | ||
| 285 | - } | ||
| 286 | - }) | ||
| 287 | - .catch(e => { | ||
| 288 | - this.loading = false; | ||
| 289 | - }); | ||
| 290 | - } | 295 | + uni.$u.api.freightGoodsSourceV2 |
| 296 | + .getDetail({ code }) | ||
| 297 | + .then(detail => { | ||
| 298 | + uni.$u.api.freightGoodsSourceV2 | ||
| 299 | + .buildMaQrcode({ code }) | ||
| 300 | + .then(qrcode => { | ||
| 301 | + if (qrcode.success && detail.success) { | ||
| 302 | + this.qrShow = true; | ||
| 303 | + this.poster = this.getPoster(detail.result, qrcode.result); | ||
| 304 | + } | ||
| 305 | + }) | ||
| 306 | + .finally(() => { | ||
| 307 | + this.loading = false; | ||
| 308 | + }); | ||
| 291 | }) | 309 | }) |
| 292 | - .catch(e => { | 310 | + .catch(() => { |
| 293 | this.loading = false; | 311 | this.loading = false; |
| 294 | }); | 312 | }); |
| 295 | }, | 313 | }, |
| @@ -324,8 +342,11 @@ export default { | @@ -324,8 +342,11 @@ export default { | ||
| 324 | padding-left: $padding-xs !important; | 342 | padding-left: $padding-xs !important; |
| 325 | padding-right: $padding-xs !important; | 343 | padding-right: $padding-xs !important; |
| 326 | overflow-y: auto; | 344 | overflow-y: auto; |
| 345 | + justify-content: space-between; | ||
| 346 | + gap: 15rpx; | ||
| 327 | 347 | ||
| 328 | .quick-tag-item { | 348 | .quick-tag-item { |
| 349 | + flex: 1; | ||
| 329 | flex-shrink: 0; | 350 | flex-shrink: 0; |
| 330 | min-width: 158upx; | 351 | min-width: 158upx; |
| 331 | height: 58upx; | 352 | height: 58upx; |
| @@ -341,7 +362,7 @@ export default { | @@ -341,7 +362,7 @@ export default { | ||
| 341 | box-sizing: border-box; | 362 | box-sizing: border-box; |
| 342 | position: relative; | 363 | position: relative; |
| 343 | &:not(:last-child) { | 364 | &:not(:last-child) { |
| 344 | - margin-right: 18upx; | 365 | + //margin-right: 18upx; |
| 345 | } | 366 | } |
| 346 | 367 | ||
| 347 | &.active { | 368 | &.active { |
pages/goodSource/qr-painter.js
| 1 | import dayjs from 'dayjs'; | 1 | import dayjs from 'dayjs'; |
| 2 | +import { mapGetters } from 'vuex'; | ||
| 2 | export default { | 3 | export default { |
| 3 | data() { | 4 | data() { |
| 4 | return { | 5 | return { |
| 5 | posterCss: { width: '150rpx', height: '150rpx', padding: '11rpx', backgroundColor: '#FFFFFF', borderRadius: '50%', objectFit: 'cover' }, // 二维码大小样式 | 6 | posterCss: { width: '150rpx', height: '150rpx', padding: '11rpx', backgroundColor: '#FFFFFF', borderRadius: '50%', objectFit: 'cover' }, // 二维码大小样式 |
| 6 | - QRcss: { position: 'fixed', left: '52rpx', bottom: '24rpx', display: 'flex' }, // 二维码定位样式 | 7 | + QRcss: { position: 'fixed', left: '32rpx', bottom: '24rpx', display: 'flex' }, // 二维码定位样式 |
| 7 | }; | 8 | }; |
| 8 | }, | 9 | }, |
| 10 | + computed: { | ||
| 11 | + ...mapGetters(['dictValue']), | ||
| 12 | + }, | ||
| 9 | methods: { | 13 | methods: { |
| 10 | saveQrImage() { | 14 | saveQrImage() { |
| 11 | this.$refs.painter.canvasToTempFilePathSync({ | 15 | this.$refs.painter.canvasToTempFilePathSync({ |
| @@ -24,249 +28,331 @@ export default { | @@ -24,249 +28,331 @@ export default { | ||
| 24 | }, | 28 | }, |
| 25 | }); | 29 | }); |
| 26 | }, | 30 | }, |
| 27 | - getPoster(item, params, wxcode) { | ||
| 28 | - let driverInfo = item.driverName ? item.driverName : ''; | ||
| 29 | - driverInfo += item.driverMobile ? item.driverMobile : ''; | ||
| 30 | - let vehicle = item.vehicleLicenseNum; | ||
| 31 | - if (item.trailerLicenseNum) { | ||
| 32 | - vehicle += '·' + item.trailerLicenseNum; | 31 | + formatVanType(vanType) { |
| 32 | + let res = []; | ||
| 33 | + for (let v of vanType.split(',')) { | ||
| 34 | + if (v === 'ALL') { | ||
| 35 | + res.push('不限'); | ||
| 36 | + } else { | ||
| 37 | + res.push(this.dictValue('VEHICLE_COMPARTMENT_TYPE', v)); | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + return res.join(','); | ||
| 41 | + }, | ||
| 42 | + formatSpecification(specification) { | ||
| 43 | + let res = []; | ||
| 44 | + for (let v of specification.split(',')) { | ||
| 45 | + if (v === 'ALL') { | ||
| 46 | + res.push('不限'); | ||
| 47 | + } else { | ||
| 48 | + res.push(this.dictValue('VEHICLE_SPECIFICATION', v)); | ||
| 49 | + } | ||
| 33 | } | 50 | } |
| 51 | + return res.join(','); | ||
| 52 | + }, | ||
| 53 | + getPoster(detail, wxcode) { | ||
| 54 | + let formatVanType = this.formatVanType(detail.vanType); | ||
| 55 | + let formatSpecification = this.formatSpecification(detail.specification); | ||
| 34 | return { | 56 | return { |
| 35 | css: { | 57 | css: { |
| 36 | - width: '640rpx', | ||
| 37 | - height: '880rpx', | ||
| 38 | - backgroundImage: 'url(https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/image/freight/b6988d70-26db-490c-9ddf-e59c554fa2ff.png)', | 58 | + width: '660rpx', |
| 59 | + height: '919rpx', | ||
| 60 | + backgroundImage: 'url(https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/image/tms/f8cefac5-86cd-4f13-89f3-66fe2c6a0ea5.png)', | ||
| 39 | objectFit: 'cover', | 61 | objectFit: 'cover', |
| 40 | }, | 62 | }, |
| 41 | views: [ | 63 | views: [ |
| 42 | { | 64 | { |
| 43 | type: 'view', | 65 | type: 'view', |
| 66 | + css: { | ||
| 67 | + width: '660rpx', | ||
| 68 | + height: '919rpx', | ||
| 69 | + padding: '10rpx', | ||
| 70 | + }, | ||
| 44 | views: [ | 71 | views: [ |
| 45 | { | 72 | { |
| 46 | type: 'text', | 73 | type: 'text', |
| 47 | - text: '订 单 号:', | 74 | + text: '则一飞牛货源码', |
| 48 | css: { | 75 | css: { |
| 49 | - width: '300rpx', | ||
| 50 | - height: '33rpx', | ||
| 51 | - fontSize: '24rpx', | ||
| 52 | - fontSamily: 'PingFangSC-Regular', | ||
| 53 | - color: '#999999', | ||
| 54 | - lineHeight: '33rpx', | ||
| 55 | - display: 'block', | ||
| 56 | - boxOrient: 'vertical', | ||
| 57 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 58 | - position: 'fixed', | ||
| 59 | - top: '169rpx', | ||
| 60 | - left: '75rpx', | 76 | + width: '550rpx', |
| 77 | + height: '70rpx', | ||
| 78 | + padding: '15rpx 30rpx', | ||
| 79 | + fontSize: '30rpx', | ||
| 80 | + color: '#000000', | ||
| 61 | }, | 81 | }, |
| 62 | }, | 82 | }, |
| 63 | { | 83 | { |
| 64 | - type: 'text', | ||
| 65 | - text: params.code, | 84 | + type: 'view', |
| 66 | css: { | 85 | css: { |
| 67 | - width: '400rpx', | ||
| 68 | - height: '33rpx', | ||
| 69 | - fontSize: '24rpx', | ||
| 70 | - fontSamily: 'PingFangSC-Regular', | ||
| 71 | - color: '#121212', | ||
| 72 | - lineHeight: '33rpx', | ||
| 73 | - overflow: 'hidden', | ||
| 74 | - textOverflow: 'ellipsis', | ||
| 75 | - display: 'block', | ||
| 76 | - boxOrient: 'vertical', | ||
| 77 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 78 | - position: 'fixed', | ||
| 79 | - top: '169rpx', | ||
| 80 | - left: '195rpx', | 86 | + width: '580rpx', |
| 87 | + height: '40rpx', | ||
| 88 | + padding: '20rpx 30rpx 15rpx 30rpx', | ||
| 81 | }, | 89 | }, |
| 90 | + views: [ | ||
| 91 | + { | ||
| 92 | + type: 'view', | ||
| 93 | + css: { | ||
| 94 | + display: 'inline-block', | ||
| 95 | + width: '410rpx', | ||
| 96 | + fontSize: '22rpx', | ||
| 97 | + lineHeight: '1em', | ||
| 98 | + verticalAlign: 'bottom', | ||
| 99 | + }, | ||
| 100 | + views: [ | ||
| 101 | + { | ||
| 102 | + type: 'text', | ||
| 103 | + text: '货源单号:', | ||
| 104 | + css: { | ||
| 105 | + color: '#999999', | ||
| 106 | + verticalAlign: 'bottom', | ||
| 107 | + }, | ||
| 108 | + }, | ||
| 109 | + { | ||
| 110 | + type: 'text', | ||
| 111 | + text: detail.code, | ||
| 112 | + css: { | ||
| 113 | + color: '#000000', | ||
| 114 | + verticalAlign: 'bottom', | ||
| 115 | + }, | ||
| 116 | + }, | ||
| 117 | + ], | ||
| 118 | + }, | ||
| 119 | + { | ||
| 120 | + type: 'view', | ||
| 121 | + css: { | ||
| 122 | + display: 'inline-block', | ||
| 123 | + width: '170rpx', | ||
| 124 | + lineHeight: '1em', | ||
| 125 | + textAlign: 'right', | ||
| 126 | + verticalAlign: 'bottom', | ||
| 127 | + }, | ||
| 128 | + views: [ | ||
| 129 | + { | ||
| 130 | + type: 'text', | ||
| 131 | + text: detail.priceType === 'TON' ? detail.weightUnitPrice : detail.vehicleUnitPrice, | ||
| 132 | + css: { | ||
| 133 | + color: '#ed3f3f', | ||
| 134 | + fontSize: '28rpx', | ||
| 135 | + verticalAlign: 'bottom', | ||
| 136 | + }, | ||
| 137 | + }, | ||
| 138 | + { | ||
| 139 | + type: 'text', | ||
| 140 | + text: detail.priceType === 'TON' ? '元/吨' : '元/车', | ||
| 141 | + css: { | ||
| 142 | + color: '#2b2b2b', | ||
| 143 | + fontSize: '20rpx', | ||
| 144 | + verticalAlign: 'bottom', | ||
| 145 | + }, | ||
| 146 | + }, | ||
| 147 | + ], | ||
| 148 | + }, | ||
| 149 | + ], | ||
| 82 | }, | 150 | }, |
| 83 | { | 151 | { |
| 84 | type: 'text', | 152 | type: 'text', |
| 85 | - text: '任务日期:', | 153 | + text: detail.startProvinceName + '-' + detail.startCityName, |
| 86 | css: { | 154 | css: { |
| 87 | - width: '400rpx', | ||
| 88 | - height: '33rpx', | ||
| 89 | - fontSize: '24rpx', | ||
| 90 | - fontSamily: 'PingFangSC-Regular', | ||
| 91 | - color: '#999999', | ||
| 92 | - lineHeight: '33rpx', | ||
| 93 | - display: 'block', | ||
| 94 | - boxOrient: 'vertical', | ||
| 95 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 96 | - position: 'fixed', | ||
| 97 | - top: '204rpx', | ||
| 98 | - left: '75rpx', | 155 | + width: '440rpx', |
| 156 | + height: '40rpx', | ||
| 157 | + fontSize: '28rpx', | ||
| 158 | + paddingLeft: '80rpx', | ||
| 159 | + color: '#000000', | ||
| 99 | }, | 160 | }, |
| 100 | }, | 161 | }, |
| 101 | { | 162 | { |
| 102 | type: 'text', | 163 | type: 'text', |
| 103 | - text: dayjs(params.loadTime).format('YYYY-MM-DD'), | 164 | + text: '总里程:' + detail.distance + 'km', |
| 104 | css: { | 165 | css: { |
| 105 | - width: '400rpx', | ||
| 106 | - height: '33rpx', | ||
| 107 | - fontSize: '24rpx', | ||
| 108 | - fontSamily: 'PingFangSC-Regular', | ||
| 109 | - color: '#121212', | ||
| 110 | - lineHeight: '33rpx', | ||
| 111 | - overflow: 'hidden', | ||
| 112 | - textOverflow: 'ellipsis', | ||
| 113 | - display: 'block', | ||
| 114 | - boxOrient: 'vertical', | ||
| 115 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 116 | - position: 'fixed', | ||
| 117 | - top: '204rpx', | ||
| 118 | - left: '195rpx', | 166 | + width: '440rpx', |
| 167 | + height: '20rpx', | ||
| 168 | + fontSize: '20rpx', | ||
| 169 | + padding: '20rpx 80rpx', | ||
| 170 | + color: '#999999', | ||
| 119 | }, | 171 | }, |
| 120 | }, | 172 | }, |
| 121 | { | 173 | { |
| 122 | type: 'text', | 174 | type: 'text', |
| 123 | - text: params.startCityName + '-' + params.startAreaName, | 175 | + text: detail.endProvinceName + '-' + detail.endCityName, |
| 124 | css: { | 176 | css: { |
| 125 | - width: '400rpx', | ||
| 126 | - height: '40rpx', | ||
| 127 | - fontSize: '36rpx', | ||
| 128 | - fontSamily: 'PingFangSC-Semibold, PingFang SC', | ||
| 129 | - fontWeight: '600', | ||
| 130 | - color: '#051B33', | ||
| 131 | - lineHeight: '40rpx', | ||
| 132 | - overflow: 'hidden', | ||
| 133 | - textOverflow: 'ellipsis', | ||
| 134 | - display: 'block', | ||
| 135 | - boxOrient: 'vertical', | ||
| 136 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 137 | - position: 'fixed', | ||
| 138 | - top: '270rpx', | ||
| 139 | - left: '129rpx', | 177 | + width: '440rpx', |
| 178 | + height: '50rpx', | ||
| 179 | + fontSize: '28rpx', | ||
| 180 | + paddingLeft: '80rpx', | ||
| 181 | + color: '#000000', | ||
| 140 | }, | 182 | }, |
| 141 | }, | 183 | }, |
| 142 | { | 184 | { |
| 143 | type: 'text', | 185 | type: 'text', |
| 144 | - text: params.endCityName + '-' + params.endAreaName, | 186 | + text: dayjs(detail.startTime).format('YYYY-MM-DD HH:mm') + ' 到 ' + dayjs(detail.endTime).format('YYYY-MM-DD HH:mm') + ' 期间装货', |
| 145 | css: { | 187 | css: { |
| 146 | - width: '400rpx', | 188 | + width: '540rpx', |
| 147 | height: '40rpx', | 189 | height: '40rpx', |
| 148 | - fontSize: '36rpx', | ||
| 149 | - fontSamily: 'PingFangSC-Semibold, PingFang SC', | ||
| 150 | - fontWeight: '600', | ||
| 151 | - color: '#051B33', | ||
| 152 | - lineHeight: '40rpx', | ||
| 153 | - overflow: 'hidden', | ||
| 154 | - textOverflow: 'ellipsis', | ||
| 155 | - display: 'block', | ||
| 156 | - boxOrient: 'vertical', | ||
| 157 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 158 | - position: 'fixed', | ||
| 159 | - top: '405rpx', | ||
| 160 | - left: '129rpx', | ||
| 161 | - }, | ||
| 162 | - }, | ||
| 163 | - { | ||
| 164 | - type: 'text', | ||
| 165 | - text: '总里程:' + item.distance + 'KM', | ||
| 166 | - css: { | ||
| 167 | - width: '400rpx', | ||
| 168 | - height: '33rpx', | ||
| 169 | fontSize: '24rpx', | 190 | fontSize: '24rpx', |
| 170 | - fontWeight: '400', | ||
| 171 | - fontSamily: 'PingFangSC-Medium, PingFang SC', | 191 | + padding: '15rpx 40rpx', |
| 172 | color: '#999999', | 192 | color: '#999999', |
| 173 | - lineHeight: '33rpx', | ||
| 174 | - position: 'fixed', | ||
| 175 | - top: '345rpx', | ||
| 176 | - left: '129rpx', | ||
| 177 | }, | 193 | }, |
| 178 | }, | 194 | }, |
| 179 | { | 195 | { |
| 180 | - type: 'text', | ||
| 181 | - text: '订单备注:', | 196 | + type: 'view', |
| 182 | css: { | 197 | css: { |
| 183 | - width: '400rpx', | ||
| 184 | - height: '33rpx', | ||
| 185 | - fontSize: '24rpx', | ||
| 186 | - fontSamily: 'PingFangSC-Regular', | ||
| 187 | - color: '#999999', | ||
| 188 | - lineHeight: '33rpx', | ||
| 189 | - display: 'block', | ||
| 190 | - boxOrient: 'vertical', | ||
| 191 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 192 | - position: 'fixed', | ||
| 193 | - top: '477rpx', | ||
| 194 | - left: '75rpx', | 198 | + width: '600rpx', |
| 199 | + paddingLeft: '30rpx', | ||
| 200 | + display: 'inline-block', | ||
| 201 | + paddingTop: '20rpx', | ||
| 202 | + height: '35rpx', | ||
| 203 | + fontSize: '26rpx', | ||
| 204 | + lineHeight: '1em', | ||
| 195 | }, | 205 | }, |
| 206 | + views: [ | ||
| 207 | + { | ||
| 208 | + type: 'text', | ||
| 209 | + text: '需求车型:', | ||
| 210 | + css: { | ||
| 211 | + color: '#999999', | ||
| 212 | + }, | ||
| 213 | + }, | ||
| 214 | + { | ||
| 215 | + type: 'text', | ||
| 216 | + text: formatSpecification, | ||
| 217 | + css: { | ||
| 218 | + paddingLeft: '15rpx', | ||
| 219 | + color: '#2b2b2b', | ||
| 220 | + }, | ||
| 221 | + }, | ||
| 222 | + ], | ||
| 196 | }, | 223 | }, |
| 197 | { | 224 | { |
| 198 | - type: 'text', | ||
| 199 | - text: params.remark, | 225 | + type: 'view', |
| 200 | css: { | 226 | css: { |
| 201 | - width: '350rpx', | ||
| 202 | - height: '33rpx', | ||
| 203 | - fontSize: '24rpx', | ||
| 204 | - fontSamily: 'PingFangSC-Regular', | ||
| 205 | - color: '#121212', | ||
| 206 | - lineHeight: '33rpx', | ||
| 207 | - overflow: 'hidden', | ||
| 208 | - textOverflow: 'ellipsis', | ||
| 209 | - display: 'block', | ||
| 210 | - boxOrient: 'vertical', | ||
| 211 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 212 | - position: 'fixed', | ||
| 213 | - top: '477rpx', | ||
| 214 | - left: '195rpx', | 227 | + width: '600rpx', |
| 228 | + paddingLeft: '30rpx', | ||
| 229 | + display: 'inline-block', | ||
| 230 | + paddingTop: '20rpx', | ||
| 231 | + height: '35rpx', | ||
| 232 | + fontSize: '26rpx', | ||
| 233 | + lineHeight: '1em', | ||
| 215 | }, | 234 | }, |
| 235 | + views: [ | ||
| 236 | + { | ||
| 237 | + type: 'text', | ||
| 238 | + text: '需求箱型:', | ||
| 239 | + css: { | ||
| 240 | + color: '#999999', | ||
| 241 | + }, | ||
| 242 | + }, | ||
| 243 | + { | ||
| 244 | + type: 'text', | ||
| 245 | + text: formatVanType, | ||
| 246 | + css: { | ||
| 247 | + paddingLeft: '15rpx', | ||
| 248 | + color: '#2b2b2b', | ||
| 249 | + }, | ||
| 250 | + }, | ||
| 251 | + ], | ||
| 216 | }, | 252 | }, |
| 217 | { | 253 | { |
| 218 | - type: 'text', | ||
| 219 | - text: '司 机:', | 254 | + type: 'view', |
| 220 | css: { | 255 | css: { |
| 221 | - width: '400rpx', | ||
| 222 | - height: '33rpx', | 256 | + width: '600rpx', |
| 257 | + paddingLeft: '30rpx', | ||
| 258 | + display: 'inline-block', | ||
| 259 | + paddingTop: '20rpx', | ||
| 260 | + height: '35rpx', | ||
| 223 | fontSize: '26rpx', | 261 | fontSize: '26rpx', |
| 224 | - fontSamily: 'PingFangSC-Regular', | ||
| 225 | - color: '#FFFFFF', | ||
| 226 | - lineHeight: '33rpx', | ||
| 227 | - display: 'block', | ||
| 228 | - boxOrient: 'vertical', | ||
| 229 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 230 | - position: 'fixed', | ||
| 231 | - top: '564rpx', | ||
| 232 | - left: '75rpx', | 262 | + lineHeight: '1em', |
| 233 | }, | 263 | }, |
| 264 | + views: [ | ||
| 265 | + { | ||
| 266 | + type: 'text', | ||
| 267 | + text: '货物信息:', | ||
| 268 | + css: { | ||
| 269 | + color: '#999999', | ||
| 270 | + }, | ||
| 271 | + }, | ||
| 272 | + { | ||
| 273 | + type: 'text', | ||
| 274 | + text: detail.goodsName, | ||
| 275 | + css: { | ||
| 276 | + paddingLeft: '15rpx', | ||
| 277 | + color: '#2b2b2b', | ||
| 278 | + }, | ||
| 279 | + }, | ||
| 280 | + ], | ||
| 234 | }, | 281 | }, |
| 235 | { | 282 | { |
| 236 | - type: 'text', | ||
| 237 | - text: driverInfo, | 283 | + type: 'view', |
| 238 | css: { | 284 | css: { |
| 239 | - width: '400rpx', | ||
| 240 | - height: '33rpx', | 285 | + width: '600rpx', |
| 286 | + paddingLeft: '30rpx', | ||
| 287 | + display: 'inline-block', | ||
| 288 | + paddingTop: '20rpx', | ||
| 289 | + height: '35rpx', | ||
| 241 | fontSize: '26rpx', | 290 | fontSize: '26rpx', |
| 242 | - fontSamily: 'PingFangSC-Regular', | ||
| 243 | - color: '#FFFFFF', | ||
| 244 | - lineHeight: '33rpx', | ||
| 245 | - display: 'block', | ||
| 246 | - boxOrient: 'vertical', | ||
| 247 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 248 | - position: 'fixed', | ||
| 249 | - top: '564rpx', | ||
| 250 | - left: '180rpx', | 291 | + lineHeight: '1em', |
| 251 | }, | 292 | }, |
| 293 | + views: [ | ||
| 294 | + { | ||
| 295 | + type: 'text', | ||
| 296 | + text: '找车需求:', | ||
| 297 | + css: { | ||
| 298 | + color: '#999999', | ||
| 299 | + }, | ||
| 300 | + }, | ||
| 301 | + { | ||
| 302 | + type: 'text', | ||
| 303 | + text: detail.priceType !== 'TON' ? `共${detail.vehicleNumber}车(` : `共${detail.goodsWeight}吨(`, | ||
| 304 | + css: { | ||
| 305 | + paddingLeft: '15rpx', | ||
| 306 | + color: '#2b2b2b', | ||
| 307 | + }, | ||
| 308 | + }, | ||
| 309 | + { | ||
| 310 | + type: 'text', | ||
| 311 | + text: detail.priceType !== 'TON' ? `还需${detail.remainVehicleNumber}车` : `剩余${detail.remainGoodsWeight}吨`, | ||
| 312 | + css: { | ||
| 313 | + paddingLeft: '15rpx', | ||
| 314 | + color: '#ed3f3f', | ||
| 315 | + }, | ||
| 316 | + }, | ||
| 317 | + { | ||
| 318 | + type: 'text', | ||
| 319 | + text: ')', | ||
| 320 | + css: { | ||
| 321 | + paddingLeft: '15rpx', | ||
| 322 | + color: '#2b2b2b', | ||
| 323 | + }, | ||
| 324 | + }, | ||
| 325 | + ], | ||
| 252 | }, | 326 | }, |
| 253 | { | 327 | { |
| 254 | - type: 'text', | ||
| 255 | - text: '车牌号:' + vehicle, | 328 | + type: 'view', |
| 256 | css: { | 329 | css: { |
| 257 | - width: '400rpx', | ||
| 258 | - height: '33rpx', | 330 | + width: '600rpx', |
| 331 | + paddingLeft: '30rpx', | ||
| 332 | + display: 'inline-block', | ||
| 333 | + paddingTop: '20rpx', | ||
| 334 | + height: '35rpx', | ||
| 259 | fontSize: '26rpx', | 335 | fontSize: '26rpx', |
| 260 | - fontSamily: 'PingFangSC-Regular', | ||
| 261 | - color: '#FFFFFF', | ||
| 262 | - lineHeight: '33rpx', | ||
| 263 | - display: 'block', | ||
| 264 | - boxOrient: 'vertical', | ||
| 265 | - lineClamp: 1 /* 这里是超出几行省略 */, | ||
| 266 | - position: 'fixed', | ||
| 267 | - top: '613rpx', | ||
| 268 | - left: '75rpx', | 336 | + lineHeight: '1em', |
| 269 | }, | 337 | }, |
| 338 | + views: [ | ||
| 339 | + { | ||
| 340 | + type: 'text', | ||
| 341 | + text: '运单备注:', | ||
| 342 | + css: { | ||
| 343 | + color: '#999999', | ||
| 344 | + }, | ||
| 345 | + }, | ||
| 346 | + { | ||
| 347 | + type: 'text', | ||
| 348 | + text: detail.remark, | ||
| 349 | + css: { | ||
| 350 | + paddingLeft: '15rpx', | ||
| 351 | + color: '#2b2b2b', | ||
| 352 | + lineClamp: 1, | ||
| 353 | + }, | ||
| 354 | + }, | ||
| 355 | + ], | ||
| 270 | }, | 356 | }, |
| 271 | ], | 357 | ], |
| 272 | }, | 358 | }, |
pages/index.vue
pages/me/index.vue
| @@ -46,7 +46,16 @@ | @@ -46,7 +46,16 @@ | ||
| 46 | <view class="page-my__list"> | 46 | <view class="page-my__list"> |
| 47 | <u-cell-group> | 47 | <u-cell-group> |
| 48 | <!-- <u-cell v-if="$permission('/settlement/paymentPlan')" icon="file-text" title="支付申请" is-link url="/pages/payPlan/list"> </u-cell>--> | 48 | <!-- <u-cell v-if="$permission('/settlement/paymentPlan')" icon="file-text" title="支付申请" is-link url="/pages/payPlan/list"> </u-cell>--> |
| 49 | - <u-cell v-if="$permission('/settlement/paymentPlan')" icon="rmb" icon-style="color:#333" title-style="color:#333" title="支付计划" is-link url="/pages/payPlan/list"> </u-cell> | 49 | + <u-cell |
| 50 | + v-if="$permission('/settlement/paymentPlan')" | ||
| 51 | + icon="https://zeyi-tms-product.oss-cn-hangzhou.aliyuncs.com/dispatch-helper-ma/svg/pay-rmb.svg" | ||
| 52 | + icon-style="color:#333" | ||
| 53 | + title-style="color:#333" | ||
| 54 | + title="支付计划" | ||
| 55 | + is-link | ||
| 56 | + url="/pages/payPlan/list" | ||
| 57 | + > | ||
| 58 | + </u-cell> | ||
| 50 | </u-cell-group> | 59 | </u-cell-group> |
| 51 | </view> | 60 | </view> |
| 52 | <view class="page-my__login"> | 61 | <view class="page-my__login"> |
pages/order/add.vue
| @@ -38,12 +38,23 @@ | @@ -38,12 +38,23 @@ | ||
| 38 | <u-input v-model="form.goodsPiece" border="none" type="digit" placeholder="请输入,选填" /> | 38 | <u-input v-model="form.goodsPiece" border="none" type="digit" placeholder="请输入,选填" /> |
| 39 | </u-form-item> | 39 | </u-form-item> |
| 40 | <u-form-item label="货物吨数" required> | 40 | <u-form-item label="货物吨数" required> |
| 41 | - <u-input v-model="form.goodsWeight" border="none" type="digit" placeholder="请输入" /> | 41 | + <u-input v-model="form.goodsWeight" border="none" type="digit" placeholder="请输入" @change="computedPaid" /> |
| 42 | </u-form-item> | 42 | </u-form-item> |
| 43 | <u-form-item label="货物方数"> | 43 | <u-form-item label="货物方数"> |
| 44 | <u-input v-model="form.goodsVolume" border="none" type="digit" placeholder="请输入,选填" /> | 44 | <u-input v-model="form.goodsVolume" border="none" type="digit" placeholder="请输入,选填" /> |
| 45 | </u-form-item> | 45 | </u-form-item> |
| 46 | </view> | 46 | </view> |
| 47 | + <view class="card" v-if="form.priceType === 'TON'"> | ||
| 48 | + <u-form-item label="计价方式"> | ||
| 49 | + <render-dict style="color: #2b2a27" :value="form.priceType" dict="FREIGHT_GOODS_SOURCE_PRICE_TYPE"></render-dict> | ||
| 50 | + </u-form-item> | ||
| 51 | + <u-form-item label="运输单价"> | ||
| 52 | + <text style="color: #2b2a27" | ||
| 53 | + ><text class="color-red">{{ form.weightUnitPrice }}</text | ||
| 54 | + >元/吨</text | ||
| 55 | + > | ||
| 56 | + </u-form-item> | ||
| 57 | + </view> | ||
| 47 | <view class="card"> | 58 | <view class="card"> |
| 48 | <view style="display: flex"> | 59 | <view style="display: flex"> |
| 49 | <view style="flex: 1"> | 60 | <view style="flex: 1"> |
| @@ -185,6 +196,7 @@ export default { | @@ -185,6 +196,7 @@ export default { | ||
| 185 | components: { UTextarea, PopupPlatenumber, payee }, | 196 | components: { UTextarea, PopupPlatenumber, payee }, |
| 186 | data() { | 197 | data() { |
| 187 | return { | 198 | return { |
| 199 | + eventCode: '', | ||
| 188 | loading: false, | 200 | loading: false, |
| 189 | showModal: '', | 201 | showModal: '', |
| 190 | showModal2: '', | 202 | showModal2: '', |
| @@ -221,6 +233,10 @@ export default { | @@ -221,6 +233,10 @@ export default { | ||
| 221 | allowDriverSeeFreightAmountNode: '', | 233 | allowDriverSeeFreightAmountNode: '', |
| 222 | waypoints: [{}, {}], | 234 | waypoints: [{}, {}], |
| 223 | remark: '', | 235 | remark: '', |
| 236 | + priceType: '', | ||
| 237 | + weightUnitPrice: '', | ||
| 238 | + goodsSourceCode: '', | ||
| 239 | + goodsSourceBiddingCode: '', | ||
| 224 | }, | 240 | }, |
| 225 | payeeModel: {}, | 241 | payeeModel: {}, |
| 226 | driverObj: {}, //司机信息 | 242 | driverObj: {}, //司机信息 |
| @@ -246,21 +262,27 @@ export default { | @@ -246,21 +262,27 @@ export default { | ||
| 246 | }, | 262 | }, |
| 247 | }, | 263 | }, |
| 248 | onLoad(option) { | 264 | onLoad(option) { |
| 249 | - if (option.code) { | ||
| 250 | - this.initData(option.code); | ||
| 251 | - } | ||
| 252 | // 从抢单来的数据 | 265 | // 从抢单来的数据 |
| 253 | if (option.eventCode) { | 266 | if (option.eventCode) { |
| 267 | + this.eventCode = option.eventCode; | ||
| 268 | + uni.setNavigationBarTitle({ title: '确定指派' }); | ||
| 254 | const eventChannel = this.getOpenerEventChannel(); | 269 | const eventChannel = this.getOpenerEventChannel(); |
| 255 | eventChannel.on('get-item', detail => { | 270 | eventChannel.on('get-item', detail => { |
| 256 | - this.setFormValue(detail); | 271 | + this.setFormValue(detail, ['priceType', 'weightUnitPrice', 'goodsSourceCode', 'goodsSourceBiddingCode', 'loadTime', 'paidAmount']); |
| 272 | + this.getAllowDriverSeeFreightAmount(); | ||
| 273 | + this.clipboard(`手机号:${detail.driverMobile || ''}车牌:${detail.vehicleLicenseNum || ''}车挂:${detail.trailerLicenseNum || ''}`); | ||
| 274 | + this.computedService(); | ||
| 257 | }); | 275 | }); |
| 276 | + } else { | ||
| 277 | + if (option.code) { | ||
| 278 | + this.initData(option.code); | ||
| 279 | + } | ||
| 280 | + this.initConfig(); | ||
| 258 | } | 281 | } |
| 259 | - this.initConfig(); | ||
| 260 | }, | 282 | }, |
| 261 | methods: { | 283 | methods: { |
| 262 | - setFormValue(detail) { | ||
| 263 | - ['goodsName', 'waypoints', 'allowDriverSeeFreightAmountNode', 'projectCode', 'projectName', 'remark', 'goodsPiece', 'goodsWeight', 'goodsVolume'].forEach(key => { | 284 | + setFormValue(detail, moreList = []) { |
| 285 | + ['goodsName', 'waypoints', 'allowDriverSeeFreightAmountNode', 'projectCode', 'projectName', 'remark', 'goodsPiece', 'goodsWeight', 'goodsVolume', ...moreList].forEach(key => { | ||
| 264 | this.form[key] = detail[key]; | 286 | this.form[key] = detail[key]; |
| 265 | }); | 287 | }); |
| 266 | if (detail.vehicleLicenseNum) { | 288 | if (detail.vehicleLicenseNum) { |
| @@ -355,10 +377,7 @@ export default { | @@ -355,10 +377,7 @@ export default { | ||
| 355 | this.clipboard(this.content2); | 377 | this.clipboard(this.content2); |
| 356 | }, | 378 | }, |
| 357 | initConfig() { | 379 | initConfig() { |
| 358 | - uni.$u.api.freightOrder.currentFreight({}).then(en => { | ||
| 359 | - this.currentFreight = en?.result || {}; | ||
| 360 | - this.form.allowDriverSeeFreightAmountNode = this.currentFreight.allowDriverSeeFreightAmountNode; | ||
| 361 | - }); | 380 | + this.getAllowDriverSeeFreightAmount(); |
| 362 | uni.$u.api.filter.projectCode({}).then(res => { | 381 | uni.$u.api.filter.projectCode({}).then(res => { |
| 363 | if (res.success && res.result && res.result.length === 1) { | 382 | if (res.success && res.result && res.result.length === 1) { |
| 364 | this.form.projectCode = res.result[0].code; | 383 | this.form.projectCode = res.result[0].code; |
| @@ -366,6 +385,12 @@ export default { | @@ -366,6 +385,12 @@ export default { | ||
| 366 | } | 385 | } |
| 367 | }); | 386 | }); |
| 368 | }, | 387 | }, |
| 388 | + getAllowDriverSeeFreightAmount() { | ||
| 389 | + uni.$u.api.freightOrder.currentFreight({}).then(en => { | ||
| 390 | + this.currentFreight = en?.result || {}; | ||
| 391 | + this.form.allowDriverSeeFreightAmountNode = this.currentFreight.allowDriverSeeFreightAmountNode; | ||
| 392 | + }); | ||
| 393 | + }, | ||
| 369 | initData(code) { | 394 | initData(code) { |
| 370 | uni.$u.api.freightOrder.getDetail({ code }).then(res => { | 395 | uni.$u.api.freightOrder.getDetail({ code }).then(res => { |
| 371 | let detail = res.result || {}; | 396 | let detail = res.result || {}; |
| @@ -567,6 +592,12 @@ export default { | @@ -567,6 +592,12 @@ export default { | ||
| 567 | computedService() { | 592 | computedService() { |
| 568 | uni.$u.debounce(this.getServiceAmountInfo, 500); | 593 | uni.$u.debounce(this.getServiceAmountInfo, 500); |
| 569 | }, | 594 | }, |
| 595 | + computedPaid() { | ||
| 596 | + if (this.eventCode) { | ||
| 597 | + this.form.paidAmount = Number(Number(this.form.goodsWeight) * Number(this.form.weightUnitPrice)).toFixed(2); | ||
| 598 | + this.computedService(); | ||
| 599 | + } | ||
| 600 | + }, | ||
| 570 | getServiceAmountInfo() { | 601 | getServiceAmountInfo() { |
| 571 | const { paidAmount = '', oilAmount = '', deliveryAmount = '', prepaidAmount = '', balancePaymentAmount = '', goodsName = '', goodsValue = '' } = this.form; | 602 | const { paidAmount = '', oilAmount = '', deliveryAmount = '', prepaidAmount = '', balancePaymentAmount = '', goodsName = '', goodsValue = '' } = this.form; |
| 572 | let params = { | 603 | let params = { |
| @@ -600,8 +631,8 @@ export default { | @@ -600,8 +631,8 @@ export default { | ||
| 600 | if (this.loading) return; | 631 | if (this.loading) return; |
| 601 | this.loading = true; | 632 | this.loading = true; |
| 602 | let totalAmount = Number(this.form.paidAmount || 0) + Number(this.form.serviceAmount || 0) + Number(this.form.securityServiceAmount || 0); | 633 | let totalAmount = Number(this.form.paidAmount || 0) + Number(this.form.serviceAmount || 0) + Number(this.form.securityServiceAmount || 0); |
| 603 | - uni.$u.api.freightOrder | ||
| 604 | - .add({ ...this.form, totalAmount, payeeId: this.payeeModel.driverId }) | 634 | + let addFun = this.eventCode ? uni.$u.api.freightGoodsSourceV2.addOrder : uni.$u.api.freightOrder.add; |
| 635 | + addFun({ ...this.form, totalAmount, payeeId: this.payeeModel.driverId }) | ||
| 605 | .then(res => { | 636 | .then(res => { |
| 606 | if (res.success) { | 637 | if (res.success) { |
| 607 | this.form = {}; | 638 | this.form = {}; |
pages/order/detail.vue
| @@ -98,10 +98,37 @@ | @@ -98,10 +98,37 @@ | ||
| 98 | <view class="card__item_content"> | 98 | <view class="card__item_content"> |
| 99 | <z-upload v-if="item.receiptAttachment" v-model="item.receiptAttachment" :limit="20" readonly disabled></z-upload> | 99 | <z-upload v-if="item.receiptAttachment" v-model="item.receiptAttachment" :limit="20" readonly disabled></z-upload> |
| 100 | </view> | 100 | </view> |
| 101 | - <view v-if="['COMPLETED'].includes(item.status) && $permission('/freightOrder/modifyReceiptAttachment')" class="action" @tap="toUploadReceipt"> | 101 | + <view v-if="['COMPLETED'].includes(item.status) && $permission('/freightOrder/modifyReceiptAttachment')" class="action" @tap="toUploadReceipt('receiptAttachment')"> |
| 102 | <u--text text="修改" suffixIcon="arrow-right"></u--text> | 102 | <u--text text="修改" suffixIcon="arrow-right"></u--text> |
| 103 | </view> | 103 | </view> |
| 104 | </view> | 104 | </view> |
| 105 | + <view v-if="item.priceType === 'TON'" class="card__item"> | ||
| 106 | + <view class="card__item_field">装车磅单</view> | ||
| 107 | + <view class="card__item_content"> | ||
| 108 | + <z-upload v-if="item.departureWeightAttachment" v-model="item.departureWeightAttachment" :limit="20" readonly disabled></z-upload> | ||
| 109 | + </view> | ||
| 110 | + <view v-if="['COMPLETED'].includes(item.status) && $permission('/freightOrder/modifyDepartureWeightAttachment')" class="action" @tap="toUploadReceipt('departureWeightAttachment')"> | ||
| 111 | + <u--text text="修改" suffixIcon="arrow-right"></u--text> | ||
| 112 | + </view> | ||
| 113 | + </view> | ||
| 114 | + <view v-if="item.priceType === 'TON'" class="card__item"> | ||
| 115 | + <view class="card__item_field">卸车磅单</view> | ||
| 116 | + <view class="card__item_content"> | ||
| 117 | + <z-upload v-if="item.arrivalWeightAttachment" v-model="item.arrivalWeightAttachment" :limit="20" readonly disabled></z-upload> | ||
| 118 | + </view> | ||
| 119 | + <view v-if="['COMPLETED'].includes(item.status) && $permission('/freightOrder/modifyArrivalWeightAttachment')" class="action" @tap="toUploadReceipt('arrivalWeightAttachment')"> | ||
| 120 | + <u--text text="修改" suffixIcon="arrow-right"></u--text> | ||
| 121 | + </view> | ||
| 122 | + </view> | ||
| 123 | + <view class="card__item"> | ||
| 124 | + <view class="card__item_field">计价方式</view> | ||
| 125 | + <view class="card__item_content"> | ||
| 126 | + <view> | ||
| 127 | + <render-dict dict="FREIGHT_GOODS_SOURCE_PRICE_TYPE" :value="item.priceType"></render-dict> | ||
| 128 | + <span v-if="item.priceType === 'TON'">({{ item.weightUnitPrice }}元/吨)</span> | ||
| 129 | + </view> | ||
| 130 | + </view> | ||
| 131 | + </view> | ||
| 105 | </view> | 132 | </view> |
| 106 | <view class="card"> | 133 | <view class="card"> |
| 107 | <view class="card__header"> | 134 | <view class="card__header"> |
| @@ -406,9 +433,9 @@ export default { | @@ -406,9 +433,9 @@ export default { | ||
| 406 | }, | 433 | }, |
| 407 | }); | 434 | }); |
| 408 | }, | 435 | }, |
| 409 | - toUploadReceipt() { | 436 | + toUploadReceipt(type = '') { |
| 410 | uni.navigateTo({ | 437 | uni.navigateTo({ |
| 411 | - url: '/pages/order/upload-receipt?code=' + this.item.code, | 438 | + url: `/pages/order/upload-receipt?code=${this.item.code}&type=${type}`, |
| 412 | events: { | 439 | events: { |
| 413 | refreshData: () => { | 440 | refreshData: () => { |
| 414 | this.initData(this.item.code); | 441 | this.initData(this.item.code); |
pages/order/filter.vue
| @@ -49,7 +49,7 @@ | @@ -49,7 +49,7 @@ | ||
| 49 | </template> | 49 | </template> |
| 50 | 50 | ||
| 51 | <script> | 51 | <script> |
| 52 | -import { urlParam } from '@/utils/param'; | 52 | +import { urlParam, formatBatchCode } from '@/utils/param'; |
| 53 | export default { | 53 | export default { |
| 54 | name: 'order-filter', | 54 | name: 'order-filter', |
| 55 | props: { | 55 | props: { |
| @@ -105,7 +105,7 @@ export default { | @@ -105,7 +105,7 @@ export default { | ||
| 105 | }, | 105 | }, |
| 106 | // 查询 | 106 | // 查询 |
| 107 | inquiryChange() { | 107 | inquiryChange() { |
| 108 | - this.getOpenerEventChannel().emit('refreshData', this.searchForm); | 108 | + this.getOpenerEventChannel().emit('refreshData', { ...this.searchForm, code: formatBatchCode(this.searchForm.code) }); |
| 109 | setTimeout(() => uni.navigateBack(), 500); | 109 | setTimeout(() => uni.navigateBack(), 500); |
| 110 | }, | 110 | }, |
| 111 | chosePayStatus() { | 111 | chosePayStatus() { |
pages/order/index.vue
| @@ -65,9 +65,9 @@ | @@ -65,9 +65,9 @@ | ||
| 65 | </view> | 65 | </view> |
| 66 | </view> | 66 | </view> |
| 67 | </u-popup> | 67 | </u-popup> |
| 68 | - <u-popup :show="qrShow" @close="qrShow = false" mode="center" closeable> | 68 | + <u-popup :show="qrShow" @close="qrShow = false" mode="center" :closeable="false" :safe-area-inset-bottom="false"> |
| 69 | <l-painter ref="painter" :board="poster"></l-painter> | 69 | <l-painter ref="painter" :board="poster"></l-painter> |
| 70 | - <view style="margin-top: 30upx"> | 70 | + <view style="margin: 30upx"> |
| 71 | <u-button type="primary" @click="saveQrImage">保存</u-button> | 71 | <u-button type="primary" @click="saveQrImage">保存</u-button> |
| 72 | </view> | 72 | </view> |
| 73 | </u-popup> | 73 | </u-popup> |
pages/order/upload-receipt.vue
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <template #content> | 3 | <template #content> |
| 4 | <u-form :model="form" ref="uForm" labelWidth="100"> | 4 | <u-form :model="form" ref="uForm" labelWidth="100"> |
| 5 | <view class="card"> | 5 | <view class="card"> |
| 6 | - <u-form-item label="上传回单"> | 6 | + <u-form-item :label="opType[type].title"> |
| 7 | <z-upload v-model="form.receiptAttachment" :limit="20"></z-upload> | 7 | <z-upload v-model="form.receiptAttachment" :limit="20"></z-upload> |
| 8 | </u-form-item> | 8 | </u-form-item> |
| 9 | </view> | 9 | </view> |
| @@ -24,13 +24,31 @@ export default { | @@ -24,13 +24,31 @@ export default { | ||
| 24 | components: { ZUpload }, | 24 | components: { ZUpload }, |
| 25 | data() { | 25 | data() { |
| 26 | return { | 26 | return { |
| 27 | + type: 'receiptAttachment', | ||
| 27 | form: { | 28 | form: { |
| 28 | receiptAttachment: '', | 29 | receiptAttachment: '', |
| 29 | }, | 30 | }, |
| 30 | item: {}, | 31 | item: {}, |
| 32 | + opType: { | ||
| 33 | + receiptAttachment: { | ||
| 34 | + title: '上传回单', | ||
| 35 | + url: 'modifyReceiptAttachment', | ||
| 36 | + }, | ||
| 37 | + departureWeightAttachment: { | ||
| 38 | + title: '装车磅单', | ||
| 39 | + url: 'modifyDepartureWeightAttachment', | ||
| 40 | + }, | ||
| 41 | + arrivalWeightAttachment: { | ||
| 42 | + title: '卸车磅单', | ||
| 43 | + url: 'modifyArrivalWeightAttachment', | ||
| 44 | + }, | ||
| 45 | + }, | ||
| 31 | }; | 46 | }; |
| 32 | }, | 47 | }, |
| 33 | onLoad(options) { | 48 | onLoad(options) { |
| 49 | + if (options.type) { | ||
| 50 | + this.type = options.type; | ||
| 51 | + } | ||
| 34 | if (options.code) { | 52 | if (options.code) { |
| 35 | this.initData(options.code); | 53 | this.initData(options.code); |
| 36 | } | 54 | } |
| @@ -39,11 +57,11 @@ export default { | @@ -39,11 +57,11 @@ export default { | ||
| 39 | initData(code) { | 57 | initData(code) { |
| 40 | uni.$u.api.freightOrder.getDetail({ code }).then(res => { | 58 | uni.$u.api.freightOrder.getDetail({ code }).then(res => { |
| 41 | this.item = res.result || {}; | 59 | this.item = res.result || {}; |
| 42 | - this.form.receiptAttachment = this.item.receiptAttachment; | 60 | + this.form.receiptAttachment = this.item[this.type]; |
| 43 | }); | 61 | }); |
| 44 | }, | 62 | }, |
| 45 | submit() { | 63 | submit() { |
| 46 | - uni.$u.api.freightOrder.modifyReceiptAttachment({ code: this.item.code, ...this.form }).then(res => { | 64 | + uni.$u.api.freightOrder[this.type]({ code: this.item.code, [this.type]: this.form.receiptAttachment }).then(res => { |
| 47 | if (res.success) { | 65 | if (res.success) { |
| 48 | uni.showToast({ title: '操作成功', icon: 'none' }); | 66 | uni.showToast({ title: '操作成功', icon: 'none' }); |
| 49 | this.getOpenerEventChannel().emit('refreshData'); | 67 | this.getOpenerEventChannel().emit('refreshData'); |
pages/payPlan/filter.vue
| @@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
| 35 | </template> | 35 | </template> |
| 36 | 36 | ||
| 37 | <script> | 37 | <script> |
| 38 | -import { urlParam } from '@/utils/param'; | 38 | +import { formatBatchCode, urlParam } from '@/utils/param'; |
| 39 | export default { | 39 | export default { |
| 40 | name: 'payPlanFilter', | 40 | name: 'payPlanFilter', |
| 41 | props: { | 41 | props: { |
| @@ -87,7 +87,7 @@ export default { | @@ -87,7 +87,7 @@ export default { | ||
| 87 | }, | 87 | }, |
| 88 | // 查询 | 88 | // 查询 |
| 89 | inquiryChange() { | 89 | inquiryChange() { |
| 90 | - this.getOpenerEventChannel().emit('refreshData', this.searchForm); | 90 | + this.getOpenerEventChannel().emit('refreshData', { ...this.searchForm, orderCode: formatBatchCode(this.searchForm.orderCode) }); |
| 91 | setTimeout(() => uni.navigateBack(), 500); | 91 | setTimeout(() => uni.navigateBack(), 500); |
| 92 | }, | 92 | }, |
| 93 | }, | 93 | }, |
pages/settlement/filter.vue
| @@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
| 52 | </template> | 52 | </template> |
| 53 | 53 | ||
| 54 | <script> | 54 | <script> |
| 55 | -import { urlParam } from '@/utils/param'; | 55 | +import { formatBatchCode, urlParam } from '@/utils/param'; |
| 56 | export default { | 56 | export default { |
| 57 | name: 'settlement-filter', | 57 | name: 'settlement-filter', |
| 58 | props: { | 58 | props: { |
| @@ -112,7 +112,7 @@ export default { | @@ -112,7 +112,7 @@ export default { | ||
| 112 | }, | 112 | }, |
| 113 | // 查询 | 113 | // 查询 |
| 114 | inquiryChange() { | 114 | inquiryChange() { |
| 115 | - this.getOpenerEventChannel().emit('refreshData', this.searchForm); | 115 | + this.getOpenerEventChannel().emit('refreshData', { ...this.searchForm, orderCode: formatBatchCode(this.searchForm.orderCode) }); |
| 116 | setTimeout(() => uni.navigateBack(), 500); | 116 | setTimeout(() => uni.navigateBack(), 500); |
| 117 | }, | 117 | }, |
| 118 | chosePayStatus() { | 118 | chosePayStatus() { |
utils/param.js
| @@ -51,3 +51,7 @@ export const urlParam = data => { | @@ -51,3 +51,7 @@ export const urlParam = data => { | ||
| 51 | export const clearURL = (str = '') => { | 51 | export const clearURL = (str = '') => { |
| 52 | return str.replace(/^(\s|\/)+|(\s|\/)+$/g, ''); | 52 | return str.replace(/^(\s|\/)+|(\s|\/)+$/g, ''); |
| 53 | }; | 53 | }; |
| 54 | + | ||
| 55 | +export const formatBatchCode = val => { | ||
| 56 | + return val ? val.replace(/,/, ',').replace(/\s+/g, ',') : ''; | ||
| 57 | +}; |