合规性手续模版新增
This commit is contained in:
@ -75,3 +75,12 @@ export const getWhetherItExists = (id: string | number): AxiosPromise<ListOfForm
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//模版新增
|
||||||
|
export const addFormalities = (data: any): AxiosPromise<ListOfFormalitiesVO> => {
|
||||||
|
return request({
|
||||||
|
url: '/formalities/formalitiesAreConsolidated/addFormalities',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
@ -49,6 +49,11 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['formalities:listOfFormalities:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd()" v-hasPermi="['formalities:listOfFormalities:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="addTemplate()" v-hasPermi="['formalities:formalitiesAreConsolidated:addFormalities']"
|
||||||
|
>新增模版</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
@ -243,6 +248,27 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 添加或修改手续办理清单模板对话框 -->
|
||||||
|
<el-dialog title="添加手续办理清单模板" v-model="tempDialogVisible" width="500px" append-to-body @close="templateCancel">
|
||||||
|
<el-form ref="listOfFormalitiesFormRef" :model="formTemplate" label-width="80px">
|
||||||
|
<el-form-item label="父级" prop="formalitiesPid" :rules="[{ required: true, message: '请选择父级', trigger: 'blur' }]">
|
||||||
|
<el-select v-model="formTemplate.formalitiesPid" placeholder="请选择父级">
|
||||||
|
<el-option label="根目录" value="0" />
|
||||||
|
<el-option v-for="item in listOfFormalitiesList" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="名称" prop="formalitiesName" :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
|
||||||
|
<el-input v-model="formTemplate.formalitiesName" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitFormTemplate">确 定</el-button>
|
||||||
|
<el-button @click="templateCancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -258,6 +284,7 @@ import {
|
|||||||
editStatus,
|
editStatus,
|
||||||
getTemplateTreeList
|
getTemplateTreeList
|
||||||
} from '@/api/formalities/formalitiesAreConsolidated';
|
} from '@/api/formalities/formalitiesAreConsolidated';
|
||||||
|
import { listListOfFormalities, addFormalities } from '@/api/formalities/listOfFormalities';
|
||||||
import {
|
import {
|
||||||
FormalitiesAreConsolidatedVO,
|
FormalitiesAreConsolidatedVO,
|
||||||
FormalitiesAreConsolidatedQuery,
|
FormalitiesAreConsolidatedQuery,
|
||||||
@ -294,6 +321,7 @@ const dialog = reactive<DialogOption>({
|
|||||||
visible: false,
|
visible: false,
|
||||||
title: ''
|
title: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
const file = ref(null);
|
const file = ref(null);
|
||||||
const fileParams = reactive({
|
const fileParams = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -411,7 +439,39 @@ const handleAdd = async () => {
|
|||||||
tempTreeList.value = res.data;
|
tempTreeList.value = res.data;
|
||||||
templateVisbile.value = true;
|
templateVisbile.value = true;
|
||||||
};
|
};
|
||||||
|
const tempDialogVisible = ref(false);
|
||||||
|
const formTemplate: any = ref({
|
||||||
|
formalitiesPid: '',
|
||||||
|
formalitiesName: ''
|
||||||
|
});
|
||||||
|
const listOfFormalitiesList: any = ref([]);
|
||||||
|
//新增模版
|
||||||
|
const addTemplate = async () => {
|
||||||
|
tempDialogVisible.value = true;
|
||||||
|
const res = await listListOfFormalities();
|
||||||
|
listOfFormalitiesList.value = res.data;
|
||||||
|
};
|
||||||
|
//确定信息
|
||||||
|
const submitFormTemplate = async () => {
|
||||||
|
const params = {
|
||||||
|
projectId: currentProject.value.id,
|
||||||
|
addBusFormalitiesAreConsolidatedBo: {
|
||||||
|
...formTemplate.value
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const res = await addFormalities(params);
|
||||||
|
if (res.code == 200) {
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
templateCancel();
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
//取消
|
||||||
|
const templateCancel = () => {
|
||||||
|
tempDialogVisible.value = false;
|
||||||
|
formTemplate.value.formalitiesPid = '';
|
||||||
|
formTemplate.value.formalitiesName = '';
|
||||||
|
};
|
||||||
// 选择模板
|
// 选择模板
|
||||||
const setTemp = async () => {
|
const setTemp = async () => {
|
||||||
// form.value.formalitiesPid = tempValue.value[tempValue.value.length - 1];
|
// form.value.formalitiesPid = tempValue.value[tempValue.value.length - 1];
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<formalitiesAreConsolidated ref="formalitiesAreConsolidatedRef" class="overlay" v-if="showFormalitiesAreConsolidated" />
|
<formalitiesAreConsolidated ref="formalitiesAreConsolidatedRef" class="overlay" v-if="showFormalitiesAreConsolidated" />
|
||||||
|
|
||||||
<div class="p-2" v-else>
|
<div class="p-2" v-else>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
|
Reference in New Issue
Block a user