24 changed files with 2046 additions and 527 deletions
@ -0,0 +1,283 @@
|
||||
<template> |
||||
<BasicContainer ref='basicContainer' :option="option"> |
||||
<!-- 头部 --> |
||||
<template #head> |
||||
<view class="header"> |
||||
请选择提货批次 |
||||
</view> |
||||
</template> |
||||
|
||||
<!-- 主体 --> |
||||
<template #body> |
||||
<!-- 提货单件数 --> |
||||
<scroll-view class="scollView" scroll-y="true" :style="{height: details.height}" |
||||
@scrolltolower="utils.debounce(reachDown, 500)"> |
||||
<block v-for="(item, index) in details.data" :key="item.id"> |
||||
<view @click="handleChooseStatus(index)" |
||||
:class="{'list_container': true, 'active': details.chooseIndex === index}"> |
||||
<view class="list_row"> |
||||
提货批次: {{item.billladingCode || '暂无数据'}} |
||||
</view> |
||||
|
||||
<view class="list_row"> |
||||
路线: {{item.lineNameTitle || '暂无数据'}} |
||||
</view> |
||||
|
||||
<view class="list_row"> |
||||
<view class=""> |
||||
仓库名称:{{item.warehouseName || '暂无数据'}} |
||||
</view> |
||||
|
||||
<view class=""> |
||||
承运商:{{item.carrierName || '暂无数据'}} |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="list_row"> |
||||
<view class=""> |
||||
司机名字:{{item.driverName || '暂无数据'}} |
||||
</view> |
||||
|
||||
<view class=""> |
||||
司机电话:{{item.driverPhone || '暂无数据'}} |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="list_row"> |
||||
备注:{{item.remark || '暂无数据'}} |
||||
</view> |
||||
|
||||
<!-- 状态标签 --> |
||||
<view class="list_tips"> |
||||
{{details.type[Number(item.billladingStatus) ]|| '暂无状态数据'}} |
||||
</view> |
||||
</view> |
||||
</block> |
||||
|
||||
<!-- 底部站位 --> |
||||
<view class="footer"> |
||||
|
||||
</view> |
||||
</scroll-view> |
||||
|
||||
<!-- 底部站位 --> |
||||
<view class="button_container"> |
||||
<view @click="handleSkip"> |
||||
跳过 |
||||
</view> |
||||
|
||||
<view @click="handleConfirm"> |
||||
下一步 |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
</BasicContainer> |
||||
|
||||
<!-- #ifdef APP --> |
||||
<saomiao2 :ishidestop="scanState !== 0"></saomiao2> |
||||
<!-- #endif --> |
||||
</template> |
||||
|
||||
<script lang="ts" setup> |
||||
import { |
||||
getBillladingList |
||||
} from '@/api/user.js' |
||||
import { |
||||
onLoad, |
||||
onShow, |
||||
} from '@dcloudio/uni-app' |
||||
import { nextTick, reactive, ref } from "vue"; |
||||
import utils from '@/utils/utils.js' |
||||
import useSystemSettingsStore from '@/store/useSystemSettingsStore'; |
||||
import { storeToRefs } from 'pinia'; |
||||
const { scanState } = storeToRefs(useSystemSettingsStore()) |
||||
// 组件配置 |
||||
const option = reactive({ |
||||
// 标题 |
||||
title: '提货批次', |
||||
// 下拉刷新回调函数 |
||||
async pullDownRefreshInitPage() { |
||||
// 重置被选中数据 |
||||
details.chooseIndex = -1 |
||||
|
||||
details.data = [] |
||||
details.page.pageNum = 1 |
||||
initpage() |
||||
|
||||
return null |
||||
}, |
||||
// 触底加载回到函数 |
||||
reachBottomInitPage: async () => { return null }, |
||||
haveData: true, |
||||
isEnd: false |
||||
}) |
||||
|
||||
let details = reactive({ |
||||
/** 提货批次列表 */ |
||||
data: [] as any[], |
||||
page: { |
||||
pageSize: 10, |
||||
pageNum: 1, |
||||
total: 0 |
||||
}, |
||||
/** 被选中的元素的索引 */ |
||||
chooseIndex: -1, |
||||
/** 提货状态 */ |
||||
type: { |
||||
1: '未开始', 2: '提货中', 3: '已完成', 4: '已结算', 5: '已取消' |
||||
}, |
||||
height: '80vh', |
||||
pageInfo: {} |
||||
}) |
||||
|
||||
// 组件实例 |
||||
const basicContainer = ref() |
||||
|
||||
onLoad((op) => { |
||||
details.pageInfo = op |
||||
|
||||
// #ifdef APP |
||||
utils.ttsspke('请扫描或输入托盘码') |
||||
// #endif |
||||
}) |
||||
onShow(async () => { |
||||
// #ifdef APP |
||||
// 初始化关闭监听 |
||||
uni.$off('scancodedate') |
||||
// #endif |
||||
|
||||
await nextTick() |
||||
basicContainer.value.startPullDownRefresh() |
||||
|
||||
details.height = await utils.getViewDistanceFormTop('.scollView') |
||||
}) |
||||
|
||||
async function initpage() { |
||||
try { |
||||
const res = await getBillladingList(details.page) |
||||
|
||||
const { code, data } = res |
||||
if (code !== 200) return |
||||
|
||||
details.data = [...details.data, ...data.records] |
||||
details.page.total = data.total |
||||
|
||||
return null |
||||
} catch (err) { |
||||
//TODO handle the exception |
||||
console.log('err :>> ', err); |
||||
} finally { |
||||
return null |
||||
} |
||||
} |
||||
|
||||
/** 触底加载 */ |
||||
const reachDown = () => { |
||||
console.log('111 :>> ', 111); |
||||
details.page.pageNum += 1 |
||||
if (details.page.total <= details.data.length) return uni.showToast({ |
||||
title: '数据加载完毕', |
||||
icon: 'none' |
||||
}) |
||||
initpage() |
||||
} |
||||
|
||||
/** 元素激活状态 */ |
||||
const handleChooseStatus = (index : number) => { |
||||
details.chooseIndex = details.chooseIndex === index ? -1 : index |
||||
} |
||||
|
||||
/** 跳过 */ |
||||
const handleSkip = () => { |
||||
uni.redirectTo({ |
||||
url: '/pagesHome/pages/PickUpLotList/PickUpLotList' |
||||
}) |
||||
} |
||||
|
||||
/** 确认 */ |
||||
const handleConfirm = () => { |
||||
if (details.chooseIndex === -1) return uni.showToast({ |
||||
title: '请选择一条提货数据', |
||||
icon: 'none' |
||||
}) |
||||
|
||||
uni.redirectTo({ |
||||
url: '/pagesHome/pages/PickUpLotList/PickUpLotList' |
||||
}) |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
// 头部 |
||||
.header { |
||||
padding: 10upx 10upx 30upx; |
||||
font-size: 0.8rem; |
||||
} |
||||
|
||||
// 列表容器 |
||||
.list_container { |
||||
// 边框圆角 |
||||
$borderRadius: 5upx; |
||||
|
||||
position: relative; |
||||
margin: 10upx; |
||||
font-size: 0.8rem; |
||||
background: #fff; |
||||
padding: 10upx; |
||||
border-radius: $borderRadius; |
||||
box-shadow: 0 0 10px #eee, 3px 3px #eee; |
||||
|
||||
&.active { |
||||
box-shadow: 0 0 10px var(--subjectColor), 3px 3px var(--subjectColor); |
||||
} |
||||
|
||||
.list_row { |
||||
margin: 10upx; |
||||
display: flex; |
||||
|
||||
>view { |
||||
flex: 1; |
||||
} |
||||
} |
||||
|
||||
.list_tips { |
||||
position: absolute; |
||||
top: 0; |
||||
right: 0; |
||||
padding: 10upx 20upx; |
||||
background: #1b6ef3; |
||||
color: #fff; |
||||
border-top-right-radius: $borderRadius; |
||||
} |
||||
} |
||||
|
||||
// 底部按钮 |
||||
.button_container { |
||||
display: flex; |
||||
justify-content: center; |
||||
position: fixed; |
||||
width: 100%; |
||||
bottom: 40upx; |
||||
left: 0; |
||||
|
||||
>view { |
||||
padding: 15upx 60upx; |
||||
background: var(--subjectColor); |
||||
border-radius: 5upx; |
||||
color: #fff; |
||||
box-shadow: 0 0 10px var(--subjectColor); |
||||
|
||||
&:first-child { |
||||
background-color: #bd3734; |
||||
box-shadow: 0 0 10px #bd3734; |
||||
margin-right: 40upx; |
||||
} |
||||
} |
||||
} |
||||
|
||||
// 底部站位 |
||||
.footer { |
||||
height: 160upx; |
||||
} |
||||
</style> |
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
.topBox[data-v-b2ec859f]{width:100%;display:flex;align-items:center;margin-bottom:.3125rem;border-radius:.3125rem}.topBox .searchInput[data-v-b2ec859f]{margin-right:.3125rem;background:#eee;padding:.375rem .625rem;flex:1}.button[data-v-b2ec859f]{padding:.3125rem 1.25rem;border-radius:.15625rem;background-color:var(--subjectColor);color:#fff}.scoolv[data-v-b2ec859f]{width:100%;height:60vh;margin-top:.625rem}.scoolv .minbx[data-v-b2ec859f]{display:flex;flex-direction:column;align-items:center}.scoolv .minbx>.its[data-v-b2ec859f]{display:flex;flex-direction:column;align-items:center;width:21.4375rem;background:#FFFFFF;border-radius:.25rem;box-sizing:border-box;margin-bottom:.625rem}.scoolv .minbx>.its[data-v-b2ec859f]:nth-last-child(1){margin-bottom:0}.scoolv .minbx>.its .titl[data-v-b2ec859f]{width:100%;font-size:1rem;font-weight:400;color:#092c4d;border-bottom:.09375rem solid #EEEEEE;padding:.8125rem .75rem;box-sizing:border-box}.scoolv .minbx>.its .bts[data-v-b2ec859f]{display:flex;align-items:center;justify-content:center;padding:.625rem 0}.scoolv .minbx>.its .bts>uni-view[data-v-b2ec859f]{width:6.375rem;height:2rem;background:#FFFFFF;border-radius:.25rem;opacity:1;border:.0625rem solid #D3832A;font-size:.875rem;color:#d3832a;display:flex;align-items:center;justify-content:center}.scoolv .minbx>.its .contsx[data-v-b2ec859f]{width:100%;display:flex;flex-direction:column;padding:1.0625rem .75rem;box-sizing:border-box;border-bottom:.09375rem solid #EEEEEE}.scoolv .minbx>.its .contsx .content[data-v-b2ec859f]{width:100%;display:flex;align-items:center;justify-content:space-between;font-size:.875rem;color:#092c4d}.scoolv .minbx>.its .contsx .content>uni-view[data-v-b2ec859f]{flex:1}.scoolv .minbx>.its .contsx .total[data-v-b2ec859f]{width:100%;display:flex;align-items:center;justify-content:space-around;margin-top:1.375rem}.scoolv .minbx>.its .contsx .total>uni-view[data-v-b2ec859f]{display:flex;flex-direction:column;align-items:center;font-size:.875rem;color:#092c4d}.scoolv .minbx>.its .contsx .total>uni-view:nth-of-type(1)>uni-view[data-v-b2ec859f]:nth-of-type(2){color:#0086f1}.scoolv .minbx>.its .contsx .total>uni-view:nth-of-type(2)>uni-view[data-v-b2ec859f]:nth-of-type(2){color:#3ad8bc}.scoolv .minbx>.its .contsx .total>uni-view:nth-of-type(3)>uni-view[data-v-b2ec859f]:nth-of-type(2){color:#fa8c16}.scoolv .minbx>.its .contsx .total>uni-view>uni-view[data-v-b2ec859f]:nth-of-type(2){font-size:1.125rem;color:#0086f1;margin-top:.625rem}.hedtopt[data-v-b2ec859f]{display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:#fff;padding:1.125rem 1rem;box-sizing:border-box}.hedtopt .typto[data-v-b2ec859f]{display:inline-flex;align-items:center;justify-content:space-between;width:100%;font-size:.875rem;font-weight:400;color:#092c4d;margin-bottom:.625rem}.hedtopt .typto .vibx[data-v-b2ec859f]{display:inline-block;min-width:3.125rem;height:1.875rem;padding:.3125rem;box-sizing:border-box;border:.03125rem solid #90A0AF;word-wrap:break-word;word-break:break-all}.hedtopt .typto[data-v-b2ec859f]:nth-last-child(1){margin-bottom:0}.hedtopt .typto>uni-view[data-v-b2ec859f]{flex:1}.hedtopt .kehupeison[data-v-b2ec859f]{width:100%;display:flex;align-items:center;justify-content:space-around;margin-top:.625rem}.hedtopt .kehupeison>uni-view[data-v-b2ec859f]{display:flex;flex-direction:column;align-items:center;font-size:.875rem;font-weight:400;color:#092c4d}.hedtopt .kehupeison>uni-view:nth-of-type(1)>uni-view[data-v-b2ec859f]:nth-of-type(2){color:#092c4d}.hedtopt .kehupeison>uni-view:nth-of-type(2)>uni-view[data-v-b2ec859f]:nth-of-type(2){color:#0086f1}.hedtopt .kehupeison>uni-view:nth-of-type(3)>uni-view[data-v-b2ec859f]:nth-of-type(2){color:#3ad8bc}.hedtopt .kehupeison>uni-view:nth-of-type(4)>uni-view[data-v-b2ec859f]:nth-of-type(2){color:#fa8c16}.hedtopt .kehupeison>uni-view>uni-view[data-v-b2ec859f]:nth-of-type(2){font-size:1.125rem;font-weight:400;color:#092c4d;margin-top:.625rem} |
||||
.topBox[data-v-ffbc8762]{width:100%;display:flex;align-items:center;margin-bottom:.3125rem;border-radius:.3125rem}.topBox .searchInput[data-v-ffbc8762]{margin-right:.3125rem;background:#eee;padding:.375rem .625rem;flex:1}.button[data-v-ffbc8762]{padding:.3125rem 1.25rem;border-radius:.15625rem;background-color:var(--subjectColor);color:#fff}.scoolv[data-v-ffbc8762]{width:100%;height:60vh;margin-top:.625rem}.scoolv .minbx[data-v-ffbc8762]{display:flex;flex-direction:column;align-items:center}.scoolv .minbx>.its[data-v-ffbc8762]{display:flex;flex-direction:column;align-items:center;width:21.4375rem;background:#FFFFFF;border-radius:.25rem;box-sizing:border-box;margin-bottom:.625rem}.scoolv .minbx>.its[data-v-ffbc8762]:nth-last-child(1){margin-bottom:0}.scoolv .minbx>.its .titl[data-v-ffbc8762]{width:100%;font-size:1rem;font-weight:400;color:#092c4d;border-bottom:.09375rem solid #EEEEEE;padding:.8125rem .75rem;box-sizing:border-box}.scoolv .minbx>.its .bts[data-v-ffbc8762]{display:flex;align-items:center;justify-content:center;padding:.625rem 0}.scoolv .minbx>.its .bts>uni-view[data-v-ffbc8762]{width:6.375rem;height:2rem;background:#FFFFFF;border-radius:.25rem;opacity:1;border:.0625rem solid #D3832A;font-size:.875rem;color:#d3832a;display:flex;align-items:center;justify-content:center}.scoolv .minbx>.its .contsx[data-v-ffbc8762]{width:100%;display:flex;flex-direction:column;padding:1.0625rem .75rem;box-sizing:border-box;border-bottom:.09375rem solid #EEEEEE}.scoolv .minbx>.its .contsx .content[data-v-ffbc8762]{width:100%;display:flex;align-items:center;justify-content:space-between;font-size:.875rem;color:#092c4d}.scoolv .minbx>.its .contsx .content>uni-view[data-v-ffbc8762]{flex:1}.scoolv .minbx>.its .contsx .total[data-v-ffbc8762]{width:100%;display:flex;align-items:center;justify-content:space-around;margin-top:1.375rem}.scoolv .minbx>.its .contsx .total>uni-view[data-v-ffbc8762]{display:flex;flex-direction:column;align-items:center;font-size:.875rem;color:#092c4d}.scoolv .minbx>.its .contsx .total>uni-view:nth-of-type(1)>uni-view[data-v-ffbc8762]:nth-of-type(2){color:#0086f1}.scoolv .minbx>.its .contsx .total>uni-view:nth-of-type(2)>uni-view[data-v-ffbc8762]:nth-of-type(2){color:#3ad8bc}.scoolv .minbx>.its .contsx .total>uni-view:nth-of-type(3)>uni-view[data-v-ffbc8762]:nth-of-type(2){color:#fa8c16}.scoolv .minbx>.its .contsx .total>uni-view>uni-view[data-v-ffbc8762]:nth-of-type(2){font-size:1.125rem;color:#0086f1;margin-top:.625rem}.hedtopt[data-v-ffbc8762]{display:flex;align-items:center;justify-content:center;flex-direction:column;background-color:#fff;padding:1.125rem 1rem;box-sizing:border-box}.hedtopt .typto[data-v-ffbc8762]{display:inline-flex;align-items:center;justify-content:space-between;width:100%;font-size:.875rem;font-weight:400;color:#092c4d;margin-bottom:.625rem}.hedtopt .typto .vibx[data-v-ffbc8762]{display:inline-block;min-width:3.125rem;height:1.875rem;padding:.3125rem;box-sizing:border-box;border:.03125rem solid #90A0AF;word-wrap:break-word;word-break:break-all}.hedtopt .typto[data-v-ffbc8762]:nth-last-child(1){margin-bottom:0}.hedtopt .typto>uni-view[data-v-ffbc8762]{flex:1}.hedtopt .kehupeison[data-v-ffbc8762]{width:100%;display:flex;align-items:center;justify-content:space-around;margin-top:.625rem}.hedtopt .kehupeison>uni-view[data-v-ffbc8762]{display:flex;flex-direction:column;align-items:center;font-size:.875rem;font-weight:400;color:#092c4d}.hedtopt .kehupeison>uni-view:nth-of-type(1)>uni-view[data-v-ffbc8762]:nth-of-type(2){color:#092c4d}.hedtopt .kehupeison>uni-view:nth-of-type(2)>uni-view[data-v-ffbc8762]:nth-of-type(2){color:#0086f1}.hedtopt .kehupeison>uni-view:nth-of-type(3)>uni-view[data-v-ffbc8762]:nth-of-type(2){color:#3ad8bc}.hedtopt .kehupeison>uni-view:nth-of-type(4)>uni-view[data-v-ffbc8762]:nth-of-type(2){color:#fa8c16}.hedtopt .kehupeison>uni-view>uni-view[data-v-ffbc8762]:nth-of-type(2){font-size:1.125rem;font-weight:400;color:#092c4d;margin-top:.625rem} |
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue