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

@ -8,7 +8,8 @@ export const projectBaseInfoSchemas: FormSchema[] = [
field: 'projectTypeid', field: 'projectTypeid',
component: 'Input', component: 'Input',
dynamicDisabled: true, dynamicDisabled: true,
defaultValue: '科技攻关', // defaultValue: '',
defaultValue: '1846744340708184065',
}, },
{ {
field: 'annualId', field: 'annualId',
@ -159,11 +160,29 @@ export const departSchemas: FormSchema[] = [
field: 'registerDate', field: 'registerDate',
component: 'DatePicker', component: 'DatePicker',
label: '注册时间', label: '注册时间',
component: 'DatePicker', // component: 'DatePicker',
// componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD',
format: 'YYYY-MM-DD',
},
// edit: true,
// editComponent: 'DatePicker',
// editComponentProps: {
// valueFormat: 'YYYY-MM-DD', // 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', field: 'departNameAbbr',
component: 'Input', 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"> <script lang="ts">
import { BasicForm, useForm } from '@/components/Form'; import { BasicForm, useForm } from '@/components/Form';
import { defineComponent, ref } from 'vue'; import { defineComponent, ref } from 'vue';
// import PersonTable from './PersonTable.vue';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { projectBaseInfoSchemas, userSchemas, departSchemas } from './data'; import { projectBaseInfoSchemas, userSchemas, departSchemas } from './data';
import { Card } from 'ant-design-vue'; import { Card } from 'ant-design-vue';
@ -63,7 +62,7 @@
try { try {
Promise.all([validateProjectInfoForm(), validateUserForm(), validateDepartForm()]).then(function (results) { Promise.all([validateProjectInfoForm(), validateUserForm(), validateDepartForm()]).then(function (results) {
const params = {...results[0], ...results[1], ...results[2]} const params = {...results[0], ...results[1], ...results[2]}
console.log('results', params); console.log('results', JSON.stringify(params));
save4shenbao(params); save4shenbao(params);
}); });
} catch (error) {} } catch (error) {}

Loading…
Cancel
Save