服务考核
This commit is contained in:
parent
c444800746
commit
aaabcc65f5
|
|
@ -1,58 +0,0 @@
|
|||
import { BasicColumn } from '/@/components/Table';
|
||||
import { FormSchema } from '/@/components/Table';
|
||||
import { rules } from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '流程名称',
|
||||
align: 'center',
|
||||
dataIndex: 'flowName',
|
||||
},
|
||||
{
|
||||
title: '分类标签',
|
||||
align: 'center',
|
||||
dataIndex: 'instructionTagId_dictText',
|
||||
},
|
||||
{
|
||||
title: '服务类别',
|
||||
align: 'center',
|
||||
dataIndex: 'categoryId_dictText',
|
||||
},
|
||||
{
|
||||
title: '服务类型',
|
||||
align: 'center',
|
||||
dataIndex: 'typeId_dictText',
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
flowName: { title: '节点名称', order: 0, view: 'text', type: 'string' },
|
||||
izEnabled: { title: '是否启用', order: 1, view: 'list', type: 'string', dictCode: 'iz_enabled' },
|
||||
instructionTagId: {
|
||||
title: '分类标签',
|
||||
order: 2,
|
||||
view: 'list',
|
||||
type: 'string',
|
||||
dictTable: 'nu_config_service_instruction_tag',
|
||||
dictCode: 'id',
|
||||
dictText: 'instruction_name',
|
||||
},
|
||||
categoryId: {
|
||||
title: '服务类别',
|
||||
order: 3,
|
||||
view: 'list',
|
||||
type: 'string',
|
||||
dictTable: 'nu_config_service_category',
|
||||
dictCode: 'id',
|
||||
dictText: 'category_name',
|
||||
},
|
||||
typeId: { title: '服务类型', order: 4, view: 'list', type: 'string', dictTable: 'nu_config_service_type', dictCode: 'id', dictText: 'type_name' },
|
||||
};
|
||||
|
|
@ -1,294 +0,0 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="flowName">
|
||||
<template #label><span title="节点名称">流程名称</span></template>
|
||||
<JInput v-model:value="queryParam.flowName" placeholder="请输入流程名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="instructionTagId">
|
||||
<template #label><span title="分类标签">分类标签</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.instructionTagId" @change="instructionTagChanged"
|
||||
dictCode="nu_config_service_instruction_tag,instruction_name,id" placeholder="请选择分类标签" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="categoryId">
|
||||
<template #label><span title="服务类别">服务类别</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.categoryId"
|
||||
:dictCode="`nu_config_service_category,category_name,id,instruction_id = '${queryParam.instructionTagId || ''}'`"
|
||||
placeholder="请选择服务类别" allow-clear @change="categoryChanged" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="typeId">
|
||||
<template #label><span title="服务类型">服务类型</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.typeId"
|
||||
:dictCode="`nu_config_service_type,type_name,id,instruction_id = '${queryParam.instructionTagId || ''}' and category_id = '${queryParam.categoryId || ''}' `"
|
||||
placeholder="请选择服务类型" allow-clear />
|
||||
<!-- <j-select-multiple placeholder="请选择服务类型" v-model:value="queryParam.typeId"
|
||||
dictCode="nu_config_service_type,type_name,id" allow-clear /> -->
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izEnabled">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" :disabled="queryParam.colDisabled"
|
||||
dictCode="iz_enabled" placeholder="请选择是否启用" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
||||
style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined">新增</a-button>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<ServiceFlowMainModal ref="registerModal" @success="handleSuccess"></ServiceFlowMainModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="flow-serviceFlowMain" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ServiceFlowMain.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, saveOrUpdate } from './ServiceFlowMain.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import ServiceFlowMainModal from './components/ServiceFlowMainModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '服务指令-主流程',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 150,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "服务指令-主流程",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
function handleIzEnabled(record, izEnabled_) {
|
||||
saveOrUpdate({ id: record.id, izEnabled: izEnabled_ }, true)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success('操作成功');
|
||||
} else {
|
||||
createMessage.warning('操作失败');
|
||||
}
|
||||
}).finally(() => {
|
||||
reload()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '节点信息',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '启用',
|
||||
onClick: handleIzEnabled.bind(null, record, 'Y'),
|
||||
ifShow: record.izEnabled == 'N'
|
||||
},
|
||||
{
|
||||
label: '停用',
|
||||
onClick: handleIzEnabled.bind(null, record, 'N'),
|
||||
ifShow: record.izEnabled == 'Y'
|
||||
},
|
||||
// {
|
||||
// label: '删除',
|
||||
// popConfirm: {
|
||||
// title: '是否确认删除',
|
||||
// confirm: handleDelete.bind(null, record),
|
||||
// placement: 'topLeft',
|
||||
// },
|
||||
// }
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function instructionTagChanged(v_) {
|
||||
queryParam.categoryId = null
|
||||
queryParam.typeId = null
|
||||
}
|
||||
|
||||
function categoryChanged(v_) {
|
||||
queryParam.typeId = null
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.query-group-cust {
|
||||
min-width: 100px !important;
|
||||
}
|
||||
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 14px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,195 +0,0 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="ServiceFlowMainForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="流程名称" v-bind="validateInfos.flowName" id="ServiceFlowMainForm-flowName"
|
||||
name="flowName">
|
||||
<a-input v-model:value="formData.flowName" placeholder="请输入流程名称" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="分类标签 " v-bind="validateInfos.instructionTagId"
|
||||
id="ServiceFlowMainForm-instructionTagId" name="instructionTagId">
|
||||
<j-dict-select-tag v-model:value="formData.instructionTagId"
|
||||
dictCode="nu_config_service_instruction_tag,instruction_name,id" placeholder="请选择分类标签 " allow-clear
|
||||
@change="instructionTagChanged" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务类别" v-bind="validateInfos.categoryId" id="ServiceFlowMainForm-categoryId"
|
||||
name="categoryId">
|
||||
<j-dict-select-tag v-model:value="formData.categoryId"
|
||||
:dictCode="`nu_config_service_category,category_name,id,instruction_id = '${formData.instructionTagId || ''}'`"
|
||||
placeholder="请选择服务类别" allow-clear @change="categoryChanged" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务类型" v-bind="validateInfos.typeId" id="ServiceFlowMainForm-typeId" name="typeId">
|
||||
<j-dict-select-tag v-model:value="formData.typeId"
|
||||
:dictCode="`nu_config_service_type,type_name,id,instruction_id = '${formData.instructionTagId || ''}' and category_id = '${formData.categoryId || ''}' `"
|
||||
placeholder="请选择服务类型" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ServiceFlowMainForm-izEnabled"
|
||||
name="izEnabled">
|
||||
<j-dict-select-tag type="radio" v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
||||
placeholder="请选择是否启用" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<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 JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../ServiceFlowMain.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
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 formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
flowName: '',
|
||||
izEnabled: 'Y',
|
||||
instructionTagId: '',
|
||||
categoryId: '',
|
||||
typeId: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
flowName: [{ required: true, message: '请输入节点名称!' },],
|
||||
izEnabled: [{ required: true, message: '请输入是否启用!' },],
|
||||
instructionTagId: [{ required: true, message: '请输入分类标签 !' },],
|
||||
categoryId: [{ required: true, message: '请输入服务类别!' },],
|
||||
typeId: [{ required: true, message: '请输入服务类型!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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' });
|
||||
}
|
||||
}
|
||||
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 saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
function instructionTagChanged(v_) {
|
||||
formData.categoryId = null
|
||||
formData.typeId = null
|
||||
}
|
||||
|
||||
function categoryChanged(v_) {
|
||||
formData.typeId = null
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<template>
|
||||
<a-drawer :title="title" :width="opeType == 'add' ? '50vw' : '100vw'" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||
<ServiceFlowMainForm v-if="opeType == 'add' && visible" ref="registerForm" @ok="submitCallback"
|
||||
:formDisabled="disableSubmit" :formBpm="false">
|
||||
</ServiceFlowMainForm>
|
||||
<ServiceFlowSubList v-if="opeType == 'node' && visible" ref="registerForm" @ok="submitCallback"
|
||||
:formDisabled="disableSubmit" :formBpm="false">
|
||||
</ServiceFlowSubList>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button v-if="opeType == 'add'" type="primary" style="margin-right: 8px" @click="handleOk">确定</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ServiceFlowSubList from './ServiceFlowSubList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import ServiceFlowMainForm from './ServiceFlowMainForm.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
const opeType = ref('');//操作类型 add新增主流程 node节点信息
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增主流程';
|
||||
visible.value = true;
|
||||
opeType.value = 'add'
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '节点信息';
|
||||
visible.value = true;
|
||||
opeType.value = 'node'
|
||||
nextTick(() => {
|
||||
registerForm.value.init(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/services/flow/sub/list',
|
||||
save='/services/flow/sub/add',
|
||||
edit='/services/flow/sub/edit',
|
||||
deleteOne = '/services/flow/sub/delete',
|
||||
deleteBatch = '/services/flow/sub/deleteBatch',
|
||||
importExcel = '/services/flow/sub/importExcel',
|
||||
exportXls = '/services/flow/sub/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
import { BasicColumn } from '/@/components/Table';
|
||||
import { FormSchema } from '/@/components/Table';
|
||||
import { rules } from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '节点名称',
|
||||
align: 'center',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '流程编码',
|
||||
align: 'center',
|
||||
dataIndex: 'flowCode',
|
||||
},
|
||||
{
|
||||
title: '下一流程节点',
|
||||
align: 'center',
|
||||
dataIndex: 'subId_dictText',
|
||||
},
|
||||
{
|
||||
title: '服务指令',
|
||||
align: 'center',
|
||||
dataIndex: 'directiveId_dictText',
|
||||
},
|
||||
{
|
||||
title: 'PAD路径',
|
||||
align: 'center',
|
||||
dataIndex: 'padPath',
|
||||
},
|
||||
{
|
||||
title: '是否启用',
|
||||
align: 'center',
|
||||
dataIndex: 'izEnabled_dictText',
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
name: { title: '名称', order: 0, view: 'text', type: 'string' },
|
||||
mainId: {
|
||||
title: '主表ID',
|
||||
order: 1,
|
||||
view: 'sel_search',
|
||||
type: 'string',
|
||||
dictTable: 'nu_config_service_flow_main',
|
||||
dictCode: 'id',
|
||||
dictText: 'flow_name',
|
||||
},
|
||||
directiveId: {
|
||||
title: '服务指令ID',
|
||||
order: 2,
|
||||
view: 'sel_search',
|
||||
type: 'string',
|
||||
dictTable: 'nu_config_service_directive',
|
||||
dictCode: 'id',
|
||||
dictText: 'directive_name',
|
||||
},
|
||||
subId: {
|
||||
title: '下一流程节点ID',
|
||||
order: 3,
|
||||
view: 'sel_search',
|
||||
type: 'string',
|
||||
dictTable: 'nu_config_service_flow_sub',
|
||||
dictCode: 'id',
|
||||
dictText: 'name',
|
||||
},
|
||||
flowCode: { title: '流程编码', order: 4, view: 'text', type: 'string' },
|
||||
izEnabled: { title: '是否启用 Y启用 N未启用', order: 5, view: 'list', type: 'string', dictCode: 'iz_enabled' },
|
||||
};
|
||||
|
|
@ -1,202 +0,0 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
name="ServiceFlowSubForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="主流程" v-bind="validateInfos.mainId" id="ServiceFlowSubForm-mainId" name="mainId">
|
||||
<j-search-select v-model:value="formData.mainId" dict="nu_config_service_flow_main,flow_name,id"
|
||||
disabled allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="名称" v-bind="validateInfos.name" id="ServiceFlowSubForm-name" name="name">
|
||||
<a-input v-model:value="formData.name" placeholder="请输入名称" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务指令" v-bind="validateInfos.directiveId" id="ServiceFlowSubForm-directiveId"
|
||||
name="directiveId">
|
||||
<j-search-select v-model:value="formData.directiveId" placeholder="请选择服务指令"
|
||||
:dict="`nu_config_service_directive,directive_name,id,instruction_tag_id = '${baseInfo.instructionTagId || ''}' and category_id = '${baseInfo.categoryId || ''}' and type_id = '${baseInfo.typeId || ''}' `"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="下一流程节点" v-bind="validateInfos.subId" id="ServiceFlowSubForm-subId" name="subId">
|
||||
<j-search-select v-model:value="formData.subId"
|
||||
:dict="`nu_config_service_flow_sub,name,id,main_id = '${baseInfo.mainId || ''}' `" allow-clear
|
||||
placeholder="请选择下一流程节点" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="流程编码" v-bind="validateInfos.flowCode" id="ServiceFlowSubForm-flowCode"
|
||||
name="flowCode">
|
||||
<a-input v-model:value="formData.flowCode" placeholder="请输入流程编码" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="PAD路径" v-bind="validateInfos.padPath" id="ServiceFlowSubForm-padPath"
|
||||
name="padPath">
|
||||
<a-input v-model:value="formData.padPath" placeholder="请输入PAD路径" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否启用" v-bind="validateInfos.izEnabled" id="ServiceFlowSubForm-izEnabled"
|
||||
name="izEnabled">
|
||||
<j-dict-select-tag type="radio" v-model:value="formData.izEnabled" dictCode="iz_enabled"
|
||||
placeholder="请选择是否启用" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<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 JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from './ServiceFlowSub.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
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 formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
name: '',
|
||||
mainId: '',
|
||||
directiveId: '',
|
||||
subId: '',
|
||||
flowCode: '',
|
||||
padPath: '',
|
||||
izEnabled: 'Y',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
const baseInfo = ref({})
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
name: [{ required: true, message: '请输入名称!' },],
|
||||
directiveId: [{ required: true, message: '请输入服务指令ID!' },],
|
||||
// subId: [{ required: true, message: '请输入下一流程节点ID!' },],
|
||||
flowCode: [{ required: true, message: '请输入流程编码!' },],
|
||||
padPath: [{ required: true, message: '请输入PAD路径!' },],
|
||||
izEnabled: [{ required: true, message: '请输入是否启用!' },],
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(() => {
|
||||
if (props.formBpm === true) {
|
||||
if (props.formData.disabled === false) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add(record_) {
|
||||
baseInfo.value = record_
|
||||
edit({ mainId: record_.mainId });
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if (record.hasOwnProperty(key)) {
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
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' });
|
||||
}
|
||||
}
|
||||
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 saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,452 +0,0 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="name">
|
||||
<template #label><span title="节点名称">节点名称</span></template>
|
||||
<JInput v-model:value="queryParam.name" placeholder="请输入节点名称" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="flowCode">
|
||||
<template #label><span title="流程编码">流程编码</span></template>
|
||||
<JInput v-model:value="queryParam.flowCode" placeholder="请输入流程编码" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="directiveId">
|
||||
<template #label><span title="服务指令">服务指令</span></template>
|
||||
<j-search-select placeholder="请选择服务指令" v-model:value="queryParam.directiveId"
|
||||
:dict="`nu_config_service_directive,directive_name,id,instruction_tag_id = '${formData.instructionTagId || ''}' and category_id = '${formData.categoryId || ''}' and type_id = '${formData.typeId || ''}' `"
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="subId">
|
||||
<template #label><span title="下一流程节点">下一流程</span></template>
|
||||
<j-search-select placeholder="请选择下一流程节点" v-model:value="queryParam.subId"
|
||||
:dict="`nu_config_service_flow_sub,name,id,main_id = '${formData.mainId || ''}' `" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izEnabled">
|
||||
<template #label><span title="是否启用">是否启用</span></template>
|
||||
<j-dict-select-tag type='list' v-model:value="queryParam.izEnabled" dictCode="iz_enabled"
|
||||
placeholder="请选择是否启用" allowClear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
||||
style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<ServiceFlowSubModal ref="registerModal" @success="handleSuccess"></ServiceFlowSubModal>
|
||||
|
||||
<a-drawer :title="title" width="50vw" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||
<div style="width: 100%;padding: 14px;background-color: white;border-radius: 10px;">
|
||||
<div v-if="opeType == 'directive'">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="formData" :label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="分类标签 " id="ServiceFlowMainForm-instructionTagId" name="instructionTagId">
|
||||
<j-dict-select-tag v-model:value="formData.instructionTagId" disabled
|
||||
dictCode="nu_config_service_instruction_tag,instruction_name,id" placeholder="请选择分类标签 "
|
||||
allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务类别" id="ServiceFlowMainForm-categoryId" name="categoryId">
|
||||
<j-dict-select-tag v-model:value="formData.categoryId" disabled
|
||||
:dictCode="`nu_config_service_category,category_name,id,instruction_id = '${formData.instructionTagId || ''}'`"
|
||||
placeholder="请选择服务类别" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务类型" id="ServiceFlowMainForm-typeId" name="typeId">
|
||||
<j-dict-select-tag v-model:value="formData.typeId" disabled
|
||||
:dictCode="`nu_config_service_type,type_name,id,instruction_id = '${formData.instructionTagId || ''}' and category_id = '${formData.categoryId || ''}' `"
|
||||
placeholder="请选择服务类型" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="服务指令" name="directiveId">
|
||||
<j-dict-select-tag v-model:value="formData.directiveId"
|
||||
:dictCode="`nu_config_service_directive,directive_name,id,instruction_tag_id = '${formData.instructionTagId || ''}' and category_id = '${formData.categoryId || ''}' and type_id = '${formData.typeId || ''}' `"
|
||||
placeholder="请选择服务指令" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="PAD路径" name="padPath">
|
||||
<a-input v-model:value="formData.padPath" placeholder="请输入PAD路径" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div v-if="opeType == 'node'">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="formData" :label-col="labelCol"
|
||||
:wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<a-form-item label="下一流程节点" name="directiveId">
|
||||
<j-dict-select-tag v-model:value="formData.subId"
|
||||
:dictCode="`nu_config_service_flow_sub,name,id,main_id = '${formData.mainId || ''}' `"
|
||||
placeholder="请选择下一流程节点" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleOk">确定</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="flow-serviceFlowSub" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ServiceFlowSub.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, saveOrUpdate } from './ServiceFlowSub.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import ServiceFlowSubModal from './ServiceFlowSubModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||
import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
const title = ref<string>('');
|
||||
const visible = ref<boolean>(false);
|
||||
const opeType = ref('')//directive服务指令 node下一节点
|
||||
const { createMessage } = useMessage();
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const opeObj = ref({})
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
mainId: '',
|
||||
instructionTagId: '',
|
||||
categoryId: '',
|
||||
typeId: '',
|
||||
directiveId: '',
|
||||
padPath: '',
|
||||
subId: '',
|
||||
});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '服务指令-子流程,用于指定节点',
|
||||
api: list,
|
||||
columns,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
actionColumn: {
|
||||
width: 230,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
queryParam.mainId = formData.mainId
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "服务指令-子流程,用于指定节点",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add(formData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
function handleIzEnabled(record, izEnabled_) {
|
||||
saveOrUpdate({ id: record.id, izEnabled: izEnabled_ }, true)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success('操作成功');
|
||||
} else {
|
||||
createMessage.warning('操作失败');
|
||||
}
|
||||
}).finally(() => {
|
||||
reload()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务指令
|
||||
*/
|
||||
function handleDirective(record: Recordable) {
|
||||
title.value = '服务指令'
|
||||
formData.directiveId = record.directiveId
|
||||
formData.padPath = record.padPath
|
||||
opeType.value = 'directive'
|
||||
visible.value = true
|
||||
opeObj.value = record
|
||||
}
|
||||
|
||||
/**
|
||||
* 下一节点
|
||||
*/
|
||||
function handleNode(record: Recordable) {
|
||||
title.value = '下一节点'
|
||||
formData.subId = record.subId
|
||||
opeType.value = 'node'
|
||||
visible.value = true
|
||||
opeObj.value = record
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '服务指令',
|
||||
onClick: handleDirective.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下一节点',
|
||||
onClick: handleNode.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '启用',
|
||||
onClick: handleIzEnabled.bind(null, record, 'Y'),
|
||||
ifShow: record.izEnabled == 'N'
|
||||
},
|
||||
{
|
||||
label: '停用',
|
||||
onClick: handleIzEnabled.bind(null, record, 'N'),
|
||||
ifShow: record.izEnabled == 'Y'
|
||||
},
|
||||
// {
|
||||
// label: '删除',
|
||||
// popConfirm: {
|
||||
// title: '是否确认删除',
|
||||
// confirm: handleDelete.bind(null, record),
|
||||
// placement: 'topLeft',
|
||||
// },
|
||||
// }
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
let params = {
|
||||
id: opeObj.value.id,
|
||||
directiveId: null,
|
||||
padPath: null,
|
||||
subId: null
|
||||
}
|
||||
if (opeType.value == 'directive') {
|
||||
if (!formData.directiveId) {
|
||||
createMessage.warning('未选择服务指令');
|
||||
return
|
||||
} else {
|
||||
params.directiveId = formData.directiveId
|
||||
}
|
||||
if (!formData.padPath) {
|
||||
createMessage.warning('未输入PAD路径');
|
||||
return
|
||||
} else {
|
||||
params.padPath = formData.padPath
|
||||
}
|
||||
}
|
||||
if (opeType.value == 'node') {
|
||||
if (!formData.subId) {
|
||||
createMessage.warning('未选择节点');
|
||||
return
|
||||
} else {
|
||||
params.subId = formData.subId
|
||||
}
|
||||
}
|
||||
saveOrUpdate(params, true)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success('保存成功');
|
||||
} else {
|
||||
createMessage.warning('保存失败');
|
||||
}
|
||||
}).finally(() => {
|
||||
visible.value = false
|
||||
reload()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
formData.mainId = record.id
|
||||
formData.instructionTagId = record.instructionTagId
|
||||
formData.categoryId = record.categoryId
|
||||
formData.typeId = record.typeId
|
||||
reload()
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0px;
|
||||
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 14px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.query-group-cust {
|
||||
min-width: 100px !important;
|
||||
}
|
||||
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 14px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
<template>
|
||||
<a-drawer :title="title" width="50vw" v-model:visible="visible" :closable="true"
|
||||
:footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
|
||||
<ServiceFlowSubForm v-if="visible" ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit"
|
||||
:formBpm="false">
|
||||
</ServiceFlowSubForm>
|
||||
<template #footer>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
|
||||
<a-button type="primary" style="margin-right: 8px" @click="handleOk">确定</a-button>
|
||||
</template>
|
||||
</a-drawer>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ServiceFlowSubForm from './ServiceFlowSubForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add(record_) {
|
||||
title.value = '新增节点';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add(record_);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -1,18 +1,19 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/services/flow/main/list',
|
||||
save='/services/flow/main/add',
|
||||
edit='/services/flow/main/edit',
|
||||
deleteOne = '/services/flow/main/delete',
|
||||
deleteBatch = '/services/flow/main/deleteBatch',
|
||||
importExcel = '/services/flow/main/importExcel',
|
||||
exportXls = '/services/flow/main/exportXls',
|
||||
list = '/service/appraisal/list',
|
||||
save='/service/appraisal/add',
|
||||
edit='/service/appraisal/edit',
|
||||
deleteOne = '/service/appraisal/delete',
|
||||
deleteBatch = '/service/appraisal/deleteBatch',
|
||||
importExcel = '/service/appraisal/importExcel',
|
||||
exportXls = '/service/appraisal/exportXls',
|
||||
queryDataById = '/service/appraisal/queryById',
|
||||
subList = '/service/appraisal/queryAppraisalSubByMainId',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
|
|
@ -24,27 +25,30 @@ export const getExportUrl = Api.exportXls;
|
|||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 查询子表数据
|
||||
* @param params
|
||||
*/
|
||||
export const queryAppraisalSubByMainId = (id) => defHttp.get({url: Api.subList, params:{ id }});
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
export const list = (params) =>
|
||||
defHttp.get({url: Api.list, params});
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
|
|
@ -60,13 +64,18 @@ export const batchDelete = (params, handleSuccess) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
return defHttp.post({url: url, params});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询数据
|
||||
* @param params
|
||||
*/
|
||||
export const queryDataById = (id) => defHttp.get({url: Api.queryDataById, params:{ id }});
|
||||
|
||||
|
|
@ -0,0 +1,678 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '单号',
|
||||
align:"center",
|
||||
dataIndex: 'orderNo'
|
||||
},
|
||||
{
|
||||
title: '手动拍照',
|
||||
align:"center",
|
||||
dataIndex: 'manuallyPicPath'
|
||||
},
|
||||
{
|
||||
title: '手动录制',
|
||||
align:"center",
|
||||
dataIndex: 'manuallyMp4Path'
|
||||
},
|
||||
{
|
||||
title: '工单类型',
|
||||
align:"center",
|
||||
dataIndex: 'orderType_dictText'
|
||||
},
|
||||
{
|
||||
title: '执行类型',
|
||||
align:"center",
|
||||
dataIndex: 'optType_dictText'
|
||||
},
|
||||
{
|
||||
title: '护理单元名称',
|
||||
align:"center",
|
||||
dataIndex: 'nuName'
|
||||
},
|
||||
{
|
||||
title: '长者名称',
|
||||
align:"center",
|
||||
dataIndex: 'elderName'
|
||||
},
|
||||
{
|
||||
title: '执行人',
|
||||
align:"center",
|
||||
dataIndex: 'optNames'
|
||||
},
|
||||
// {
|
||||
// title: '员工姓名',
|
||||
// align:"center",
|
||||
// dataIndex: 'employeeName'
|
||||
// },
|
||||
{
|
||||
title: '是否指令包',
|
||||
align:"center",
|
||||
dataIndex: 'izPackage_dictText'
|
||||
},
|
||||
{
|
||||
title: '指令名称',
|
||||
align:"center",
|
||||
dataIndex: 'directiveName'
|
||||
},
|
||||
{
|
||||
title: '周期类型',
|
||||
align:"center",
|
||||
dataIndex: 'cycleType'
|
||||
},
|
||||
// {
|
||||
// title: '是否开始',
|
||||
// align:"center",
|
||||
// dataIndex: 'izStart_dictText'
|
||||
// },
|
||||
{
|
||||
title: '是否完成',
|
||||
align:"center",
|
||||
dataIndex: 'izFinish_dictText'
|
||||
},
|
||||
// {
|
||||
// title: '发起人姓名',
|
||||
// align:"center",
|
||||
// dataIndex: 'initiatorName'
|
||||
// },
|
||||
{
|
||||
title: '是否超时',
|
||||
align:"center",
|
||||
dataIndex: 'izTimeout_dictText'
|
||||
},
|
||||
{
|
||||
title: '预计开始时间',
|
||||
align:"center",
|
||||
dataIndex: 'startTime'
|
||||
},
|
||||
{
|
||||
title: '预计结束时间',
|
||||
align:"center",
|
||||
dataIndex: 'endTime'
|
||||
},
|
||||
// {
|
||||
// title: '实际开始员工',
|
||||
// align:"center",
|
||||
// dataIndex: 'beginEmp'
|
||||
// },
|
||||
{
|
||||
title: '实际开始时间',
|
||||
align:"center",
|
||||
dataIndex: 'beginTime'
|
||||
},
|
||||
// {
|
||||
// title: '实际结束员工',
|
||||
// align:"center",
|
||||
// dataIndex: 'finishEmp'
|
||||
// },
|
||||
{
|
||||
title: '实际结束时间',
|
||||
align:"center",
|
||||
dataIndex: 'finishTime'
|
||||
},
|
||||
{
|
||||
title: '服务时长(分钟)',
|
||||
align:"center",
|
||||
dataIndex: 'serviceDuration'
|
||||
},
|
||||
{
|
||||
title: '服务容错时长',
|
||||
align:"center",
|
||||
dataIndex: 'timeoutDuration'
|
||||
},
|
||||
|
||||
{
|
||||
title: '收费价格',
|
||||
align:"center",
|
||||
dataIndex: 'tollPrice'
|
||||
},
|
||||
{
|
||||
title: '提成价格',
|
||||
align:"center",
|
||||
dataIndex: 'comPrice'
|
||||
},
|
||||
{
|
||||
title: '实际提成价格',
|
||||
align:"center",
|
||||
dataIndex: 'realComPrice'
|
||||
},
|
||||
{
|
||||
title: '考核状态',
|
||||
align:"center",
|
||||
dataIndex: 'appraisalStatus_dictText'
|
||||
},
|
||||
{
|
||||
title: '考核时间',
|
||||
align:"center",
|
||||
dataIndex: 'appraisalTime'
|
||||
},
|
||||
{
|
||||
title: '考核人',
|
||||
align:"center",
|
||||
dataIndex: 'appraisalName'
|
||||
},
|
||||
];
|
||||
|
||||
//子表表格配置
|
||||
export const subColumns: JVxeColumn[] = [
|
||||
{
|
||||
title: '单号',
|
||||
key: 'orderNo',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '工单类型 1护理;2医疗:3仓库;4行政',
|
||||
key: 'orderType',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '主表ID,nu_biz_nu_directive_order.id',
|
||||
key: 'mainId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '护理单元ID,nu_base_info.id',
|
||||
key: 'nuId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '护理单元名称',
|
||||
key: 'nuName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '长者ID,nu_biz_elder_info.id',
|
||||
key: 'elderId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '长者名称',
|
||||
key: 'elderName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '员工ID',
|
||||
key: 'employeeId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '员工姓名',
|
||||
key: 'employeeName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '分类标签',
|
||||
key: 'instructionTagId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '分类标签名称',
|
||||
key: 'instructionTagName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务类别ID,nu_config_service_category.id',
|
||||
key: 'categoryId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务类别名称',
|
||||
key: 'categoryName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务类型ID,nu_config_service_type.id',
|
||||
key: 'typeId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务类型名称',
|
||||
key: 'typeName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务指令ID,nu_config_service_directive.id',
|
||||
key: 'directiveId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务指令名称',
|
||||
key: 'directiveName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '周期类型ID',
|
||||
key: 'cycleTypeId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '周期类型',
|
||||
key: 'cycleType',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '周期值',
|
||||
key: 'cycleValue',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务指令图片大图',
|
||||
key: 'previewFile',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务指令图片小图',
|
||||
key: 'previewFileSmall',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '语音文件',
|
||||
key: 'mp3File',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '视频文件',
|
||||
key: 'mp4File',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务时长(分钟)',
|
||||
key: 'serviceDuration',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务说明',
|
||||
key: 'serviceContent',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '收费价格',
|
||||
key: 'tollPrice',
|
||||
type: JVxeTypes.inputNumber,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '提成价格',
|
||||
key: 'comPrice',
|
||||
type: JVxeTypes.inputNumber,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '实际提成价格',
|
||||
key: 'realComPrice',
|
||||
type: JVxeTypes.inputNumber,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务指令包ID',
|
||||
key: 'packageId',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务指令包名称',
|
||||
key: 'packageName',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '是否是服务指令包 Y是 N否',
|
||||
key: 'izPackage',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '开始时间',
|
||||
key: 'startTime',
|
||||
type: JVxeTypes.datetime,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '结束时间',
|
||||
key: 'endTime',
|
||||
type: JVxeTypes.datetime,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '实际开始时间',
|
||||
key: 'beginTime',
|
||||
type: JVxeTypes.datetime,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '实际结束时间',
|
||||
key: 'finishTime',
|
||||
type: JVxeTypes.datetime,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '是否开始 Y是 N否',
|
||||
key: 'izStart',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '是否完成 Y是 N否',
|
||||
key: 'izFinish',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
key: 'createBy',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '创建日期',
|
||||
key: 'createTime',
|
||||
type: JVxeTypes.datetime,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '更新人',
|
||||
key: 'updateBy',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '更新日期',
|
||||
key: 'updateTime',
|
||||
type: JVxeTypes.datetime,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: 'tplink下载地址',
|
||||
key: 'tplinkPath',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '手动拍照',
|
||||
key: 'manuallyPicPath',
|
||||
type: JVxeTypes.textarea,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '手动录制',
|
||||
key: 'manuallyMp4Path',
|
||||
type: JVxeTypes.textarea,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '执行类型 1单人 2协助 3转单',
|
||||
key: 'optType',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '服务容错时长(end_time + 这个时间) 小于 begin_time算超时',
|
||||
key: 'timeoutDuration',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '是否超时 Y超时 N未超时',
|
||||
key: 'izTimeout',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '实际执行人id(多个); 主要执行人+协助人',
|
||||
key: 'optIds',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
{
|
||||
title: '实际执行人名称(多个); 主要执行人+协助人',
|
||||
key: 'optNames',
|
||||
type: JVxeTypes.input,
|
||||
width:"200px",
|
||||
placeholder: '请输入${title}',
|
||||
defaultValue:'',
|
||||
},
|
||||
]
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
orderNo: {title: '单号',order: 0,view: 'text', type: 'string',},
|
||||
orderType: {title: '工单类型 1护理;2医疗:3仓库;4行政',order: 1,view: 'text', type: 'string',},
|
||||
optType: {title: '执行类型 1单人 2协助 3转单',order: 2,view: 'text', type: 'string',},
|
||||
poolId: {title: '数据池主表ID,nu_biz_nu_directive_data_pool.id',order: 3,view: 'text', type: 'string',},
|
||||
bizId: {title: '服务指令计划ID,nu_biz_nu_customer_care_server.id;即时指令计划ID,nu_biz_nu_customer_care_server_instant.id',order: 4,view: 'text', type: 'string',},
|
||||
bizType: {title: '业务类型',order: 5,view: 'text', type: 'string',},
|
||||
nuName: {title: '护理单元名称',order: 7,view: 'text', type: 'string',},
|
||||
elderId: {title: '长者ID,nu_biz_elder_info.id',order: 8,view: 'text', type: 'string',},
|
||||
elderName: {title: '长者名称',order: 9,view: 'text', type: 'string',},
|
||||
employeeId: {title: '员工ID',order: 10,view: 'text', type: 'string',},
|
||||
employeeName: {title: '员工姓名',order: 11,view: 'text', type: 'string',},
|
||||
directiveId: {title: '服务指令ID,nu_config_service_directive.id',order: 12,view: 'text', type: 'string',},
|
||||
directiveName: {title: '服务指令名称',order: 13,view: 'text', type: 'string',},
|
||||
cycleTypeId: {title: '周期类型ID',order: 14,view: 'text', type: 'string',},
|
||||
cycleType: {title: '周期类型',order: 15,view: 'text', type: 'string',},
|
||||
cycleValue: {title: '周期值',order: 16,view: 'text', type: 'string',},
|
||||
previewFile: {title: '服务指令图片大图',order: 17,view: 'text', type: 'string',},
|
||||
previewFileSmall: {title: '服务指令图片小图',order: 18,view: 'text', type: 'string',},
|
||||
mp3File: {title: '语音文件',order: 19,view: 'text', type: 'string',},
|
||||
mp4File: {title: '视频文件',order: 20,view: 'text', type: 'string',},
|
||||
serviceDuration: {title: '服务时长(分钟)',order: 21,view: 'text', type: 'string',},
|
||||
serviceContent: {title: '服务说明',order: 22,view: 'text', type: 'string',},
|
||||
izPackage: {title: '是否是服务指令包 Y是 N否',order: 23,view: 'text', type: 'string',},
|
||||
tollPrice: {title: '收费价格',order: 24,view: 'number', type: 'number',},
|
||||
comPrice: {title: '提成价格',order: 25,view: 'number', type: 'number',},
|
||||
realComPrice: {title: '实际提成价格',order: 26,view: 'number', type: 'number',},
|
||||
startTime: {title: '开始时间',order: 27,view: 'datetime', type: 'string',},
|
||||
endTime: {title: '结束时间',order: 28,view: 'datetime', type: 'string',},
|
||||
beginEmp: {title: '实际开始员工',order: 29,view: 'text', type: 'string',},
|
||||
beginTime: {title: '实际开始时间',order: 30,view: 'datetime', type: 'string',},
|
||||
finishEmp: {title: '实际结束员工',order: 31,view: 'text', type: 'string',},
|
||||
finishTime: {title: '实际结束时间',order: 32,view: 'datetime', type: 'string',},
|
||||
izStart: {title: '是否开始 Y是 N否',order: 33,view: 'text', type: 'string',},
|
||||
izFinish: {title: '是否完成 Y是 N否',order: 34,view: 'text', type: 'string',},
|
||||
initiatorId: {title: '发起人ID',order: 35,view: 'text', type: 'string',},
|
||||
initiatorName: {title: '发起人姓名',order: 36,view: 'text', type: 'string',},
|
||||
createEmp: {title: '创建人',order: 37,view: 'text', type: 'string',},
|
||||
createBy: {title: '创建人',order: 38,view: 'text', type: 'string',},
|
||||
createTime: {title: '创建日期',order: 39,view: 'datetime', type: 'string',},
|
||||
updateEmp: {title: '更新人',order: 40,view: 'text', type: 'string',},
|
||||
updateBy: {title: '更新人',order: 41,view: 'text', type: 'string',},
|
||||
updateTime: {title: '更新日期',order: 42,view: 'datetime', type: 'string',},
|
||||
remarks: {title: '备注',order: 44,view: 'text', type: 'string',},
|
||||
timeoutDuration: {title: '服务容错时长(end_time + 这个时间) 小于 begin_time算超时',order: 45,view: 'text', type: 'string',},
|
||||
izTimeout: {title: '是否超时 Y超时 N未超时',order: 46,view: 'text', type: 'string',},
|
||||
optIds: {title: '实际执行人id(多个); 主要执行人+协助人',order: 47,view: 'text', type: 'string',},
|
||||
optNames: {title: '实际执行人名称(多个); 主要执行人+协助人',order: 48,view: 'text', type: 'string',},
|
||||
manuallyPicPath: {title: '手动拍照',order: 49,view: 'textarea', type: 'string',},
|
||||
manuallyMp4Path: {title: '手动录制',order: 50,view: 'textarea', type: 'string',},
|
||||
appraisalStatus: {title: '考核状态 0未考核 1通过 2未通过',order: 51,view: 'list', type: 'string',dictCode: 'appraisal_status',},
|
||||
appraisalTime: {title: '考核时间',order: 52,view: 'datetime', type: 'string',},
|
||||
appraisalId: {title: '考核人ID',order: 53,view: 'text', type: 'string',},
|
||||
appraisalName: {title: '考核人',order: 54,view: 'text', type: 'string',},
|
||||
//子表高级查询
|
||||
nuBizNuDirectiveOrderSub: {
|
||||
title: 'nu_biz_nu_directive_order_sub',
|
||||
view: 'table',
|
||||
fields: {
|
||||
orderNo: {title: '单号',order: 0,view: 'text', type: 'string',},
|
||||
orderType: {title: '工单类型 1护理;2医疗:3仓库;4行政',order: 1,view: 'text', type: 'string',},
|
||||
mainId: {title: '主表ID,nu_biz_nu_directive_order.id',order: 2,view: 'text', type: 'string',},
|
||||
nuId: {title: '护理单元ID,nu_base_info.id',order: 3,view: 'text', type: 'string',},
|
||||
nuName: {title: '护理单元名称',order: 4,view: 'text', type: 'string',},
|
||||
elderId: {title: '长者ID,nu_biz_elder_info.id',order: 5,view: 'text', type: 'string',},
|
||||
elderName: {title: '长者名称',order: 6,view: 'text', type: 'string',},
|
||||
employeeId: {title: '员工ID',order: 7,view: 'text', type: 'string',},
|
||||
employeeName: {title: '员工姓名',order: 8,view: 'text', type: 'string',},
|
||||
instructionTagId: {title: '分类标签',order: 9,view: 'text', type: 'string',},
|
||||
instructionTagName: {title: '分类标签名称',order: 10,view: 'text', type: 'string',},
|
||||
categoryId: {title: '服务类别ID,nu_config_service_category.id',order: 11,view: 'text', type: 'string',},
|
||||
categoryName: {title: '服务类别名称',order: 12,view: 'text', type: 'string',},
|
||||
typeId: {title: '服务类型ID,nu_config_service_type.id',order: 13,view: 'text', type: 'string',},
|
||||
typeName: {title: '服务类型名称',order: 14,view: 'text', type: 'string',},
|
||||
directiveId: {title: '服务指令ID,nu_config_service_directive.id',order: 15,view: 'text', type: 'string',},
|
||||
directiveName: {title: '服务指令名称',order: 16,view: 'text', type: 'string',},
|
||||
cycleTypeId: {title: '周期类型ID',order: 17,view: 'text', type: 'string',},
|
||||
cycleType: {title: '周期类型',order: 18,view: 'text', type: 'string',},
|
||||
cycleValue: {title: '周期值',order: 19,view: 'text', type: 'string',},
|
||||
previewFile: {title: '服务指令图片大图',order: 20,view: 'text', type: 'string',},
|
||||
previewFileSmall: {title: '服务指令图片小图',order: 21,view: 'text', type: 'string',},
|
||||
mp3File: {title: '语音文件',order: 22,view: 'text', type: 'string',},
|
||||
mp4File: {title: '视频文件',order: 23,view: 'text', type: 'string',},
|
||||
serviceDuration: {title: '服务时长(分钟)',order: 24,view: 'text', type: 'string',},
|
||||
serviceContent: {title: '服务说明',order: 25,view: 'text', type: 'string',},
|
||||
tollPrice: {title: '收费价格',order: 26,view: 'number', type: 'number',},
|
||||
comPrice: {title: '提成价格',order: 27,view: 'number', type: 'number',},
|
||||
realComPrice: {title: '实际提成价格',order: 28,view: 'number', type: 'number',},
|
||||
packageId: {title: '服务指令包ID',order: 29,view: 'text', type: 'string',},
|
||||
packageName: {title: '服务指令包名称',order: 30,view: 'text', type: 'string',},
|
||||
izPackage: {title: '是否是服务指令包 Y是 N否',order: 31,view: 'text', type: 'string',},
|
||||
startTime: {title: '开始时间',order: 32,view: 'datetime', type: 'string',},
|
||||
endTime: {title: '结束时间',order: 33,view: 'datetime', type: 'string',},
|
||||
beginTime: {title: '实际开始时间',order: 34,view: 'datetime', type: 'string',},
|
||||
finishTime: {title: '实际结束时间',order: 35,view: 'datetime', type: 'string',},
|
||||
izStart: {title: '是否开始 Y是 N否',order: 36,view: 'text', type: 'string',},
|
||||
izFinish: {title: '是否完成 Y是 N否',order: 37,view: 'text', type: 'string',},
|
||||
createBy: {title: '创建人',order: 38,view: 'text', type: 'string',},
|
||||
createTime: {title: '创建日期',order: 39,view: 'datetime', type: 'string',},
|
||||
updateBy: {title: '更新人',order: 40,view: 'text', type: 'string',},
|
||||
updateTime: {title: '更新日期',order: 41,view: 'datetime', type: 'string',},
|
||||
tplinkPath: {title: 'tplink下载地址',order: 43,view: 'text', type: 'string',},
|
||||
manuallyPicPath: {title: '手动拍照',order: 44,view: 'textarea', type: 'string',},
|
||||
manuallyMp4Path: {title: '手动录制',order: 45,view: 'textarea', type: 'string',},
|
||||
optType: {title: '执行类型 1单人 2协助 3转单',order: 46,view: 'text', type: 'string',},
|
||||
timeoutDuration: {title: '服务容错时长(end_time + 这个时间) 小于 begin_time算超时',order: 47,view: 'text', type: 'string',},
|
||||
izTimeout: {title: '是否超时 Y超时 N未超时',order: 48,view: 'text', type: 'string',},
|
||||
optIds: {title: '实际执行人id(多个); 主要执行人+协助人',order: 49,view: 'text', type: 'string',},
|
||||
optNames: {title: '实际执行人名称(多个); 主要执行人+协助人',order: 50,view: 'text', type: 'string',},
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
@ -0,0 +1,518 @@
|
|||
<template>
|
||||
<a-spin :spinning="loading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form v-bind="formItemLayout" name="DirectiveOrderForm" ref="formRef">
|
||||
<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-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;
|
||||
|
||||
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;
|
||||
});
|
||||
|
||||
|
||||
|
||||
function add() {
|
||||
resetFields();
|
||||
nuBizNuDirectiveOrderSubTable.dataSource = [];
|
||||
}
|
||||
|
||||
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,
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.ant-tabs-tabpane.sub-one-form {
|
||||
max-height: 340px;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<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>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ref, unref } from 'vue';
|
||||
import { BasicModal, useModalInner } from '/@/components/Modal';
|
||||
import DirectiveOrderForm from './AppraisalForm.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 [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 handleSubmit() {
|
||||
formComponent.value.submitForm();
|
||||
}
|
||||
|
||||
function submitSuccess(){
|
||||
emit('success');
|
||||
closeModal();
|
||||
}
|
||||
|
||||
return {
|
||||
registerModal,
|
||||
title,
|
||||
formComponent,
|
||||
formDisabled,
|
||||
handleSubmit,
|
||||
submitSuccess
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
/** 时间和数字输入框样式 */
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.ant-calendar-picker) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,371 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="startTime">
|
||||
<template #label><span title="开始时间">开始时间</span></template>
|
||||
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择开始时间" v-model:value="queryParam.startTime" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="endTime">
|
||||
<template #label><span title="结束时间">结束时间</span></template>
|
||||
<a-date-picker show-time valueFormat="YYYY-MM-DD HH:mm:ss" placeholder="请选择结束时间" v-model:value="queryParam.endTime" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="appraisalStatus">
|
||||
<template #label><span title="考核状态">考核状态</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.appraisalStatus"
|
||||
dictCode="appraisal_status" placeholder="选择考核状态"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="orderNo">
|
||||
<template #label><span title="单号">单号</span></template>
|
||||
<JInput v-model:value="queryParam.orderNo" placeholder="输入单号" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="orderType">
|
||||
<template #label><span title="工单类型">工单类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.orderType"
|
||||
dictCode="service_instruction_tag" placeholder="选择工单类型"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="optType">
|
||||
<template #label><span title="执行类型">执行类型</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.optType"
|
||||
dictCode="directive_order_opt_type" placeholder="选择执行类型"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="nuId">
|
||||
<template #label><span title="护理单元">护理单元</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.nuId"
|
||||
:dictCode="`nu_base_info,nu_name,nu_id,del_flag = 0 order by nu_id asc`" placeholder="选择护理单元"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="employeeId">
|
||||
<template #label><span title="员工">员工</span></template>
|
||||
<j-dict-select-tag 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>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="elderId">
|
||||
<template #label><span title="长者">长者</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.elderId"
|
||||
:dictCode="`nu_biz_elder_info,name,id,del_flag = 0 order by id asc`" placeholder="选择长者"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izPackage">
|
||||
<template #label><span title="服务包">服务包</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.izPackage"
|
||||
dictCode="is_open" placeholder="是否服务包"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izFinish">
|
||||
<template #label><span title="执行">执行</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.izFinish"
|
||||
dictCode="is_open" placeholder="是否执行"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="izTimeout">
|
||||
<template #label><span title="超时">超时</span></template>
|
||||
<j-dict-select-tag v-model:value="queryParam.izTimeout"
|
||||
dictCode="is_open" placeholder="是否超时"
|
||||
allowClear :ignoreDisabled="true" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
|
||||
<a-button preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
</a>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<!-- <BasicTable @register="registerTable" :rowSelection="rowSelection">-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<!-- <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button>批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>-->
|
||||
<!-- 高级查询 -->
|
||||
<!-- <super-query :config="superQueryConfig" @search="handleSuperQuery" />-->
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<!-- <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>-->
|
||||
<TableAction :actions="getTableAction(record)"/>
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<AppraisalModal @register="registerModal" @success="handleSuccess"></AppraisalModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="directiveorder-directiveOrder" setup>
|
||||
import {ref, reactive, computed, unref} from 'vue';
|
||||
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 {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './appraisal.api';
|
||||
import {downloadFile} from '/@/utils/common/renderUtils';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import { cloneDeep } from "lodash-es";
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
//注册model
|
||||
const [registerModal, {openModal}] = useModal();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||
tableProps:{
|
||||
title: '服务考核',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
striped: true,
|
||||
showIndexColumn: true,
|
||||
actionColumn: {
|
||||
width: 140,
|
||||
fixed:'right'
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
// let rangerQuery = await setRangeQuery();
|
||||
// return Object.assign(params, rangerQuery);
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name:"服务考核",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
})
|
||||
|
||||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
|
||||
// 高级查询配置
|
||||
// const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
// function handleSuperQuery(params) {
|
||||
// Object.keys(params).map((k) => {
|
||||
// queryParam[k] = params[k];
|
||||
// });
|
||||
// reload();
|
||||
// }
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
// function handleAdd() {
|
||||
// openModal(true, {
|
||||
// isUpdate: false,
|
||||
// showFooter: true,
|
||||
// });
|
||||
// }
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
// async function handleDelete(record) {
|
||||
// await deleteOne({id: record.id}, handleSuccess);
|
||||
// }
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
// async function batchHandleDelete() {
|
||||
// await batchDelete({ids: selectedRowKeys.value},handleSuccess);
|
||||
// }
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record){
|
||||
return [
|
||||
{
|
||||
label: '考核',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
{
|
||||
label: '业务数据',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
},
|
||||
]
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
// function getDropDownAction(record){
|
||||
// return [
|
||||
// {
|
||||
// label: '详情',
|
||||
// onClick: handleDetail.bind(null, record),
|
||||
// },
|
||||
// {
|
||||
// label: '删除',
|
||||
// popConfirm: {
|
||||
// title: '是否确认删除',
|
||||
// confirm: handleDelete.bind(null, record),
|
||||
// placement: 'topLeft'
|
||||
// },
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
|
||||
|
||||
|
||||
/* ----------------------以下为原生查询需要添加的-------------------------- */
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
// let rangeField = 'startTime,endTime,'
|
||||
|
||||
/**
|
||||
* 设置范围查询条件
|
||||
*/
|
||||
// async function setRangeQuery(){
|
||||
// let queryParamClone = cloneDeep(queryParam);
|
||||
// if (rangeField) {
|
||||
// let fieldsValue = rangeField.split(',');
|
||||
// fieldsValue.forEach(item => {
|
||||
// if (queryParamClone[item]) {
|
||||
// let range = queryParamClone[item];
|
||||
// queryParamClone[item+'_begin'] = range[0];
|
||||
// queryParamClone[item+'_end'] = range[1];
|
||||
// delete queryParamClone[item];
|
||||
// } else {
|
||||
// queryParamClone[item+'_begin'] = '';
|
||||
// queryParamClone[item+'_end'] = '';
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// return queryParamClone;
|
||||
// }
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue