Browse Source

Merge remote-tracking branch 'origin/master'

wwj 1 month ago
parent
commit
4f2105a957

+ 4 - 1
src/api/museums/specimenoutbound/index.ts

@@ -106,6 +106,9 @@ export const SpecimenOutboundApi = {
   getSpecimenReturn: async (id: number) => {
     return await request.get({ url: `/museums/specimen-outbound/getReturn?id=` + id })
   },
-
+  //获取用户信息
+  getUserInfo: async () => {
+    return await request.get({ url: `/system/user/profile/get` })
+  },
 
 }

+ 13 - 0
src/router/modules/remaining.ts

@@ -652,6 +652,19 @@ const remainingRouter: AppRouteRecordRaw[] = [
           activeMenu: '/photosmanage/photogroup'
         }
       },
+      //查看出库申请详情
+      {
+        path: '/museums/specimenoutbound/OutboundForm/outboundDetail.vue',
+        component: () => import('@/views/museums/specimenoutbound/OutboundForm/outboundDetail.vue'),
+        name: 'OutboundDetails',
+        meta: {
+          noCache: true,
+          hidden: true,
+          canTo: true,
+          title: '查看标本出库申请详情',
+          activeMenu: '/museumsdocument/OutboundApplication'
+        }
+      },
       {
         path: '/museums/specimenoutbound/OutboundForm/outboundDetail.vue',
         component: () => import('@/views/museums/specimenoutbound/OutboundForm/outboundDetail.vue'),

+ 1 - 1
src/views/museums/photogroup/ImageImportForm .vue

@@ -33,7 +33,7 @@
           <el-upload
             ref="uploadRef"
             v-model:file-list="fileList"
-            :action="importUrl + '?updateSupport=' + updateSupport + '&groupName=' + formData.groupName + '&groupDescription=' + formData.groupDescription"
+            :action="importUrl + '?updateSupport=' + updateSupport + '&groupName=' + formData.groupName + '&groupDescription=' + formData.groupDescription + '&groupDate=' + formData.groupDate "
             :auto-upload="false"
             :disabled="formLoading"
             :headers="uploadHeaders"

+ 13 - 0
src/views/museums/specimenoutbound/ApproalProcess.vue

@@ -173,6 +173,15 @@
               link
               type="primary"
               @click="ApproalDetails(scope.row.id)"
+              v-if="user.roles[0].id==113 && scope.row.status==0  ||  user.roles[0].id==112 && scope.row.status==1"
+            >
+              审核
+            </el-button>
+            <el-button
+              link
+              type="success"
+              @click="ApproalDetails(scope.row.id)"
+              v-else
             >
               查看
             </el-button>
@@ -207,6 +216,7 @@ const message = useMessage() // 消息弹窗
 const loading = ref(true) // 列表的加载中
 const list = ref<SpecimenOutboundVO[]>([]) // 列表的数据
 const total = ref(0) // 列表的总页数
+const user=ref('')
 const queryParams = reactive({
   pageNo: 1,
   pageSize: 10,
@@ -246,6 +256,9 @@ const getList = async () => {
     const data = await SpecimenOutboundApi.getSpecimenOutboundPage(queryParams)
     list.value = data.list
     total.value = data.total
+    console.log(data)
+    user.value =await SpecimenOutboundApi.getUserInfo()
+    console.log(user.value)
   } finally {
     loading.value = false
   }

+ 19 - 2
src/views/museums/specimenoutbound/OutboundApplication.vue

@@ -188,6 +188,13 @@
         </el-table-column>
         <el-table-column label="操作" align="center" min-width="150px">
           <template #default="scope">
+            <el-button
+              link
+              type="primary"
+              @click="detail(scope.row.id)"
+            >
+              查看
+            </el-button>
             <!-- 只有当记录未被审批或驳回时,才显示编辑按钮 -->
             <el-button
               v-if="scope.row.status !== 1 &&  scope.row.status !== 3  && scope.row.status !== 4 && scope.row.status !== 5 && scope.row.status !== 6 && scope.row.status !== 2"
@@ -198,8 +205,6 @@
             >
               编辑
             </el-button>
-
-
             <el-button
               v-if="scope.row.status !== 0 && scope.row.status !== 1 && scope.row.status !== 3 && scope.row.status !== 4 && scope.row.status !== 5 "
               link
@@ -307,6 +312,18 @@ const resetQuery = () => {
   handleQuery()
 }
 
+//查看详情
+import { useRouter } from 'vue-router';
+import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
+const router = useRouter();
+const detail=(dataId: number) => {
+  router.push({
+    name: 'OutboundDetails',
+    query: {
+      dataId: dataId,
+    }
+  })
+}
 
 /** 添加/修改操作 */
 const formRef = ref()

+ 188 - 56
src/views/museums/specimenoutbound/OutboundForm/ApproalDetails.vue

@@ -3,25 +3,36 @@
     <el-row :gutter="8" justify="space-between">
       <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
         <el-card style="margin-bottom: 10px">
-
           <template #header>
-            <div class="card-header" style="text-align: center">
-              <h1 class="text1">标本出库申请详情</h1>
+            <div class="card-header" style="text-align: center" >
+              <h1 class="text1">标本出库入库详情
+                <el-tag type="primary" style="margin-left: 10px;margin-top: -1px">
+                {{ statusText }}</el-tag>
+              </h1>
+                <div v-if="user.roles[0].id==113 && outboundData.status === 0  ||  user.roles[0].id==112 && outboundData.status === 1"
+                     style="float: right;position: relative;top: -40px">
+                  <el-button
+                    @click="handleApproval"
+                    type="danger"
+                    size="large"
+                    style="float:right; margin-left: 20px;margin-top:10px;margin-bottom:10px"
+                  > 审 批
+                  </el-button>
+                </div>
             </div>
           </template>
+
           <el-row>
             <el-col :xl="11" :lg="11" :md="24" :sm="24" :xs="24">
               <el-descriptions
                 :column="1"
-                border
-                :size="size"
                 v-if="outboundData"
-              >
-                <el-descriptions-item label="审批状态:" label-align="right"
-                                      label-class-name="my-label">{{ StatusText }}
-                </el-descriptions-item>
+                :size="size"
+                border>
                 <el-descriptions-item label="申请人姓名:" label-align="right"
-                                      label-class-name="my-label">{{ outboundData.applicantName }}
+                                      label-class-name="my-label">{{
+                    outboundData.applicantName
+                  }}
                 </el-descriptions-item>
                 <el-descriptions-item label="申请单位:" label-align="right"
                                       label-class-name="my-label">{{
@@ -29,68 +40,197 @@
                   }}
                 </el-descriptions-item>
                 <el-descriptions-item label="电话号码:" label-align="right"
-                                      label-class-name="my-label">{{ outboundData.phoneNumber }}
+                                      label-class-name="my-label">{{
+                    outboundData.phoneNumber
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="研究项目名称:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.projectName
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="项目开始时间:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.startTime
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="项目结束时间:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.endTime
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="一级审批时间:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.approvalTime
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="一级审批员:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.approveUsers
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="一级审批建议:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.processInstanceId
+                  }}
                 </el-descriptions-item>
               </el-descriptions>
             </el-col>
             <el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">
               <el-descriptions
                 :column="1"
-                border
-                :size="size"
                 v-if="outboundData"
-              >
-                <el-descriptions-item label="研究项目名称:" label-align="right"
-                                      label-class-name="my-label">{{ outboundData.projectName }}
+                :size="size"
+                border>
+                <el-descriptions-item label="二级审批时间:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.twoApprovalTime
+                  }}
                 </el-descriptions-item>
-                <el-descriptions-item label="项目开始时间:" label-align="right"
-                                      label-class-name="my-label">{{ outboundData.startTime }}
+                <el-descriptions-item label="二级审批员:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.twoApproveUsers
+                  }}
                 </el-descriptions-item>
-                <el-descriptions-item label="项目结束时间:" label-align="right"
-                                      label-class-name="my-label">{{ outboundData.endTime }}
+                <el-descriptions-item label="二级审批建议" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.rejectionReasons
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="出库时间:" label-align="right"
+                                      label-class-name="my-label">{{ outboundData.outgoingTime }}
                 </el-descriptions-item>
-                <el-descriptions-item label="出库备注信息:" label-align="right"
-                                      label-class-name="my-label">{{ outboundData.outboundRemarks }}
+                <el-descriptions-item label="出库员:" label-align="right" label-class-name="my-label">
+                  {{ outboundData.operator }}
                 </el-descriptions-item>
+
+                <el-descriptions-item label="退还日期:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.returnDate
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="退还人:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.returner
+                  }}
+                </el-descriptions-item>
+                <el-descriptions-item label="点收人:" label-align="right"
+                                      label-class-name="my-label">{{
+                    outboundData.receiver
+                  }}
+                </el-descriptions-item>
+
+                <el-descriptions-item label="回库备注信息:" label-align="right"
+                                      label-class-name="my-label">{{ outboundData.remarks }}
+                </el-descriptions-item>
+
+
               </el-descriptions>
             </el-col>
-            <el-col :xl="2" :lg="2" :md="24" :sm="24" :xs="24">
+
+            <el-col :xl="3" :lg="3" :md="24" :sm="24" :xs="24">
               <el-descriptions
                 v-if="outboundData"
                 direction="vertical"
+                :column="1"
                 :size="size"
                 border
-
               >
+
                 <el-descriptions-item
-                  :width="200"
+                  :rowspan="4"
+                  :width="140"
                   label="申请附件"
                   align="center"
                   label-class-name="my-label"
                   class-name="my-content"
                 >
+                  <!--                    <div v-if="outboundData.attachments && outboundData.attachments.type && outboundData.attachments.type.includes('image')" class="image-container">-->
+                  <!--                      <el-image-->
+                  <!--                        class="h-80px w-80px"-->
+                  <!--                        lazy-->
+                  <!--                        :src="outboundData.attachments"-->
+                  <!--                        :preview-src-list="outboundData.attachments ? [outboundData.attachments] : []"-->
+                  <!--                        preview-teleported-->
+                  <!--                        fit="cover"-->
+                  <!--                      />-->
+                  <!--                    </div>-->
+                  <!--                    <el-link-->
+                  <!--                      v-else-if="outboundData.attachments"-->
+                  <!--                      type="primary"-->
+                  <!--                      :href="outboundData.attachments"-->
+                  <!--                      :underline="false"-->
+                  <!--                      target="_blank"-->
+                  <!--                    >下载</el-link>-->
                   <div class="demo-image__preview" v-if="outboundData && outboundData.attachments">
-                    <a :href="outboundData.attachments" download style="color: #dcb56d
-                ; text-decoration: none;">下载附件</a>
+                    <!--                    <a :href="outboundData.attachments" style="color: #dcb56d-->
+                    <!--                ; text-decoration: none;" download>下载附件</a>-->
+                    <!--                    <el-link type="primary" download :href="outboundData.attachments" :underline="false" target="_blank"-->
+                    <!--                    >下载</el-link-->
+                    <!--                    >-->
+                    <el-image
+                      v-if="outboundData.attachments.includes('image')"
+                      class="h-80px w-80px"
+                      lazy
+                      :src="outboundData.attachments"
+                      :preview-src-list="[outboundData.attachments]"
+                      preview-teleported
+                      fit="cover"
+                    />
+                    <el-link
+                      v-else-if="outboundData.attachments.includes('pdf')"
+                      type="primary"
+                      :href="outboundData.attachments"
+                      :underline="false"
+                      target="_blank"
+                    >预览</el-link
+                    >
+                    <el-link v-else type="primary" download :href="outboundData.attachments" :underline="false" target="_blank"
+                    >下载</el-link
+                    >
+
+
                   </div>
                 </el-descriptions-item>
-              </el-descriptions>
-              <!--           <div class="demo-image__preview" v-if="outboundData ">-->
-              <!--             <el-image-->
+                <el-descriptions-item
+                  :rowspan="4"
+                  :width="140"
+                  label="回库附件"
+                  align="center"
+                  label-class-name="my-label"
+                  class-name="my-content"
+                >
 
