generated from Leo_Ding/web-template
服务对象联系人
This commit is contained in:
parent
1eaf10502b
commit
feafdaa230
@ -12,5 +12,11 @@ export const createItem = (params) => request.basic.post('/api/v1/concats', para
|
||||
export const updateItem = (params) => request.basic.put(`/api/v1/concats/${params.id}`, params)
|
||||
// 删除数据
|
||||
export const delItem = (id) => request.basic.delete(`/api/v1/concats/${id}`)
|
||||
// 获取项目列表
|
||||
export const getInOutList = (params) => request.basic.get('/api/v1/in-out-logs', params)
|
||||
|
||||
// 获取残疾人信息
|
||||
export const getInfo = (params) => request.basic.get(`/api/v1/disabled-people/${params.id}`)
|
||||
// 更新残疾人信息
|
||||
export const updateInfo = (params) => request.basic.put(`/api/v1/disabled-people/${params.id}`, params)
|
||||
|
||||
|
||||
@ -118,6 +118,7 @@ const loadData = async (selectedOptions) => {
|
||||
|
||||
// 📣 处理选择变化
|
||||
const handleChange = (value, selectedOptions) => {
|
||||
console.log(value)
|
||||
emit('change', value, selectedOptions?.map(opt => opt.label) || []);
|
||||
};
|
||||
defineExpose({initData})
|
||||
|
||||
@ -78,4 +78,6 @@ export default {
|
||||
operatorMgt:'话务员管理',
|
||||
operator:'话务员列表',
|
||||
contacts:'联系人管理',
|
||||
YunYingserviceStaff:'服务人员管理',
|
||||
YunYingserviceStaffList:'服务人员'
|
||||
}
|
||||
|
||||
@ -2,8 +2,8 @@ import { DollarOutlined } from '@ant-design/icons-vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: 'serviceStaffyuying',
|
||||
name: 'serviceStaffyuying',
|
||||
path: 'YunYingserviceStaff',
|
||||
name: 'YunYingserviceStaff',
|
||||
component: 'RouteViewLayout',
|
||||
meta: {
|
||||
icon: DollarOutlined,
|
||||
@ -14,9 +14,9 @@ export default [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'serviceStaffList',
|
||||
name: 'serviceStaffList',
|
||||
component: 'serviceStaff/serviceStaffList/index.vue',
|
||||
path: 'YunYingserviceStaffList',
|
||||
name: 'YunYingserviceStaffList',
|
||||
component: 'YunYingserviceStaff/YunYingserviceStaffList/index.vue',
|
||||
meta: {
|
||||
title: '服务人员',
|
||||
isMenu: true,
|
||||
|
||||
@ -0,0 +1,220 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-row :gutter="20">
|
||||
<!-- 基本信息 -->
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">服务对象姓名姓名:</span> {{ formData.name || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">性别:</span> {{ formData.gender || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">出生日期:</span> {{ formData.birthDate || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">关爱巡访电话:</span> {{ formData.careVisitPhone || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">联系方式:</span> {{ formData.contact1 || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">其他电话1:</span> {{ formData.otherPhone1 || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">其他电话2:</span> {{ formData.otherPhone2 || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">联系状态:</span> {{ formData.contactStatus || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">社保卡号:</span> {{ formData.socialSecurityCardNumber || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">证件类型:</span> {{ formData.identityType || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">证件号码:</span> {{ formData.idNumber || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<div >
|
||||
<span class="label">家庭地址:</span>
|
||||
{{ formatArea(formData.homeAreaLabels) }} {{ formData.homeDetailAddress || '' }}
|
||||
<span v-if="formData.lag && formData.lat" style="color: #999;">
|
||||
(经度: {{ formData.lag }}, 纬度: {{ formData.lat }})
|
||||
</span>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">护理等级:</span> {{ formData.nursingLevel || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">健康状况:</span> {{ formData.healthStatus || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">生存状态:</span> {{ formData.survivalStatus || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">服务状态:</span> {{ formData.serviceStatus || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">服务形式:</span> {{ formData.serviceForm || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div >
|
||||
<span class="label">户籍地址:</span>
|
||||
{{ formatArea(formData.houseAreaLabels) }} {{ formData.householdDetailAddress || '' }}
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<!-- 政府购买服务时间 -->
|
||||
<a-col :span="8">
|
||||
<div >
|
||||
<span class="label">政府购买服务开始时间(起):</span>
|
||||
{{ formatDate(formData.governmentPurchasedServiceStartDateStart) }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div >
|
||||
<span class="label">政府购买服务开始时间(止):</span>
|
||||
{{ formatDate(formData.governmentPurchasedServiceStartDateEnd) }}
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<!-- 其他字段 -->
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">居住情况:</span> {{ formData.livingSituation || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">子女情况:</span> {{ formData.childrenSituation || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">统计分类:</span> {{ formData.statisticsCategory || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">智力情况:</span> {{ formData.intellectualSituation || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div >
|
||||
<span class="label">长期照料失能子女:</span>
|
||||
{{ formData.longTermCareForDisabledChildren === 'true' ? '是' : formData.longTermCareForDisabledChildren === 'false' ? '否' : '-' }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">子女探望情况:</span> {{ formData.childrenVisitStatus || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div >
|
||||
<span class="label">人户分离:</span>
|
||||
{{ formData.householdResidenceSeparation === 'true' ? '是' : formData.householdResidenceSeparation === 'false' ? '否' : '-' }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">民族:</span> {{ formData.ethnicity || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div >
|
||||
<span class="label">完成能力评估:</span>
|
||||
{{ formData.completedCapacityAssessment === 'true' ? '是' : formData.completedCapacityAssessment === 'false' ? '否' : '-' }}
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div >
|
||||
<span class="label">住出租屋/地下室:</span>
|
||||
{{ formData.livesInRentedRoomOrBasement === 'true' ? '是' : formData.livesInRentedRoomOrBasement === 'false' ? '否' : '-' }}
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">经济来源:</span> {{ formData.economicSource || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">文化程度:</span> {{ formData.educationLevel || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">宗教信仰:</span> {{ formData.religion || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">职业情况:</span> {{ formData.occupation || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">政治面貌:</span> {{ formData.politicalAffiliation || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div ><span class="label">婚姻情况:</span> {{ formData.maritalStatus || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<!-- 数组类字段 -->
|
||||
<a-col :span="24" v-if="formData.idCardPhotos && formData.idCardPhotos.length > 0">
|
||||
<div >
|
||||
<span class="label">身份证照片:</span>
|
||||
<div style="margin-top: 8px;">
|
||||
<a-image
|
||||
v-for="(url, index) in formData.idCardPhotos"
|
||||
:key="index"
|
||||
:src="url"
|
||||
fit="cover"
|
||||
style="width: 100px; height: 60px; margin-right: 8px;"
|
||||
:preview-src-list="formData.idCardPhotos"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps } from 'vue';
|
||||
|
||||
const formData=ref({});
|
||||
|
||||
// 格式化地址数组
|
||||
const formatArea = (areaArray) => {
|
||||
if (!areaArray || !Array.isArray(areaArray)) return '-';
|
||||
return areaArray.filter(item => item).join(' / ');
|
||||
};
|
||||
|
||||
// 格式化时间
|
||||
const formatDate = (date) => {
|
||||
if (!date) return '-';
|
||||
return new Date(date).toLocaleDateString();
|
||||
};
|
||||
|
||||
// 打开文件链接
|
||||
const openFile = (url) => {
|
||||
window.open(url, '_blank');
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.customer-detail {
|
||||
padding: 20px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.field-item {
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: inline-block;
|
||||
line-height: 45px;
|
||||
}
|
||||
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:deep(.el-tag) {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,384 @@
|
||||
<template>
|
||||
<a-modal :open="modal.open" :title="modal.title" :width="800" :confirm-loading="modal.confirmLoading"
|
||||
:after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel">
|
||||
<a-card>
|
||||
<a-form ref="formRef" :model="formData" :rules="formRules">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-item label="所属服务站点" name="stationId">
|
||||
<a-select v-model:value="formData.stationId" allowClear>
|
||||
<a-select-option v-for="item in stationList" :key="item.id" :value="item.id">{{
|
||||
item.name }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="服务人员姓名" name="name">
|
||||
<a-input v-model:value="formData.name" placeholder="请输入姓名" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号" name="idCard">
|
||||
<a-input v-model:value="formData.idCard" placeholder="请输入证件号码"
|
||||
@change="extractBirthDateFromIdCard" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="出生日期" name="birthDate2">
|
||||
<a-input v-model:value="formData.birthDate2" placeholder="根据身份证号码自动识别" disabled />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 性别 -->
|
||||
<a-col :span="12">
|
||||
<a-form-item label="性别" name="gender">
|
||||
<a-radio-group v-model:value="formData.gender">
|
||||
<a-radio value="1">男</a-radio>
|
||||
<a-radio value="2">女</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="状态" name="status">
|
||||
<a-radio-group v-model:value="formData.status">
|
||||
<a-radio v-for="item in dicsStore.dictOptions.STAFF_STATUS" :key="item.dval" :value="item.dval">{{ item.introduction }}</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 证件号码 -->
|
||||
|
||||
<a-col :span="12">
|
||||
<a-form-item label="电话" name="phone">
|
||||
<a-input v-model:value="formData.phone" placeholder="请输入电话" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="12">
|
||||
<a-form-item label="护理人员类型" name="serviceType">
|
||||
<a-select v-model:value="formData.serviceType" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.STAFF_TYPE" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资格证照名称" name="qualificationName">
|
||||
<a-input v-model:value="formData.qualificationName" placeholder="请输入资格证照名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资格证照等级" name="qualificationLV">
|
||||
<a-select v-model:value="formData.qualificationLV" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.QUA_LV" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="参保情况" name="insuranceStatus">
|
||||
<a-select v-model:value="formData.insuranceStatus" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.INSURANCE_STATUS" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="学历" name="education">
|
||||
<a-select v-model:value="formData.education" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.Level_Education" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="用工形式" name="workType">
|
||||
<a-select v-model:value="formData.workType" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.USE_TYPE" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="负责区域" name="sAreaCodes">
|
||||
<AreaCascader v-model:value="formData.sAreaCodes" @change="onAreaChange"
|
||||
ref="areaCascaderRef" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="提成比例" name="commissionRate">
|
||||
<a-input-number v-model:value="formData.commissionRate" placeholder="请输入提成比例">
|
||||
<template #addonAfter>
|
||||
<span>%</span>
|
||||
</template>
|
||||
</a-input-number>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="入职日期" name="joinAt">
|
||||
<a-date-picker v-model:value="formData.joinAt" placeholder="请选择入职日期" style="width: 100%;" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资格证照注册号" name="qualificationNo">
|
||||
<a-input v-model:value="formData.qualificationNo" placeholder="请输入资格证照注册号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="劳动合同期限" name="laborContract">
|
||||
<a-range-picker v-model:value="formData.laborContract" placeholder="请选择劳动合同期限" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="星级评价等级" name="starLv">
|
||||
<a-select v-model:value="formData.starLv" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.START_LV" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开户行名称" name="bankName">
|
||||
<a-input v-model:value="formData.bankName" placeholder="请输入开户行名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡号" name="bankNo">
|
||||
<a-input v-model:value="formData.bankNo" placeholder="请输入银行卡号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="补贴类型" name="subsidyType">
|
||||
<a-select v-model:value="formData.subsidyType" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.SUBSIDY_TYPE" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="家庭地址" name="areaCodes">
|
||||
<AreaCascader v-model:value="formData.areaCodes" @change="onAreaChange2" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="家庭详细地址" name="address">
|
||||
<a-input v-model:value="formData.address" placeholder="请输入家庭详细地址"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="备注" name="remark">
|
||||
<a-textarea v-model:value="formData.remark" placeholder="请输入备注" :rows="4"></a-textarea>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="证件照片" name="imgs">
|
||||
<gx-upload v-model="formData.imgs" :fileNumber="1" accept-types=".jpg,.png,.webp" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="附件" name="attachments">
|
||||
<UploadInput v-model="formData.attachments"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-card>
|
||||
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { ref, nextTick } from 'vue'
|
||||
import { config } from '@/config'
|
||||
import apis from '@/apis'
|
||||
import { useForm, useModal } from '@/hooks'
|
||||
import { useDicsStore } from '@/store'
|
||||
import AreaCascader from '@/components/AreaCascader/index.vue'
|
||||
import NodeTree from '@/components/NodeTree/index.vue'
|
||||
import dayjs from 'dayjs'
|
||||
import { getBirthDate, spliceUrl } from '@/utils/util'
|
||||
import { validatePhone, validateEmail, validateIdCard } from '@/utils/validate'
|
||||
import storage from '@/utils/storage'
|
||||
import UploadInput from '@/components/Upload/UploadInput.vue'
|
||||
const emit = defineEmits(['ok'])
|
||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||
const { formRecord, formData, formRef, formRules, resetForm } = useForm()
|
||||
const cancelText = ref('取消')
|
||||
const dicsStore = useDicsStore()
|
||||
const stationList = ref([])
|
||||
const areaCascaderRef = ref()
|
||||
formRules.value = {
|
||||
stationId: [{ required: true, message: '请选择服务组织', trigger: ['blur', 'change'] }],
|
||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||
idCard: [{ validator: validateIdCard, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
|
||||
phone: [{ validator: validatePhone, trigger: ['blur', 'input'] }, { required: true, message: '请输入联系方式', trigger: 'blur' }],
|
||||
serviceType: [{ required: true, message: '请选择护理人员类型', trigger: ['blur', 'change'] }],
|
||||
insuranceStatus: [{ required: true, message: '请选择参保情况', trigger: ['blur', 'change'] }],
|
||||
}
|
||||
/**
|
||||
* 新建
|
||||
*/
|
||||
function handleCreate() {
|
||||
formData.value.gender = '1'
|
||||
formData.value.status = '1'
|
||||
formData.value.companyId = storage.local.getItem('companyId')
|
||||
formData.value.stationId = storage.local.getItem('stationId')
|
||||
showModal({
|
||||
type: 'create',
|
||||
title: '新增服务人员',
|
||||
})
|
||||
}
|
||||
getStationList()
|
||||
async function getStationList() {
|
||||
try {
|
||||
showLoading()
|
||||
const { success, data, total } = await apis.serviceMenu
|
||||
.getServiceSiteList({
|
||||
pageSize: 100,
|
||||
current: 1,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
hideLoading()
|
||||
if (config('http.code.success') === success) {
|
||||
//筛选type的值80对应about
|
||||
stationList.value = data.map(item => ({ id: item.id, name: item.name }))
|
||||
console.log(stationList.value)
|
||||
}
|
||||
} catch (error) {
|
||||
hideLoading()
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
async function handleEdit(record = {}) {
|
||||
try {
|
||||
showModal({
|
||||
type: 'edit',
|
||||
title: '编辑项',
|
||||
})
|
||||
const { data, success } = await apis.serviceStaffList.getItem(record.id).catch()
|
||||
if (!success) {
|
||||
hideModal()
|
||||
return
|
||||
}
|
||||
formData.value = data
|
||||
if (formData.value.joinAt) {
|
||||
formData.value.joinAt = dayjs(formData.value.joinAt)
|
||||
}
|
||||
if (formData.value.laborContractStartAt && formData.value.laborContractEndAt) {
|
||||
formData.value.laborContract = [dayjs(formData.value.laborContractStartAt), dayjs(formData.value.laborContractEndAt)]
|
||||
}
|
||||
formData.value.imgs = (data.imgs && data.imgs.length > 0) ? data.imgs.map(item => config('http.apiUpload') + item) : []
|
||||
formData.value.attachments = (data.attachments && data.attachments.length > 0) ? data.attachments.map(item => config('http.apiUpload') + item) : []
|
||||
formData.value.commissionRate = formData.value.commissionRate ?? formData.value.commissionRate * 100
|
||||
formData.value.birthDate2 = dayjs(data.birthDay).format('YYYY-DD-MM')
|
||||
nextTick(() => {
|
||||
areaCascaderRef.value.initData(data.sAreaCodes||[])
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 确定
|
||||
*/
|
||||
function handleOk() {
|
||||
formRef.value
|
||||
.validateFields()
|
||||
.then(async (values) => {
|
||||
try {
|
||||
showLoading()
|
||||
let params = {
|
||||
...formData.value,
|
||||
birthDay: formData.value.birthDate2
|
||||
}
|
||||
|
||||
if (formData.value.laborContract && formData.value.laborContract.length > 0) {
|
||||
params.laborContractStartAt = formData.value.laborContract[0]
|
||||
params.laborContractEndAt = formData.value.laborContract[1]
|
||||
}
|
||||
console.log(formData.value.imgs)
|
||||
params.imgs = (formData.value.imgs && formData.value.imgs.length) > 0 ? formData.value.imgs.map(item => spliceUrl(item)) : []
|
||||
params.attachments = (formData.value.attachments && formData.value.attachments.length) > 0 ? formData.value.attachments.map(item => spliceUrl(item)) : []
|
||||
params.commissionRate = formData.value.commissionRate ?? formData.value.commissionRate / 100
|
||||
console.log(params)
|
||||
let result = null
|
||||
switch (modal.value.type) {
|
||||
case 'create':
|
||||
result = await apis.serviceStaffList.createItem(params).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
break
|
||||
case 'edit':
|
||||
result = await apis.serviceStaffList.updateItem(params).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
break
|
||||
}
|
||||
hideLoading()
|
||||
if (config('http.code.success') === true) {
|
||||
hideModal()
|
||||
emit('ok')
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error.message)
|
||||
hideLoading()
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
// 提取出生日期方法
|
||||
const extractBirthDateFromIdCard = () => {
|
||||
console.log(111)
|
||||
const { idCard } = formData.value;
|
||||
if (!idCard) {
|
||||
formData.value.birthDate = '';
|
||||
return;
|
||||
}
|
||||
console.log(getBirthDate(idCard))
|
||||
formData.value.birthDate2 = getBirthDate(idCard)
|
||||
formData.value.birthDate = new Date(getBirthDate(idCard));
|
||||
}
|
||||
function onAreaChange(value, labels) {
|
||||
formData.value.sAreaLabels = [...labels]
|
||||
}
|
||||
function onAreaChange2(value, labels) {
|
||||
formData.value.areaLabels = [...labels]
|
||||
}
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
function handleCancel() {
|
||||
hideModal()
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭后
|
||||
*/
|
||||
function onAfterClose() {
|
||||
resetForm()
|
||||
hideLoading()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleEdit,
|
||||
handleCreate,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<a-modal :open="modal.open" :title="modal.title" :width="1000" :confirm-loading="modal.confirmLoading"
|
||||
:after-close="onAfterClose" :cancel-text="cancelText" @ok="handleOk" @cancel="handleCancel">
|
||||
<a-card class="">
|
||||
<div style="display: flex;justify-content: space-around;">
|
||||
<div
|
||||
style="width:250px;margin-top: 20px;border-right: 1px solid #f0f0f0;display: flex;flex-direction: column;align-items: center;">
|
||||
<gx-upload v-model="formData.imgList" accept-types=".jpg,.png,.webp" :fileNumber="1" />
|
||||
<div>
|
||||
<p>姓名:{{ formData.name }}</p>
|
||||
<p>性别:{{ formData.gender == 1 ? '男' : '女' }}</p>
|
||||
<p>身份证号:{{ formData.idCard }}</p>
|
||||
<p>手机号:{{ formData.phone }}</p>
|
||||
<p>状态: <a-tag>{{ dicsStore.getDictLabel('STAFF_STATUS', formData.status) }}</a-tag></p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: calc(100% - 200px);padding: 20px;">
|
||||
<a-row :gutter="20">
|
||||
<a-col :span="8">
|
||||
<div><span class="label">出生日期:</span> {{ formData.birthday || '-' }}</div>
|
||||
</a-col>
|
||||
<!-- 基本信息 -->
|
||||
<a-col :span="8">
|
||||
<div><span class="label">参保情况:</span> {{ dicsStore.getDictLabel('INSURANCE_STATUS',
|
||||
formData.insuranceStatus) || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div><span class="label">学历:</span> {{ dicsStore.getDictLabel('Level_Education',
|
||||
formData.education) || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div><span class="label">护理人员类型:</span> {{
|
||||
dicsStore.getDictLabel('STAFF_TYPE', formData.serviceType) }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div><span class="label">用工形式:</span> {{ dicsStore.getDictLabel('USE_TYPE',
|
||||
formData.workType) || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
|
||||
<a-col :span="8">
|
||||
<div><span class="label">提成比例:</span> {{ formData.commissionRate + '%' || '-' }}</div>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="8">
|
||||
<div><span class="label">入职日期:</span> {{ dayjs(formData.joinAt).format('YYYY-MM-DD') || '-'
|
||||
}}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div><span class="label">资格证照名称:</span> {{ formData.qualificationName || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div><span class="label">资格证照等级:</span> {{ dicsStore.getDictLabel('QUA_LV',
|
||||
formData.qualificationLV) || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div><span class="label">银行卡号:</span> {{ formData.bankNo || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div><span class="label">开户行名称:</span> {{ formData.bankName || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<div><span class="label">补贴类型:</span> {{ dicsStore.getDictLabel('SUBSIDY_TYPE',
|
||||
formData.subsidyType) || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div><span class="label">负责区域:</span> {{ formData.sAreaLabels ?
|
||||
formData.sAreaLabels.join('/')
|
||||
: '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div><span class="label">家庭住址:</span> {{ formData.areaLabels ? formData.areaLabels.join('/')
|
||||
:
|
||||
'-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div><span class="label">备注:</span> {{ formData.remark || '-' }}</div>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<div>
|
||||
<span class="label">附件:</span>
|
||||
<div>
|
||||
<a v-for="value in formData.attachments" :key="value" :href="value"
|
||||
target="_blank">{{ value }}</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import GxUpload from '@/components/GxUpload/index.vue'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import { ref, computed, defineAsyncComponent, defineExpose, getCurrentInstance, nextTick } from 'vue'
|
||||
import { config } from '@/config'
|
||||
import apis from '@/apis'
|
||||
import { useForm, useModal } from '@/hooks'
|
||||
import dayjs from 'dayjs'
|
||||
import { useDicsStore } from '@/store'
|
||||
const emit = defineEmits(['ok'])
|
||||
const activeKey = ref('1')
|
||||
const dicsStore = useDicsStore()
|
||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||
const { formRecord, formData, formRef, formRules, resetForm } = useForm()
|
||||
const cancelText = ref('取消')
|
||||
const imgList = ref([])
|
||||
|
||||
// 兼容 setup 中使用 $refs
|
||||
const { proxy } = getCurrentInstance();
|
||||
/**
|
||||
* 新建
|
||||
*/
|
||||
function handleCreate() {
|
||||
showModal({
|
||||
type: 'create',
|
||||
title: '服务人员详情',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
async function handleEdit(record = {}) {
|
||||
showModal({
|
||||
type: 'edit',
|
||||
title: '服务人员详情',
|
||||
})
|
||||
const { data, success } = await apis.serviceStaffList.getItem(record.id).catch()
|
||||
if (!success) {
|
||||
hideModal()
|
||||
return
|
||||
}
|
||||
formData.value = data
|
||||
formData.value.imgList = data.imgs ? data.imgs.map(item => config('http.apiUpload') + item) : []
|
||||
formData.value.attachments = (data.attachments && data.attachments.length > 0) ? data.attachments.map(item => config('http.apiUpload') + item) : []
|
||||
}
|
||||
const callback = (val) => {
|
||||
console.log(val);
|
||||
};
|
||||
/**
|
||||
* 确定
|
||||
*/
|
||||
function handleOk() {
|
||||
formRef.value
|
||||
.validateFields()
|
||||
.then(async (values) => {
|
||||
try {
|
||||
showLoading()
|
||||
const params = {
|
||||
...formData.value,
|
||||
}
|
||||
let result = null
|
||||
switch (modal.value.type) {
|
||||
case 'create':
|
||||
result = await apis.serverObj.createItem(params).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
break
|
||||
case 'edit':
|
||||
result = await apis.serverObj.updateItem(params).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
break
|
||||
}
|
||||
hideLoading()
|
||||
if (config('http.code.success') === result?.code) {
|
||||
hideModal()
|
||||
emit('ok')
|
||||
}
|
||||
} catch (error) {
|
||||
hideLoading()
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
hideLoading()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消
|
||||
*/
|
||||
function handleCancel() {
|
||||
hideModal()
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭后
|
||||
*/
|
||||
function onAfterClose() {
|
||||
// resetForm()
|
||||
formData.value = {}
|
||||
hideLoading()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
handleCreate,
|
||||
handleEdit,
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.customer-detail {
|
||||
padding: 20px;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.field-item {
|
||||
margin-bottom: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.label {
|
||||
display: inline-block;
|
||||
line-height: 45px;
|
||||
}
|
||||
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:deep(.el-tag) {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
336
src/views/YunYingserviceStaff/YunYingserviceStaffList/index.vue
Normal file
336
src/views/YunYingserviceStaff/YunYingserviceStaffList/index.vue
Normal file
@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<x-search-bar class="mb-8-2">
|
||||
<template #default="{ gutter, colSpan }">
|
||||
<a-form :model="searchFormData" layout="inline" labelAlign="left">
|
||||
<a-row :gutter="[24, 24]">
|
||||
<!-- 所在区域 -->
|
||||
<a-col :span="8" v-if="platForm !== 'yunying'">
|
||||
<a-form-item label="所属服务组织" name="station">
|
||||
<node-tree v-model:value="searchFormData.station" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 姓名 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item label="姓名" name="name">
|
||||
<a-input v-model:value="searchFormData.name" placeholder="请输入姓名" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<!-- 身份证号 -->
|
||||
<a-col :span="8">
|
||||
<a-form-item label="联系电话" name="phone">
|
||||
<a-input v-model:value="searchFormData.phone" placeholder="请输入联系电话" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="护理人员类型" name="serviceType">
|
||||
<a-select v-model:value="searchFormData.serviceType" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.STAFF_TYPE" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="护理人员状态" name="status">
|
||||
<a-select v-model:value="searchFormData.status" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.STAFF_STATUS" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="用工形式" name="workType">
|
||||
<a-select v-model:value="searchFormData.workType" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.USE_TYPE" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 操作按钮 -->
|
||||
<a-col class="align-right" :span="24">
|
||||
<a-space>
|
||||
<a-button @click="handleResetSearch">{{ $t('button.reset') }}</a-button>
|
||||
<a-button ghost type="primary" @click="handleSearch">
|
||||
{{ $t('button.search') }}
|
||||
</a-button>
|
||||
</a-space>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</x-search-bar>
|
||||
<a-row :gutter="8" :wrap="false">
|
||||
<a-col flex="auto">
|
||||
<a-card title="服务人员列表">
|
||||
<template #extra>
|
||||
<a-space>
|
||||
<a-button type="primary" @click="$refs.editDialogRef.handleCreate(record)">新建</a-button>
|
||||
<a-button type="primary">导出</a-button>
|
||||
<a-button type="dashed">导出记录</a-button>
|
||||
</a-space>
|
||||
</template>
|
||||
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||
:pagination="paginationState" :scroll="{ x: 'max-content' }" @change="onTableChange">
|
||||
<template #bodyCell="{ index, column, record }">
|
||||
<template v-if="column.key === 'serialNumber'">
|
||||
<span>{{ index + 1 }}</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'workType'">
|
||||
<span>{{ dicsStore.getDictLabel('USE_TYPE', record.workType) }}</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'gender'">
|
||||
<span v-if="record.gender == '1'">男</span>
|
||||
<span v-else>女</span>
|
||||
</template>
|
||||
<template v-if="column.key === 'status'">
|
||||
<a-tag v-if="record.status == '1'" color="green">启用</a-tag>
|
||||
<a-tag v-else color="red">禁用</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'serviceType'">
|
||||
<span>{{ dicsStore.getDictLabel('STAFF_TYPE', record.serviceType) }}</span>
|
||||
</template>
|
||||
|
||||
<template v-if="'action' === column.key">
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)">
|
||||
<span>编辑</span>
|
||||
</x-action-button>
|
||||
<x-action-button @click="$refs.detailRef.handleEdit(record)">
|
||||
<span>详情</span>
|
||||
</x-action-button>
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)" v-if="platForm==='yunying'">
|
||||
<span>服务项目</span>
|
||||
</x-action-button>
|
||||
<x-action-button @click="$refs.editDialogRef.handleEdit(record)" v-if="platForm==='yunying'">
|
||||
<span>停用</span>
|
||||
</x-action-button>
|
||||
<x-action-button @click="handleDelete(record)">
|
||||
<span style="color: #ff4d4f;">删除</span>
|
||||
</x-action-button>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<edit-dialog ref="editDialogRef" @ok="onOk"></edit-dialog>
|
||||
<detail ref="detailRef"></detail>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { ref } from 'vue'
|
||||
import apis from '@/apis'
|
||||
import { config } from '@/config'
|
||||
import { usePagination } from '@/hooks'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import EditDialog from './components/EditDialog.vue'
|
||||
import { useDicsStore } from '@/store'
|
||||
import AreaCascader from '@/components/AreaCascader/index.vue'
|
||||
import detail from './components/detail.vue'
|
||||
import dayjs from 'dayjs'
|
||||
import NodeTree from '@/components/NodeTree/index.vue'
|
||||
import storage from '@/utils/storage'
|
||||
defineOptions({
|
||||
name: 'allocation',
|
||||
})
|
||||
const dicsStore = useDicsStore()
|
||||
const platForm = storage.local.getItem('platform')
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'serialNumber',
|
||||
key: 'serialNumber',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
dataIndex: 'gender',
|
||||
key: 'gender',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '电话',
|
||||
dataIndex: 'phone',
|
||||
key: 'phone',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
dataIndex: 'idCard',
|
||||
key: 'idCard',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '护理人员类型',
|
||||
dataIndex: 'serviceType',
|
||||
key: 'serviceType',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '用工形式',
|
||||
dataIndex: 'workType',
|
||||
key: 'workType',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '所属服务组织',
|
||||
dataIndex: 'stationName',
|
||||
key: 'stationName',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
// {
|
||||
// title: '组织所在区域',
|
||||
// dataIndex: 'areaLabels',
|
||||
// key: 'areaLabels',
|
||||
// align: 'center',
|
||||
// width: 120,
|
||||
// },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 250,
|
||||
fixed: 'right',
|
||||
}
|
||||
];
|
||||
const { t } = useI18n() // 解构出t方法
|
||||
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
|
||||
const editDialogRef = ref()
|
||||
const detailRef = ref()
|
||||
|
||||
getPageList()
|
||||
|
||||
async function getPageList() {
|
||||
try {
|
||||
const { pageSize, current } = paginationState
|
||||
const { success, data, total } = await apis.serviceStaffList
|
||||
.getProjectList({
|
||||
companyId: storage.local.getItem('companyId'),
|
||||
stationId: storage.local.getItem('stationId'),
|
||||
pageSize,
|
||||
current: current,
|
||||
...searchFormData.value,
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
|
||||
if (config('http.code.success') === success) {
|
||||
listData.value = data
|
||||
paginationState.total = total
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
/**核销 */
|
||||
const checkHandler = (record) => {
|
||||
Modal.confirm({
|
||||
title: '即将核销是否继续',
|
||||
content: t('button.confirm'),
|
||||
okText: t('button.confirm'),
|
||||
onOk: async () => {
|
||||
const params = {
|
||||
...record,
|
||||
status: 'success'
|
||||
}
|
||||
const { success } = await apis.productOrder.updateItem(params.id, params).catch(() => {
|
||||
// throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
// resolve()
|
||||
message.success('核销成功')
|
||||
await getPageList()
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
function handleDelete({ id }) {
|
||||
Modal.confirm({
|
||||
title: t('pages.system.user.delTip'),
|
||||
content: t('button.confirm'),
|
||||
okText: t('button.confirm'),
|
||||
onOk: () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
; (async () => {
|
||||
try {
|
||||
const { success } = await apis.productOrder.delItem(id).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
resolve()
|
||||
message.success(t('component.message.success.delete'))
|
||||
await getPageList()
|
||||
}
|
||||
} catch (error) {
|
||||
reject()
|
||||
}
|
||||
})()
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
function onTableChange({ current, pageSize }) {
|
||||
paginationState.current = current
|
||||
paginationState.pageSize = pageSize
|
||||
getPageList()
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
function handleSearch() {
|
||||
resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function handleResetSearch() {
|
||||
searchFormData.value = {}
|
||||
resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
/**
|
||||
* 编辑完成
|
||||
*/
|
||||
async function onOk() {
|
||||
await getPageList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
@ -1,20 +1,29 @@
|
||||
<template>
|
||||
<a-row :gutter="8" :wrap="false">
|
||||
<a-col flex="auto">
|
||||
<a-card title="电话关爱对象列表">
|
||||
<a-card>
|
||||
<template #extra>
|
||||
<a-button type="primary" @click="showModal">新增</a-button>
|
||||
</template>
|
||||
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||
:pagination="paginationState" :scroll="{ x: 'max-content' }" @change="onTableChange">
|
||||
<template #bodyCell="{ index, column, record }">
|
||||
<template v-if="column.key === 'serialNumber'">
|
||||
<span>{{ index + 1 }}</span>
|
||||
</template>
|
||||
<template v-if="'action' === column.key">
|
||||
<x-action-button @click="$refs.editDialogRef.handleCreate(record)">
|
||||
<x-action-button @click="handleEdit(record)">
|
||||
<span>编辑</span>
|
||||
</x-action-button>
|
||||
<x-action-button @click="handleDelete(record)">
|
||||
<span>删除</span>
|
||||
</x-action-button>
|
||||
</template>
|
||||
<template v-if="'gender' === column.key">
|
||||
<span>{{ record.gender === '1' ? '男' : '女' }}</span>
|
||||
</template>
|
||||
<template v-if="'isEmergency' === column.key">
|
||||
<span>{{ record.isEmergency === '1' ? '是' : '否' }}</span>
|
||||
</template>
|
||||
<template v-if="'workCondition' === column.key">
|
||||
<span>{{ record.workCondition === '1' ? '已工作' : '未工作' }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
@ -45,6 +54,14 @@
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="是否为紧急联系人" name="isEmergency">
|
||||
<a-radio-group v-model:value="contactForm.isEmergency">
|
||||
<a-radio value="1">是</a-radio>
|
||||
<a-radio value="2">否</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="年龄" name="age">
|
||||
<a-input-number v-model:value="contactForm.age" placeholder="请输入年龄" style="width: 100%;" />
|
||||
@ -74,8 +91,11 @@
|
||||
|
||||
<!-- 关爱巡访电话 -->
|
||||
<a-col :span="12">
|
||||
<a-form-item label="工作类型" name="workCondition">
|
||||
<a-input v-model:value="contactForm.workCondition" placeholder="请输入工作类型" />
|
||||
<a-form-item label="工作情况" name="workCondition">
|
||||
<a-select v-model:value="contactForm.workCondition" placeholder="请选择工作情况" style="width: 100%;">
|
||||
<a-select-option :key="1" value="1">已工作</a-select-option>
|
||||
<a-select-option :key="2" value="2">未工作</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@ -98,7 +118,7 @@
|
||||
|
||||
<script setup>
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { ref } from 'vue'
|
||||
import { ref, defineProps } from 'vue'
|
||||
import apis from '@/apis'
|
||||
import { config } from '@/config'
|
||||
import { usePagination } from '@/hooks'
|
||||
@ -117,19 +137,14 @@ const props = defineProps({
|
||||
default: () => ({})
|
||||
}
|
||||
});
|
||||
const areaCascaderRef=ref()
|
||||
const actionType = ref('')
|
||||
const visibleOpen = ref(false)
|
||||
const dicsStore = useDicsStore()
|
||||
formRules.value = {
|
||||
name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
|
||||
}
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'serialNumber',
|
||||
key: 'serialNumber',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '名字',
|
||||
dataIndex: 'name',
|
||||
@ -160,6 +175,13 @@ const columns = [
|
||||
align: 'center',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '年龄',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
dataIndex: 'identityNo',
|
||||
@ -231,28 +253,7 @@ async function getPageList() {
|
||||
|
||||
}
|
||||
}
|
||||
/**核销 */
|
||||
const checkHandler = (record) => {
|
||||
Modal.confirm({
|
||||
title: '即将核销是否继续',
|
||||
content: t('button.confirm'),
|
||||
okText: t('button.confirm'),
|
||||
onOk: async () => {
|
||||
const params = {
|
||||
...record,
|
||||
status: 'success'
|
||||
}
|
||||
const { success } = await apis.productOrder.updateItem(params.id, params).catch(() => {
|
||||
// throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
// resolve()
|
||||
message.success('核销成功')
|
||||
await getPageList()
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@ -265,7 +266,7 @@ function handleDelete({ id }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
; (async () => {
|
||||
try {
|
||||
const { success } = await apis.productOrder.delItem(id).catch(() => {
|
||||
const { success } = await apis.contacts.delItem(id).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
@ -281,11 +282,56 @@ function handleDelete({ id }) {
|
||||
},
|
||||
})
|
||||
}
|
||||
const handleOk = () => {
|
||||
console.log('contactForm.value', contactForm.value)
|
||||
formRef.value.validate().then(async () => {
|
||||
const params = {
|
||||
...contactForm.value,
|
||||
customerId: props.formData.customerId
|
||||
}
|
||||
if (actionType.value === 'create') {
|
||||
const { success } = await apis.contacts.createItem(params).catch(() => {
|
||||
// throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
message.success('添加成功')
|
||||
visibleOpen.value = false
|
||||
resetForm()
|
||||
await getPageList()
|
||||
}
|
||||
}else{
|
||||
const { success } = await apis.contacts.updateItem(params).catch(() => {
|
||||
// throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
message.success('编辑成功')
|
||||
visibleOpen.value = false
|
||||
resetForm()
|
||||
await getPageList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}).catch((err) => {
|
||||
console.log('err', err)
|
||||
// message.error(err)
|
||||
})
|
||||
}
|
||||
const showModal = () => {
|
||||
contactForm.value.gender = '1';
|
||||
contactForm.value.isEmergency = '2';
|
||||
actionType.value = 'create';
|
||||
visibleOpen.value = true;
|
||||
};
|
||||
function onAreaChange(value, labels) {
|
||||
formData.value.areaLabels = [...labels]
|
||||
contactForm.value.areaCodes = [...value]
|
||||
console.log(contactForm.value.areaCodes)
|
||||
contactForm.value.areaLabels = [...labels]
|
||||
}
|
||||
const handleEdit = (record) => {
|
||||
actionType.value = 'edit';
|
||||
contactForm.value = Object.assign({}, record)
|
||||
visibleOpen.value = true
|
||||
}
|
||||
/**
|
||||
* 分页
|
||||
|
||||
@ -1,44 +1,121 @@
|
||||
<template>
|
||||
<div>
|
||||
<a-form ref="formRef" :model="searchFormData" :rules="formRules">
|
||||
<a-row :gutter="20">
|
||||
<a-col :span="24" align="right">
|
||||
<a-form-item>
|
||||
<a-button @click="refreshData()" type="primary" ghost>更新</a-button>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<!-- 基本信息 -->
|
||||
<a-col :span="6">
|
||||
<div><span class="label">残疾证号:</span> {{ formData.disabledPerson.disabledNo || '-' }}</div>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="残疾证号" name="'disabledNo'">
|
||||
<a-input v-model:value="searchFormData.disabledNo" placeholder="请输入残疾证号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<div><span class="label">残疾类型:</span> {{ formData.disabledPerson.disabledType || '-' }}</div>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="残疾类型" name="disabledType">
|
||||
<a-select v-model:value="searchFormData.disabledType" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.DISABILITY_TYPES" :key="item.dval"
|
||||
:value="item.dval">{{ item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<div><span class="label">残疾等级:</span> {{ formData.disabledPerson.disabledLv || '-' }}</div>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="残疾等级" name="disabledLv">
|
||||
<a-select v-model:value="searchFormData.disabledLv" allowClear>
|
||||
<a-select-option v-for="item in dicsStore.dictOptions.Disability_Level" :key="item.dval"
|
||||
:value="item.dval">{{
|
||||
item.introduction }}</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<div><span class="label">是否已签订托养协议:</span> {{ formData.disabledPerson.agreementSigned || '-' }}</div>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="是否已签订托养协议" name="agreementSigned">
|
||||
<a-select v-model:value="searchFormData.agreementSigned" allowClear>
|
||||
<a-select-option key="1" value="1">是</a-select-option>
|
||||
<a-select-option key="2" value="2">否</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<div><span class="label">托养起止时间:</span> {{ formData.disabledPerson.starCareService || '-' }} - {{ formData.disabledPerson.endCareService || '-' }}</div>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="托养开始时间" name="starCareService">
|
||||
<a-date-picker v-model:value="searchFormData.starCareService" placeholder="请选择开始日期" style="width: 100%;" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-form-item label="托养结束时间" name="endCareService">
|
||||
<a-date-picker v-model:value="searchFormData.endCareService" placeholder="请选择结束日期" style="width: 100%;" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="托养协议照片" name="careServiceImgs">
|
||||
<gx-upload v-model="searchFormData.careServiceImgs" accept-types=".jpg,.png,.webp" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24" v-if="formData.disabledPerson.careServiceImgs && formData.disabledPerson.careServiceImgs.length > 0">
|
||||
<div>
|
||||
<span class="label">托养协议照片:</span>
|
||||
<div style="margin-top: 8px;">
|
||||
<a-image v-for="(url, index) in formData.disabledPerson.careServiceImgs" :key="index" :src="url" fit="cover"
|
||||
style="width: 100px; height: 60px; margin-right: 8px;" :preview-src-list="formData.disabledPerson.careServiceImgs" />
|
||||
</div>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps } from 'vue';
|
||||
import { useDicsStore } from '@/store'
|
||||
import apis from '@/apis'
|
||||
import { config } from '@/config'
|
||||
import dayjs from 'dayjs';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { getBirthDate, spliceUrl } from '@/utils/util'
|
||||
const dicsStore = useDicsStore()
|
||||
const searchFormData = ref({})
|
||||
const formRules = ref({
|
||||
|
||||
})
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
});
|
||||
getPageList()
|
||||
|
||||
async function getPageList() {
|
||||
try {
|
||||
console.log(1111)
|
||||
const { success, data, total } = await apis.contacts.getInfo({ id: props.formData.id })
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
searchFormData.value = data
|
||||
searchFormData.value.careServiceImgs = data.careServiceImgs ? data.careServiceImgs.map(item => config('http.apiUpload') + item) : []
|
||||
searchFormData.value.starCareService = dayjs(data.starCareService)
|
||||
searchFormData.value.endCareService = dayjs(data.endCareService)
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
async function refreshData() {
|
||||
try {
|
||||
const params = {
|
||||
...searchFormData.value,
|
||||
careServiceImgs: searchFormData.value.careServiceImgs && searchFormData.value.careServiceImgs.length > 0 ? searchFormData.value.careServiceImgs.map(item => spliceUrl(item)) : []
|
||||
}
|
||||
const { success, data, total } = await apis.contacts.updateInfo(params)
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
|
||||
if (config('http.code.success') === success) {
|
||||
message.success('信息更新成功')
|
||||
getPageList()
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.label {
|
||||
|
||||
@ -1,6 +1,220 @@
|
||||
<template>
|
||||
<div>新建文件</div>
|
||||
<a-row :gutter="8" :wrap="false">
|
||||
<a-col flex="auto">
|
||||
<a-card>
|
||||
<a-table :columns="columns" :data-source="listData" bordered="true" :loading="loading"
|
||||
:pagination="paginationState" :scroll="{ x: 'max-content' }" @change="onTableChange">
|
||||
<template #bodyCell="{ index, column, record }">
|
||||
<template v-if="'direction' === column.key">
|
||||
<span>{{ record.direction === 'Out' ? '迁出' : '迁入' }}</span>
|
||||
</template>
|
||||
<template v-if="'directionType' === column.key">
|
||||
<span>{{ record.directionType === 'Transfer' ? '转出' : '去世' }}</span>
|
||||
</template>
|
||||
<template v-if="'passWayAt' === column.key">
|
||||
<span>{{dayjs(record.passWayAt).format('YYYY-MM-DD')}}</span>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import { ref, defineProps } from 'vue'
|
||||
import apis from '@/apis'
|
||||
import { config } from '@/config'
|
||||
import { usePagination } from '@/hooks'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useDicsStore } from '@/store'
|
||||
import AreaCascader from '@/components/AreaCascader/index.vue'
|
||||
import { useForm, useModal } from '@/hooks'
|
||||
const { formRecord, formData: contactForm, formRef, formRules, resetForm } = useForm()
|
||||
import dayjs from 'dayjs'
|
||||
defineOptions({
|
||||
name: 'allocation',
|
||||
})
|
||||
const props = defineProps({
|
||||
formData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
});
|
||||
const areaCascaderRef=ref()
|
||||
const actionType = ref('')
|
||||
const visibleOpen = ref(false)
|
||||
const dicsStore = useDicsStore()
|
||||
const columns = [
|
||||
{
|
||||
title: '迁出/迁入',
|
||||
dataIndex: 'direction',
|
||||
key: 'direction',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
|
||||
// --- 联系方式 ---
|
||||
{
|
||||
title: '迁出类型',
|
||||
dataIndex: 'directionType',
|
||||
key: 'directionType',
|
||||
align: 'center',
|
||||
width: 130,
|
||||
},
|
||||
{
|
||||
title: '去世时间',
|
||||
dataIndex: 'passWayAt',
|
||||
key: 'passWayAt',
|
||||
align: 'center',
|
||||
width: 130,
|
||||
},
|
||||
{
|
||||
title: '转出原因',
|
||||
dataIndex: 'reason',
|
||||
key: 'reason',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
}
|
||||
];
|
||||
const { t } = useI18n() // 解构出t方法
|
||||
const { listData, loading, showLoading, hideLoading, paginationState, resetPagination, searchFormData } = usePagination()
|
||||
const editDialogRef = ref()
|
||||
getPageList()
|
||||
|
||||
async function getPageList() {
|
||||
try {
|
||||
const { pageSize, current } = paginationState
|
||||
const { success, data, total } = await apis.contacts
|
||||
.getInOutList({
|
||||
pageSize,
|
||||
current: current,
|
||||
customerId: props.formData.customerId
|
||||
})
|
||||
.catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
|
||||
if (config('http.code.success') === success) {
|
||||
listData.value = data
|
||||
paginationState.total = total || 0
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
function handleDelete({ id }) {
|
||||
Modal.confirm({
|
||||
title: t('pages.system.user.delTip'),
|
||||
content: t('button.confirm'),
|
||||
okText: t('button.confirm'),
|
||||
onOk: () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
; (async () => {
|
||||
try {
|
||||
const { success } = await apis.contacts.delItem(id).catch(() => {
|
||||
throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
resolve()
|
||||
message.success(t('component.message.success.delete'))
|
||||
await getPageList()
|
||||
}
|
||||
} catch (error) {
|
||||
reject()
|
||||
}
|
||||
})()
|
||||
})
|
||||
},
|
||||
})
|
||||
}
|
||||
const handleOk = () => {
|
||||
console.log('contactForm.value', contactForm.value)
|
||||
formRef.value.validate().then(async () => {
|
||||
const params = {
|
||||
...contactForm.value,
|
||||
customerId: props.formData.customerId
|
||||
}
|
||||
if (actionType.value === 'create') {
|
||||
const { success } = await apis.contacts.createItem(params).catch(() => {
|
||||
// throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
message.success('添加成功')
|
||||
visibleOpen.value = false
|
||||
resetForm()
|
||||
await getPageList()
|
||||
}
|
||||
}else{
|
||||
const { success } = await apis.contacts.updateItem(params).catch(() => {
|
||||
// throw new Error()
|
||||
})
|
||||
if (config('http.code.success') === success) {
|
||||
message.success('编辑成功')
|
||||
visibleOpen.value = false
|
||||
resetForm()
|
||||
await getPageList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}).catch((err) => {
|
||||
console.log('err', err)
|
||||
// message.error(err)
|
||||
})
|
||||
}
|
||||
const showModal = () => {
|
||||
contactForm.value.gender = '1';
|
||||
contactForm.value.isEmergency = '2';
|
||||
actionType.value = 'create';
|
||||
visibleOpen.value = true;
|
||||
};
|
||||
function onAreaChange(value, labels) {
|
||||
contactForm.value.areaCodes = [...value]
|
||||
console.log(contactForm.value.areaCodes)
|
||||
contactForm.value.areaLabels = [...labels]
|
||||
}
|
||||
const handleEdit = (record) => {
|
||||
actionType.value = 'edit';
|
||||
contactForm.value = Object.assign({}, record)
|
||||
visibleOpen.value = true
|
||||
}
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
function onTableChange({ current, pageSize }) {
|
||||
paginationState.current = current
|
||||
paginationState.pageSize = pageSize
|
||||
getPageList()
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*/
|
||||
function handleSearch() {
|
||||
resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function handleResetSearch() {
|
||||
searchFormData.value = {}
|
||||
resetPagination()
|
||||
getPageList()
|
||||
}
|
||||
/**
|
||||
* 编辑完成
|
||||
*/
|
||||
async function onOk() {
|
||||
await getPageList()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
@ -8,16 +8,16 @@
|
||||
<gx-upload v-model="idCardPhotos" accept-types=".jpg,.png,.webp" :fileNumber="1" />
|
||||
<div style="margin-left: 20px;">
|
||||
<p style="font-weight: bold;">
|
||||
<span>{{ formData.name }}</span>
|
||||
<span style="margin: 0 50px;">{{ formData.gender === '1' ? '男' : '女' }}</span>
|
||||
<span>{{ formData.age }}</span>
|
||||
<span>{{ customerName }}</span>
|
||||
<span style="margin: 0 50px;">{{ customerGender === '1' ? '男' : '女' }}</span>
|
||||
<span>{{ customerAge }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<span>身份证号:{{ formData.idNumber }}</span>
|
||||
<span style="margin: 0 50px;">手机号:{{ formData.contact1 }}</span>
|
||||
<span>身份证号:{{ customerIdNumber }}</span>
|
||||
<span style="margin: 0 50px;">手机号:{{ customerContact }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<a-tag color="#2db7f5" v-for="value in formData.serviceRecipientCategory" :key="value">
|
||||
<a-tag color="#2db7f5" v-for="value in customerServiceRecipientCategory" :key="value">
|
||||
{{ value }}
|
||||
</a-tag>
|
||||
</p>
|
||||
@ -61,8 +61,16 @@ const idCardPhotos = ref([])
|
||||
const { modal, showModal, hideModal, showLoading, hideLoading } = useModal()
|
||||
const { formData, resetForm } = useForm()
|
||||
|
||||
const customerAge=ref('')
|
||||
const customerContact=ref('')
|
||||
const customerGender=ref('')
|
||||
const customerIdNumber=ref('')
|
||||
const customerName=ref('')
|
||||
const customerServiceRecipientCategory=ref([])
|
||||
|
||||
const cancelText = ref('取消')
|
||||
const recordId = ref('');
|
||||
const disabledId=ref('')
|
||||
// Tab 列表
|
||||
const tabsList = [
|
||||
'基本信息',
|
||||
@ -104,16 +112,9 @@ const getBasicInfo = async () => {
|
||||
if (!success) {
|
||||
return
|
||||
}
|
||||
|
||||
idCardPhotos.value = data.archive.idCardPhotos ? data.archive.idCardPhotos.map(item => config('http.apiUpload') + item) : []
|
||||
console.log('idCardPhotos.value', idCardPhotos.value)
|
||||
return data;
|
||||
}
|
||||
const getDisabledPersonInfo = async () => {
|
||||
|
||||
return { ceshi: '残疾人信息' };
|
||||
}
|
||||
|
||||
|
||||
// Tab 切换时调用子组件方法
|
||||
const handleTabChange = async (key) => {
|
||||
@ -122,7 +123,7 @@ const handleTabChange = async (key) => {
|
||||
formData.value = await getBasicInfo();
|
||||
break;
|
||||
case '残疾人信息':
|
||||
formData.value = await getBasicInfo();
|
||||
formData.value = { id: disabledId.value };
|
||||
break;
|
||||
case '联系人信息':
|
||||
formData.value = { customerId: recordId.value };
|
||||
@ -154,7 +155,15 @@ function handleEdit(record = {}) {
|
||||
title: '详情',
|
||||
})
|
||||
recordId.value = record.id
|
||||
disabledId.value=record.disabledPerson.id
|
||||
formData.value = cloneDeep(record)
|
||||
|
||||
customerAge.value=record.age
|
||||
customerContact.value=record.contact1
|
||||
customerGender.value=record.gender
|
||||
customerIdNumber.value=record.identityNo
|
||||
customerName.value=record.name
|
||||
customerServiceRecipientCategory.value=record.serviceRecipientCategory
|
||||
idCardPhotos.value = record.archive.idCardPhotos ? record.archive.idCardPhotos.map(item => config('http.apiUpload') + item) : []
|
||||
}
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ const columns = [
|
||||
dataIndex: 'action',
|
||||
key: 'action',
|
||||
align: 'center',
|
||||
width: 180,
|
||||
width: 250,
|
||||
fixed: 'right',
|
||||
}
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user