报表申报智能运输页面完成

This commit is contained in:
zx
2026-04-23 14:35:54 +08:00
parent 6f1db0f92e
commit 5ca85c1f0d
53 changed files with 3659 additions and 292 deletions

View File

@@ -0,0 +1,113 @@
<template>
<navigation :title="title" :back-url="backUrl">
<template #right>
<my-link @tap="toMyTransport" style="font-size: 14px;">我的</my-link>
</template>
</navigation>
<view class="contentBox">
<!-- 仓库信息 - 仓库存储区 -->
<warehousing-info ref="warehousingInfoRef" :warehouseInfo="warehouseInfo"
:pathParams="{ ...pathParams, type: 'transport' }" />
<!-- 物料列表 - 添加物料 -->
<material-list ref="materialRef" :formData="formData" isEdit="4" :backStr="transport"
:pathParams="pathParams" />
<!-- 底部操作栏 -->
<view class="bottom">
<uv-button @tap="scanCode">扫码添加</uv-button>
<uv-button type="primary" @tap="submitForm">打卡</uv-button>
</view>
</view>
</template>
<script setup>
import _ from 'lodash';
import { ref } from 'vue';
import { objectToQuery, } from '../../until';
import { onLoad } from "@dcloudio/uni-app";
import MaterialList from '../../components/MaterialList.vue';
import WarehousingInfo from '../../components/WarehousingInfo.vue';
import Navigation from '../../components/Navigation.vue';
// const OPERATE_CONFIG = {
// // 创建
// transport: {
// back: 'pages/warehousing/index',
// title: '运输打卡'
// },
// // 编辑
// transport_edit: {
// back: '/pages/warehousing/stockIn/components/detail',
// title: ''
// },
// }
// 数据:路径参数
const pathParams = ref('')
// 标志:是否为编辑
const isEdit = ref('')
// ref标题
const title = ref('运输打卡')
const backUrl = ref('pages/warehousing/index')
const formData = ref([{ remark: '', material: [] }])
// 数据:仓库信息
const warehouseInfo = ref({ warehousing: {}, storageArea: {}, remark: '' })
// 数据:获取缓存信息
const getMaterialList = () => {
}
getMaterialList();
// 扫码添加
const scanCode = () => {
};
const toMyTransport = () => {
const query = objectToQuery(pathParams.value)
uni.navigateTo({
url: `/pages/warehousing/Transport/my${query}`
});
}
// 提交表单
const submitForm = () => {
}
// 数据:路径参数
onLoad((options) => {
pathParams.value = options
})
</script>
<style lang="scss" scoped>
.contentBox {
background: #f5f5f5;
min-height: 100vh;
}
/* 底部按钮 */
::v-deep .bottom {
position: fixed;
bottom: 0;
height: 60rpx;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
.uv-button-wrapper {
width: 50%;
border-radius: 0;
}
.uv-button--info {
background-color: #07c160;
color: #fff;
}
}
</style>

View File

@@ -0,0 +1,132 @@
<template>
<!-- -->
<navigation title="我的运输打卡" :back-url="backUrl"></navigation>
<view class="contentBox">
<!-- 搜索框 -->
<view class="topSearch">
<uni-easyinput type="text" v-model="queryParams.keyword" prefixIcon="search" :input-border="false"
@icon-click="getList" placeholder="请输入搜索内容" />
</view>
<!-- 列表 -->
<z-paging ref="pagingRef" class="containerBox" v-model="list" @query="getList">
<uni-list class="listBox">
<uni-list-item v-for="item in list" :key="item.id" clickable @tap="onDetail(item)">
<template v-slot:body>
<view style="display: flex; flex-direction: column; width: 100%;">
<view class="line title">
<p> 申报单号{{ item.billNo }}</p>
<p>{{ getLabel(declareType, item?.status) }}</p>
</view>
<p class="line content">联系人<text>{{ item?.contactName || '-' }}</text></p>
<p class="line content">联系电话<text>{{ item?.contactPhone || '-' }}</text></p>
<p class="line content">地址:<text>{{ item?.address || '-' }}</text></p>
<p class="line content">申报时间 <text>{{ item?.createTime || '-' }}</text></p>
</view>
</template>
</uni-list-item>
</uni-list>
</z-paging>
</view>
</template>
<script setup>
import _ from 'lodash';
import { ref } from 'vue';
import { onShow, onLoad } from "@dcloudio/uni-app";
import Navigation from '../../components/Navigation.vue';
import { getLabel, declareType } from '../../until';
const OPERATE_CONFIG = {
transport: {
back: '/pages/warehousing/Transport/checkIn'
},
my: {
back: 'pages/warehousing/index'
},
}
const pagingRef = ref(null)
const list = ref([])
const backUrl = ref('')
const pathParams = ref('')
const queryParams = ref({ keyword: '' })
const onDetail = () => { }
const getList = (pageNo, pageSize) => {
queryParams.value.pageNum = pageNo
}
// 数据:路径参数
onLoad(options => {
pathParams.value = options;
backUrl.value = OPERATE_CONFIG[options.type]?.back
})
onShow(() => {
pagingRef.value?.reload?.()
})
</script>
<style scoped lang="scss">
/* 搜索框:放在导航栏下面,不覆盖 */
.topSearch {
position: fixed;
top: 65rpx;
left: 0;
right: 0;
z-index: 99;
padding: 8rpx 16rpx;
background-color: #fff;
border-bottom: 1px solid #eee;
box-sizing: border-box;
}
.containerBox {
padding-top: 125rpx !important;
width: 100%;
height: 100%;
box-sizing: border-box;
}
::v-deep .listBox {
width: 100%;
height: 100%;
box-sizing: border-box;
background-color: #F8F8FF;
.zp-l-text-rpx {
font-size: 12px;
}
.uni-list--border-bottom {
padding: 8px 12px 8px 15px;
}
.uni-list {
background-color: #F8F8FF;
}
.uni-list-item {
margin-bottom: 4rpx;
}
.line {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 0;
}
.title {
justify-content: space-between;
font-weight: 600;
font-size: 13px;
}
.content {
font-weight: 500;
font-size: 13px;
color: #696969;
}
}
</style>