-              <!--               style=" align-items: center"-->
-              <!--               :src="outboundData.attachments"-->
-              <!--               :zoom-rate="1.2"-->
-              <!--               :max-scale="7"-->
-              <!--               :min-scale="0.2"-->
-              <!--               :preview-src-list="outboundData.attachments"-->
-              <!--               :initial-index="index"-->
-              <!--               fit="cover"-->
-              <!--             />-->
-              <!--           </div>-->
+                  <div class="demo-image__preview" v-if="outboundData && outboundData.sampleStatus">
+                    <!--                    <a :href="outboundData.sampleStatus" style="color: #dcb56d-->
+                    <!--                ; text-decoration: none;" download>下载附件</a>-->
+                    <el-image
+                      v-if="outboundData.sampleStatus.includes('image')"
+                      class="h-80px w-80px"
+                      lazy
+                      :src="outboundData.sampleStatus"
+                      :preview-src-list="[outboundData.sampleStatus]"
+                      preview-teleported
+                      fit="cover"
+                    />
+                    <el-link
+                      v-else-if="outboundData.sampleStatus.includes('pdf')"
+                      type="primary"
+                      :href="outboundData.sampleStatus"
+                      :underline="false"
+                      target="_blank"
+                    >预览</el-link
+                    >
+                    <el-link v-else type="primary" download :href="outboundData.sampleStatus" :underline="false" target="_blank"
+                    >下载</el-link
+                    >
+
+                  </div>
+
+                </el-descriptions-item>
+              </el-descriptions>
             </el-col>
           </el-row>
-
         </el-card>
       </el-col>
 
@@ -150,16 +290,7 @@
                 @pagination="getList"
               />
             </el-col>
-            <el-col>
-              <div v-if="outboundData.status === 0 || outboundData.status === 1 ">
-                <el-button
-                  @click="handleApproval"
-                  type="primary"
-                  style="float:right; margin-left: 20px;margin-top:10px;margin-bottom:10px"
-                > 审批
-                </el-button>
-              </div>
-            </el-col>
+
           </el-row>
         </el-card>
       </el-col>
@@ -179,7 +310,7 @@ import {formatDate} from "@/utils/formatTime";
 import {reactive, ref, computed} from "vue";
 import {DICT_TYPE} from "@/utils/dict";
 import Approval from "@/views/museums/specimenoutbound/approval.vue"
-
+const user=ref('')
 const size = ref<ComponentSize>('large')
 let outboundData = ref(null); // 初始化响应式数据
 const {query} = useRoute() // 查询参数
@@ -207,6 +338,7 @@ const getList = async () => {
     const data = await SpecimenOutboundApi.getSpecimenOutboundDetailsPage(id, pageParams)
     list.value = data.specimenInfoList.list
     total.value = data.specimenInfoList.total
+    user.value =await SpecimenOutboundApi.getUserInfo()
   } finally {
     loading.value = false
   }
@@ -226,15 +358,15 @@ const fetchData = async () => {
 }
 
 /**审批状态**/
