报表申报智能运输页面完成
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -9,21 +9,24 @@
|
||||
|
||||
<view class="content mt-16">
|
||||
<p>物料:
|
||||
<span>{{ material?.materialName }}</span>
|
||||
<span v-if="material?.quantity">x {{ material?.quantity }}</span>
|
||||
<text>{{ material?.materialName }}</text>
|
||||
<text v-if="material?.quantity">x {{ material?.quantity }}</text>
|
||||
</p>
|
||||
<p>描述:
|
||||
<span v-if="material?.description">{{ material?.description || '-' }}</span>
|
||||
<span v-else>
|
||||
<span v-if="material?.materialShortName">{{ material?.materialShortName }} / </span>
|
||||
<span v-if="material?.model">{{ material?.model }} / </span>
|
||||
<span v-if="material?.specification">{{ material?.specification }} / </span>
|
||||
<span v-if="material?.typeName">{{ material?.typeName }} </span>
|
||||
</span>
|
||||
<text v-if="material?.description">{{ material?.description || '-' }}</text>
|
||||
<text v-else>
|
||||
<text v-if="material?.materialShortName">{{ material?.materialShortName }} / </text>
|
||||
<text v-if="material?.model">{{ material?.model }} / </text>
|
||||
<text v-if="material?.specification">{{ material?.specification }} / </text>
|
||||
<text v-if="material?.typeName">{{ material?.typeName }} </text>
|
||||
</text>
|
||||
</p>
|
||||
<view class="top">
|
||||
<p>备注:
|
||||
<span>{{ material?.uniqueCodeRemark || '' }}</span>
|
||||
<text>
|
||||
<text v-if="item?.uniqueCodeRemark">{{ item?.uniqueCodeRemark }}</text>
|
||||
<text v-else class="empty">未填写</text>
|
||||
</text>
|
||||
</p>
|
||||
<uv-image :src="qrCode" width="80rpx" height="80rpx" />
|
||||
</view>
|
||||
@@ -43,6 +46,7 @@ const props = defineProps({
|
||||
const qrCode = computed(() => props.detail?.material?.[0]?.qrCode);
|
||||
const material = computed(() => props.detail?.material?.[0]);
|
||||
const barcodeValue = computed(() => props.detail?.material?.[0]?.code || '');
|
||||
console.log(props.detail?.material?.[0]?.code, 'code==>');
|
||||
|
||||
|
||||
// iPad 兼容核心:不用 document,只用 uni 官方 API
|
||||
@@ -98,12 +102,16 @@ watch(
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
span {
|
||||
text {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.empty {
|
||||
color: #D3D3D3;
|
||||
}
|
||||
|
||||
/* 必须给宽度高度,iPad 才会显示 */
|
||||
.barcode-canvas {
|
||||
width: 40%;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<navigation :title="title" :back-url="backUrl">
|
||||
<template #right>
|
||||
<view class="right-btn flex align-center justify-center ">
|
||||
<uv-image @click="toEdit" src="../../../../static/edit.png" class="ml-24" width="20px" height="20px"
|
||||
<uv-image @tap="toEdit" src="../../../../static/edit.png" class="ml-24" width="20px" height="20px"
|
||||
style="margin-top:10rpx" />
|
||||
</view>
|
||||
</template>
|
||||
@@ -24,19 +24,19 @@
|
||||
<!-- 内容行 -->
|
||||
<view class="text">
|
||||
<p>RFID:
|
||||
<span v-if="item.rfidCode">{{ item.remark }}</span>
|
||||
<span v-else style="color: #999;">未绑定RFID</span>
|
||||
<text v-if="item.rfidCode">{{ item.remark }}</text>
|
||||
<text v-else style="color: #999;">未绑定RFID</text>
|
||||
</p>
|
||||
<p>生成时间:
|
||||
<span>{{ item?.createTime }}</span>
|
||||
<text>{{ item?.createTime }}</text>
|
||||
</p>
|
||||
<!-- 备注行-->
|
||||
<view class="flex-center qrCode">
|
||||
<p>备注:
|
||||
<span v-if="item.remark">{{ item.remark }}</span>
|
||||
<span v-else style="color: #999;">未填写</span>
|
||||
<text v-if="item.remark">{{ item.remark }}</text>
|
||||
<text v-else style="color: #999;">未填写</text>
|
||||
</p>
|
||||
<view @click="toViewQrCode">
|
||||
<view @tap="toViewQrCode">
|
||||
<uv-image src="../../../../static/qrcode.png" width="40rpx" height="40rpx"
|
||||
style="margin-top:10rpx" />
|
||||
</view>
|
||||
@@ -54,7 +54,7 @@
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom">
|
||||
<uv-button type="primary" text="唯一码打印"></uv-button>
|
||||
<uv-button type="success" text="溯源" @click="toTraceability"></uv-button>
|
||||
<uv-button type="success" text="溯源" @tap="toTraceability"></uv-button>
|
||||
</view>
|
||||
</view>
|
||||
</uv-skeletons>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<z-paging ref="pagingRef" class="containerBox" v-model="uniqueCodeList" @query="getMaterialList">
|
||||
<uni-list>
|
||||
<uni-list-item v-for="item in uniqueCodeList" :key="item.id" clickable class="material-card"
|
||||
@longpress="() => handleItemLongPress(item, index)" @click="toDetail(item)">
|
||||
@longpress="() => handleItemLongPress(item, index)" @tap="toDetail(item)">
|
||||
<template v-slot:body>
|
||||
<p style="display: flex; flex-direction: column; width: 100%;">
|
||||
<!-- 编码、状态行 -->
|
||||
@@ -23,19 +23,19 @@
|
||||
<!-- 内容行 -->
|
||||
<view class="text ">
|
||||
<p>RFID:
|
||||
<span v-if="item.rfidCode">{{ item.remark }}</span>
|
||||
<span v-else style="color: #999;">未绑定RFID</span>
|
||||
<text v-if="item.rfidCode">{{ item.remark }}</text>
|
||||
<text v-else style="color: #999;">未绑定RFID</text>
|
||||
</p>
|
||||
<p>生成时间:
|
||||
<span>{{ item?.createTime }}</span>
|
||||
<text>{{ item?.createTime }}</text>
|
||||
</p>
|
||||
<!-- 备注行-->
|
||||
<view class="flex-center qrCode">
|
||||
<p>备注:
|
||||
<span v-if="item.remark">{{ item.remark }}</span>
|
||||
<span v-else style="color: #999;">未填写</span>
|
||||
<text v-if="item.remark">{{ item.remark }}</text>
|
||||
<text v-else style="color: #999;">未填写</text>
|
||||
</p>
|
||||
<view @click.stop="getDetailInfo(item)">
|
||||
<view @tap.stop="getDetailInfo(item)">
|
||||
<uv-image src="../../../../static/qrcode.png" width="40rpx" height="40rpx"
|
||||
style="margin-top:10rpx" />
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user