Преглед изворни кода

指派公司+指派护理人员

qinyan пре 4 месеци
родитељ
комит
7d78f40f14

+ 2 - 1
ruoyi-common/src/main/java/com/ruoyi/common/enums/CareApplyStatus.java

@@ -10,7 +10,8 @@ public enum CareApplyStatus
     WAITCHECK("wait_check"),//待审核
     AGREE("agree"),//同意
     DISAGREE("disagree"),//不同意
-    WAITASSIGN("wait_assign"),//待指派
+    WAITASSIGNCOMPANY("wait_assign_company"),//待指派公司
+    WAITASSIGNNURSE("wait_assign_nurse"),//待指派护理人员
     ASSIGNED("assigned");//已指派
 
     private final String code;

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/care/domain/CareApplications.java

@@ -55,7 +55,7 @@ public class CareApplications extends BaseEntity
     private String status;
 
     /** 处理状态(正在进行 0、已完成 1) */
-    @Excel(name = "处理状态(正在进行 0、已完成 1)")
+    @Excel(name = "处理状态(未开始、正在进行、已完成 )")
     private String dealStatus;
 
     /** 支付状态(未结算 0、已结算 1) */

+ 0 - 1
ruoyi-system/src/main/java/com/ruoyi/care/service/impl/CareApplicationsServiceImpl.java