-const StatusText = computed(() => {
+const statusText = computed(() => {
   if (outboundData.value === null) {
     return '';
   }
   switch (outboundData.value.status) {
     case 0:
-      return '审批';
+      return '审批';
     case 1:
-      return '一审通过';
+      return '二审中';
     case 2:
       return '一审驳回';
     case 3:
@@ -242,7 +374,7 @@ const StatusText = computed(() => {
     case 4:
       return '已回库';
     case 5:
-      return '审通过';
+      return '审通过';
     case 6:
       return '二审驳回';
     default:

+ 8 - 7
src/views/museums/specimenoutbound/OutboundForm/outboundDetail.vue

@@ -7,7 +7,9 @@
 
           <template #header>
             <div class="card-header" style="text-align: center">
-              <h1 class="text1">标本出库入库详情</h1>
+              <h1 class="text1">标本出库入库详情<el-tag type="primary" style="margin-left: 10px;margin-top: -1px">
+                {{ statusText }}</el-tag></h1>
+
             </div>
           </template>
 
@@ -17,7 +19,6 @@
                 :column="1"
                 v-if="outboundData"
                 :size="size"
-
                 border>
                 <el-descriptions-item label="申请人姓名:" label-align="right"
                                       label-class-name="my-label">{{
@@ -90,7 +91,7 @@
                 <el-descriptions-item label="出库时间:" label-align="right"
                                       label-class-name="my-label">{{ outboundData.outgoingTime }}
                 </el-descriptions-item>
-                <el-descriptions-item label="出库员:" label-align="right">
+                <el-descriptions-item label="出库员:" label-align="right" label-class-name="my-label">
                   {{ outboundData.operator }}
                 </el-descriptions-item>
 
@@ -356,17 +357,17 @@ const statusText = computed(() => {
     case 0:
       return '审批中';
     case 1:
-      return '一级审批通过';
+      return '二审中';
     case 2:
-      return '一驳回';
+      return '一审驳回';
     case 3:
       return '已出库';
     case 4:
       return '已回库';
     case 5:
-      return '二级审批通过';
+      return '审批通过';
     case 6:
-      return '二驳回';
+      return '二审驳回';
     default:
       return '';
   }

+ 11 - 9
src/views/museums/specimenoutbound/SpecimenOutboundForm.vue

@@ -16,18 +16,18 @@
                   </div>
 
 <!--              点击添加的时候扩展一栏,即formData.specimenNumber的长度+1-->
-      <div>
+      <el-card style="margin-bottom: 20px" shadow="never">
       <el-button type="primary"
-                 style="float: right ;margin-left: 5px; padding: 5px 10px; font-size: 12px;"
-                 @click="removeSpecimenNumber">-</el-button>
+                 style="float: right ;margin-left: 5px; padding: 5px 10px; font-size: 20px;"
+                 @click="removeSpecimenNumber">-
+      </el-button>
       <el-button type="primary"
-                 style="float: right; padding: 5px 10px; font-size: 12px;"
-                 @click="addSpecimenNumber">+</el-button>
-         </div>
+                 style="float: right; padding: 5px 10px; font-size: 20px;"
+                 @click="addSpecimenNumber">+
+      </el-button>
       <el-form-item label="标本编号"  prop="number" label-width="150px">
         <el-input v-model="formData.number[0]" placeholder="请输入标本编号" label-width="150px"/>
       </el-form-item>
-
       <template v-if="formData.number && formData.number.length > 1">
         <el-form-item
           v-for="(item, index) in formData.number.slice(1)"
@@ -39,7 +39,7 @@
           <el-input v-model="formData.number[index + 1]" placeholder="请输入标本编号" />
         </el-form-item>
       </template>
-
+      </el-card>
       <el-form-item label="申请人姓名"  prop="applicantName" label-width="150px">
         <el-input v-model="formData.applicantName" placeholder="请输入申请人姓名" label-width="150px"/>
       </el-form-item>
@@ -142,6 +142,7 @@ const formRules = reactive({
 
   number: [{required: true, message: '标本编号不能为空', trigger: 'blur'}],
   applicantName: [{required: true, message: '申请人姓名不能为空', trigger: 'blur'}],
+  projectName: [{required: true, message: '研究项目名称不能为空', trigger: 'blur'}],
   applicationUsage: [{required: true, message: '申请单位不能为空', trigger: 'blur'}],
   phoneNumber: [{required: true, message: '电话号码不能为空', trigger: 'blur'}],
   startTime: [{required: true, message: '项目开始时间不能为空', trigger: 'blur'}],
@@ -152,6 +153,7 @@ const formRef = ref() // 表单 Ref
 /**增减标本编号**/
 const addSpecimenNumber = () => {
   formData.value.number.push(''); // 向数组中添加一个新的空字符串
+  console.log(formData.value.number)
 };
 const removeSpecimenNumber = () => {
   if (formData.value.number.length > 0) { // 确保至少保留一个输入框
@@ -223,7 +225,7 @@ const resetForm = () => {
     id: undefined,
     infoId: [],
     chineseName: undefined,// 确保初始值为数组
-    number: [],// 确保初始值为数组
+    number: [''],// 确保初始值为数组
     applicantName: undefined,
     applicationDate: undefined,
     applicationUsage: undefined,