Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

wwj 3 hari lalu
induk
melakukan
54b001e9f6

+ 4 - 0
src/api/museums/specimeninfo/index.ts

@@ -72,6 +72,10 @@ export const SpecimenInfoApi = {
   exportSpecimenInfo: async (params) => {
     return await request.download({ url: `/museums/specimen-info/export-excel`, params })
   },
+  exportSelectSpecimenInfo: async (params) => {
+    return await request.download({ url: `/museums/specimen-info/select-excel`, params })
+  },
+
   //标本详情界面
   // getSpecimenRecord:async (id: number ) => {
   //   return await request.get({ url: '/museums/specimen-info/records??id=' + id })

+ 48 - 2
src/views/museums/specimeninfo/index.vue

@@ -239,7 +239,24 @@
             :value="dict.value"
           />
         </el-select>
-      </el-form-item>
+        </el-form-item>
+        <el-form-item label="已入资产" prop="assetNumberIsNull">
+          <el-select
+            v-model="queryParams.assetNumberIsNull"
+            placeholder="是否已入资产"
+            clearable
+            class="!w-240px"
+          >
+            <el-option
+              label="是"
+              :value="true"
+            />
+            <el-option
+                label="否"
+                :value="false"
+            />
+          </el-select>
+        </el-form-item>
 <!--      <el-form-item label="备注" prop="notes">-->
 <!--        <el-input-->
 <!--          v-model="queryParams.notes"-->
@@ -334,6 +351,15 @@
         >
           <Icon icon="ep:upload" class="mr-5px" /> 导出excel
         </el-button>
+         <el-button
+          type="success"
+          plain
+          @click="handleSelectExport"
+          :loading="exportLoading"
+        >
+          <Icon icon="ep:upload" class="mr-5px" /> 导出已选excel
+        </el-button>
+
         <el-button
           type="success"
           plain
@@ -589,7 +615,9 @@ const queryParams = reactive({
   deletedReason: undefined,
   operator: undefined,
   entryDate: [],
-  mainPurpose:undefined
+  mainPurpose:undefined,
+  assetNumberIsNull:undefined,
+  ids:undefined
 })
 //标签打印的表单
 const formData = ref({
@@ -699,6 +727,24 @@ const handleExport = async () => {
     exportLoading.value = false
   }
 }
+
+/** 导出按钮操作 */
+const handleSelectExport = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const idList = selectedlabel.value.map(item => item.id);
+    queryParams.ids = idList
+    const data = await SpecimenInfoApi.exportSelectSpecimenInfo(queryParams)
+    download.excel(data, '标本管理.xls')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
+
 //字段类型
 const optionsLabel = [
 

+ 1 - 1
src/views/museums/specimenoutbound/ApproalProcess.vue

@@ -34,7 +34,7 @@
             class="!w-240px"
           />
         </el-form-item>
-        <el-form-item label="申请日期" prop="applicationDate">
+        <el-form-item label="申请日期" prop="createTime">
           <el-date-picker
             v-model="queryParams.createTime"
             value-format="YYYY-MM-DD HH:mm:ss"

+ 1 - 1
src/views/museums/specimenoutbound/OutboundApplication.vue

@@ -36,7 +36,7 @@
             class="!w-240px"
           />
         </el-form-item>
-        <el-form-item label="申请日期" prop="applicationDate">
+        <el-form-item label="申请日期" prop="createTime">
           <el-date-picker
             v-model="queryParams.createTime"
             value-format="YYYY-MM-DD HH:mm:ss"

+ 40 - 10
src/views/museums/specimenoutbound/OutboundManagement.vue

@@ -178,15 +178,37 @@
                 证明出库
               </el-button>
           </div>
-
-          <el-button
-            v-if="scope.row.status !== 0 && scope.row.status !== 1 && scope.row.status !== 2 && scope.row.status !== 4 && scope.row.status !== 5 && scope.row.status !== 6"
-            link
-            type="success"
-            @click=" openForm(scope.row.id)"
-          >
+          <div
+              v-if="scope.row.status !== 0
+              && scope.row.status !== 1
+              && scope.row.status !== 2
+              && scope.row.status !== 4
+              && scope.row.status !== 5
+              && scope.row.status !== 6">
+            <el-button
+              link
+              type="success"
+              @click=" openForm(scope.row.id)"
+                v-if="scope.row.returnConfirm == null"
+            >
             回库
-          </el-button>
+            </el-button>
+            <el-button
+                link
+                type="danger"
+                v-else-if="scope.row.returnConfirm != null && scope.row.isFirstRet"
+            >
+                待证明回库
+            </el-button>
+            <el-button
+              link
+              type="success"
+              @click=" returnConfirm(scope.row.id)"
+              v-else
+            >
+              证明回库
+            </el-button>
+          </div>
         </template>
       </el-table-column>
     </el-table>
@@ -287,8 +309,6 @@ const handleExport = async () => {
   }
 }
 
-
-
 /** 查看详情页面 **/
 import { useRouter } from 'vue-router';
 import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
@@ -323,6 +343,16 @@ const openForm = (id?: number) => {
   formRef.value.open( id)
 }
 
+const returnConfirm = async (projectId?: number) => {
+    let hhh = reactive({id:-1})
+    hhh.id = projectId
+    await SpecimenOutboundApi.updateSpecimenOutbound(hhh)
+    message.success(t('回库成功'))
+    queryFormRef.value.resetFields()
+    handleQuery()
+}
+
+
 // const isOut ()+>{
 //
 // } scope.row.status !== 0 && scope.row.status !== 1 && scope.row.status !== 2 && scope.row.status !== 3 && scope.row.status !== 4 && scope.row.status !== 6 && scope.row.operator !== null  && (scope.row.operator !== null)

+ 3 - 3
src/views/museums/specimenoutbound/SpecimenOutboundForm.vue

@@ -43,7 +43,7 @@
       <el-form-item label="申请人姓名"  prop="applicantName" label-width="150px">
         <el-input v-model="formData.applicantName" placeholder="请输入申请人姓名" label-width="150px"/>
       </el-form-item>
-      <el-form-item label="申请单位" prop="applicantName" label-width="150px">
+      <el-form-item label="申请单位" prop="applicationUsage" label-width="150px">
         <el-input v-model="formData.applicationUsage" placeholder="请输入申请单位"
                   label-width="150px"/>
       </el-form-item>
@@ -64,7 +64,7 @@
         />
       </el-form-item>
 
-      <el-form-item label="借用开始时间" prop="outgoingTime" label-width="150px">
+      <el-form-item label="借用开始时间" prop="startTime" label-width="150px">
         <el-date-picker
           v-model="formData.startTime"
           type="date"
@@ -73,7 +73,7 @@
         />
       </el-form-item>
 
-      <el-form-item label="借用结束时间" prop="returnDate" label-width="150px">
+      <el-form-item label="借用结束时间" prop="endTime" label-width="150px">
         <el-date-picker
           v-model="formData.endTime"
           type="date"