소스 검색

上传病例管理增加退回按钮

liangpeile 1 년 전
부모
커밋
0f9b39778c

+ 18 - 2
medical_history-vue/src/views/admin/AdminMedicalHistoryList2.vue

@@ -94,6 +94,9 @@
 <!--          <a @click="handleEdit(record)">编辑</a>-->
           <a @click="handleDetail(record)">详情</a>
                     <a-divider type="vertical" />
+
+          <a @click="returnDetail(record.id)">退回</a>
+          <a-divider type="vertical" />
 <!--          v-if="record.isSecondaryUpload =='1'"-->
              <a @click="isSecondaryUpload(record.id,'2')">用户需要二次上传</a>
 
@@ -284,8 +287,8 @@ export default {
         deleteBatch: '/admincasehistory/adminMedicalHistory/deleteBatch',
         exportXlsUrl: '/admincasehistory/adminMedicalHistory/exportXls2',
         importExcelUrl: 'admincasehistory/adminMedicalHistory/importExcel',
-        edit: 'admincasehistory/adminMedicalHistory/edit'
-
+        edit: 'admincasehistory/adminMedicalHistory/edit',
+        returnDetail: 'admincasehistory/adminMedicalHistory/returnDetail',
       },
       dictOptions: {},
       superFieldList: []
@@ -314,6 +317,19 @@ export default {
     },
     initDictConfig() {
     },
+    returnDetail(id) {
+      debugger
+      httpAction(this.url.returnDetail,  id, 'post').then((res) => {
+        if (res.success) {
+          this.$message.success(res.message)
+          this.loadData()
+        } else {
+          this.$message.warning(res.message)
+        }
+      }).finally(() => {
+
+      })
+    },
     getSuperFieldList() {
       let fieldList = []
       fieldList.push({ type: 'string', value: 'phone', text: '提交人账号', dictCode: '' })

+ 22 - 0
medical_history/jeecg-boot-module-system/src/main/java/org/jeecg/modules/admincasehistory/controller/AdminMedicalHistoryController.java

@@ -302,6 +302,28 @@ public class AdminMedicalHistoryController extends JeecgController<AdminMedicalH
     }
 
     /**
+     * 退回
+     *
+     * @param id
+     * @return
+     */
+    @AutoLog(value = "病历管理-退回")
+    @ApiOperation(value = "病历管理-退回", notes = "病历管理-退回")
+    @RequestMapping(value = "/returnDetail", method = {RequestMethod.PUT, RequestMethod.POST})
+    public Result<String> returnDetail(@RequestBody  String id) {
+        String[] split = id.split("=");
+        String s = split[0];
+        AdminMedicalHistory adminMedicalHistory = adminMedicalHistoryService.getById(s);
+        if (null==adminMedicalHistory){
+            return Result.error("数据不存在");
+        }
+        adminMedicalHistory.setFirstTrial("0");
+
+        adminMedicalHistoryService.updateById(adminMedicalHistory);
+        return Result.OK("操作成功!");
+    }
+
+    /**
      * 通过id删除
      *
      * @param id