ZaiZai 1 rok pred
rodič
commit
0c1b385de0

+ 12 - 0
src/api/modules/tentative/material/testSample.js

@@ -0,0 +1,12 @@
+import { HcApi } from '../../../request/index'
+
+export default {
+    //分页查询
+    async queryPage(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/entrustinfo/sample_page',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+}

+ 68 - 0
src/api/modules/tentative/material/testSample/flow.js

@@ -0,0 +1,68 @@
+import { HcApi } from '../../../../request/index'
+
+export default {
+    //进场材料分页条件查询
+    async queryPage(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/page',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+    //进场材料新增或修改
+    async submitForm(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/submit',
+            method: 'post',
+            data: form,
+        }, msg)
+    },
+    //进场材料批量删除
+    async removeData(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/remove',
+            method: 'post',
+            params: form,
+        }, msg)
+    },
+    //校验材料编号是否唯一
+    async verification(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/verification',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+    //进场材料批量复制
+    async copyData(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/copy',
+            method: 'post',
+            data: form,
+        }, msg)
+    },
+    //批量打印进场材料Pdf
+    async exportPdf(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/export-pdf',
+            method: 'post',
+            params: form,
+        }, msg)
+    },
+    //材料取样记录
+    async samplingRecord(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/sampling-record',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+    //材料进场附件附件修改接口:
+    async updateMobilizationFile(form, msg = true) {
+        return HcApi({
+            url: '/api/blade-business/material/mobilization/upload-file',
+            method: 'post',
+            params: form,
+        }, msg)
+    },
+}

+ 42 - 22
src/views/tentative/material/modules/testSample/dispose.vue

