emis-app/pages/tabBar/order/order.vue

256 lines
7.9 KiB
Vue
Raw Normal View History

2023-11-25 16:30:38 +00:00
<template>
2024-05-06 16:38:24 +00:00
<tpx-page>
<tpx-layout>
<template v-slot:header>
<view class="pt-30">
<view class="com-jianju" style="padding: 30rpx;background-color:#B12D29;border-radius: 30rpx;">
<u-row justify="between">
<view class="clr-wht font-32 font-weight">订单概况</view>
<tpx-select mode="drop" v-model:value="searchParam.keyword" :list="dateRangeList" >
<view style="width: 200rpx;;">
<u-button :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;width: 130rpx;">
<u-row justify="between" custom-style="width: 100%;">
<view :style="'padding-right: 4rpx;white-space: nowrap;' + 'color: #666;'">
统计
</view>
<u-icon :name="showSearchMore?'arrow-up-fill':'arrow-down-fill'"
color="#666" size="18" custom-style="margin-top: 2rpx;"
></u-icon>
</u-row>
</u-button>
</view>
</tpx-select>
</u-row>
2023-12-19 17:58:00 +00:00
2024-05-06 16:38:24 +00:00
<u-row justify="between" custom-style="margin-top:30rpx;">
<view style="flex: 1;text-align: center;">
<u-text :text="5" color="#fff" bold="true" size="40" align="center"></u-text>
<view class="pt-20 clr-wht font-26" style="opacity: 0.8;">
<u-row justify="center">
<u-icon name="order" color="#fff" custom-style="opacity: 0.8;" size="30"></u-icon>
<text class="pl-10">待处理订单</text>
2023-12-19 17:58:00 +00:00
</u-row>
2024-05-06 16:38:24 +00:00
</view>
2023-12-19 17:58:00 +00:00
</view>
2024-05-06 16:38:24 +00:00
<view>
<u-line direction="col" color="#fff" length="80"></u-line>
2023-12-19 17:58:00 +00:00
</view>
2024-05-06 16:38:24 +00:00
<view style="flex: 1;text-align: center;">
<u-text :text="118" color="#fff" bold="true" size="40" align="center"></u-text>
<view class="pt-20 clr-wht font-26" style="opacity: 0.8;">
<u-row justify="center">
<u-icon name="order" color="#fff" custom-style="opacity: 0.8;" size="30"></u-icon>
<text class="pl-10">累计处理订单</text>
</u-row>
</view>
2023-12-19 17:58:00 +00:00
</view>
2024-05-06 16:38:24 +00:00
</u-row>
</view>
</view>
<view class="com-jianju" style="padding-top: 30rpx;">
<u-row justify="between" align="top">
<u-col span="12">
<!-- 订单状态 -->
<tpx-tabs :list="ordStatusList" v-model:value="searchParam.ordStatus"
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab"
>
<text slot>
(<text>{{curOrdTab.item.val}}</text>)
</text>
</tpx-tabs>
</u-col>
2023-12-19 17:58:00 +00:00
</u-row>
</view>
2024-05-06 16:38:24 +00:00
</template>
<template v-slot:body>
<view class="pos-abt-all">
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
ref="listRef"
>
<view class="pgb-cont">
<!-- 列表数据 -->
2024-05-07 05:46:42 +00:00
<view v-for="(item) in resData.list" class="ord-list-item">
2024-05-06 16:38:24 +00:00
<u-row justify="between">
2024-05-07 05:46:42 +00:00
<view>
<u-row @click="handleDealItem(item, { type: 2 })">
2024-05-06 16:38:24 +00:00
<view>
2024-05-07 05:46:42 +00:00
<u-text v-if="item.billCode" :text="'运单号:' + item.billCode" size="26"></u-text>
<u-text v-else :text="'订单号:'+ item.orderSn" size="26"></u-text>
2024-05-06 16:38:24 +00:00
</view>
<view class="pl-10">
<u-icon name="file-text" size="32" custom-style=""></u-icon>
</view>
</u-row>
2024-05-07 05:46:42 +00:00
</view>
<view style="text-align: right;">
<tpx-text-dic :value="item.orderStatus" :list="dicData.emis_order_status" ></tpx-text-dic>
</view>
2023-12-19 17:58:00 +00:00
</u-row>
2024-05-06 16:38:24 +00:00
2024-05-07 05:46:42 +00:00
<u-row @click="handleDealItem(item, { type: 1 })" custom-style="margin-top: 30rpx;" justify="center">
2024-05-06 16:38:24 +00:00
<u-col span="4">
2024-05-07 13:44:17 +00:00
<u-text :text="(item.sendCountryName + item.sendProvinceName)||'-'" size="30" :bold="true" align="center"></u-text>
2024-05-07 05:46:42 +00:00
<u-text :text="item.sendName" size="26" color="#999" margin="20rpx 0 0 0"
2024-05-06 16:38:24 +00:00
align="center"></u-text>
</u-col>
<u-col span="4" justify="center" align="center" custom-style="text-align: center;">
2024-05-07 05:46:42 +00:00
<image style="width: 70rpx;height: 14rpx;" :src="getCdnUrl('post/toline.png')">
2024-05-06 16:38:24 +00:00
</image>
2024-05-07 05:46:42 +00:00
<!-- getCdnUrl('post/toline-grey.png') -->
<view class="mt-10">
<tpx-text-dic :value="item.waybillStatus" :list="dicData.emis_waybill_status" ></tpx-text-dic>
</view>
2024-05-06 16:38:24 +00:00
</u-col>
<u-col span="4">
2024-05-07 13:44:17 +00:00
<u-text :text="(item.receiveCountryName + item.receiveProvinceName)||'-'" size="30" :bold="true" align="center"></u-text>
2024-05-07 05:46:42 +00:00
<u-text :text="item.receiveName" size="26" color="#999" margin="20rpx 0 0 0"
2024-05-06 16:38:24 +00:00
align="center"></u-text>
</u-col>
</u-row>
<u-text :text="'签收时间:' + '2022-04-30 15:25'" color="#999" size="24"
margin="30rpx 0 0 0"></u-text>
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
<u-row justify="end" custom-style="margin-top:20rpx;">
<view style="display: inline-block;white-space: nowrap;">
<u-row>
2024-05-07 16:13:08 +00:00
<u-button @click="handleDealItem(item, { type: 6 })" shape="circle" type="primary"
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">揽收</u-button>
2024-05-07 13:44:17 +00:00
<u-button @click="handleDealItem(item, { type: 4 })" shape="circle" type="primary"
2024-05-06 16:38:24 +00:00
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button>
2024-05-07 13:44:17 +00:00
<u-button @click="handleDealItem(item, { type: 5 })" shape="circle" type="primary" :plain="true"
2024-05-06 16:38:24 +00:00
custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
</u-row>
</view>
2023-12-19 17:58:00 +00:00
</u-row>
</view>
2024-05-06 16:38:24 +00:00
</view>
</tpx-scroll-view>
2023-12-19 17:58:00 +00:00
</view>
2024-05-06 16:38:24 +00:00
</template>
</tpx-layout>
</tpx-page>
2023-11-25 16:30:38 +00:00
</template>
2024-05-06 16:38:24 +00:00
2023-11-25 16:30:38 +00:00
<script>
2024-05-06 16:38:24 +00:00
import { dateRangeList, ordStatusList } from "@/common/enum"
import * as apiService from "@/common/api"
2024-02-29 06:05:33 +00:00
2023-12-19 17:58:00 +00:00
export default {
2023-11-25 16:30:38 +00:00
props: {
2023-12-19 17:58:00 +00:00
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
2024-05-07 05:46:42 +00:00
dicData() {
return this.$store.getters.dicData
},
2023-11-25 16:30:38 +00:00
},
2023-12-19 17:58:00 +00:00
data() {
return {
2024-05-06 16:38:24 +00:00
...JSON.parse(JSON.stringify({ dateRangeList, ordStatusList })),
2023-12-19 17:58:00 +00:00
searchParam: {
2024-05-06 16:38:24 +00:00
searchValue: ''
},
queryOption: {
2023-11-25 16:30:38 +00:00
},
2024-05-06 16:38:24 +00:00
resData: {
list: []
}
2023-11-25 16:30:38 +00:00
}
},
2023-12-19 17:58:00 +00:00
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
2024-05-07 05:46:42 +00:00
onLoad(option) {
this.queryOption = option
2023-12-19 17:58:00 +00:00
this.initData();
},
onUnload() {
},
methods: {
2024-05-06 16:38:24 +00:00
getListFun: apiService.getOrderList,
2023-12-19 17:58:00 +00:00
initData(){
2024-05-06 16:38:24 +00:00
2023-12-19 17:58:00 +00:00
},
async handleDealItem(item, deal = { type: '1' }) {
2024-05-07 16:13:08 +00:00
let itemQuery = `?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`
2023-12-19 17:58:00 +00:00
switch (deal.type){
case 1: // 跳转
2024-04-28 10:41:13 +00:00
this.goto(`post/detail?id=${item.id || ''}`)
2023-12-19 17:58:00 +00:00
break;
case 2: // 复制订单号
2024-05-06 16:38:24 +00:00
this.setClipboardData(item.billCode || item.orderSn)
2023-12-19 17:58:00 +00:00
break;
case 3: // 删除
2024-02-29 06:05:33 +00:00
await this.confirmModal('确认要删除吗?')
2023-12-19 17:58:00 +00:00
break;
case 4: // 取消
2024-02-29 06:05:33 +00:00
await this.confirmModal('确认要取消吗?')
2023-12-19 17:58:00 +00:00
break;
2024-05-07 13:44:17 +00:00
case 5: // 立即开单
2024-05-07 16:13:08 +00:00
this.goto(`post/openorder${itemQuery}`)
break;
case 6: // 揽收
this.goto(`deliveryDeal/pickUp${itemQuery}`)
2024-05-07 13:44:17 +00:00
break;
2023-12-19 17:58:00 +00:00
default:
break;
}
}
}
}
2023-11-25 16:30:38 +00:00
</script>
2023-12-01 04:47:59 +00:00
<style lang="scss">
2023-12-19 17:58:00 +00:00
@import '@/common/uni-nvue.scss';
page {
background-color: #fff !important;
height: 100% !important;
}
2023-11-25 16:30:38 +00:00
</style>
2023-12-19 17:58:00 +00:00
<style scoped lang="scss">
.pgb-cont{
padding: 30rpx;
}
.ord-list-item{
border: 2px solid #F6F6F6;
box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139,139,139,0.06);
border-radius: 20rpx;
padding: 22rpx 30rpx;
background-color: #fff;
margin-bottom: 30rpx;
}
.search-more-panel{
overflow: hidden;
position: absolute;
left: 0;
right: 0;
height: calc(70vh);
z-index: 200;
}
.smp-body{
padding: 30rpx;
display: flex;
flex-direction: column;
height: 100%;
background-color: #FFF;
border-radius: 0 0 30rpx 30rpx;
box-sizing: border-box;
}
.smp-content{
flex: 1;
position: relative;
}
</style>