This commit is contained in:
aihe 2023-12-04 09:18:04 +08:00
parent 85d6afd105
commit 65acf8d769
6 changed files with 396 additions and 32 deletions

View File

@ -21,48 +21,29 @@
"path": "pages/tabBar/sending/sending",
"style": {
"navigationBarTitleText": "",
"navigationStyle":"custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "\ue534",
"fontSize": "24px",
"color": "#FFFFFF"
}]
}
}
"navigationStyle":"custom"
}
},
{
"path": "pages/tabBar/search/search",
"style": {
"navigationBarTitleText": "查件",
"navigationStyle":"custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "\ue534",
"fontSize": "24px",
"color": "#FFFFFF"
}]
}
}
"navigationStyle":"custom"
}
},
{
"path": "pages/tabBar/mine/mine",
"style": {
"navigationBarTitleText": "我的",
"navigationStyle":"custom",
"app-plus": {
"titleNView": {
"buttons": [{
"text": "\ue534",
"fontSize": "24px",
"color": "#FFFFFF"
}]
}
}
"navigationStyle":"custom"
}
},
{
"path": "pages/post/post",
"style": {
"navigationBarTitleText": "上门取件"
}
},
{

381
pages/post/post.vue Normal file
View File

@ -0,0 +1,381 @@
<template>
<!-- <view class="nours com-jianju">
<u-notice-bar :text="['最近一周内暂未有新通告!!!']" direction="column" speed="250" bgColor="#F6F6F6" color="#333333" mode="link"></u-notice-bar>
</view> -->
<view class="pg-cont">
<view class="customer_nav_bar">
<view class="com-jianju" style="width: 490rpx;">
<!-- 关键字搜索框 -->
<u-search placeholder="请输入运单号/订单号" v-model="searchParam.keyword" height="56" search-icon-size="40"
:clearabled="true" @change="(e)=> { handleSearchParamChange() }" :show-action="false"></u-search>
</view>
<view class="com-jianju" style="padding-top: 10rpx;">
<u-row justify="between">
<u-col span="10">
<!-- 订单状态 -->
<u-row justify="start">
<view v-for="(orsItem) in ordStatusList" @click="handleSearchParamChange('ordStatus', orsItem.val)"
:class="'sta-item ' + (searchParam.ordStatus == orsItem.val?'active':'')"
>
<view class="stai-text">
{{orsItem.title}}
(<text>0</text>)
</view>
</view>
</u-row>
</u-col>
<u-col span="2">
<!-- 更多查询条件 -->
<u-button @click="handleSearchMoreBtn()" :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;">
<u-row justify="center">
<view :style="'padding-right: 4rpx;white-space: nowrap;' + (hasExtSchParam?'color: #B12D29;':'color: #666;')">
{{hasExtSchParam?'已':''}}筛选
</view>
<u-icon :name="showSearchMore?'arrow-up-fill':'arrow-down-fill'"
:color="(hasExtSchParam?'#B12D29':'color: #666')" size="18" custom-style="margin-top: 2rpx;"
></u-icon>
</u-row>
</u-button>
</u-col>
</u-row>
</view>
<!-- 状态搜索 -->
<view v-if="showSearchMore" class="search-more-panel">
<view class="smp-body slideInDown animated fast">
<view class="smp-content">
<view class="pos-abt-all" style="overflow-y: auto;">
<view style="padding-bottom: 30rpx;">
<view>
<u-text text="快递状态" size="28" :bold="true"></u-text>
<view class="smp-tag" v-for="(dItem, dIndex) in dlvTypeList">
<u-tag :text="`${dItem.title}`" :plain="!dItem.checked" type="info" shape="circle" :bg-color="`${dItem.checked?'#de524e':''}`" :name="dIndex"
@click="handleCheckBoxClick(dItem)">
</u-tag>
</view>
</view>
<view>
<u-text text="付款方式" size="28" :bold="true" margin="40rpx 0 0 0"></u-text>
<view class="smp-tag" v-for="(pItem, pIndex) in payTypeList">
<u-tag :text="`${pItem.title}`" :plain="!pItem.checked" type="info" shape="circle" :bg-color="`${pItem.checked?'#de524e':''}`" :name="pIndex"
@click="handleCheckBoxClick(pItem)">
</u-tag>
</view>
</view>
<view>
<u-text text="时间范围" size="28" :bold="true" margin="40rpx 0 0 0"></u-text>
<view class="smp-tag" v-for="(daItem, daIndex) in dateTypeList"
v-show="!(tmpSearchParam.date && dateTypeEnum.custom == daItem.val)"
>
<u-tag
:text="`${daItem.title}`" :plain="!(daItem.val == tmpSearchParam.dateType)" type="info" shape="circle" :bg-color="`${daItem.val == tmpSearchParam.dateType?'#de524e':''}`"
@click="handleCheckDate(daItem)">
</u-tag>
</view>
<view v-if="tmpSearchParam.date" class="smp-tag" style="display: block;">
<view style="display: inline-block;">
<u-tag :text="`${tmpSearchParam.date}`" :plain="false" type="info" shape="circle" :bg-color="`#de524e`"
@click="handleSwitchCladar()">
</u-tag>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="smp-foot">
<u-row gutter="20" justify="between">
<u-button @click="handleResetTempSearch()" shape="circle">重置</u-button>
<view style="width: 40rpx;"></view>
<u-button @click="handleConfirmTempSearch()" shape="circle" type="primary">确认</u-button>
</u-row>
</view>
</view>
</view>
</view>
<view class="pg-body">
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pgb-cont pos-abt-all"
>
<!-- 列表数据 -->
<view v-for="(orItem) in ordList" class="ord-list-item">
<u-row justify="between">
<u-col span="11">
<u-row @click="handleDealItem(orItem, { type: 2 })">
<u-text :text="'运单号:'+ 'T7080304038'" size="26"></u-text>
<view style="flex:1;">
<u-icon name="file-text" size="32" custom-style=""></u-icon>
</view>
</u-row>
</u-col>
<u-icon @click="handleDealItem(orItem, { type: 3 })" name="trash"></u-icon>
</u-row>
<u-row custom-style="margin-top: 30rpx;" justify="center">
<u-col span="4">
<u-text :text="'中国上海'" size="30" :bold="true" align="center"></u-text>
<u-text :text="'张三'" size="26" color="#999" margin="20rpx 0 0 0" align="center"></u-text>
</u-col>
<u-col span="4" justify="center" align="center" custom-style="text-align: center;">
<image style="width: 70rpx;height: 14rpx;" :src="getCdnUrl('search/toline.png')"></image>
<!-- getCdnUrl('search/toline-grey.png') -->
<u-text :text="'待付款'" align="center" size="22" margin="10rpx 0 0 0"></u-text>
</u-col>
<u-col span="4">
<u-text :text="'越南'" size="30" :bold="true" align="center"></u-text>
<u-text :text="'李四'" size="26" color="#999" margin="20rpx 0 0 0" align="center"></u-text>
</u-col>
</u-row>
<u-text :text="'签收时间:' + '2022-04-30 15:25'" color="#999" size="22" 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;">
<u-row>
<u-button shape="circle" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;white-space: nowrap;">进仓确认</u-button>
<u-button shape="circle" type="primary" custom-style="height: 54rpx;margin-left: 12rpx;white-space: nowrap;">再来一单</u-button>
<!-- <u-button shape="circle" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 16rpx;">单据</u-button> -->
<u-button @click="handleDealItem(orItem, { type: 4 })" shape="circle" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">取消</u-button>
<u-button shape="circle" type="primary" :plain="true" custom-style="height: 54rpx;margin-left: 12rpx;">去付款</u-button>
</u-row>
</view>
</u-row>
</view>
<!-- 加载更多 -->
<u-loadmore icon-size="28" font-size="28" margin-top="30" v-if="showLoadMore || loadedAll" :status="loadedAll ? 'nomore' : 'loading'" />
<!-- 空数据页 -->
<view v-if="ordList.length == 0" style="padding-top: 100rpx;">
<u-empty
text="无数据"
:icon="getCdnUrl('kong.png')"
textSize="28"
width="86" height="97"
>
</u-empty>
</view>
</scroll-view>
</view>
</view>
<!-- 日历 -->
<!-- @close="handleSwitchCladar()" -->
<u-calendar title="请选择日期范围" color="#B12D29" mode="range" rowHeight="90" closeOnClickOverlay :show="showCladar" :defaultDate="tmpSearchParam.date.split('~')" @confirm="handleClaOk" @close="handleSwitchCladar"
></u-calendar>
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { ordStaEnum, ordStatusList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList } from "@/common/enum"
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
hasExtSchParam() {
return Object.values(this.tmpSearchParam).filter(v=> !!v).length > 0
},
},
data() {
return {
...JSON.parse(JSON.stringify({ ordStaEnum, ordStatusList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList })),
searchParam: {
keyword: '',
ordStatus: 1 // 订单状态, 1:寄件; 2:收件; 3:待付款;
},
showSearchMore: false,
showCladar: false,
tmpSearchParam: {
postStatus: '', // 快递状态
payType: '', // 支付类型
dateType: '', // 日期类型
date: '' // 日期
},
ordList: [
{},{},{},{},{},{},{},{}
],
showLoadMore: false,
loadedAll: false
}
},
onShareAppMessage() {
return {
// title: '',
// path: 'TODO'
}
},
onLoad() {
this.initData();
},
onUnload() {
this.ordList = [],
this.showLoadMore = false;
},
methods: {
getCdnUrl,
initData(){
// uni.showLoading({
// title: '加载中'
// });
setTimeout(() => {
uni.stopPullDownRefresh();
}, 300);
},
setListData() {
},
onScrollBottom() {
console.log("onScrollBottom");
if (this.loadedAll) {
return;
}
this.showLoadMore = true;
setTimeout(() => {
this.setListData();
}, 300);
},
handleSearchMoreBtn(){
if(!this.showLoadMore) {
// 回显更多条件
Object.keys(this.tmpSearchParam).map(t=> {
this.tmpSearchParam[t] = this.searchParam[t] || ''
})
}
this.showSearchMore = !this.showSearchMore
},
handleSearchParamChange(key, val) {
this.searchParam[key] = val
},
handleDealItem(item, deal = { type: '1' }) {
switch (deal.type){
case 1: // 跳转
break;
case 2: // 复制订单号
uni.setClipboardData({
data: "xxxxxxxxx",
success: () => {
uni.showToast({ title: "复制成功" })
},
})
break;
case 3: // 删除
uni.showModal({ content: "确认要删除吗?", }).then((res)=> {
if(res.confirm) {
}
})
break;
case 4: // 取消
uni.showModal({ content: "确认要取消吗?", }).then((res)=> {
if(res.confirm) {
}
})
break;
default:
break;
}
},
handleResetTempSearch(){
Object.keys(this.tmpSearchParam).map(t=> {
this.tmpSearchParam[t] = ''
})
},
handleConfirmTempSearch(){
Object.assign(this.searchParam, this.tmpSearchParam)
// Object.keys(this.tmpSearchParam).map(t=> {
// this.searchParam[t] = this.tmpSearchParam[t]
// })
},
handleCheckBoxClick(item, key){
item.checked = !item.checked
},
handleCheckDate(item) {
let newVal = item.val
if(newVal == dateTypeEnum.custom) {
this.handleSwitchCladar()
} else {
newVal == this.tmpSearchParam.dateType && (newVal = '')
this.tmpSearchParam.date = ''
}
this.tmpSearchParam.dateType = newVal
},
handleClaOk(res){
const ary = Object.values(res)
const val = [ary[0], ary[ary.length-1]].join("~")
this.handleSwitchCladar()
this.tmpSearchParam.date = val
},
handleSwitchCladar() {
this.showCladar = !this.showCladar
if(!this.showCladar) {
!this.tmpSearchParam.date && (this.tmpSearchParam.dateType = '')
}
}
}
}
</script>
<style lang="scss">
@import '../../common/uni-nvue.scss';
page {
background-color: #F6F6F6;
height: 100% !important;
}
</style>
<style scoped lang="scss">
.sta-item {
flex: 1;
padding: 30rpx 0 30rpx 0;
margin-right: 30rpx;
position: relative;
font-size: 28rpx;
color: #FFF;
opacity: 0.8;
.stai-text{
position: relative;
display: inline-block;
}
&.active{
font-weight: 600;
opacity: 1;
.stai-text{
&::after {
content: ' ';
position: absolute;
bottom: -30rpx;
left: 50%;
margin-left: -32rpx;
width: 64rpx;
height: 6rpx;
background: #FFF;
}
}
}
}
.ord-list-item{
box-shadow: 0rpx 3rpx 12rpx 0rpx rgba(139,139,139,0.06);
border-radius: 20rpx;
padding: 22rpx 30rpx;
background-color: #fff;
margin-bottom: 30rpx;
}
</style>