@@ -28,7 +28,8 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getErtractInfo } from '~api/other'
-import { getArrValue, getObjValue } from 'js-fast-way'
+import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import mainApi from '~api/tentative/material/testSample'
 
 //参数
 const props = defineProps({
@@ -64,13 +65,17 @@ const getContractData = async () => {
 }
 
 //监听数据
-const treeInfo = ref({})
+const treeInfo = ref(props.tree)
 watch(() => props.tree, (obj) => {
     treeInfo.value = getObjValue(obj)
+    searchClick()
 })
 
 //搜索表单
-const searchForm = ref({ current: 1, size: 20, total: 0 })
+const searchForm = ref({
+    status: 6, startTime: null, endTime: null, materialName: null,
+    current: 1, size: 20, total: 0,
+})
 
 //日期时间被选择
 const betweenTime = ref(null)
@@ -80,8 +85,8 @@ const betweenTimeUpdate = ({ arr }) => {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
     } else {
-        searchForm.value.startTime = ''
-        searchForm.value.endTime = ''
+        searchForm.value.startTime = null
+        searchForm.value.endTime = null
     }
 }
 
@@ -100,31 +105,46 @@ const pageChange = ({ current, size }) => {
 
 //表格数据
 const tableColumn = ref([
-    { key: 'key1', name: '取样名称' },
-    { key: 'key2', name: '规格型号', align: 'center' },
-    { key: 'key3', name: '试样数量', align: 'center' },
-    { key: 'key4', name: '试验数量', align: 'center' },
+    { key: 'materialName', name: '样品名称' },
+    { key: 'specificationModel', name: '规格型号', align: 'center' },
+    { key: 'materialCount', name: '试样数量', align: 'center' },
+    { key: 'expCount', name: '试验数量', align: 'center' },
     { key: 'key5', name: '废除数量', align: 'center' },
-    { key: 'key6', name: '计算单位', align: 'center' },
-    { key: 'key7', name: '拟用部位' },
-    { key: 'key8', name: '代表数量', align: 'center' },
-    { key: 'key9', name: '委托上报时间', align: 'center' },
-    { key: 'key9', name: '入库时间', align: 'center' },
-    { key: 'key9', name: '创建试验时间', align: 'center' },
+    { key: 'calculationUnit', name: '计算单位', align: 'center' },
+    { key: 'proposedPosition', name: '拟用部位' },
+    { key: 'representativeCount', name: '代表数量', align: 'center' },
+    { key: 'entrustTime', name: '委托上报时间', align: 'center' },
+    { key: 'carryTime', name: '入库时间', align: 'center' },
+    { key: 'createTime', name: '创建试验时间', align: 'center' },
     { key: 'key9', name: '是否留样', align: 'center' },
-    { key: 'key9', name: '留样时间', align: 'center' },
-    { key: 'key9', name: '废除时间', align: 'center' },
-    { key: 'key9', name: '废除原因', align: 'center' },
+    { key: 'resamTime', name: '留样时间', align: 'center' },
+    { key: 'repealTime', name: '废除时间', align: 'center' },
+    { key: 'repealReason', name: '废除原因', align: 'center' },
     { key: 'action', name: '操作', width: 100, align: 'center', fixed: 'right' },
 ])
-const tableData = ref([
-    {},
-])
+const tableData = ref([])
 
 //获取表格数据
 const tableLoading = ref(false)
 const getTableData = async () => {
-
+    const { primaryKeyId } = treeInfo.value
+    if (isNullES(primaryKeyId)) return
+    tableLoading.value = true
+    const { error, code, data } = await mainApi.queryPage({
+        ...searchForm.value,
+        projectId: projectId.value,
+        contractId: contractId.value,
+        nodeId: primaryKeyId || '',
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data.total || 0
+    } else {
+        tableData.value = []
+        searchForm.value.total = 0
+    }
 }
 
 //查看报告

+ 39 - 18
src/views/tentative/material/modules/testSample/flow.vue

@@ -10,7 +10,7 @@
                 <hc-date-picker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
             </div>
             <div class="ml-2 w-250px">
-                <hc-search-input v-model="searchForm.queryValue" @search="searchClick" />
+                <hc-search-input v-model="searchForm.materialName" @search="searchClick" />
             </div>
         </template>
         <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }">
@@ -30,7 +30,8 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getErtractInfo } from '~api/other'
-import { getArrValue, getObjValue } from 'js-fast-way'
+import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import mainApi from '~api/tentative/material/testSample'
 
 //参数
 const props = defineProps({
@@ -51,13 +52,17 @@ onMounted(() => {
 })
 
 //监听数据
-const treeInfo = ref({})
+const treeInfo = ref(props.tree)
 watch(() => props.tree, (obj) => {
     treeInfo.value = getObjValue(obj)
+    searchClick()
 })
 
 //搜索表单
-const searchForm = ref({ current: 1, size: 20, total: 0 })
+const searchForm = ref({
+    status: 1, startTime: null, endTime: null, materialName: null,
+    current: 1, size: 20, total: 0,
+})
 
 //获取合同段信息
 const contractData = ref([])
@@ -70,10 +75,10 @@ const getContractData = async () => {
     contractData.value = res
     if (res.length > 0) {
         searchForm.value.contractId = res[0].id
+        searchClick()
     }
 }
 
-
 //日期时间被选择
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({ arr }) => {
@@ -82,8 +87,8 @@ const betweenTimeUpdate = ({ arr }) => {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
     } else {
-        searchForm.value.startTime = ''
-        searchForm.value.endTime = ''
+        searchForm.value.startTime = null
+        searchForm.value.endTime = null
     }
 }
 
@@ -102,21 +107,37 @@ const pageChange = ({ current, size }) => {
 
 //表格数据
 const tableColumn = ref([
-    { key: 'key1', name: '取样名称' },
-    { key: 'key2', name: '规格型号', align: 'center' },
-    { key: 'key3', name: '试样数量', align: 'center' },
-    { key: 'key4', name: '计算单位', align: 'center' },
-    { key: 'key5', name: '拟用部位' },
-    { key: 'key6', name: '代表数量', align: 'center' },
-    { key: 'key7', name: '取样人', align: 'center' },
-    { key: 'key8', name: '委托单上报时间', align: 'center' },
-    { key: 'key9', name: '委托单状态', align: 'center' },
+    { key: 'materialName', name: '样品名称' },
+    { key: 'specificationModel', name: '规格型号', align: 'center' },
+    { key: 'materialCount', name: '试样数量', align: 'center' },
+    { key: 'calculationUnit', name: '计算单位', align: 'center' },
+    { key: 'proposedPosition', name: '拟用部位' },
+    { key: 'representativeCount', name: '代表数量', align: 'center' },
+    { key: 'userName', name: '取样人', align: 'center' },
+    { key: 'entrustTime', name: '委托单上报时间', align: 'center' },
 ])
-const tableData = ref([{ key9:1 }, { key9:2 }, { key9:3 }])
+const tableData = ref([])
 
 //获取表格数据
 const tableLoading = ref(false)
 const getTableData = async () => {
-
+    const { primaryKeyId } = treeInfo.value
+    if (isNullES(primaryKeyId)) return
+    tableLoading.value = true
+    const { error, code, data } = await mainApi.queryPage({
+        ...searchForm.value,
+        projectId: projectId.value,
+        contractId: contractId.value,
+        nodeId: primaryKeyId || '',
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data.total || 0
+    } else {
+        tableData.value = []
+        searchForm.value.total = 0
+    }
 }
 </script>

+ 39 - 20
src/views/tentative/material/modules/testSample/inventory.vue

@@ -10,7 +10,7 @@
                 <hc-date-picker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
             </div>
             <div class="ml-2 w-250px">
-                <hc-search-input v-model="searchForm.queryValue" @search="searchClick" />
+                <hc-search-input v-model="searchForm.materialName" @search="searchClick" />
             </div>
         </template>
         <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }">
@@ -86,7 +86,8 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getErtractInfo } from '~api/other'
-import { getArrValue, getObjValue } from 'js-fast-way'
+import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import mainApi from '~api/tentative/material/testSample'
 
 //参数
 const props = defineProps({
@@ -107,14 +108,17 @@ onMounted(() => {
 })
 
 //监听数据
-const treeInfo = ref({})
+const treeInfo = ref(props.tree)
 watch(() => props.tree, (obj) => {
     treeInfo.value = getObjValue(obj)
+    searchClick()
 })
 
 //搜索表单
-const searchForm = ref({ current: 1, size: 20, total: 0 })
-
+const searchForm = ref({
+    status: 2, startTime: null, endTime: null, materialName: null,
+    current: 1, size: 20, total: 0,
+})
 
 //获取合同段信息
 const contractData = ref([])
@@ -127,10 +131,10 @@ const getContractData = async () => {
     contractData.value = res
     if (res.length > 0) {
         searchForm.value.contractId = res[0].id
+        searchClick()
     }
 }
 
-
 //日期时间被选择
 const betweenTime = ref(null)
 const betweenTimeUpdate = ({ arr }) => {
@@ -139,8 +143,8 @@ const betweenTimeUpdate = ({ arr }) => {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
     } else {
-        searchForm.value.startTime = ''
-        searchForm.value.endTime = ''
+        searchForm.value.startTime = null
+        searchForm.value.endTime = null
     }
 }
 
@@ -159,24 +163,39 @@ const pageChange = ({ current, size }) => {
 
 //表格数据
 const tableColumn = ref([
-    { key: 'key1', name: '取样名称' },
-    { key: 'key2', name: '规格型号', align: 'center' },
-    { key: 'key3', name: '试样数量', align: 'center' },
-    { key: 'key4', name: '计算单位', align: 'center' },
-    { key: 'key5', name: '拟用部位' },
-    { key: 'key6', name: '代表数量', align: 'center' },
-    { key: 'key7', name: '取样人', align: 'center' },
-    { key: 'key8', name: '入库时间', align: 'center' },
+    { key: 'materialName', name: '样品名称' },
+    { key: 'specificationModel', name: '规格型号', align: 'center' },
+    { key: 'materialCount', name: '试样数量', align: 'center' },
+    { key: 'calculationUnit', name: '计算单位', align: 'center' },
+    { key: 'proposedPosition', name: '拟用部位' },
+    { key: 'representativeCount', name: '代表数量', align: 'center' },
+    { key: 'userName', name: '取样人', align: 'center' },
+    { key: 'carryTime', name: '入库时间', align: 'center' },
     { key: 'action', name: '操作', width: 150, align: 'center' },
 ])
-const tableData = ref([
-    {},
-])
+const tableData = ref([])
 
 //获取表格数据
 const tableLoading = ref(false)
 const getTableData = async () => {
-
+    const { primaryKeyId } = treeInfo.value
+    if (isNullES(primaryKeyId)) return
+    tableLoading.value = true
+    const { error, code, data } = await mainApi.queryPage({
+        ...searchForm.value,
+        projectId: projectId.value,
+        contractId: contractId.value,
+        nodeId: primaryKeyId || '',
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data.total || 0
+    } else {
+        tableData.value = []
+        searchForm.value.total = 0
+    }
 }
 
 //表单数据

+ 39 - 18
src/views/tentative/material/modules/testSample/leave.vue

@@ -10,7 +10,7 @@
                 <hc-date-picker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
             </div>
             <div class="ml-2 w-250px">
-                <hc-search-input v-model="searchForm.queryValue" @search="searchClick" />
+                <hc-search-input v-model="searchForm.materialName" @search="searchClick" />
             </div>
         </template>
         <template #extra>
@@ -51,7 +51,8 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getErtractInfo } from '~api/other'
-import { getArrValue, getObjValue } from 'js-fast-way'
+import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import mainApi from '~api/tentative/material/testSample'
 
 //参数
 const props = defineProps({
@@ -72,13 +73,17 @@ onMounted(() => {
 })
 
 //监听数据
-const treeInfo = ref({})
+const treeInfo = ref(props.tree)
 watch(() => props.tree, (obj) => {
     treeInfo.value = getObjValue(obj)
+    searchClick()
 })
 
 //搜索表单
-const searchForm = ref({ current: 1, size: 20, total: 0 })
+const searchForm = ref({
+    status: 5, startTime: null, endTime: null, materialName: null,
+    current: 1, size: 20, total: 0,
+})
 
 //获取合同段信息
 const contractData = ref([])
@@ -91,6 +96,7 @@ const getContractData = async () => {
     contractData.value = res
     if (res.length > 0) {
         searchForm.value.contractId = res[0].id
+        searchClick()
     }
 }
 
@@ -102,8 +108,8 @@ const betweenTimeUpdate = ({ arr }) => {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
     } else {
-        searchForm.value.startTime = ''
-        searchForm.value.endTime = ''
+        searchForm.value.startTime = null
+        searchForm.value.endTime = null
     }
 }
 
@@ -122,25 +128,40 @@ const pageChange = ({ current, size }) => {
 
 //表格数据
 const tableColumn = ref([
-    { key: 'key1', name: '取样名称' },
-    { key: 'key2', name: '规格型号', align: 'center' },
-    { key: 'key3', name: '试样数量', align: 'center' },
-    { key: 'key4', name: '试验数量', align: 'center' },
+    { key: 'materialName', name: '样品名称' },
+    { key: 'specificationModel', name: '规格型号', align: 'center' },
+    { key: 'materialCount', name: '试样数量', align: 'center' },
+    { key: 'expCount', name: '试验数量', align: 'center' },
     { key: 'key5', name: '留样数量', align: 'center' },
-    { key: 'key6', name: '计算单位', align: 'center' },
-    { key: 'key7', name: '拟用部位' },
-    { key: 'key8', name: '代表数量', align: 'center' },
-    { key: 'key9', name: '留样时间', align: 'center' },
+    { key: 'calculationUnit', name: '计算单位', align: 'center' },
+    { key: 'proposedPosition', name: '拟用部位' },
+    { key: 'representativeCount', name: '代表数量', align: 'center' },
+    { key: 'resamTime', name: '留样时间', align: 'center' },
     { key: 'action', name: '操作', width: 150, align: 'center' },
 ])
-const tableData = ref([
-    {},
-])
+const tableData = ref([])
 
 //获取表格数据
 const tableLoading = ref(false)
 const getTableData = async () => {
-
+    const { primaryKeyId } = treeInfo.value
+    if (isNullES(primaryKeyId)) return
+    tableLoading.value = true
+    const { error, code, data } = await mainApi.queryPage({
+        ...searchForm.value,
+        projectId: projectId.value,
+        contractId: contractId.value,
+        nodeId: primaryKeyId || '',
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data.total || 0
+    } else {
+        tableData.value = []
+        searchForm.value.total = 0
+    }
 }
 
 //多选

+ 41 - 18
src/views/tentative/material/modules/testSample/testUnder.vue

@@ -10,7 +10,7 @@
                 <hc-date-picker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
             </div>
             <div class="ml-2 w-250px">
-                <hc-search-input v-model="searchForm.queryValue" @search="searchClick" />
+                <hc-search-input v-model="searchForm.materialName" @search="searchClick" />
             </div>
         </template>
         <template #extra>
@@ -63,7 +63,8 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getErtractInfo } from '~api/other'
-import { getArrValue, getObjValue } from 'js-fast-way'
+import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import mainApi from '~api/tentative/material/testSample'
 
 //参数
 const props = defineProps({
@@ -84,14 +85,17 @@ onMounted(() => {
 })
 
 //监听数据
-const treeInfo = ref({})
+const treeInfo = ref(props.tree)
 watch(() => props.tree, (obj) => {
     treeInfo.value = getObjValue(obj)
+    searchClick()
 })
 
 //搜索表单
-const searchForm = ref({ current: 1, size: 20, total: 0 })
-
+const searchForm = ref({
+    status: 4, startTime: null, endTime: null, materialName: null,
+    current: 1, size: 20, total: 0,
+})
 
 //获取合同段信息
 const contractData = ref([])
@@ -104,6 +108,7 @@ const getContractData = async () => {
     contractData.value = res
     if (res.length > 0) {
         searchForm.value.contractId = res[0].id
+        searchClick()
     }
 }
 
@@ -115,8 +120,8 @@ const betweenTimeUpdate = ({ arr }) => {
         searchForm.value.startTime = arr[0]
         searchForm.value.endTime = arr[1]
     } else {
-        searchForm.value.startTime = ''
-        searchForm.value.endTime = ''
+        searchForm.value.startTime = null
+        searchForm.value.endTime = null
     }
 }
 
@@ -135,25 +140,43 @@ const pageChange = ({ current, size }) => {
 
 //表格数据
 const tableColumn = ref([
-    { key: 'key1', name: '取样名称' },
-    { key: 'key2', name: '规格型号', align: 'center' },
-    { key: 'key3', name: '试样数量', align: 'center' },
-    { key: 'key4', name: '试验数量', align: 'center' },
+    { key: 'materialName', name: '样品名称' },
+    { key: 'specificationModel', name: '规格型号', align: 'center' },
+    { key: 'materialCount', name: '试样数量', align: 'center' },
+    { key: 'expCount', name: '试验数量', align: 'center' },
     { key: 'key5', name: '剩余数量', align: 'center' },
-    { key: 'key6', name: '计算单位', align: 'center' },
-    { key: 'key7', name: '拟用部位' },
-    { key: 'key8', name: '代表数量', align: 'center' },
-    { key: 'key9', name: '取样人', align: 'center' },
-    { key: 'key10', name: '创建试验时间', align: 'center' },
+    { key: 'calculationUnit', name: '计算单位', align: 'center' },
+    { key: 'proposedPosition', name: '拟用部位' },
+    { key: 'representativeCount', name: '代表数量', align: 'center' },
+    { key: 'userName', name: '取样人', align: 'center' },
+    { key: 'userName', name: '取样人', align: 'center' },
+    { key: 'createTime', name: '创建试验时间', align: 'center' },
     { key: 'key11', name: '报告状态', align: 'center' },
     { key: 'action', name: '操作', width: 120, align: 'center' },
 ])
-const tableData = ref([{ key11:1 }, { key11:2 }, { key11:3 }])
+const tableData = ref([])
 
 //获取表格数据
 const tableLoading = ref(false)
 const getTableData = async () => {
-
+    const { primaryKeyId } = treeInfo.value
+    if (isNullES(primaryKeyId)) return
+    tableLoading.value = true
+    const { error, code, data } = await mainApi.queryPage({
+        ...searchForm.value,
+        projectId: projectId.value,
+        contractId: contractId.value,
+        nodeId: primaryKeyId || '',
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data.total || 0
+    } else {
+        tableData.value = []
+        searchForm.value.total = 0
+    }
 }
 
 //多选

+ 33 - 15
src/views/tentative/material/modules/testSample/tested.vue

@@ -7,7 +7,7 @@
                 </el-select>
             </div>
             <div class="ml-2 w-250px">
-                <hc-search-input v-model="searchForm.queryValue" @search="searchClick" />
+                <hc-search-input v-model="searchForm.materialName" @search="searchClick" />
             </div>
         </template>
         <template #extra>
@@ -32,7 +32,8 @@
 import { onMounted, ref, watch } from 'vue'
 import { useAppStore } from '~src/store'
 import { getErtractInfo } from '~api/other'
-import { getArrValue, getObjValue } from 'js-fast-way'
+import { getArrValue, getObjValue, isNullES } from 'js-fast-way'
+import mainApi from '~api/tentative/material/testSample'
 
 //参数
 const props = defineProps({
@@ -53,13 +54,14 @@ onMounted(() => {
 })
 
 //监听数据
-const treeInfo = ref({})
+const treeInfo = ref(props.tree)
 watch(() => props.tree, (obj) => {
     treeInfo.value = getObjValue(obj)
+    searchClick()
 })
 
 //搜索表单
-const searchForm = ref({ current: 1, size: 20, total: 0 })
+const searchForm = ref({ status: 3, materialName: null, current: 1, size: 20, total: 0 })
 
 //获取合同段信息
 const contractData = ref([])
@@ -72,6 +74,7 @@ const getContractData = async () => {
     contractData.value = res
     if (res.length > 0) {
         searchForm.value.contractId = res[0].id
+        searchClick()
     }
 }
 
@@ -90,24 +93,39 @@ const pageChange = ({ current, size }) => {
 
 //表格数据
 const tableColumn = ref([
-    { key: 'key1', name: '取样名称' },
-    { key: 'key2', name: '规格型号', align: 'center' },
-    { key: 'key3', name: '试样数量', align: 'center' },
-    { key: 'key4', name: '计算单位', align: 'center' },
-    { key: 'key5', name: '拟用部位' },
-    { key: 'key6', name: '代表数量', align: 'center' },
-    { key: 'key7', name: '取样人', align: 'center' },
+    { key: 'materialName', name: '样品名称' },
+    { key: 'specificationModel', name: '规格型号', align: 'center' },
+    { key: 'materialCount', name: '试样数量', align: 'center' },
+    { key: 'calculationUnit', name: '计算单位', align: 'center' },
+    { key: 'proposedPosition', name: '拟用部位' },
+    { key: 'representativeCount', name: '代表数量', align: 'center' },
+    { key: 'userName', name: '取样人', align: 'center' },
     { key: 'key8', name: '待测时间', align: 'center' },
     { key: 'action', name: '操作', width: 150, align: 'center' },
 ])
-const tableData = ref([
-    {},
-])
+const tableData = ref([])
 
 //获取表格数据
 const tableLoading = ref(false)
 const getTableData = async () => {
-
+    const { primaryKeyId } = treeInfo.value
+    if (isNullES(primaryKeyId)) return
+    tableLoading.value = true
+    const { error, code, data } = await mainApi.queryPage({
+        ...searchForm.value,
+        projectId: projectId.value,
+        contractId: contractId.value,
+        nodeId: primaryKeyId || '',
+    })
+    //处理数据
+    tableLoading.value = false
+    if (!error && code === 200) {
+        tableData.value = getArrValue(data?.records)
+        searchForm.value.total = data.total || 0
+    } else {
+        tableData.value = []
+        searchForm.value.total = 0
+    }
 }
 
 //多选