231 lines
6.4 KiB
Vue
231 lines
6.4 KiB
Vue
<template>
|
|
<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>
|
|
</u-row>
|
|
|
|
<u-row v-if="staticDataList.length > 0" justify="between" custom-style="margin-top:30rpx;">
|
|
<template v-for="(mbItem, mIndex) in staticDataList">
|
|
<view style="flex: 1;text-align: center;">
|
|
<u-text :text="mbItem.subTitle" 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">{{mbItem.title}}</text>
|
|
</u-row>
|
|
</view>
|
|
</view>
|
|
<view v-if="mIndex+1 != staticDataList.length">
|
|
<u-line direction="col" color="#fff" length="80"></u-line>
|
|
</view>
|
|
</template>
|
|
</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="dicData.emis_waybill_stat_type" v-model:value="searchParam.waybillStatType"
|
|
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab"
|
|
>
|
|
<text slot>
|
|
(<text>{{ staticInfo.orderStat[curOrdTab.item.val] || 0 }}</text>)
|
|
</text>
|
|
</tpx-tabs>
|
|
</u-col>
|
|
</u-row>
|
|
</view>
|
|
</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">
|
|
<!-- 列表数据 -->
|
|
<view v-for="(item) in resData.list" class="ord-list-item">
|
|
<view class="mt-10">
|
|
<bpd-send-reciever-tmp :value="item" :showInfoBtn="false"></bpd-send-reciever-tmp>
|
|
</view>
|
|
|
|
<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>
|
|
<u-button @click="handleDealItem(item, { type: 6 })" shape="circle" type="primary"
|
|
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">揽收</u-button>
|
|
<u-button @click="handleDealItem(item, { type: 4 })" shape="circle" type="primary"
|
|
:plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button>
|
|
<u-button @click="handleDealItem(item, { type: 5 })" shape="circle" type="primary" :plain="true"
|
|
custom-style="height: 54rpx;margin-left: 12rpx;">立即开单</u-button>
|
|
</u-row>
|
|
</view>
|
|
|
|
</u-row>
|
|
</view>
|
|
</view>
|
|
</tpx-scroll-view>
|
|
</view>
|
|
</template>
|
|
</tpx-layout>
|
|
</tpx-page>
|
|
</template>
|
|
|
|
<script>
|
|
import { dateRangeList } from "@/common/enum"
|
|
import * as apiService from "@/common/api"
|
|
import BpdSendRecieverTmp from "@/components/buns-post-detail-templates/bpd-send-reciever-tmp"
|
|
import { getAuthList, authCodeEnum } from "@/common/authCode"
|
|
|
|
export default {
|
|
props: {
|
|
},
|
|
computed: {
|
|
dicData() {
|
|
return this.$store.getters.dicData
|
|
},
|
|
staticDataList(){
|
|
let { commStat } = this.staticInfo
|
|
let list = [
|
|
{ title: '待处理订单', subTitle: commStat.waitDoNum || 0, url: '', code: authCodeEnum.dingDanGaiKuang },
|
|
{ title: '累计处理订单', subTitle: commStat.hasDoNum || 0, url: '', code: authCodeEnum.dingDanGaiKuang }
|
|
]
|
|
list = getAuthList({ list, _thisPage: this })
|
|
return list
|
|
},
|
|
},
|
|
components: { BpdSendRecieverTmp },
|
|
data() {
|
|
let { dicData } = this.$store.getters
|
|
return {
|
|
authCodeEnum,
|
|
...JSON.parse(JSON.stringify({ dateRangeList })),
|
|
searchParam: {
|
|
billCode: '',
|
|
_date: [],
|
|
waybillStatType: dicData?.emis_waybill_stat_type?.[0]?.val,
|
|
},
|
|
queryOption: {
|
|
|
|
},
|
|
staticInfo: {
|
|
commStat: {},
|
|
orderStat: {},
|
|
},
|
|
resData: {
|
|
list: []
|
|
}
|
|
}
|
|
},
|
|
onShareAppMessage() {
|
|
return {
|
|
// title: '',
|
|
// path: 'TODO'
|
|
}
|
|
},
|
|
onShow(){
|
|
this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
|
|
this.initData()
|
|
},
|
|
onLoad(option) {
|
|
this.queryOption = option
|
|
this.initData();
|
|
},
|
|
onUnload() {
|
|
},
|
|
methods: {
|
|
getListFun: apiService.getOrderList,
|
|
initData(){
|
|
this.getStaticData()
|
|
},
|
|
async getStaticData(){
|
|
const staRes = await apiService.getWaybillStatMap()
|
|
let { hasDoNum, waitDoNum, statNumList } = staRes.data
|
|
this.staticInfo.commStat = { hasDoNum, waitDoNum }
|
|
let orderStat = {}
|
|
statNumList.map(t=> {
|
|
orderStat[t.statType] = t.statNum
|
|
})
|
|
this.staticInfo.orderStat = orderStat
|
|
},
|
|
async handleDealItem(item, deal = { type: '1' }) {
|
|
let itemQuery = `?billCode=${item.billCode || ''}&orderSn=${item.orderSn || ''}`
|
|
switch (deal.type){
|
|
case 1: // 跳转
|
|
this.goto(`post/detail${itemQuery}`)
|
|
break;
|
|
case 2: // 复制订单号
|
|
this.setClipboardData(item.billCode || item.orderSn)
|
|
break;
|
|
case 3: // 删除
|
|
await this.confirmModal('确认要删除吗?')
|
|
break;
|
|
case 4: // 取消
|
|
await this.confirmModal('确认要取消吗?')
|
|
break;
|
|
case 5: // 立即开单
|
|
this.goto(`post/openorder${itemQuery}`)
|
|
break;
|
|
case 6: // 揽收
|
|
this.goto(`deliveryDeal/pickUp${itemQuery}`)
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
},
|
|
handleSearchParamChange() {
|
|
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
@import '@/common/uni-nvue.scss';
|
|
page {
|
|
background-color: #fff !important;
|
|
height: 100% !important;
|
|
}
|
|
</style>
|
|
<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> |