项目申报表单添加 10.18

master
zhc077 1 month ago
parent a99e3c8af1
commit 07960993ee
  1. 13
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/project/service/impl/ProjectServiceImpl.java
  2. 47
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/data.ts
  3. 3
      jeecgboot-vue3/src/views/projectApplication/kejigongguan/projectApplicationList.vue

@ -11,6 +11,8 @@ import org.jeecg.modules.demo.project.dto.ProjectShenBaoDto;
import org.jeecg.modules.demo.project.entity.Project;
import org.jeecg.modules.demo.project.mapper.ProjectMapper;
import org.jeecg.modules.demo.project.service.IProjectService;
import org.jeecg.modules.demo.projectType.entity.ProjectType;
import org.jeecg.modules.demo.projectType.service.IProjectTypeService;
import org.jeecg.modules.demo.userext.entity.UserExt;
import org.jeecg.modules.demo.userext.service.IUserExtService;
import org.jeecg.modules.system.entity.SysDepart;
@ -43,10 +45,15 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
@Autowired
private IUserExtService iUserExtService;
@Autowired
private IProjectTypeService iProjectTypeService;
@Override
public void save4shenbao(ProjectShenBaoDto dto) {
log.info(">>> the 新增项目审报 reqParams:{}", JSON.toJSONString(dto));
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// SysDepart sysDepart = new SysDepart();
DepartExt departExt = new DepartExt();
// SysUser sysUser = new SysUser();
@ -58,9 +65,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
// BeanUtils.copyProperties(dto, sysUser);
BeanUtils.copyProperties(dto, userExt);
BeanUtils.copyProperties(dto, project);
project.setSysOrgCode(loginUser.getOrgId());
//负责人
project.setProjectCharger(loginUser.getId());
//申请人待提交
project.setProjectStatus("5");
// 预算书不存在
project.setBudgetStatus("10");
this.save(project);
userExt.setUserId(loginUser.getId());
this.iUserExtService.save(userExt);

@ -8,7 +8,8 @@ export const projectBaseInfoSchemas: FormSchema[] = [
field: 'projectTypeid',
component: 'Input',
dynamicDisabled: true,
defaultValue: '科技攻关',
// defaultValue: '',
defaultValue: '1846744340708184065',
},
{
field: 'annualId',
@ -159,11 +160,29 @@ export const departSchemas: FormSchema[] = [
field: 'registerDate',
component: 'DatePicker',
label: '注册时间',
component: 'DatePicker',
// componentProps: {
// component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD',
format: 'YYYY-MM-DD',
},
// edit: true,
// editComponent: 'DatePicker',
// editComponentProps: {
// valueFormat: 'YYYY-MM-DD',
// format: 'YYYY-MM-DD',
// },
// width: 200,
},
// {
// field: 'date',
// label: '2',
// component: 'DatePicker',
// editComponentProps: {
// valueFormat: 'YYYY-MM-DD',
// format: 'YYYY-MM-DD',
// },
// width: 200,
// },
{
field: 'departNameAbbr',
component: 'Input',
@ -260,4 +279,26 @@ export const departSchemas: FormSchema[] = [
];
},
},
{
label: '项目书状态',
field: 'projectStatus',
component: 'Input',
componentProps: {
dictCode: "project_status"
},
defaultValue: '5', //
// dynamicDisabled: true,
ifShow: false,
},
{
label: '预算书状态',
field: 'budgetStatus',
component: 'JDictSelectTag',
componentProps: {
dictCode: "budget_status"
},
defaultValue: "10", //
// dynamicDisabled: true,
ifShow: false,
},
];

@ -18,7 +18,6 @@
<script lang="ts">
import { BasicForm, useForm } from '@/components/Form';
import { defineComponent, ref } from 'vue';
// import PersonTable from './PersonTable.vue';
import { PageWrapper } from '@/components/Page';
import { projectBaseInfoSchemas, userSchemas, departSchemas } from './data';
import { Card } from 'ant-design-vue';
@ -63,7 +62,7 @@
try {
Promise.all([validateProjectInfoForm(), validateUserForm(), validateDepartForm()]).then(function (results) {
const params = {...results[0], ...results[1], ...results[2]}
console.log('results', params);
console.log('results', JSON.stringify(params));
save4shenbao(params);
});
} catch (error) {}

Loading…
Cancel
Save