🗑️ chore(mes): 清理已移除的冗余 Tab 组件(ClientProductSalesTab、VendorItemReceiptTab、BatchTraceDetailTab)

pull/871/MERGE
YunaiV 2026-03-29 16:27:11 +08:00
parent 736f7d2455
commit 98a227a609
5 changed files with 0 additions and 388 deletions

View File

@ -1,78 +0,0 @@
<template>
<div class="overflow-hidden">
<!-- 客户详情-产品清单 tab复用 getProductSalesLinePage 分页接口 -->
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="物料编码" align="center" prop="itemCode" width="140">
<template #default="scope">
<el-button link type="primary" @click="handleViewItem(scope.row.itemId)">
{{ scope.row.itemCode }}
</el-button>
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitMeasureName" />
<el-table-column label="出库数量" align="center" prop="quantity" />
<el-table-column label="批次号" align="center" prop="batchCode" />
</el-table>
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 物料详情弹窗 -->
<MdItemForm ref="itemFormRef" />
</div>
</template>
<script setup lang="ts">
import { WmProductSalesLineApi } from '@/api/mes/wm/productsales/line'
import MdItemForm from '@/views/mes/md/item/MdItemForm.vue'
defineOptions({ name: 'ClientProductSalesLineTab' })
const props = defineProps<{
clientId: number
}>()
const loading = ref(false)
const list = ref<any[]>([])
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
clientId: undefined as number | undefined
})
/** 查询列表 */
const getList = async () => {
if (!queryParams.clientId) return
loading.value = true
try {
const data = await WmProductSalesLineApi.getProductSalesLinePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 查看物料详情 */
const itemFormRef = ref()
const handleViewItem = (itemId: number) => {
itemFormRef.value.open('detail', itemId)
}
/** 监听 clientId 变化,自动加载 */
watch(
() => props.clientId,
(val) => {
queryParams.clientId = val
queryParams.pageNo = 1
getList()
},
{ immediate: true }
)
</script>

View File

@ -1,88 +0,0 @@
<template>
<div class="overflow-hidden">
<!-- 客户详情-销售记录 tab复用 getProductSalesPage 分页接口 -->
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="出库单编号" align="center" prop="code" min-width="160">
<template #default="scope">
<el-button link type="primary" @click="handleDetail(scope.row.id)">
{{ scope.row.code }}
</el-button>
</template>
</el-table-column>
<el-table-column label="出库单名称" align="center" prop="name" min-width="150" />
<el-table-column
label="出库日期"
align="center"
prop="salesDate"
:formatter="dateFormatter2"
width="180px"
/>
<el-table-column label="单据状态" align="center" prop="status" min-width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.MES_WM_PRODUCT_SALES_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 销售出库单详情弹窗 -->
<ProductSalesForm ref="formRef" />
</div>
</template>
<script setup lang="ts">
import { dateFormatter2 } from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict'
import { WmProductSalesApi } from '@/api/mes/wm/productsales'
import ProductSalesForm from '@/views/mes/wm/productsales/ProductSalesForm.vue'
defineOptions({ name: 'ClientProductSalesTab' })
const props = defineProps<{
clientId: number
}>()
const loading = ref(false)
const list = ref<any[]>([])
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
clientId: undefined as number | undefined
})
/** 查询列表 */
const getList = async () => {
if (!queryParams.clientId) return
loading.value = true
try {
const data = await WmProductSalesApi.getProductSalesPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 查看详情 */
const formRef = ref()
const handleDetail = (id: number) => {
formRef.value.open('detail', id)
}
/** 监听 clientId 变化,自动加载 */
watch(
() => props.clientId,
(val) => {
queryParams.clientId = val
queryParams.pageNo = 1
getList()
},
{ immediate: true }
)
</script>

View File

@ -1,78 +0,0 @@
<template>
<div class="overflow-hidden">
<!-- 供应商详情-物料清单 tab复用 getItemReceiptLinePage 分页接口 -->
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="物料编码" align="center" prop="itemCode" width="140">
<template #default="scope">
<el-button link type="primary" @click="handleViewItem(scope.row.itemId)">
{{ scope.row.itemCode }}
</el-button>
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitMeasureName" />
<el-table-column label="入库数量" align="center" prop="receivedQuantity" />
<el-table-column label="批次号" align="center" prop="batchCode" />
</el-table>
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 物料详情弹窗 -->
<MdItemForm ref="itemFormRef" />
</div>
</template>
<script setup lang="ts">
import { WmItemReceiptLineApi } from '@/api/mes/wm/itemreceipt/line'
import MdItemForm from '@/views/mes/md/item/MdItemForm.vue'
defineOptions({ name: 'VendorItemReceiptLineTab' })
const props = defineProps<{
vendorId: number
}>()
const loading = ref(false)
const list = ref<any[]>([])
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
vendorId: undefined as number | undefined
})
/** 查询列表 */
const getList = async () => {
if (!queryParams.vendorId) return
loading.value = true
try {
const data = await WmItemReceiptLineApi.getItemReceiptLinePage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 查看物料详情 */
const itemFormRef = ref()
const handleViewItem = (itemId: number) => {
itemFormRef.value.open('detail', itemId)
}
/** 监听 vendorId 变化,自动加载 */
watch(
() => props.vendorId,
(val) => {
queryParams.vendorId = val
queryParams.pageNo = 1
getList()
},
{ immediate: true }
)
</script>

View File

@ -1,88 +0,0 @@
<template>
<div class="overflow-hidden">
<!-- 供应商详情-采购记录 tab复用 getItemReceiptPage 分页接口 -->
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="入库单编号" align="center" prop="code" min-width="160">
<template #default="scope">
<el-button link type="primary" @click="handleDetail(scope.row.id)">
{{ scope.row.code }}
</el-button>
</template>
</el-table-column>
<el-table-column label="入库单名称" align="center" prop="name" min-width="150" />
<el-table-column
label="入库日期"
align="center"
prop="receiptDate"
:formatter="dateFormatter2"
width="180px"
/>
<el-table-column label="单据状态" align="center" prop="status" min-width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.MES_WM_ITEM_RECEIPT_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
</el-table>
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 采购入库单详情弹窗 -->
<ItemReceiptForm ref="formRef" />
</div>
</template>
<script setup lang="ts">
import { dateFormatter2 } from '@/utils/formatTime'
import { DICT_TYPE } from '@/utils/dict'
import { WmItemReceiptApi } from '@/api/mes/wm/itemreceipt'
import ItemReceiptForm from '@/views/mes/wm/itemreceipt/ItemReceiptForm.vue'
defineOptions({ name: 'VendorItemReceiptTab' })
const props = defineProps<{
vendorId: number
}>()
const loading = ref(false)
const list = ref<any[]>([])
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
vendorId: undefined as number | undefined
})
/** 查询列表 */
const getList = async () => {
if (!queryParams.vendorId) return
loading.value = true
try {
const data = await WmItemReceiptApi.getItemReceiptPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 查看详情 */
const formRef = ref()
const handleDetail = (id: number) => {
formRef.value.open('detail', id)
}
/** 监听 vendorId 变化,自动加载 */
watch(
() => props.vendorId,
(val) => {
queryParams.vendorId = val
queryParams.pageNo = 1
getList()
},
{ immediate: true }
)
</script>

View File

@ -1,56 +0,0 @@
<template>
<div class="app-container">
<el-table v-loading="loading" :data="batchList">
<el-table-column label="生产工单号" width="150px" align="center" prop="workOrderCode" />
<el-table-column label="批次编号" align="center" prop="code" />
<el-table-column label="产品物料编码" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="itemSpecification" />
<el-table-column label="单位" align="center" prop="unitName" />
</el-table>
</div>
</template>
<script lang="ts" setup>
import { BatchApi, BatchVO } from '@/api/mes/wm/batch'
defineOptions({ name: 'BatchTraceDetailTab' })
const props = defineProps<{
batchId?: number
batchCode?: string
direction: 'forward' | 'backward' // forward=backward=
}>()
const loading = ref(true) //
const batchList = ref<BatchVO[]>([]) //
watch(
() => props.batchCode,
(val) => {
if (val) {
getList()
}
}
)
/** 查询列表 */
const getList = async () => {
if (!props.batchCode) {
return
}
loading.value = true
try {
batchList.value =
props.direction === 'forward'
? await BatchApi.getForwardList(props.batchCode)
: await BatchApi.getBackwardList(props.batchCode)
} finally {
loading.value = false
}
}
/** 初始化 */
onMounted(() => {
getList()
})
</script>