305 lines
9.3 KiB
Vue
305 lines
9.3 KiB
Vue
|
|
<template>
|
|||
|
|
<tpx-layout>
|
|||
|
|
<template v-slot:header>
|
|||
|
|
<view class="customer_nav_bar">
|
|||
|
|
<view class="com-jianju" >
|
|||
|
|
<!-- 关键字搜索框 -->
|
|||
|
|
<tpx-search placeholder="请输入订单号/运单号/进仓单号/姓名/手机号" v-model:value="searchParam.keyword" @change="handleSearchParamChange()" bgColor="#FFF" :timelyTrigger="false"></tpx-search>
|
|||
|
|
</view>
|
|||
|
|
|
|||
|
|
<view class="com-jianju" style="padding-top: 30rpx;">
|
|||
|
|
<u-row justify="between" align="top">
|
|||
|
|
<u-col span="9">
|
|||
|
|
<!-- 订单状态 -->
|
|||
|
|
<tpx-tabs :list="wareTypeList" v-model:value="searchParam.wareStatus"
|
|||
|
|
@tabchange="(val)=> { handleSearchParamChange() }" v-slot="curOrdTab"
|
|||
|
|
>
|
|||
|
|
<text slot>
|
|||
|
|
(<text>{{curOrdTab.item.val}}</text>)
|
|||
|
|
</text>
|
|||
|
|
</tpx-tabs>
|
|||
|
|
</u-col>
|
|||
|
|
<u-col span="2">
|
|||
|
|
<!-- 更多查询条件 -->
|
|||
|
|
<u-button @click="handleSearchMoreBtn()" :hairline="false" shape="circle" size="mini" custom-style="border-radius: 23rpx;font-size: 26rpx;height: 50rpx;">
|
|||
|
|
<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: 0 0 30rpx 0">
|
|||
|
|
<view>
|
|||
|
|
<u-text text="快递状态" size="28" :bold="true" margin="0 0 20rpx 0"></u-text>
|
|||
|
|
<tpx-tags :list="dlvTypeList" v-model:value="tmpSearchParam.postStatus" ></tpx-tags>
|
|||
|
|
</view>
|
|||
|
|
|
|||
|
|
<view>
|
|||
|
|
<u-text text="付款方式" size="28" :bold="true" margin="20rpx 0 20rpx 0"></u-text>
|
|||
|
|
<tpx-tags :list="payTypeList" v-model:value="tmpSearchParam.payType" ></tpx-tags>
|
|||
|
|
</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>
|
|||
|
|
</template>
|
|||
|
|
|
|||
|
|
<template v-slot:body>
|
|||
|
|
<scroll-view :scroll-y="true" @scrolltolower="onScrollBottom()" class="pos-abt-all"
|
|||
|
|
>
|
|||
|
|
<view class="pgb-cont">
|
|||
|
|
<!-- 列表数据 -->
|
|||
|
|
<view v-for="(orItem) in dataList" class="ord-list-item" >
|
|||
|
|
<u-row justify="between">
|
|||
|
|
<text>进仓单号:TAN-7080304038001</text>
|
|||
|
|
<view class="com-tag-grey font-26">
|
|||
|
|
{{'待入仓/部分入仓'}}
|
|||
|
|
</view>
|
|||
|
|
</u-row>
|
|||
|
|
<u-text margin="10rpx 0 0 0" :text="`拉链 无 12L 1000件 ..- ,针织上衣 LINing XL 1000件 等货一`" size="26" color="#999"></u-text>
|
|||
|
|
<view class="mt-10" @click="handleGoDetail(orItem)">
|
|||
|
|
<u-row justify="between" align="center">
|
|||
|
|
<u-row custom-style="flex:1;" justify="between">
|
|||
|
|
<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>
|
|||
|
|
</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-row custom-style="margin-left:20rpx;">
|
|||
|
|
<u-image shape="square" width="160" height="160" radius="10"></u-image>
|
|||
|
|
</u-row>
|
|||
|
|
</u-row>
|
|||
|
|
</view>
|
|||
|
|
<u-row custom-style="margin-top:30rpx;" justify="between">
|
|||
|
|
<view>
|
|||
|
|
<u-text :text="`订单号:${'TW7080304038'}`" color="#999" size="26"></u-text>
|
|||
|
|
</view>
|
|||
|
|
<view>
|
|||
|
|
<u-text :text="`${'2023-11-20 13:28:56'}`" color="#999" size="26"></u-text>
|
|||
|
|
</view>
|
|||
|
|
</u-row>
|
|||
|
|
<u-line color="#DEDEDE" margin="30rpx 0 0 0"></u-line>
|
|||
|
|
<u-row justify="end" custom-style="margin-top:20rpx;">
|
|||
|
|
<u-row>
|
|||
|
|
<u-button shape="circle" type="primary" :plain="true"
|
|||
|
|
@click="goto(`warehousing/pdfPreview?id=${112}`)" custom-style="width: 180rpx;box-sizing: content-box;height: 54rpx;margin-left: 12rpx;">下载打印PDF</u-button>
|
|||
|
|
<u-button shape="circle" type="primary"
|
|||
|
|
@click="handleGoDetail(orItem)" custom-style="width: 100rpx;box-sizing: content-box;height: 54rpx;margin-left: 12rpx;">去确认</u-button>
|
|||
|
|
</u-row>
|
|||
|
|
</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="dataList.length == 0" style="padding-top: 100rpx;">
|
|||
|
|
<u-empty text="无数据" :icon="getCdnUrl('kong.png')" textSize="28" width="86" height="97">
|
|||
|
|
</u-empty>
|
|||
|
|
</view>
|
|||
|
|
</view>
|
|||
|
|
</scroll-view>
|
|||
|
|
</template>
|
|||
|
|
</tpx-layout>
|
|||
|
|
|
|||
|
|
</template>
|
|||
|
|
<script>
|
|||
|
|
import getCdnUrl from "@/common/getCdnUrl"
|
|||
|
|
import { wareTypeEnum, wareTypeList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList } from "@/common/enum"
|
|||
|
|
import { goto, setClipboardData, confirmModal, showLoading } from "@/common/untool"
|
|||
|
|
export default {
|
|||
|
|
props: {
|
|||
|
|
// hasLeftWin: {
|
|||
|
|
// type: Boolean
|
|||
|
|
// }
|
|||
|
|
},
|
|||
|
|
computed: {
|
|||
|
|
hasExtSchParam() {
|
|||
|
|
let hasExt = false
|
|||
|
|
const searchParam = this.searchParam
|
|||
|
|
if(
|
|||
|
|
(searchParam.postStatus && searchParam.postStatus.length > 0)
|
|||
|
|
|| (searchParam.payType && searchParam.payType.length > 0)
|
|||
|
|
|| (searchParam.date || (searchParam.dateType && searchParam.dateType != dateTypeEnum.custom) )
|
|||
|
|
) {
|
|||
|
|
hasExt = true
|
|||
|
|
}
|
|||
|
|
return hasExt
|
|||
|
|
},
|
|||
|
|
},
|
|||
|
|
data() {
|
|||
|
|
return {
|
|||
|
|
...JSON.parse(JSON.stringify({ wareTypeEnum, wareTypeList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList })),
|
|||
|
|
searchParam: {
|
|||
|
|
keyword: '',
|
|||
|
|
wareStatus: wareTypeList[0].val // 订单状态, 1:寄件; 2:收件; 3:待付款;
|
|||
|
|
},
|
|||
|
|
showSearchMore: false,
|
|||
|
|
showCladar: false,
|
|||
|
|
tmpSearchParam: {
|
|||
|
|
|
|||
|
|
},
|
|||
|
|
dataList: [
|
|||
|
|
{}
|
|||
|
|
,{},{},{},{},{},{},{}
|
|||
|
|
],
|
|||
|
|
showLoadMore: false,
|
|||
|
|
loadedAll: false
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
onShareAppMessage() {
|
|||
|
|
return {
|
|||
|
|
// title: '',
|
|||
|
|
// path: 'TODO'
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
onLoad() {
|
|||
|
|
this.initTmpSrchParam()
|
|||
|
|
this.initData();
|
|||
|
|
},
|
|||
|
|
onUnload() {
|
|||
|
|
},
|
|||
|
|
methods: {
|
|||
|
|
getCdnUrl,
|
|||
|
|
goto,
|
|||
|
|
initData(){
|
|||
|
|
// showLoading()
|
|||
|
|
setTimeout(() => {
|
|||
|
|
uni.stopPullDownRefresh();
|
|||
|
|
}, 300);
|
|||
|
|
},
|
|||
|
|
initTmpSrchParam(){
|
|||
|
|
this.tmpSearchParam = {
|
|||
|
|
postStatus: [], // 快递状态
|
|||
|
|
payType: [], // 支付类型
|
|||
|
|
dateType: '', // 日期类型
|
|||
|
|
date: '' // 日期
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
loadListData() {
|
|||
|
|
// 请求列表数据 TODO
|
|||
|
|
console.log('====this.searchParam===', this.searchParam)
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
onScrollBottom() {
|
|||
|
|
console.log("onScrollBottom");
|
|||
|
|
if (this.loadedAll) {
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
this.showLoadMore = true;
|
|||
|
|
this.handleSearchParamChange();
|
|||
|
|
},
|
|||
|
|
handleSearchMoreBtn(){
|
|||
|
|
if(!this.showLoadMore) {
|
|||
|
|
// 回显更多条件
|
|||
|
|
Object.keys(this.tmpSearchParam).map(t=> {
|
|||
|
|
const val = this.searchParam[t]
|
|||
|
|
typeof val != 'undefined' && (this.tmpSearchParam[t] = val)
|
|||
|
|
})
|
|||
|
|
}
|
|||
|
|
this.showSearchMore = !this.showSearchMore
|
|||
|
|
},
|
|||
|
|
handleSearchParamChange(key, val) {
|
|||
|
|
if(key) {
|
|||
|
|
this.searchParam[key] = val
|
|||
|
|
}
|
|||
|
|
this.loadListData()
|
|||
|
|
},
|
|||
|
|
|
|||
|
|
handleResetTempSearch(){
|
|||
|
|
this.initTmpSrchParam()
|
|||
|
|
},
|
|||
|
|
handleConfirmTempSearch(){
|
|||
|
|
Object.assign(this.searchParam, this.tmpSearchParam)
|
|||
|
|
this.showSearchMore = false
|
|||
|
|
this.handleSearchParamChange();
|
|||
|
|
},
|
|||
|
|
handleGoDetail(item = {}) {
|
|||
|
|
goto(`warehousing/detail?id=${item.id}`)
|
|||
|
|
},
|
|||
|
|
handleDownPdf(item = {}) {
|
|||
|
|
debugger
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
|
|||
|
|
<style lang="scss">
|
|||
|
|
@import '@/common/uni-nvue.scss';
|
|||
|
|
page {
|
|||
|
|
background-color: #F6F6F6;
|
|||
|
|
height: 100% !important;
|
|||
|
|
}
|
|||
|
|
.customer_nav_bar {
|
|||
|
|
padding-top: 30rpx;
|
|||
|
|
background-color: #FFF;
|
|||
|
|
position: relative;
|
|||
|
|
}
|
|||
|
|
</style>
|
|||
|
|
<style scoped lang="scss">
|
|||
|
|
.pgb-cont{
|
|||
|
|
padding: 30rpx;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
.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;
|
|||
|
|
}
|
|||
|
|
.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>
|