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

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

@@ -3,13 +3,13 @@
<navigation :title="title" :back-url="backUrl"></navigation>
<view class="contentBox">
<view class="remarkLine">
<span>备注</span>
<text>备注</text>
<uni-easyinput type="text" v-model="formData.remark" :inputBorder="false" placeholder="请输入备注" />
</view>
<!-- 物料列表 - 添加物料 -->
<material-list ref="materialRef" :formData="formData" :remark="formData.remark" isEdit="1"
:pathParams="pathParams" />
<button class="bottom-btn" type="primary" @click="handleSubmit">提交</button>
<button class="bottom-btn" type="primary" @tap="handleSubmit">提交</button>
</view>
</template>
<script setup>
@@ -73,7 +73,7 @@ const handleSubmit = () => {
remark: formData.value.remark,
material: { ...material.material, unitId: '23' }
}
if (pathParams.value.type == `issueUniqueCode_inbound`) {
if (pathParams.value.type == `stockIn_inbound`) {
params.billNo = pathParams.value.billNo
}
if (pathParams.value.id) {
@@ -139,7 +139,7 @@ const getMaterialList = () => {
margin-bottom: 8rpx;
min-height: 40rpx;
span {
text {
font-size: 14px;
}

View File

@@ -11,16 +11,16 @@
v-if="!isInbound">
<uni-list>
<uni-list-item v-for="item in materialList" :key="item.id" clickable class="material-card"
@click="onMaterial(item)">
@tap="onMaterial(item)">
<template v-slot:body>
<p style="display: flex; flex-direction: column; width: 100%;">
<p class="title">{{ item.materialName }} ({{ item.materialCode }})</p>
<p class="subTitle">
<!-- 简称/型号/规格/类型 -->
<span v-if="item.materialShortName">{{ item.materialShortName }} / </span>
<span v-if="item.model">{{ item.model }} / </span>
<span v-if="item.specification">{{ item.specification }} / </span>
<span v-if="item.typeName">{{ item.typeName }} </span>
<text v-if="item.materialShortName">{{ item.materialShortName }} / </text>
<text v-if="item.model">{{ item.model }} / </text>
<text v-if="item.specification">{{ item.specification }} / </text>
<text v-if="item.typeName">{{ item.typeName }} </text>
</p>
<p class="tag">
<uni-tag :text="getTypeParentNames(item.typeParentNames)" type="error" />
@@ -36,16 +36,16 @@
<view v-if="isInbound">
<uni-list>
<uni-list-item v-for="item in materialList" :key="item.id" clickable class="material-card"
@click="onMaterial(item)">
@tap="onMaterial(item)">
<template v-slot:body>
<p style="display: flex; flex-direction: column; width: 100%;">
<p class="title">{{ item.materialName }} ({{ item.materialCode }})</p>
<p class="subTitle">
<!-- 简称/型号/规格/类型 -->
<span v-if="item.materialShortName">{{ item.materialShortName }} / </span>
<span v-if="item.model">{{ item.model }} / </span>
<span v-if="item.specification">{{ item.specification }} / </span>
<span v-if="item.typeName">{{ item.typeName }} </span>
<text v-if="item.materialShortName">{{ item.materialShortName }} / </text>
<text v-if="item.model">{{ item.model }} / </text>
<text v-if="item.specification">{{ item.specification }} / </text>
<text v-if="item.typeName">{{ item.typeName }} </text>
</p>
<p class="tag">
<uni-tag :text="getTypeParentNames(item.typeParentNames)" type="error" />
@@ -87,6 +87,16 @@ const OPERATE_CONFIG = {
stockIn_detail: {
back: '/pages/warehousing/stockIn/create'
},
// 申报单开单
declaration: {
back: '/pages/warehousing/Declaration/create',
title: '申报单开单'
},
// 申报单开单
my: {
back: '/pages/warehousing/stockIn/create',
title: '申报单开单'
},
}
// ref:下拉加载
const pagingRef = ref(null)
@@ -117,14 +127,6 @@ const getMaterialListInbound = () => {
const list = uni.getStorageSync('app_material_select_list')
materialList.value = list
}
onShow(() => {
pagingRef.value?.reload?.()
})
onLoad((options) => {
pathParams.value = options
getMaterialListInbound()
})
// 方法:获取缓存物料信息
const getStorageMaterial = (val) => {
// 唯一码编辑进入 数量默认1\唯一码物料表id\物料id
@@ -147,7 +149,7 @@ const onMaterial = (val) => {
const idx = _.findIndex(materialChecked, (i) => i.materialId ? i.materialId === val.id : i.id === val.id)
if (idx != -1 && item?.isDelete == '0') { // isDelete为0表示未删除 1为已删除数据不在对比范围内
if (keyType.value === 'stockIn') {
if (keyType.value === 'stockIn' || _.includes(keyType.value, 'declaration')) {
uni.showToast({
title: '该物料已添加,请勿重复添加!',
mask: true,
@@ -157,7 +159,7 @@ const onMaterial = (val) => {
} else {
if (val) {
if (keyType.value == 'stockIn') {
if (keyType.value == 'stockIn' || _.includes(keyType.value, 'declaration')) {
materialChecked = [...materialChecked, { ...val, quantity: 1, isDelete: '0' }];
} else {
materialChecked = getStorageMaterial(val)
@@ -170,7 +172,13 @@ const onMaterial = (val) => {
url: OPERATE_CONFIG?.[keyType.value].back + path
})
}
onShow(() => {
pagingRef.value?.reload?.()
})
onLoad((options) => {
pathParams.value = options
getMaterialListInbound()
})
</script>
<style scoped lang="scss">
.topSearch {