emis-app/pages/deliveryDeal/paiList.vue
2024-07-11 22:25:52 +08:00

139 lines
3.3 KiB
Vue

<template>
<tpx-page>
<tpx-layout>
<template v-slot:body>
<view class="pos-abt-all">
<tpx-scroll-view v-model:resObject="resData" :searchParam="searchParam" :getListFun="getListFun"
ref="listRef" :autoReload="false"
>
<view class="blcok-white-noradius" style="margin-top: 0;">
<u-row justify="between">
<view style="width: 140rpx;" class="font-weight">运单号</view>
<view style="flex:1;">
<tpx-scan-input v-model:value="searchParam.billCode" placeholder="请输入或扫码"
@scanChange="handleSearch" iconPos="right"></tpx-scan-input>
</view>
</u-row>
<u-row justify="between" custom-style="margin-top:20rpx;">
<view style="width: 140rpx;" class="font-weight">日期</view>
<view style="flex:1;">
<tpx-date-input v-model:value="searchParam._date" placeholder="请选择时间"></tpx-date-input>
</view>
</u-row>
<view class="mt-20">
<u-button type="primary" size="large" shape="square" plain="true" @click="handleSearch"
custom-style="height:66rpx;font-size: 30rpx;border-radius: 14rpx;">查询</u-button>
</view>
</view>
<view class="blcok-white-noradius">
<view class="">
<view class="pb-20">
<u-row>
<u-col span="8">
<text class="font-weight">运单号</text>
</u-col>
<u-col span="4">
<text class="font-weight">派件时间</text>
</u-col>
</u-row>
</view>
<view v-for="(item, index) in resData.list" class="yditem"
@click="goto(`post/detail?billCode=${item.billCode}`)"
>
<u-row>
<u-col span="8">
<text class="">{{item.billCode}}</text>
</u-col>
<u-col span="4">
<text class="clr-sub">{{item.scanDate}}</text>
</u-col>
</u-row>
</view>
</view>
</view>
</tpx-scroll-view>
</view>
</template>
<template v-slot:footer>
</template>
</tpx-layout>
</tpx-page>
</template>
<script>
import { debounce } from "@/common/util"
import * as apiService from "@/common/api"
export default {
props: {
// hasLeftWin: {
// type: Boolean
// }
},
computed: {
},
data() {
return {
searchParam: {
billCode: '',
_date: [],
scanStatType: 3, // 派件
},
resData: { list: [] }
}
},
onShareAppMessage() {
return {
}
},
onLoad() {
this.initData();
},
onUnload() {
},
methods: {
async getListFun(param){
let cpParam = JSON.parse(JSON.stringify(param))
cpParam.beginScanDate = cpParam._date[0]
cpParam.endScanDate = cpParam._date[1]
let res = await apiService.queryScanWaybillList(cpParam)
return res
},
initData() {
},
handleSearch(){
setTimeout(()=> {
this.triggerListReload()
}, 300)
},
triggerListReload(){
this?.$refs?.listRef?.getDataList?.(true) // 重置到第一页数据
},
handleSubmit() {
}
}
}
</script>
<style lang="scss">
@import '@/common/uni-nvue.scss';
page {
background-color: #F6F6F6;
height: 100% !important;
}
</style>
<style scoped lang="scss">
.yditem{
padding: 20rpx 0;
border-top: 2px solid #F6F6F6;
}
</style>