@@ -107,7 +107,6 @@ public class CareApplicationsServiceImpl implements ICareApplicationsService
     public int assign(CareApplications careApplications) {
         int result=0;
         CareAssignments careAssignments=new CareAssignments();
-        careApplications.setStatus(CareApplyStatus.ASSIGNED.getCode());
         careApplicationsMapper.updateCareApplications(careApplications);
 
         if(careApplications.getAssignId()==null){

+ 22 - 6
ruoyi-vue/src/views/care/applications/index.vue

@@ -111,12 +111,24 @@
         </template>
       </el-table-column>
       <el-table-column label="所在医院" align="center" prop="hospital" />
-      <el-table-column label="科室具体楼层房间床号" align="center" prop="address" />
+      <el-table-column label="详细地址" align="center" prop="address" />
       <el-table-column label="预计天数" align="center" prop="careDays" />
       <el-table-column label="申请日期" align="center" prop="applyDate" />
       <el-table-column label="申请状态" align="center" prop="status" >
         <template #default="scope">
-          <dict-tag :options="care_apply_status" :value="scope.row.status"/>
+          <div v-if="scope.row.status == 'disagree'">
+            <el-popover effect="light" trigger="hover" placement="top" width="auto">
+              <template #default>
+                <div>审核原因: {{ scope.row.auditReason }}</div>
+              </template>
+              <template #reference>
+                <dict-tag :options="care_apply_status" :value="scope.row.status"/>
+              </template>
+            </el-popover>
+          </div>
+          <div v-if="scope.row.status !== 'disagree'">
+            <dict-tag :options="care_apply_status" :value="scope.row.status"/>
+          </div>
         </template>
       </el-table-column>
       <el-table-column label="处理状态" align="center" prop="dealStatus" >
@@ -175,7 +187,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="所在医院" prop="hospital">
-          <el-select v-model="form.hospital" placeholder="所在公司">
+          <el-select v-model="form.hospital" placeholder="所在医院">
             <el-option
                 v-for="dict in hispitalList"
                 :key="dict.name"
@@ -191,7 +203,12 @@
           <el-input v-model="form.careDays" placeholder="请输入预计天数" />
         </el-form-item>
         <el-form-item label="申请日期" prop="applyDate">
-          <el-input v-model="form.applyDate" placeholder="请输入申请日期" />
+          <el-date-picker clearable
+                          v-model="form.applyDate"
+                          type="date"
+                          value-format="YYYY-MM-DD"
+                          placeholder="请选择协议生效日期">
+          </el-date-picker>
         </el-form-item>
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
@@ -343,8 +360,7 @@ function handleUpdate(row) {
 }
 // 送审
 function handleCheck(row) {
-  const _applyIds = row.applyId || ids.value;
-  proxy.$modal.confirm('是否确认送审护理申请编号为"' + _applyIds + '"的数据项?').then(function() {
+  proxy.$modal.confirm('是否确认送审"' + row.personName + '"的护理申请?').then(function() {
     row.status='wait_check';
     updateApplications(row).then(response => {
       proxy.$modal.msgSuccess("送审成功");

+ 10 - 1
ruoyi-vue/src/views/care/applications/index_assign_nurse.vue

@@ -179,6 +179,13 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row :gutter="20">
+          <el-col :span="24">
+            <el-form-item label="护理备注" prop="assignRemark">
+              <el-input v-model="form.assignRemark" type="textarea" placeholder="请输入内容" disabled/>
+            </el-form-item>
+          </el-col>
+        </el-row>
 
         <el-divider/>
         <el-row :gutter="20">
@@ -248,7 +255,7 @@ const data = reactive({
     address: null,
     careDays: null,
     applyDate: null,
-    status: 'assigned',
+    status: 'wait_assign_nurse',
     dealStatus: null,
     payStatus: null,
     auditReason: null,
@@ -335,6 +342,8 @@ function submitForm() {
   console.info(form.value);
   proxy.$refs["applicationsRef"].validate(valid => {
     if (valid) {
+      form.value.status='assigned'
+      form.value.dealStatus='no_start'
       assignApplications(form.value).then(response => {
         proxy.$modal.msgSuccess("指派成功");
         openAssign.value = false;

+ 3 - 2
ruoyi-vue/src/views/care/applications/index_wait_check.vue

@@ -510,7 +510,7 @@ function submitForm(type) {
       }
 
       updateApplications(form.value).then(response => {
-        proxy.$modal.msgSuccess("指派成功");
+        proxy.$modal.msgSuccess("审核成功");
         open.value = false;
         getList();
         getAssignList();
@@ -522,9 +522,10 @@ function submitForm(type) {
 function submitAssignForm(){
   proxy.$refs["applicationAssignRef"].validate(valid => {
     if (valid) {
+      form.value.status='wait_assign_nurse'
       assignApplications(form.value).then(response => {
         proxy.$modal.msgSuccess("指派成功");
-        open.value = false;
+        openAssign.value = false;
         getList();
         getAssignList();
       });

+ 20 - 66
ruoyi-vue/src/views/care/clocks/index.vue

@@ -1,14 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="护理任务记录表id" prop="nursingRecordId">
-        <el-input
-          v-model="queryParams.nursingRecordId"
-          placeholder="请输入护理任务记录表id"
-          clearable
-          @keyup.enter="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="护理时间" prop="nursingTime">
         <el-date-picker clearable
           v-model="queryParams.nursingTime"
@@ -17,74 +9,28 @@
           placeholder="请选择护理时间">
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="图片路径" prop="imgPaths">
-        <el-input
-          v-model="queryParams.imgPaths"
-          placeholder="请输入图片路径"
-          clearable
-          @keyup.enter="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="图片数量" prop="imgNum">
-        <el-input
-          v-model="queryParams.imgNum"
-          placeholder="请输入图片数量"
-          clearable
-          @keyup.enter="handleQuery"
-        />
-      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
         <el-button icon="Refresh" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
         <el-button
-          type="primary"
-          plain
-          icon="Plus"
-          @click="handleAdd"
-          v-hasPermi="['care:clocks:add']"
+            type="primary"
+            plain
+            icon="Plus"
+            @click="handleAdd"
+            v-hasPermi="['care:clocks:add']"
         >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="Edit"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['care:clocks:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
         <el-button
-          type="danger"
-          plain
-          icon="Delete"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['care:clocks:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="Download"
-          @click="handleExport"
-          v-hasPermi="['care:clocks:export']"
+            type="warning"
+            plain
+            icon="Download"
+            @click="handleExport"
+            v-hasPermi="['care:clocks:export']"
         >导出</el-button>
-      </el-col>
-      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+      </el-form-item>
+    </el-form>
 
     <el-table v-loading="loading" :data="clocksList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="护理任务打卡表的唯一标识符" align="center" prop="clockId" />
-      <el-table-column label="护理任务记录表id" align="center" prop="nursingRecordId" />
       <el-table-column label="护理时间" align="center" prop="nursingTime" width="180">
         <template #default="scope">
           <span>{{ parseTime(scope.row.nursingTime, '{y}-{m}-{d}') }}</span>
@@ -161,6 +107,14 @@ const multiple = ref(true);
 const total = ref(0);
 const title = ref("");
 
+// 定义 props
+const props = defineProps({
+  applyId: {
+    type: String,
+    required: true
+  }
+});
+
 const data = reactive({
   form: {},
   queryParams: {

+ 277 - 0
ruoyi-vue/src/views/care/clocks/index_task.vue

@@ -0,0 +1,277 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="128px">
+      <el-form-item label="申请人姓名" prop="personName">
+        <el-input
+            v-model="queryParams.personName"
+            placeholder="请输入申请人姓名"
+            clearable
+            @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="所在医院" prop="hospital">
+        <el-select v-model="queryParams.hospital" placeholder="请选择所在医院" clearable>
+          <el-option
+              v-for="dict in hispitalList"
+              :key="dict.name"
+              :label="dict.name"
+              :value="dict.name"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="预计天数" prop="careDays">
+        <el-input
+            v-model="queryParams.careDays"
+            placeholder="请输入预计天数"
+            clearable
+            @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="申请日期" prop="applyDate">
+        <el-input
+            v-model="queryParams.applyDate"
+            placeholder="请输入申请日期"
+            clearable
+            @keyup.enter="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <el-table v-loading="loading" :data="applicationsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="申请人姓名" align="center" prop="personName" />
+      <el-table-column label="护理需求详情" align="center" prop="careNeeds" />
+      <el-table-column label="所在医院" align="center" prop="hospital" />
+      <el-table-column label="科室具体楼层房间床号" align="center" prop="address" />
+      <el-table-column label="预计天数" align="center" prop="careDays" />
+      <el-table-column label="申请日期" align="center" prop="applyDate" />
+      <el-table-column label="处理状态" align="center" prop="dealStatus" >
+        <template #default="scope">
+          <dict-tag :options="deal_status" :value="scope.row.dealStatus"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="168px">
+        <template #default="scope">
+          <el-button link type="primary" icon="Edit" @click="look(scope.row)" v-hasPermi="['care:applications:look']">查看</el-button>
+          <el-button link type="primary" icon="Edit" @click="clock(scope.row)" v-hasPermi="['care:applications:clock']">打卡</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+        v-show="total>0"
+        :total="total"
+        v-model:page="queryParams.pageNum"
+        v-model:limit="queryParams.pageSize"
+        @pagination="getList"
+    />
+  </div>
+
+  <el-dialog :title="title" v-model="open" width="500px" append-to-body>
+    <el-form ref="applicationsRef" :model="form" label-width="80px">
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="申请人" prop="personId">
+            <el-select v-model="form.personId" placeholder="请选择特困人员" disabled>
+              <el-option
+                  v-for="dict in personList"
+                  :key="dict.personId"
+                  :label="dict.name"
+                  :value="dict.personId"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="首选性别" prop="nurseGender">
+            <el-select v-model="form.nurseGender" placeholder="请选择首选护理人员性别" disabled>
+              <el-option
+                  v-for="dict in sys_user_sex"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+              ></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-form-item label="护理需求" prop="careNeeds">
+            <el-input v-model="form.careNeeds" type="textarea" placeholder="请输入详细护理需求" disabled />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="所在医院" prop="hospital">
+            <el-input v-model="form.hospital" type="textarea" placeholder="请输入详细护理需求" disabled />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="详细地址" prop="address">
+            <el-input v-model="form.address" placeholder="请输入科室具体楼层房间床号" disabled/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item label="预计天数" prop="careDays">
+            <el-input v-model="form.careDays" placeholder="请输入预计天数" disabled/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="申请日期" prop="applyDate">
+            <el-input v-model="form.applyDate" placeholder="请输入申请日期" disabled/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remark">
+            <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" disabled/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="24">
+          <el-form-item label="护理备注" prop="assignRemark">
+            <el-input v-model="form.assignRemark" type="textarea" placeholder="请输入内容" disabled/>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+  </el-dialog>
+
+  <el-dialog v-model="openClock" width="80%">
+    <component :is="currentComponent" v-bind="componentProps"></component>
+  </el-dialog>
+</template>
+
+<script setup name="WaitCheckApplications">
+import {
+  getApplications,
+  listApplications,
+} from "@/api/care/applications";
+import clockIndex from './index.vue';
+
+const { proxy } = getCurrentInstance();
+const {deal_status,sys_user_sex } = proxy.useDict('deal_status','sys_user_sex');
+
+const applicationsList = ref([]);
+const hispitalList=ref([]);
+const currentComponent = ref(null); // 使用 ref 来管理组件
+const componentProps = ref({});     // 使用 ref 来管理传递给组件的属性
+const personList=ref([]);
+const loading = ref(true);
+const showSearch = ref(true);
+const ids = ref([]);
+const single = ref(true);
+const multiple = ref(true);
+const title = ref("");
+const total=ref(0);
+const open=ref(false);
+const openClock=ref(false);
+const data = reactive({
+  form: {},
+  queryParams: {
+    pageNum: 1,
+    pageSize: 10,
+    personId: null,
+    personName: null,
+    careNeeds: null,
+    nurseGender: null,
+    hospital: null,
+    address: null,
+    careDays: null,
+    applyDate: null,
+    status: 'assigned',
+    dealStatus: null,
+    payStatus: null,
+    auditReason: null,
+  }
+});
+
+const { queryParams, form } = toRefs(data);
+
+/** 查询护理指派列表 */
+function getList(){
+  loading.value = true;
+  listApplications(queryParams.value).then(response => {
+    applicationsList.value = response.rows;
+    total.value = response.total;
+    loading.value = false;
+  });
+}
+// 取消按钮
+function cancel() {
+  open.value=false;
+}
+
+/** 搜索按钮操作 */
+function handleQuery() {
+  queryParams.value.pageNum = 1;
+  queryParams.value.pageNum = 1;
+  getList();
+}
+
+/** 重置按钮操作 */
+function resetQuery() {
+  proxy.resetForm("queryRef");
+  handleQuery();
+}
+
+// 多选框选中数据
+function handleSelectionChange(selection) {
+  ids.value = selection.map(item => item.applyId);
+  single.value = selection.length != 1;
+  multiple.value = !selection.length;
+}
+
+
+/** 导出按钮操作 */
+function handleExport() {
+  proxy.download('care/applications/export', {
+    ...queryParams.value
+  }, `applications_${new Date().getTime()}.xlsx`)
+}
+
+function handleSelectChange(value) {
+  // 找到选中的选项
+  const person =personList.value.find(option => option.personId === value);
+  if (person) {
+    form.value.personId=person.personId
+    form.value.personName=person.name
+  }
+}
+
+function look(row) {
+  const _applyId = row.applyId || ids.value
+  getApplications(_applyId).then(response => {
+    form.value = response.data;
+    open.value = true;
+    title.value = "查看";
+  });
+}
+
+function clock(row){
+  const _applyId = row.applyId || ids.value
+  // 设置要加载的组件
+  currentComponent.value = clockIndex;
+
+  // 设置传递给组件的属性
+  componentProps.value = {
+    applyId: _applyId,
+    // 其他需要传递的属性可以在这里添加
+  };
+  openClock.value=true
+}
+getList();
+
+</script>