Ver Fonte

Merge remote-tracking branch 'origin/stable' into stable

xzc há 1 semana atrás
pai
commit
516c4c9c91

+ 1 - 1
yudao-ui-admin-vue3/src/views/pressure2/acceptorder/index.vue

@@ -118,7 +118,7 @@
     {
       label: '受理单号',
       prop: 'acceptNo',
-      width: 140,
+      width: 160,
       search: {
         type: 'input'
       },

+ 1 - 1
yudao-ui-admin-vue3/src/views/pressure2/acceptorder/pipeIndex.vue

@@ -117,7 +117,7 @@
     {
       label: '受理单号',
       prop: 'acceptNo',
-      width: 140,
+      width: 160,
       search: {
         type: 'input'
       },

+ 35 - 8
yudao-ui-admin-vue3/src/views/pressure2/pipeuseregistrationreport/index.vue

@@ -36,11 +36,12 @@
             class="!w-240px"
           />
         </el-form-item>
-        <el-form-item label="部门" prop="deptId">
-          <DeptSelect
-            v-model="queryParams.deptId"
-            placeholder="请选择部门"
+        <el-form-item label="报告编号" prop="reportNo">
+          <el-input
+            v-model="queryParams.reportNo"
+            placeholder="请输入报告编号"
             clearable
+            @keyup.enter="handleQuery"
             class="!w-240px"
           />
         </el-form-item>
@@ -60,7 +61,14 @@
             <el-option label="已拒绝" value="300" />
           </el-select>
         </el-form-item>
-
+        <el-form-item label="部门" prop="deptId">
+          <DeptSelect
+            v-model="queryParams.deptId"
+            placeholder="请选择部门"
+            clearable
+            class="!w-240px"
+          />
+        </el-form-item>
         <el-form-item label="是否办证" prop="hasCertificateNo">
           <el-select
             v-model="queryParams.hasCertificateNo"
@@ -79,6 +87,14 @@
         <el-form-item>
           <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
           <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
+          <el-button
+            type="primary"
+            plain
+            @click="handleExport"
+            :loading="exportLoading"
+          >
+            <Icon icon="ep:download" class="mr-5px" /> 导出
+          </el-button>
 <!--          <el-button-->
 <!--            type="primary"-->
 <!--            plain-->
@@ -96,8 +112,9 @@
 
   <!-- 列表 -->
   <ContentWrap>
-    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border>
+    <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border @selection-change="handleSelectionChange">
 
+      <el-table-column type="selection" align="center" width="40" />
       <el-table-column type="index" label="序号" align="center" width="60" />
       <el-table-column label="工程号" align="center" prop="projectNo" min-width="180px"/>
       <el-table-column label="使用单位名称" align="center" prop="unitName" min-width="270px"/>
@@ -216,6 +233,7 @@ const queryParams = reactive({
 })
 const queryFormRef = ref() // 搜索的表单
 const exportLoading = ref(false) // 导出的加载中
+const selectedRows = ref<PipeUseRegistrationReportVO[]>([]) // 勾选的行
 
 /** 查询列表 */
 const getList = async () => {
@@ -241,6 +259,11 @@ const resetQuery = () => {
   handleQuery()
 }
 
+/** 勾选变化 */
+const handleSelectionChange = (rows: PipeUseRegistrationReportVO[]) => {
+  selectedRows.value = rows
+}
+
 /** 删除按钮操作 */
 const handleDelete = async (id: number) => {
   try {
@@ -268,9 +291,13 @@ const handleExport = async () => {
   try {
     // 导出的二次确认
     await message.exportConfirm()
-    // 发起导出
     exportLoading.value = true
-    const data = await PipeUseRegistrationReportApi.exportPipeUseRegistrationReport(queryParams)
+    // 有勾选时导出勾选的数据,否则导出全部
+    const params: any = { ...queryParams }
+    if (selectedRows.value.length > 0) {
+      params.ids = selectedRows.value.map(row => row.id).join(',')
+    }
+    const data = await PipeUseRegistrationReportApi.exportPipeUseRegistrationReport(params)
     download.excel(data, '管道使用登记.xls')
   } catch {
   } finally {

+ 35 - 29
yudao-ui-admin-vue3/src/views/pressure2/planNew/boilerDetail.vue

@@ -1,17 +1,18 @@
 <template>
-  <!-- 单位基本信息 -->
+  <!-- 受检单位基本信息 - 始终展开 -->
   <div class="plan-section mb-4">
     <div class="section-title">
       <span>受检单位基本信息</span>
     </div>
-    <el-descriptions :column="3" border>
-      <el-descriptions-item label="单位名称">{{ unitInfo.unitName }}</el-descriptions-item>
-      <el-descriptions-item label="单位地址">{{ unitInfo.unitAddress }}</el-descriptions-item>
-      <!-- <el-descriptions-item label="使用单位联系人">{{ unitInfo.contact }}</el-descriptions-item>
-        <el-descriptions-item label="使用单位联系电话">{{ unitInfo.contactPhone }}</el-descriptions-item>
-        <el-descriptions-item label="区域">{{ unitInfo.equipDistrictName }}</el-descriptions-item>
-        <el-descriptions-item label="街道">{{ unitInfo.equipStreetName }}</el-descriptions-item> -->
-    </el-descriptions>
+    <div class="mb-[5px]">
+      <el-button type="primary" @click="handleUnitCodeFn(unitInfo.id)">工商信息</el-button>
+      <el-descriptions :column="3" border class="flex-1 mt-[10px]">
+        <el-descriptions-item label="单位名称">{{ unitInfo.name || '-' }}</el-descriptions-item>
+        <el-descriptions-item label="登记状态">{{ unitInfo.regstateCn || '-' }}</el-descriptions-item>
+        <el-descriptions-item label="市场主体类型">{{ unitInfo.enterpriseType || '-' }}</el-descriptions-item>
+        <el-descriptions-item label="单位地址">{{ unitInfo.addr || '-' }}</el-descriptions-item>
+      </el-descriptions>
+    </div>
   </div>
 
   <div class="plan-section mb-4">
@@ -450,6 +451,8 @@
       <el-button @click="batchEditLocationVisible = false">取 消</el-button>
     </template>
   </Dialog>
+
+  <unitContainerForm ref="unitContainerFormRef" />
 </template>
 
 <script setup lang="ts" name="PlanNewDetail">
@@ -481,6 +484,8 @@ import {
 } from "@/api/pressure2/equipboilerscheduling";
 import BoilerPlanScheduleDialog
   from "@/views/pressure2/equipboilerscheduling/components/BoilerPlanScheduleDialog.vue";
+import unitContainerForm from '@/components/unitContainerForm/index.vue'
+import { getUnitInfo, UpdateUnitVO } from '@/api/laboratory/unit'
 const router = useRouter()
 
 const props = defineProps({
@@ -519,16 +524,9 @@ const batchEditLocationFormRules = reactive({
   equipDistrict: [{ required: true, message: '请选择设备所在行政区', trigger: 'change' }],
   equipStreet: [{ required: true, message: '请选择设备所在街道', trigger: 'change' }],
 })
-// 单位基本信息
-const unitInfo = ref({
-  unitId: '',
-  unitName: '',
-  unitAddress: '',
-  contact: '',
-  contactPhone: '',
-  equipDistrictName: '',
-  equipStreetName: ''
-})
+// 单位基本信息(通过API获取完整单位信息)
+const unitInfo = ref<UpdateUnitVO>({} as UpdateUnitVO)
+const unitContainerFormRef = ref<InstanceType<typeof unitContainerForm>>()
 
 const equipTypeMap = {
   1: '容器'
@@ -569,6 +567,15 @@ const containerTypeOptions = getStrDictOptions(DICT_TYPE.SYSTEM_EQUIP_BOILER_TYP
 const currentEquip = ref<EquipBoilerSchedulingEquipVO>()
 const currentCheckType = ref<scheduleType>('')
 
+const getUnitDetail = async (unitId: string) => {
+  try {
+    const res = await getUnitInfo({id: unitId})
+    unitInfo.value = res
+  } catch (error) {
+    console.error('获取单位详情失败:', error)
+  }
+}
+
 /** 打开弹窗 */
 const open = async (row: PlanNewPageVO) => {
   equipIds.value = [...new Set([row.equipIds, row.yearEquipIds, row.expiredEquipIds])]
@@ -576,16 +583,7 @@ const open = async (row: PlanNewPageVO) => {
     .join(',')
     .split(',')
 
-  // 设置单位信息
-  unitInfo.value = {
-    unitId: row.unitId || '',
-    unitName: row.unitName || '',
-    unitAddress: row.unitAddress || '',
-    contact: row.contact || '',
-    contactPhone: row.contactPhone || '',
-    equipDistrictName: row.equipDistrictName || '',
-    equipStreetName: row.equipStreetName || ''
-  }
+  row.unitId && await getUnitDetail(row.unitId)
 
   // 初始化查询参数
   queryParams.value = {
@@ -927,6 +925,14 @@ onMounted(() => {
 defineExpose({
   open
 })
+
+// 工商信息
+const handleUnitCodeFn = (id) => {
+  if (!id) {
+    return ElMessage.warning('该单位信息异常!')
+  }
+  unitContainerFormRef.value?.open(id)
+}
 </script>
 
 <style lang="scss" scoped>

+ 35 - 29
yudao-ui-admin-vue3/src/views/pressure2/planNew/pipeDetail.vue

@@ -1,17 +1,18 @@
 <template>
-  <!-- 单位基本信息 -->
+  <!-- 受检单位基本信息 - 始终展开 -->
   <div class="plan-section mb-4">
     <div class="section-title">
       <span>受检单位基本信息</span>
     </div>
-    <el-descriptions :column="3" border>
-      <el-descriptions-item label="单位名称">{{ unitInfo.unitName }}</el-descriptions-item>
-      <el-descriptions-item label="单位地址">{{ unitInfo.unitAddress }}</el-descriptions-item>
-      <!-- <el-descriptions-item label="使用单位联系人">{{ unitInfo.contact }}</el-descriptions-item>
-        <el-descriptions-item label="使用单位联系电话">{{ unitInfo.contactPhone }}</el-descriptions-item>
-        <el-descriptions-item label="区域">{{ unitInfo.equipDistrictName }}</el-descriptions-item>
-        <el-descriptions-item label="街道">{{ unitInfo.equipStreetName }}</el-descriptions-item> -->
-    </el-descriptions>
+    <div class="mb-[5px]">
+      <el-button type="primary" @click="handleUnitCodeFn(unitInfo.id)">工商信息</el-button>
+      <el-descriptions :column="3" border class="flex-1 mt-[10px]">
+        <el-descriptions-item label="单位名称">{{ unitInfo.name || '-' }}</el-descriptions-item>
+        <el-descriptions-item label="登记状态">{{ unitInfo.regstateCn || '-' }}</el-descriptions-item>
+        <el-descriptions-item label="市场主体类型">{{ unitInfo.enterpriseType || '-' }}</el-descriptions-item>
+        <el-descriptions-item label="单位地址">{{ unitInfo.addr || '-' }}</el-descriptions-item>
+      </el-descriptions>
+    </div>
   </div>
 
   <div class="plan-section mb-4">
@@ -520,6 +521,8 @@
       <el-button @click="batchEditLocationVisible = false">取 消</el-button>
     </template>
   </Dialog>
+
+  <unitContainerForm ref="unitContainerFormRef" />
 </template>
 
 <script setup lang="ts" name="PlanNewDetail">
@@ -552,6 +555,8 @@ import PlanScheduleBoilerDialog
 import {ref} from "vue";
 import PipePlanScheduleDialog
   from "@/views/pressure2/pipescheduling/components/PipePlanScheduleDialog.vue";
+import unitContainerForm from '@/components/unitContainerForm/index.vue'
+import { getUnitInfo, UpdateUnitVO } from '@/api/laboratory/unit'
 
 const router = useRouter()
 
@@ -595,16 +600,9 @@ const batchEditLocationFormRules = reactive({
   equipDistrict: [{ required: true, message: '请选择设备所在行政区', trigger: 'change' }],
   equipStreet: [{ required: true, message: '请选择设备所在街道', trigger: 'change' }],
 })
-// 单位基本信息
-const unitInfo = ref({
-  unitId: '',
-  unitName: '',
-  unitAddress: '',
-  contact: '',
-  contactPhone: '',
-  equipDistrictName: '',
-  equipStreetName: ''
-})
+// 单位基本信息(通过API获取完整单位信息)
+const unitInfo = ref<UpdateUnitVO>({} as UpdateUnitVO)
+const unitContainerFormRef = ref<InstanceType<typeof unitContainerForm>>()
 
 const equipTypeMap = {
   1: '容器'
@@ -741,22 +739,22 @@ const handleExpandChange = (row, expandedRows: any[]) => {
 }
 
 /** 打开弹窗 */
+const getUnitDetail = async (unitId: string) => {
+  try {
+    const res = await getUnitInfo({id: unitId})
+    unitInfo.value = res
+  } catch (error) {
+    console.error('获取单位详情失败:', error)
+  }
+}
+
 const open = async (row: PlanNewPageVO) => {
   equipIds.value = [...new Set([row.equipIds, row.yearEquipIds, row.expiredEquipIds])]
     .filter((id) => id) // 过滤掉 null、undefined、空字符串
     .join(',')
     .split(',')
 
-  // 设置单位信息
-  unitInfo.value = {
-    unitId: row.unitId || '',
-    unitName: row.unitName || '',
-    unitAddress: row.unitAddress || '',
-    contact: row.contact || '',
-    contactPhone: row.contactPhone || '',
-    equipDistrictName: row.equipDistrictName || '',
-    equipStreetName: row.equipStreetName || ''
-  }
+  row.unitId && await getUnitDetail(row.unitId)
 
   // 初始化查询参数
   queryParams.value = {
@@ -1237,6 +1235,14 @@ onMounted(() => {
 defineExpose({
   open
 })
+
+// 工商信息
+const handleUnitCodeFn = (id) => {
+  if (!id) {
+    return ElMessage.warning('该单位信息异常!')
+  }
+  unitContainerFormRef.value?.open(id)
+}
 </script>
 
 <style lang="scss" scoped>