123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- <template>
- <!-- 订单详情 -->
- <view>
- <u-navbar title="" autoBack placeholder></u-navbar>
- <view class="card_order_detail">
- <view class="orderNumber">
- <view class="card_order_title">
- <span>运单号:</span>{{orderList.waybillNo}}
- </view>
- <span class="card_state"
- :style="{color:getState(orderList.status)}">{{orderStatus(orderList.status)}}</span>
- </view>
- <view class="title_delivery">寄件人:</view>
- <x-orderCard :list="senderList"></x-orderCard>
- <view class="title_delivery">收件人:</view>
- <x-orderCard :list="consigneeList"></x-orderCard>
- <view class="card_humiture">
- <view class="title_claim">
- <span>温度需求:</span>
- <view style="width: auto;">
- <u-tag :text="orderList.temperatureInterval" plain size="mini" type="success"></u-tag>
- </view>
- </view>
- <view class="title_claim">
- <span>配送要求:</span>
- <view style="width: auto;">
- <u-tag :text="orderList.deliveryCondition" plain size="mini" type="primary"></u-tag>
- </view>
- </view>
- <view class="title_claim">
- <span>货物类型:</span>
- <view style="width: auto;">
- <u-tag :text="orderList.cargoType" plain size="mini" type="warning"></u-tag>
- </view>
- </view>
- <view class="title_claim">
- <span>数量:</span>
- <view style="width: auto;font-size: 28rpx;">
- {{orderList.quantity}}
- </view>
- </view>
- <view class="title_claim"><span>备注:</span>{{orderList.remark}}</view>
- </view>
- <view class="card_humiture1" v-if="orderList.status == 8">
- <view class="order_iamge_item" v-for="(item,index) in srcList" :key="index">
- <u-image :showLoading="true" :src="item.url" width="80px" height="80px" radius="2"></u-image>
- <view class="order_item_title">{{item.title}}</view>
- </view>
- </view>
- <view v-if="orderList.status != 1">
- <view class="line_back" style="margin-top: 40rpx;" @click="logistics">查看物流详情</view>
- <view class="line_back" @click="goHumiture">查看温湿度</view>
- </view>
- <view style="width: 100%;height: 80rpx;"></view>
- </view>
- <!-- <view class="btn_print" v-if="type == 'details' && orderList.status == 2 || orderList.status == 3">
- <u-button type="primary" text="打印条码"></u-button>
- </view> -->
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- type: 'details',
- senderList: {
- name: '',
- phone: '',
- address: '',
- },
- consigneeList: {
- name: '',
- phone: '',
- address: '',
- },
- orderList: {},
- srcList: [{
- title: '运单签收图片',
- url: '',
- }, {
- title: '随货通行单图片',
- url: '',
- }, {
- title: '冷链交接单图片',
- url: '',
- }],
- userInfo: {},
- }
- },
- onLoad(value) {
- var userInfo = this.$cache.getCache('userInfo')
- this.userInfo = userInfo
- this.type = value.type
- },
- onShow() {
- var orderList = this.$cache.getCache('orderDetails')
- this.orderList = orderList
- this.senderList.name = orderList.senderAddressName
- this.senderList.phone = orderList.senderAddressPhone
- this.senderList.address = orderList.senderAddressDetails
- this.consigneeList.name = orderList.consigneeAddressName
- this.consigneeList.phone = orderList.consigneeAddressPhone
- this.consigneeList.address = orderList.consigneeAddressDetails
- if (orderList.status == 8) {
- const arr = orderList.ReceiptImg.split(',')
- this.srcList[0].url = arr[0]
- this.srcList[1].url = arr[1]
- this.srcList[2].url = arr[2]
- }
- },
- methods: {
- // 物流详情
- logistics() {
- uni.navigateTo({
- url: '/pages/order/logisticsDetails'
- });
- },
- // 温湿度记录
- goHumiture() {
- var orderList = this.$cache.getCache('orderDetails')
- uni.navigateTo({
- url: '/pages/order/humiture?waybillNo=' + orderList.waybillNo
- });
- },
- // 订单状态
- orderStatus(value) {
- if (this.userInfo.userType == 'sys') {
- if (this.userInfo.type == 2) {
- // 仓管
- if (value == 3) {
- return '未入库'
- } else if (value == 9) {
- return '待装箱'
- } else if (value == 10) {
- return '已装箱'
- } else if (value == 11) {
- return '已出箱'
- } else if (value == 5) {
- return '已入库'
- } else if (value == 7) {
- return '已出库'
- }
- } else if (this.userInfo.type == 3) {
- // 司机
- if (value == 2) {
- return '未装车'
- } else if (value == 9) {
- return '待装箱'
- } else if (value == 10) {
- return '已装箱'
- } else if (value == 4) {
- return '已装车'
- } else if (value == 6) {
- return '已下车'
- } else if (value == 8) {
- return '已签收'
- }
- }
- } else {
- if (value == 1 || value == 2 || value == 3) {
- return '未发货'
- } else if (value == 4 || value == 5 || value == 6 || value == 7) {
- return '已发货'
- } else if (value == 8) {
- return '已签收'
- }
- }
- },
- // 订单文字颜色
- getState(value) {
- if (this.userInfo.userType == 'sys') {
- if (this.userInfo.type == 2) {
- // 仓管
- if (value == 3) {
- return '#ff9900'
- } else if (value == 9) {
- return '#ff9900'
- } else if (value == 10) {
- return '#19be6b'
- } else if (value == 5) {
- return '#19be6b'
- } else {
- return '#606266'
- }
- } else if (this.userInfo.type == 3) {
- // 司机
- if (value == 2) {
- return '#ff9900'
- } else if (value == 9) {
- return '#ff9900'
- } else if (value == 10) {
- return '#19be6b'
- } else if (value == 4) {
- return '#19be6b'
- } else if (value == 6) {
- return '#19be6b'
- } else {
- return '#606266'
- }
- }
- } else {
- if (value == 1 || value == 2 || value == 3) {
- return '#ff9900'
- } else if (value == 4 || value == 5 || value == 6 || value == 7) {
- return '#19be6b'
- } else {
- return '#606266'
- }
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .card_order_detail {
- margin: 20rpx;
- }
- .orderNumber {
- display: flex;
- justify-content: space-between;
- align-items: center;
- background-color: #fff;
- border-radius: 20rpx;
- padding: 15rpx;
- }
- .card_order_title {
- span {
- font-size: 28rpx;
- color: #909399;
- margin-right: 10rpx;
- }
- }
- .card_state {
- color: #606266;
- font-size: 30rpx;
- }
- .title_delivery {
- font-size: 30rpx;
- font-weight: 600;
- margin: 20rpx 0rpx 10rpx 10rpx;
- }
- .card_humiture {
- margin-top: 30rpx;
- border-radius: 20rpx;
- padding: 1rpx 20rpx;
- background-color: #fff;
- }
- .card_humiture1 {
- display: flex;
- justify-content: space-around;
- align-items: center;
- flex-wrap: wrap;
- margin-top: 10rpx;
- border-radius: 20rpx;
- padding: 20rpx;
- background-color: #fff;
- }
- .order_iamge_item {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .order_item_title {
- font-weight: 600;
- margin-top: 10rpx;
- font-size: 26rpx;
- }
- .title_claim {
- display: flex;
- margin: 20rpx 0rpx;
- span {
- font-size: 28rpx;
- color: #909399;
- margin-right: 10rpx;
- }
- }
- .line_back {
- font-size: 30rpx;
- margin: 20rpx 0rpx;
- color: #3c9cff;
- }
- </style>
|