View File

@ -12,7 +12,7 @@
<button class="btn-ljyy" type="primary">立即预约</button>
<view class="btnlist1">
<u-row>
<u-col v-for="(mbItem, mIndex) in mainBtnlist" span="6" align="center">
<u-col v-for="(mbItem, mIndex) in mainBtnlist" span="6" align="center" @click="goto(mbItem.url)">
<view :class="'mb-item ' + (mIndex+1 == mainBtnlist.length ?'noborder': '') ">
<u-row align="center" justify="center">
<image class="tb1" style="width: 92rpx;height: 73rpx;" :src="mbItem.icon"/>
@ -55,6 +55,7 @@
</template>
<script>
import getCdnUrl from "@/common/getCdnUrl"
import { goto } from "@/common/untool"
export default {
props: {
// hasLeftWin: {
@ -64,7 +65,7 @@
data() {
return {
mainBtnlist: [
{ title: '下单寄件', subTitle: "上门揽件/寄仓库", icon: getCdnUrl(`sdg/btn-send.png`), url: '' },
{ title: '下单寄件', subTitle: "上门揽件/寄仓库", icon: getCdnUrl(`sdg/btn-send.png`), url: 'post/post' },
{ title: '专属小哥', subTitle: "下单给专属业务员", icon: getCdnUrl(`sdg/btn-bindbr.png`), url: '' }
],
toolBtnlist: [
@ -90,6 +91,7 @@
},
methods: {
getCdnUrl,
goto
}
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
static/images/post/ji.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
static/images/post/shou.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB