✨ feat(mes): 增强批次追溯功能,添加删除标记过滤
更新 SQL 查询以过滤已删除的记录,确保批次追溯时只返回有效数据。同时,增加了集成测试用例以验证新逻辑的正确性。pull/871/MERGE
parent
53fa5ea202
commit
1313347c85
|
|
@ -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()
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue