diff --git a/src/views/mes/plan/index.vue b/src/views/mes/plan/index.vue
index 80b569e7..089ebe89 100644
--- a/src/views/mes/plan/index.vue
+++ b/src/views/mes/plan/index.vue
@@ -73,33 +73,19 @@
-
-
-
-
-
-
-
-
- setInspectable(scope.row.id, hasPending)" />
-
-
-
+
-
+
setInspectable(scope.row.id, hasPending)" />
diff --git a/src/views/mes/zjproduct/components/ZjProductPreList.vue b/src/views/mes/zjproduct/components/ZjProductPreList.vue
index a3411664..1f42718a 100644
--- a/src/views/mes/zjproduct/components/ZjProductPreList.vue
+++ b/src/views/mes/zjproduct/components/ZjProductPreList.vue
@@ -48,6 +48,12 @@
+
@@ -60,13 +66,12 @@ import { DictTag } from '@/components/DictTag'
import { DICT_TYPE } from '@/utils/dict'
import ZjTaskResultDialog from '@/views/mes/zjTask/components/ZjTaskResultDialog.vue'
-/** 质量管理-质检参数 列表 */
defineOptions({ name: 'ZjProductPreList' })
type ZjTaskListRow = ZjTaskVO & { ticketCode?: string; executeTime?: string }
const props = defineProps<{
- ticket?: number | string // 工单(父列表的 id 字段)
+ ticket?: number | string
}>()
const emit = defineEmits<{
@@ -75,22 +80,30 @@ const emit = defineEmits<{
const { t } = useI18n()
-const loading = ref(false) // 列表的加载中
-const list = ref([]) // 列表的数据
+const loading = ref(false)
+const list = ref([])
+const total = ref(0)
+const queryParams = reactive({
+ pageNo: 1,
+ pageSize: 10,
+ ticket: undefined as string | undefined
+})
const resultDialogRef = ref()
-/** 查询列表 */
const getList = async () => {
const ticket = props.ticket === undefined || props.ticket === null ? '' : String(props.ticket)
if (!ticket) {
list.value = []
+ total.value = 0
emit('inspectableChange', false)
return
}
loading.value = true
try {
- const data = await ZjTaskApi.getZjTaskList({ ticket })
- list.value = Array.isArray(data) ? data : data?.list ?? data?.data ?? []
+ queryParams.ticket = ticket
+ const data = await ZjTaskApi.getZjTaskPage(queryParams)
+ list.value = data.list ?? []
+ total.value = data.total ?? 0
const hasPending = list.value.some((item) => String(item?.status) === '0')
emit('inspectableChange', hasPending)
} finally {
@@ -118,6 +131,7 @@ const handleRowClick = (row: ZjTaskListRow) => {
watch(
() => props.ticket,
() => {
+ queryParams.pageNo = 1
getList()
},
{ immediate: true }