feat(mes): 增强批次追溯功能,添加删除标记过滤

更新 SQL 查询以过滤已删除的记录,确保批次追溯时只返回有效数据。同时,增加了集成测试用例以验证新逻辑的正确性。
pull/871/MERGE
YunaiV 2026-04-05 10:40:49 +08:00
parent 53fa5ea202
commit 1313347c85
2 changed files with 13 additions and 11 deletions

View File

@ -25,14 +25,6 @@ const props = defineProps<{
const loading = ref(true) // const loading = ref(true) //
const batchList = ref<BatchVO[]>([]) // const batchList = ref<BatchVO[]>([]) //
watch(
() => props.batchCode,
(val) => {
if (val) {
getList()
}
}
)
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {
if (!props.batchCode) { if (!props.batchCode) {
@ -49,6 +41,16 @@ const getList = async () => {
} }
} }
/** 监听批次编号变化 */
watch(
() => props.batchCode,
(val) => {
if (val) {
getList()
}
}
)
/** 初始化 */ /** 初始化 */
onMounted(() => { onMounted(() => {
getList() getList()

View File

@ -101,9 +101,8 @@ import BatchTraceDetail from './BatchTraceDetail.vue'
defineOptions({ name: 'BatchTrace' }) defineOptions({ name: 'BatchTrace' })
const loading = ref(true) // const loading = ref(true) //
const total = ref(0) //
const list = ref<BatchVO[]>([]) // const list = ref<BatchVO[]>([]) //
const queryFormRef = ref() // const total = ref(0) //
const queryParams = reactive({ const queryParams = reactive({
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -114,6 +113,8 @@ const queryParams = reactive({
salesOrderCode: undefined, salesOrderCode: undefined,
purchaseOrderCode: undefined purchaseOrderCode: undefined
}) })
const queryFormRef = ref() //
const detailRef = ref() //
/** 查询列表 */ /** 查询列表 */
const getList = async () => { const getList = async () => {
@ -140,7 +141,6 @@ const resetQuery = () => {
} }
/** 批次追溯按钮操作 */ /** 批次追溯按钮操作 */
const detailRef = ref()
const openDetail = (row: BatchVO) => { const openDetail = (row: BatchVO) => {
detailRef.value.open(row) detailRef.value.open(row)
} }