服务考核-列表展示、审核提交
This commit is contained in:
parent
7f13bdfb8d
commit
988ca7b1c7
|
|
@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
|
|||
|
||||
enum Api {
|
||||
list = '/service/appraisal/list',
|
||||
approval='/service/appraisal/approval',
|
||||
save='/service/appraisal/add',
|
||||
edit='/service/appraisal/edit',
|
||||
deleteOne = '/service/appraisal/delete',
|
||||
|
|
@ -38,6 +39,14 @@ export const queryAppraisalSubByMainId = (id) => defHttp.get({url: Api.subList,
|
|||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
|
||||
/**
|
||||
* 审核
|
||||
* @param params
|
||||
*/
|
||||
export const approval = (params,) => {
|
||||
return defHttp.post({url: Api.approval, params});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -159,8 +159,67 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
];
|
||||
|
||||
//子表表格配置
|
||||
export const subColumns: JVxeColumn[] = [
|
||||
//子表列表数据
|
||||
export const subColumns: BasicColumn[] = [
|
||||
{
|
||||
title: '单号',
|
||||
align:"center",
|
||||
dataIndex: 'orderNo'
|
||||
},
|
||||
{
|
||||
title: '手动拍照',
|
||||
align:"center",
|
||||
dataIndex: 'manuallyPicPath'
|
||||
},
|
||||
{
|
||||
title: '手动录制',
|
||||
align:"center",
|
||||
dataIndex: 'manuallyMp4Path'
|
||||
},
|
||||
{
|
||||
title: '摄像头录制',
|
||||
align:"center",
|
||||
dataIndex: 'tplinkPath'
|
||||
},
|
||||
{
|
||||
title: '分类标签',
|
||||
align:"center",
|
||||
dataIndex: 'instructionTagName'
|
||||
},
|
||||
{
|
||||
title: '服务类别',
|
||||
align:"center",
|
||||
dataIndex: 'categoryName'
|
||||
},
|
||||
{
|
||||
title: '服务类型',
|
||||
align:"center",
|
||||
dataIndex: 'typeName'
|
||||
},
|
||||
{
|
||||
title: '指令名称',
|
||||
align:"center",
|
||||
dataIndex: 'directiveName'
|
||||
},
|
||||
{
|
||||
title: '服务时长(分钟)',
|
||||
align:"center",
|
||||
dataIndex: 'serviceDuration'
|
||||
},
|
||||
// {
|
||||
// title: '收费价格',
|
||||
// align:"center",
|
||||
// dataIndex: 'tollPrice'
|
||||
// },
|
||||
// {
|
||||
// title: '提成价格',
|
||||
// align:"center",
|
||||
// dataIndex: 'comPrice'
|
||||
// },
|
||||
];
|
||||
|
||||
//表单配置
|
||||
export const jVxeSubColumns: JVxeColumn[] = [
|
||||
{
|
||||
title: '单号',
|
||||
key: 'orderNo',
|
||||
|
|
|
|||
|
|
@ -1,518 +1,161 @@
|
|||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form v-bind="formItemLayout" name="DirectiveOrderForm" ref="formRef">
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="AppraisalForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="单号" v-bind="validateInfos.orderNo" id="DirectiveOrderForm-orderNo" name="orderNo">
|
||||
<a-input v-model:value="formData.orderNo" placeholder="请输入单号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="工单类型 1护理;2医疗:3仓库;4行政" v-bind="validateInfos.orderType" id="DirectiveOrderForm-orderType" name="orderType">
|
||||
<a-input v-model:value="formData.orderType" placeholder="请输入工单类型 1护理;2医疗:3仓库;4行政" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="执行类型 1单人 2协助 3转单" v-bind="validateInfos.optType" id="DirectiveOrderForm-optType" name="optType">
|
||||
<a-input v-model:value="formData.optType" placeholder="请输入执行类型 1单人 2协助 3转单" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="数据池主表ID,nu_biz_nu_directive_data_pool.id" v-bind="validateInfos.poolId" id="DirectiveOrderForm-poolId" name="poolId">
|
||||
<a-input v-model:value="formData.poolId" placeholder="请输入数据池主表ID,nu_biz_nu_directive_data_pool.id" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id" v-bind="validateInfos.bizId" id="DirectiveOrderForm-bizId" name="bizId">
|
||||
<a-input v-model:value="formData.bizId" placeholder="请输入服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="业务类型" v-bind="validateInfos.bizType" id="DirectiveOrderForm-bizType" name="bizType">
|
||||
<a-input v-model:value="formData.bizType" placeholder="请输入业务类型" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="护理单元名称" v-bind="validateInfos.nuName" id="DirectiveOrderForm-nuName" name="nuName">
|
||||
<a-input v-model:value="formData.nuName" placeholder="请输入护理单元名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="长者ID,nu_biz_elder_info.id" v-bind="validateInfos.elderId" id="DirectiveOrderForm-elderId" name="elderId">
|
||||
<a-input v-model:value="formData.elderId" placeholder="请输入长者ID,nu_biz_elder_info.id" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="长者名称" v-bind="validateInfos.elderName" id="DirectiveOrderForm-elderName" name="elderName">
|
||||
<a-input v-model:value="formData.elderName" placeholder="请输入长者名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="员工ID" v-bind="validateInfos.employeeId" id="DirectiveOrderForm-employeeId" name="employeeId">
|
||||
<a-input v-model:value="formData.employeeId" placeholder="请输入员工ID" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="员工姓名" v-bind="validateInfos.employeeName" id="DirectiveOrderForm-employeeName" name="employeeName">
|
||||
<a-input v-model:value="formData.employeeName" placeholder="请输入员工姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务指令ID,nu_config_service_directive.id" v-bind="validateInfos.directiveId" id="DirectiveOrderForm-directiveId" name="directiveId">
|
||||
<a-input v-model:value="formData.directiveId" placeholder="请输入服务指令ID,nu_config_service_directive.id" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务指令名称" v-bind="validateInfos.directiveName" id="DirectiveOrderForm-directiveName" name="directiveName">
|
||||
<a-input v-model:value="formData.directiveName" placeholder="请输入服务指令名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="周期类型ID" v-bind="validateInfos.cycleTypeId" id="DirectiveOrderForm-cycleTypeId" name="cycleTypeId">
|
||||
<a-input v-model:value="formData.cycleTypeId" placeholder="请输入周期类型ID" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="周期类型" v-bind="validateInfos.cycleType" id="DirectiveOrderForm-cycleType" name="cycleType">
|
||||
<a-input v-model:value="formData.cycleType" placeholder="请输入周期类型" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="周期值" v-bind="validateInfos.cycleValue" id="DirectiveOrderForm-cycleValue" name="cycleValue">
|
||||
<a-input v-model:value="formData.cycleValue" placeholder="请输入周期值" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务指令图片大图" v-bind="validateInfos.previewFile" id="DirectiveOrderForm-previewFile" name="previewFile">
|
||||
<a-input v-model:value="formData.previewFile" placeholder="请输入服务指令图片大图" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务指令图片小图" v-bind="validateInfos.previewFileSmall" id="DirectiveOrderForm-previewFileSmall" name="previewFileSmall">
|
||||
<a-input v-model:value="formData.previewFileSmall" placeholder="请输入服务指令图片小图" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="语音文件" v-bind="validateInfos.mp3File" id="DirectiveOrderForm-mp3File" name="mp3File">
|
||||
<a-input v-model:value="formData.mp3File" placeholder="请输入语音文件" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="视频文件" v-bind="validateInfos.mp4File" id="DirectiveOrderForm-mp4File" name="mp4File">
|
||||
<a-input v-model:value="formData.mp4File" placeholder="请输入视频文件" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务时长(分钟)" v-bind="validateInfos.serviceDuration" id="DirectiveOrderForm-serviceDuration" name="serviceDuration">
|
||||
<a-input v-model:value="formData.serviceDuration" placeholder="请输入服务时长(分钟)" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务说明" v-bind="validateInfos.serviceContent" id="DirectiveOrderForm-serviceContent" name="serviceContent">
|
||||
<a-input v-model:value="formData.serviceContent" placeholder="请输入服务说明" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否是服务指令包 Y是 N否" v-bind="validateInfos.izPackage" id="DirectiveOrderForm-izPackage" name="izPackage">
|
||||
<a-input v-model:value="formData.izPackage" placeholder="请输入是否是服务指令包 Y是 N否" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="收费价格" v-bind="validateInfos.tollPrice" id="DirectiveOrderForm-tollPrice" name="tollPrice">
|
||||
<a-input-number v-model:value="formData.tollPrice" placeholder="请输入收费价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="提成价格" v-bind="validateInfos.comPrice" id="DirectiveOrderForm-comPrice" name="comPrice">
|
||||
<a-input-number v-model:value="formData.comPrice" placeholder="请输入提成价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际提成价格" v-bind="validateInfos.realComPrice" id="DirectiveOrderForm-realComPrice" name="realComPrice">
|
||||
<a-input-number v-model:value="formData.realComPrice" placeholder="请输入实际提成价格" style="width: 100%" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="开始时间" v-bind="validateInfos.startTime" id="DirectiveOrderForm-startTime" name="startTime">
|
||||
<a-date-picker placeholder="请选择开始时间" v-model:value="formData.startTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="结束时间" v-bind="validateInfos.endTime" id="DirectiveOrderForm-endTime" name="endTime">
|
||||
<a-date-picker placeholder="请选择结束时间" v-model:value="formData.endTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际开始员工" v-bind="validateInfos.beginEmp" id="DirectiveOrderForm-beginEmp" name="beginEmp">
|
||||
<a-input v-model:value="formData.beginEmp" placeholder="请输入实际开始员工" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际开始时间" v-bind="validateInfos.beginTime" id="DirectiveOrderForm-beginTime" name="beginTime">
|
||||
<a-date-picker placeholder="请选择实际开始时间" v-model:value="formData.beginTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际结束员工" v-bind="validateInfos.finishEmp" id="DirectiveOrderForm-finishEmp" name="finishEmp">
|
||||
<a-input v-model:value="formData.finishEmp" placeholder="请输入实际结束员工" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际结束时间" v-bind="validateInfos.finishTime" id="DirectiveOrderForm-finishTime" name="finishTime">
|
||||
<a-date-picker placeholder="请选择实际结束时间" v-model:value="formData.finishTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否开始 Y是 N否" v-bind="validateInfos.izStart" id="DirectiveOrderForm-izStart" name="izStart">
|
||||
<a-input v-model:value="formData.izStart" placeholder="请输入是否开始 Y是 N否" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否完成 Y是 N否" v-bind="validateInfos.izFinish" id="DirectiveOrderForm-izFinish" name="izFinish">
|
||||
<a-input v-model:value="formData.izFinish" placeholder="请输入是否完成 Y是 N否" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="发起人ID" v-bind="validateInfos.initiatorId" id="DirectiveOrderForm-initiatorId" name="initiatorId">
|
||||
<a-input v-model:value="formData.initiatorId" placeholder="请输入发起人ID" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="发起人姓名" v-bind="validateInfos.initiatorName" id="DirectiveOrderForm-initiatorName" name="initiatorName">
|
||||
<a-input v-model:value="formData.initiatorName" placeholder="请输入发起人姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="创建人" v-bind="validateInfos.createEmp" id="DirectiveOrderForm-createEmp" name="createEmp">
|
||||
<a-input v-model:value="formData.createEmp" placeholder="请输入创建人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="创建人" v-bind="validateInfos.createBy" id="DirectiveOrderForm-createBy" name="createBy">
|
||||
<a-input v-model:value="formData.createBy" placeholder="请输入创建人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="创建日期" v-bind="validateInfos.createTime" id="DirectiveOrderForm-createTime" name="createTime">
|
||||
<a-date-picker placeholder="请选择创建日期" v-model:value="formData.createTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="更新人" v-bind="validateInfos.updateEmp" id="DirectiveOrderForm-updateEmp" name="updateEmp">
|
||||
<a-input v-model:value="formData.updateEmp" placeholder="请输入更新人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="更新人" v-bind="validateInfos.updateBy" id="DirectiveOrderForm-updateBy" name="updateBy">
|
||||
<a-input v-model:value="formData.updateBy" placeholder="请输入更新人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="更新日期" v-bind="validateInfos.updateTime" id="DirectiveOrderForm-updateTime" name="updateTime">
|
||||
<a-date-picker placeholder="请选择更新日期" v-model:value="formData.updateTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="备注" v-bind="validateInfos.remarks" id="DirectiveOrderForm-remarks" name="remarks">
|
||||
<a-input v-model:value="formData.remarks" placeholder="请输入备注" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务容错时长(end_time + 这个时间) 小于 begin_time算超时" v-bind="validateInfos.timeoutDuration" id="DirectiveOrderForm-timeoutDuration" name="timeoutDuration">
|
||||
<a-input v-model:value="formData.timeoutDuration" placeholder="请输入服务容错时长(end_time + 这个时间) 小于 begin_time算超时" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否超时 Y超时 N未超时" v-bind="validateInfos.izTimeout" id="DirectiveOrderForm-izTimeout" name="izTimeout">
|
||||
<a-input v-model:value="formData.izTimeout" placeholder="请输入是否超时 Y超时 N未超时" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际执行人id(多个); 主要执行人+协助人" v-bind="validateInfos.optIds" id="DirectiveOrderForm-optIds" name="optIds">
|
||||
<a-input v-model:value="formData.optIds" placeholder="请输入实际执行人id(多个); 主要执行人+协助人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="实际执行人名称(多个); 主要执行人+协助人" v-bind="validateInfos.optNames" id="DirectiveOrderForm-optNames" name="optNames">
|
||||
<a-input v-model:value="formData.optNames" placeholder="请输入实际执行人名称(多个); 主要执行人+协助人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="手动拍照" v-bind="validateInfos.manuallyPicPath" id="DirectiveOrderForm-manuallyPicPath" name="manuallyPicPath">
|
||||
<a-textarea v-model:value="formData.manuallyPicPath" :rows="4" placeholder="请输入手动拍照" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="手动录制" v-bind="validateInfos.manuallyMp4Path" id="DirectiveOrderForm-manuallyMp4Path" name="manuallyMp4Path">
|
||||
<a-textarea v-model:value="formData.manuallyMp4Path" :rows="4" placeholder="请输入手动录制" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="考核状态 0未考核 1通过 2未通过" v-bind="validateInfos.appraisalStatus" id="DirectiveOrderForm-appraisalStatus" name="appraisalStatus">
|
||||
<j-dict-select-tag v-model:value="formData.appraisalStatus" dictCode="appraisal_status" placeholder="请选择考核状态 0未考核 1通过 2未通过" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="考核时间" v-bind="validateInfos.appraisalTime" id="DirectiveOrderForm-appraisalTime" name="appraisalTime">
|
||||
<a-date-picker placeholder="请选择考核时间" v-model:value="formData.appraisalTime" showTime value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="考核人ID" v-bind="validateInfos.appraisalId" id="DirectiveOrderForm-appraisalId" name="appraisalId">
|
||||
<a-input v-model:value="formData.appraisalId" placeholder="请输入考核人ID" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="考核人" v-bind="validateInfos.appraisalName" id="DirectiveOrderForm-appraisalName" name="appraisalName">
|
||||
<a-input v-model:value="formData.appraisalName" placeholder="请输入考核人" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="单号" v-bind="validateInfos.orderNo" id="AppraisalForm-orderNo" name="orderNo">
|
||||
<a-input v-model:value="formData.orderNo" placeholder="请输入单号" disabled="true" ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="审核状态" v-bind="validateInfos.appraisalStatus" id="AppraisalForm-appraisalStatus" name="appraisalStatus">
|
||||
<a-radio-group v-model:value="formData.appraisalStatus" name="appraisalStatus">
|
||||
<a-radio value="1">通过</a-radio>
|
||||
<a-radio value="2">拒绝</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24" v-if="formData.appraisalStatus == '2'">
|
||||
<a-form-item label="审核意见" v-bind="validateInfos.appraisalComments" id="AppraisalForm-appraisalComments" name="appraisalComments">
|
||||
<a-textarea v-model:value="formData.appraisalComments" :rows="4" placeholder="请输入审核意见" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
|
||||
<!-- 子表单区域 -->
|
||||
<a-tabs v-model:activeKey="activeKey" animated style="overflow:hidden;">
|
||||
<a-tab-pane tab="nu_biz_nu_directive_order_sub" key="nuBizNuDirectiveOrderSub" :forceRender="true">
|
||||
<j-vxe-table
|
||||
:keep-source="true"
|
||||
resizable
|
||||
ref="nuBizNuDirectiveOrderSubTableRef"
|
||||
:loading="nuBizNuDirectiveOrderSubTable.loading"
|
||||
:columns="nuBizNuDirectiveOrderSubTable.columns"
|
||||
:dataSource="nuBizNuDirectiveOrderSubTable.dataSource"
|
||||
:height="340"
|
||||
:disabled="disabled"
|
||||
:rowNumber="true"
|
||||
:rowSelection="true"
|
||||
:toolbar="true"/>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, ref, reactive, computed, toRaw, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useValidateAntFormAndTable } from '/@/hooks/system/useJvxeMethods';
|
||||
import { queryAppraisalSubByMainId, queryDataById, saveOrUpdate } from '../appraisal.api';
|
||||
import { JVxeTable } from '/@/components/jeecg/JVxeTable';
|
||||
import {subColumns} from '../appraisal.data';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import { Form } from 'ant-design-vue';
|
||||
const useForm = Form.useForm;
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { approval } from '../appraisal.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import dayjs from 'dayjs';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const dataSource = ref([]);
|
||||
const userStore = useUserStore();
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
orderNo: '',
|
||||
appraisalStatus: '',
|
||||
appraisalComments: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 4 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 20 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
export default defineComponent({
|
||||
name: "DirectiveOrderForm",
|
||||
components:{
|
||||
JDictSelectTag,
|
||||
JVxeTable,
|
||||
JFormContainer,
|
||||
},
|
||||
props:{
|
||||
formDisabled:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
formData: { type: Object, default: ()=>{} },
|
||||
formBpm: { type: Boolean, default: true }
|
||||
},
|
||||
emits:['success'],
|
||||
setup(props, {emit}) {
|
||||
const loading = ref(false);
|
||||
const formRef = ref();
|
||||
const nuBizNuDirectiveOrderSubTableRef = ref();
|
||||
const nuBizNuDirectiveOrderSubTable = reactive<Record<string, any>>({
|
||||
loading: false,
|
||||
columns: subColumns,
|
||||
dataSource: []
|
||||
});
|
||||
const activeKey = ref('nuBizNuDirectiveOrderSub');
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
orderNo: '',
|
||||
orderType: '',
|
||||
optType: '',
|
||||
poolId: '',
|
||||
bizId: '',
|
||||
bizType: '',
|
||||
nuName: '',
|
||||
elderId: '',
|
||||
elderName: '',
|
||||
employeeId: '',
|
||||
employeeName: '',
|
||||
directiveId: '',
|
||||
directiveName: '',
|
||||
cycleTypeId: '',
|
||||
cycleType: '',
|
||||
cycleValue: '',
|
||||
previewFile: '',
|
||||
previewFileSmall: '',
|
||||
mp3File: '',
|
||||
mp4File: '',
|
||||
serviceDuration: '',
|
||||
serviceContent: '',
|
||||
izPackage: '',
|
||||
tollPrice: undefined,
|
||||
comPrice: undefined,
|
||||
realComPrice: undefined,
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
beginEmp: '',
|
||||
beginTime: '',
|
||||
finishEmp: '',
|
||||
finishTime: '',
|
||||
izStart: '',
|
||||
izFinish: '',
|
||||
initiatorId: '',
|
||||
initiatorName: '',
|
||||
createEmp: '',
|
||||
createBy: '',
|
||||
createTime: '',
|
||||
updateEmp: '',
|
||||
updateBy: '',
|
||||
updateTime: '',
|
||||
delFlag: '',
|
||||
remarks: '',
|
||||
timeoutDuration: '',
|
||||
izTimeout: '',
|
||||
optIds: '',
|
||||
optNames: '',
|
||||
manuallyPicPath: '',
|
||||
manuallyMp4Path: '',
|
||||
appraisalStatus: '',
|
||||
appraisalTime: '',
|
||||
appraisalId: '',
|
||||
appraisalName: '',
|
||||
});
|
||||
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const {resetFields, validate, validateInfos} = useForm(formData, validatorRules, {immediate: false});
|
||||
const dbData = {};
|
||||
const formItemLayout = {
|
||||
labelCol: {xs: {span: 24}, sm: {span: 5}},
|
||||
wrapperCol: {xs: {span: 24}, sm: {span: 16}},
|
||||
};
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
function add() {
|
||||
resetFields();
|
||||
nuBizNuDirectiveOrderSubTable.dataSource = [];
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
formData.appraisalStatus = '1';
|
||||
});
|
||||
}
|
||||
|
||||
async function edit(row) {
|
||||
//主表数据
|
||||
await queryMainData(row.id);
|
||||
//子表数据
|
||||
const nuBizNuDirectiveOrderSubDataList = await queryAppraisalSubByMainId(row['id']);
|
||||
nuBizNuDirectiveOrderSubTable.dataSource = [...nuBizNuDirectiveOrderSubDataList];
|
||||
}
|
||||
|
||||
async function queryMainData(id) {
|
||||
const row = await queryDataById(id);
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(row.hasOwnProperty(key)){
|
||||
tmpData[key] = row[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData,tmpData);
|
||||
}
|
||||
|
||||
const {getSubFormAndTableData, transformData} = useValidateAntFormAndTable(activeKey, {
|
||||
'nuBizNuDirectiveOrderSub': nuBizNuDirectiveOrderSubTableRef,
|
||||
});
|
||||
|
||||
async function getFormData() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
return transformData(toRaw(formData))
|
||||
}
|
||||
|
||||
async function submitForm() {
|
||||
const mainData = await getFormData();
|
||||
const subData = await getSubFormAndTableData();
|
||||
const values = Object.assign({}, dbData, mainData, subData);
|
||||
console.log('表单提交数据', values)
|
||||
const isUpdate = values.id ? true : false
|
||||
await saveOrUpdate(values, isUpdate);
|
||||
//关闭弹窗
|
||||
emit('success');
|
||||
}
|
||||
|
||||
function setFieldsValue(values) {
|
||||
if(values){
|
||||
Object.keys(values).map(k=>{
|
||||
formData[k] = values[k];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 值改变事件触发-树控件回调
|
||||
* @param key
|
||||
* @param value
|
||||
*/
|
||||
function handleFormChange(key, value) {
|
||||
formData[key] = value;
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
nuBizNuDirectiveOrderSubTableRef,
|
||||
nuBizNuDirectiveOrderSubTable,
|
||||
validatorRules,
|
||||
validateInfos,
|
||||
activeKey,
|
||||
loading,
|
||||
formData,
|
||||
setFieldsValue,
|
||||
handleFormChange,
|
||||
formItemLayout,
|
||||
disabled,
|
||||
getFormData,
|
||||
submitForm,
|
||||
add,
|
||||
edit,
|
||||
formRef,
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.ant-tabs-tabpane.sub-one-form {
|
||||
max-height: 340px;
|
||||
overflow: auto;
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await approval(model)
|
||||
.then((res) => {
|
||||
emit('ok');
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,67 +1,82 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" :width="800" @ok="handleSubmit">
|
||||
<appraisal-form ref="formComponent" :formDisabled="formDisabled" :formBpm="false" @success="submitSuccess"></appraisal-form>
|
||||
</BasicModal>
|
||||
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" @close="handleCancel">
|
||||
<AppraisalForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></AppraisalForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, unref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import DirectiveOrderForm from './AppraisalForm.vue';
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import AppraisalForm from './AppraisalForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
export default {
|
||||
name: "TestCgMainVxeModal",
|
||||
components:{
|
||||
BasicModal,
|
||||
DirectiveOrderForm
|
||||
},
|
||||
emits:['register','success'],
|
||||
setup(_p, {emit}){
|
||||
const formComponent = ref()
|
||||
const isUpdate = ref(true);
|
||||
const formDisabled = ref(false);
|
||||
const title = ref('')
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('800');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
//表单赋值
|
||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||
setModalProps({confirmLoading: false,showCancelBtn:data?.showFooter,showOkBtn:data?.showFooter});
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
formDisabled.value = !data?.showFooter;
|
||||
title.value = data?.isUpdate ? (unref(formDisabled) ? '详情' : '编辑') : '新增';
|
||||
if (unref(isUpdate)) {
|
||||
formComponent.value.edit(data.record)
|
||||
}else{
|
||||
formComponent.value.add()
|
||||
}
|
||||
});
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
function handleSubmit() {
|
||||
formComponent.value.submitForm();
|
||||
}
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '服务考核';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
function submitSuccess(){
|
||||
emit('success');
|
||||
closeModal();
|
||||
}
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
return {
|
||||
registerModal,
|
||||
title,
|
||||
formComponent,
|
||||
formDisabled,
|
||||
handleSubmit,
|
||||
submitSuccess
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
/** 时间和数字输入框样式 */
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.ant-calendar-picker) {
|
||||
width: 100%;
|
||||
}
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
<a-col :lg="6">
|
||||
<a-form-item name="employeeId">
|
||||
<template #label><span title="员工">员工</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.employeeId"
|
||||
<j-select-multiple v-model:value="queryParam.employeeId"
|
||||
:dictCode="`nu_biz_employees_info,name,id,del_flag = 0 order by id asc`" placeholder="选择员工"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
|
|
@ -141,9 +141,14 @@
|
|||
<!--字段回显插槽-->
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
<template #expandedRowRender="{ record }">
|
||||
<a-table :columns="subColumns" :data-source="record.appraisalSubList" :pagination="false">
|
||||
|
||||
</a-table>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<AppraisalModal @register="registerModal" @success="handleSuccess"></AppraisalModal>
|
||||
<AppraisalModal ref="registerModal" @success="handleSuccess"></AppraisalModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -153,7 +158,7 @@ import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
|||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import {useModal} from '/@/components/Modal';
|
||||
import AppraisalModal from './components/AppraisalModal.vue'
|
||||
import {columns, superQuerySchema} from './appraisal.data';
|
||||
import {columns,subColumns,superQuerySchema} from './appraisal.data';
|
||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './appraisal.api';
|
||||
import {downloadFile} from '/@/utils/common/renderUtils';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
|
|
@ -165,7 +170,7 @@ const formRef = ref();
|
|||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
//注册model
|
||||
const [registerModal, {openModal}] = useModal();
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||
|
|
@ -226,21 +231,18 @@ const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
|||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
// openModal(true, {
|
||||
// record,
|
||||
// isUpdate: true,
|
||||
// showFooter: false,
|
||||
// });
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
|
|
@ -264,16 +266,20 @@ function handleSuccess() {
|
|||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record){
|
||||
return [
|
||||
{
|
||||
let action = [];
|
||||
if(record.appraisalStatus == '0'){
|
||||
action.push({
|
||||
label: '考核',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
})
|
||||
}
|
||||
if(record.orderType != '1'){
|
||||
action.push({
|
||||
label: '业务数据',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
]
|
||||
},)
|
||||
}
|
||||
return action;
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
|
|
|
|||
Loading…
Reference in New Issue