添加h5入住护理单元功能
This commit is contained in:
parent
8118cc5639
commit
60bbc359db
|
@ -5,7 +5,12 @@
|
|||
<p>机构名称:{{formData.sysOrgCodeName}}</p>
|
||||
<p>入住类型:{{formData.advisoryTypeName}}</p>
|
||||
<p>联系电话:{{formData.tel}}</p>
|
||||
<p>审核状态:{{formData.statusName}}</p>
|
||||
<p v-if="formData.oldManName">老人姓名:{{formData.oldManName}}</p>
|
||||
<p v-if="formData.oldManAge">老人年龄:{{formData.oldManAge}}</p>
|
||||
<p v-if="formData.oldManSex">老人性别:{{formData.oldManSexName}}</p>
|
||||
<p v-if="formData.medicalInsuranceType">医保类型:{{formData.medicalInsuranceTypeName}}</p>
|
||||
<p v-if="formData.reimbType">报销类型:{{formData.reimbTypeName}}</p>
|
||||
<p v-if="formData.statusName">审核状态:{{formData.statusName}}</p>
|
||||
<p>
|
||||
<a-button type="primary" @click="handleEdit">修改信息</a-button>
|
||||
<a-button type="primary" style="margin-left: 10px;">办理入住</a-button>
|
||||
|
@ -87,7 +92,8 @@
|
|||
}
|
||||
.advisoryClass{
|
||||
background-image: url(/@/assets/images/advisory.jpg);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover; /* 确保图片覆盖整个元素 */
|
||||
background-position: center; /* 将图片居中显示 */
|
||||
min-height: 100vh; /* 确保至少为视口高度 */
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -35,6 +35,33 @@
|
|||
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<div v-if="formData.advisoryType == '1'">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="老人姓名" v-bind="validateInfos.oldManName" id="NuBizAdvisoryInfoForm-oldManName" name="oldManName">
|
||||
<a-input v-model:value="formData.oldManName" placeholder="请输入老人姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="老人年龄" v-bind="validateInfos.oldManAge" id="NuBizAdvisoryInfoForm-oldManAge" name="oldManAge">
|
||||
<a-input v-model:value="formData.oldManAge" placeholder="请输入老人年龄" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="医保类型" v-bind="validateInfos.medicalInsuranceType" id="NuBizAdvisoryInfoForm-medicalInsuranceType" name="medicalInsuranceType">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.medicalInsuranceType" dictCode="medical_insurance_type" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="老人性别" v-bind="validateInfos.oldManSex" id="NuBizAdvisoryInfoForm-oldManSex" name="oldManSex">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.oldManSex" dictCode="sex" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="报销类型" v-bind="validateInfos.reimbType" id="NuBizAdvisoryInfoForm-reimbType" name="reimbType">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.reimbType" dictCode="reimb_type" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</div>
|
||||
<a-col :span="24" style="text-align: center;">
|
||||
<a-button type="primary" @click="handleSubmit()">提交</a-button>
|
||||
</a-col>
|
||||
|
@ -139,6 +166,14 @@
|
|||
model.wechatName = wechatName.value;
|
||||
model.status = '1';//强制在提交时把status置为1 审核中
|
||||
console.log('model--->',model);
|
||||
|
||||
if(model.advisoryType == '1'){
|
||||
if(!model.oldManName){
|
||||
|
||||
return createMessage.error("老人姓名不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
const serverUrl = formData.serverUrl;
|
||||
axios.post(serverUrl+"/h5Api/nuBizAdvisoryInfo/edit",model).then(response => {
|
||||
var data = response.data;
|
||||
|
@ -185,7 +220,8 @@
|
|||
}
|
||||
.advisoryClass{
|
||||
background-image: url(/@/assets/images/advisory.jpg);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover; /* 确保图片覆盖整个元素 */
|
||||
background-position: center; /* 将图片居中显示 */
|
||||
min-height: 100vh; /* 确保至少为视口高度 */
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -35,6 +35,41 @@
|
|||
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.advisoryType == '1'">
|
||||
<a-form-item label="老人姓名" v-bind="validateInfos.oldManName" id="NuBizAdvisoryInfoForm-oldManName" name="oldManName">
|
||||
<a-input v-model:value="formData.oldManName" placeholder="请输入老人姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.advisoryType == '1'">
|
||||
<a-form-item label="老人年龄" v-bind="validateInfos.oldManAge" id="NuBizAdvisoryInfoForm-oldManAge" name="oldManAge">
|
||||
<a-input v-model:value="formData.oldManAge" placeholder="请输入老人年龄" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.advisoryType == '1'">
|
||||
<a-form-item label="入住单元" v-bind="validateInfos.nuId" id="NuBizAdvisoryInfoForm-nuId" name="nuId">
|
||||
<a-input-group compact>
|
||||
<a-input v-model:value="formData.nuName" placeholder="选择入住单元" readonly style="width: calc(100% - 65px)" />
|
||||
<a-button type="primary" @click="handleCheckNu">选择</a-button>
|
||||
</a-input-group>
|
||||
<a-input v-model:value="formData.nuId" placeholder="入住单元名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.advisoryType == '1'">
|
||||
<a-form-item label="医保类型" v-bind="validateInfos.medicalInsuranceType" id="NuBizAdvisoryInfoForm-medicalInsuranceType" name="medicalInsuranceType">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.medicalInsuranceType" dictCode="medical_insurance_type" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.advisoryType == '1'">
|
||||
<a-form-item label="老人性别" v-bind="validateInfos.oldManSex" id="NuBizAdvisoryInfoForm-oldManSex" name="oldManSex">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.oldManSex" dictCode="sex" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.advisoryType == '1'">
|
||||
<a-form-item label="报销类型" v-bind="validateInfos.reimbType" id="NuBizAdvisoryInfoForm-reimbType" name="reimbType">
|
||||
<j-dict-select-tag type='radio' v-model:value="formData.reimbType" dictCode="reimb_type" placeholder="请选择性别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" style="text-align: center;">
|
||||
<a-button type="primary" @click="handleSubmit()">提交</a-button>
|
||||
</a-col>
|
||||
|
@ -42,6 +77,7 @@
|
|||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
<CheckNuListModal ref="checkNuListModal" @success="handleCheckNuOk" />
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
|
@ -56,6 +92,9 @@
|
|||
import { useGlobSetting } from "/@/hooks/setting";
|
||||
import { useRouter } from 'vue-router'
|
||||
import axios from 'axios';
|
||||
import CheckNuListModal from '/@/views/biz/NuBizAdvisoryInfo/h5/components/CheckNuListModal.vue';
|
||||
|
||||
|
||||
|
||||
const router = useRouter();
|
||||
const props = defineProps({
|
||||
|
@ -64,6 +103,7 @@
|
|||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const checkNuListModal = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const glob = useGlobSetting()
|
||||
|
@ -73,15 +113,17 @@
|
|||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
name: '',
|
||||
sex: '1',
|
||||
sex: '',
|
||||
sysOrgCode: '',
|
||||
tel: '',
|
||||
advisoryType: '1',
|
||||
status: '1',
|
||||
advisoryType: '',
|
||||
status: '',
|
||||
content: '',
|
||||
serverUrl: '',
|
||||
openId: '',
|
||||
wechatName: '',
|
||||
nuId: '',
|
||||
nuName: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
|
@ -108,6 +150,26 @@
|
|||
console.log('formData--->',formData);
|
||||
}
|
||||
|
||||
//选择入住单元
|
||||
function handleCheckNu(){
|
||||
var serverUrl = formData.serverUrl;
|
||||
if(!serverUrl){
|
||||
createMessage.error('请先选择入住机构!');
|
||||
return;
|
||||
}
|
||||
checkNuListModal.value.disableSubmit = true;
|
||||
console.log("🚀 ~ handleCheckNu ~ serverUrl:", serverUrl)
|
||||
checkNuListModal.value.edit({serverUrl});
|
||||
}
|
||||
|
||||
//选择入住单元后的回显
|
||||
function handleCheckNuOk(record){
|
||||
console.log("🚀 ~ handleCheckNuOk ~ record:", record)
|
||||
formData.nuId = record.nuId;
|
||||
formData.nuName = record.nuName;
|
||||
|
||||
}
|
||||
|
||||
//提交信息
|
||||
async function handleSubmit() {
|
||||
try {
|
||||
|
@ -139,6 +201,14 @@
|
|||
model.wechatName = wechatName.value;
|
||||
model.status = '1';//强制在提交时把status置为1 审核中
|
||||
console.log('model--->',model);
|
||||
|
||||
if(model.advisoryType == '1'){
|
||||
if(!model.oldManName){
|
||||
|
||||
return createMessage.error("老人姓名不能为空");
|
||||
}
|
||||
}
|
||||
|
||||
const serverUrl = formData.serverUrl;
|
||||
axios.post(serverUrl+"/h5Api/nuBizAdvisoryInfo/add",model).then(response => {
|
||||
var data = response.data;
|
||||
|
@ -188,7 +258,8 @@
|
|||
}
|
||||
.advisoryClass{
|
||||
background-image: url(/@/assets/images/advisory.jpg);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-size: cover; /* 确保图片覆盖整个元素 */
|
||||
background-position: center; /* 将图片居中显示 */
|
||||
min-height: 100vh; /* 确保至少为视口高度 */
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,70 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-for="(item, index) in nulistSource" :key="index" style="padding: 4px">
|
||||
<a-card :title="index+1 +'、'+ item.nuName" style="width: 100%">
|
||||
<template #extra><a @click="handleCheckNu(item)">选择</a></template>
|
||||
</a-card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import axios from 'axios';
|
||||
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const nulistSource = ref([]);
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
var serverUrl = record.serverUrl;
|
||||
const getNulistUrl = serverUrl+"/h5Api/nuBaseInfo/list";
|
||||
console.log("🚀 ~ edit ~ getNulistUrl:", getNulistUrl)
|
||||
axios.get(getNulistUrl).then(response => {
|
||||
console.log("🚀 ~ axios.get ~ response:", response)
|
||||
var data = response.data;
|
||||
nulistSource.value = data.result;
|
||||
console.log("🚀 ~ axios.get ~ nulistSource:", nulistSource)
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
emit('ok',{nuId:'1',nuName:'单元'});
|
||||
}
|
||||
|
||||
function handleCheckNu(record) {
|
||||
console.log("🚀 ~ handleCheckNu ~ record:", record)
|
||||
emit('ok',{nuId:record.id,nuName:record.nuName});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<CheckNuListForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></CheckNuListForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import CheckNuListForm from './CheckNuListForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '选择入住单元';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(record) {
|
||||
handleCancel();
|
||||
emit('success',record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
Loading…
Reference in New Issue