报表申报智能运输页面完成
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user