From fdd8173de21c03d7b1169ec18d870ee268b6ada3 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Tue, 29 Oct 2024 11:53:07 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E4=B8=93?= =?UTF-8?q?=E9=A1=B9=E7=BB=8F=E8=B4=B9=E9=A2=84=E7=AE=97=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=B7=BB=E5=8A=A0=2010.29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectFeeBudgetController.java | 162 +++++++++++++++ .../entity/ProjectFeeBudget.java | 104 ++++++++++ .../mapper/ProjectFeeBudgetMapper.java | 17 ++ .../mapper/xml/ProjectFeeBudgetMapper.xml | 5 + .../service/IProjectFeeBudgetService.java | 14 ++ .../impl/ProjectFeeBudgetServiceImpl.java | 19 ++ .../projectFeeBudget/ProjectFeeBudget.api.ts | 64 ++++++ .../projectFeeBudget/ProjectFeeBudget.data.ts | 118 +++++++++++ .../projectFeeBudget/ProjectFeeBudgetList.vue | 190 ++++++++++++++++++ .../components/ProjectFeeBudgetForm.vue | 70 +++++++ .../components/ProjectFeeBudgetModal.vue | 76 +++++++ 11 files changed, 839 insertions(+) create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/entity/ProjectFeeBudget.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/ProjectFeeBudgetMapper.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/xml/ProjectFeeBudgetMapper.xml create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/IProjectFeeBudgetService.java create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/impl/ProjectFeeBudgetServiceImpl.java create mode 100644 jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.api.ts create mode 100644 jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.data.ts create mode 100644 jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudgetList.vue create mode 100644 jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetForm.vue create mode 100644 jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetModal.vue diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java new file mode 100644 index 0000000..f72784a --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java @@ -0,0 +1,162 @@ +package org.jeecg.modules.demo.projectFeeBudget.controller; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.system.base.controller.JeecgController; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; +import org.jeecg.modules.demo.projectFeeBudget.service.IProjectFeeBudgetService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Arrays; + +/** + * @Description: 项目经费预算 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +@Api(tags = "项目经费预算") +@RestController +@RequestMapping("/projectFeeBudget/projectFeeBudget") +@Slf4j +public class ProjectFeeBudgetController extends JeecgController { + @Autowired + private IProjectFeeBudgetService projectFeeBudgetService; + + /** + * 分页列表查询 + * + * @param projectFeeBudget + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "项目经费预算-分页列表查询") + @ApiOperation(value = "项目经费预算-分页列表查询", notes = "项目经费预算-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(ProjectFeeBudget projectFeeBudget, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(projectFeeBudget, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = projectFeeBudgetService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param projectFeeBudget + * @return + */ + @AutoLog(value = "项目经费预算-添加") + @ApiOperation(value = "项目经费预算-添加", notes = "项目经费预算-添加") +// @RequiresPermissions("projectFeeBudget:project_fee_budget:add") + @PostMapping(value = "/add") + public Result add(@RequestBody ProjectFeeBudget projectFeeBudget) { + projectFeeBudgetService.save(projectFeeBudget); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param projectFeeBudget + * @return + */ + @AutoLog(value = "项目经费预算-编辑") + @ApiOperation(value = "项目经费预算-编辑", notes = "项目经费预算-编辑") +// @RequiresPermissions("projectFeeBudget:project_fee_budget:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) + public Result edit(@RequestBody ProjectFeeBudget projectFeeBudget) { + projectFeeBudgetService.updateById(projectFeeBudget); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "项目经费预算-通过id删除") + @ApiOperation(value = "项目经费预算-通过id删除", notes = "项目经费预算-通过id删除") +// @RequiresPermissions("projectFeeBudget:project_fee_budget:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name = "id", required = true) String id) { + projectFeeBudgetService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "项目经费预算-批量删除") + @ApiOperation(value = "项目经费预算-批量删除", notes = "项目经费预算-批量删除") +// @RequiresPermissions("projectFeeBudget:project_fee_budget:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) { + this.projectFeeBudgetService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "项目经费预算-通过id查询") + @ApiOperation(value = "项目经费预算-通过id查询", notes = "项目经费预算-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name = "id", required = true) String id) { + ProjectFeeBudget projectFeeBudget = projectFeeBudgetService.getById(id); + if (projectFeeBudget == null) { + return Result.error("未找到对应数据"); + } + return Result.OK(projectFeeBudget); + } + + /** + * 导出excel + * + * @param request + * @param projectFeeBudget + */ +// @RequiresPermissions("projectFeeBudget:project_fee_budget:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, ProjectFeeBudget projectFeeBudget) { + return super.exportXls(request, projectFeeBudget, ProjectFeeBudget.class, "项目经费预算"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("projectFeeBudget:project_fee_budget:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, ProjectFeeBudget.class); + } + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/entity/ProjectFeeBudget.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/entity/ProjectFeeBudget.java new file mode 100644 index 0000000..b03433b --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/entity/ProjectFeeBudget.java @@ -0,0 +1,104 @@ +package org.jeecg.modules.demo.projectFeeBudget.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Description: 项目经费预算 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +@Data +@TableName("project_fee_budget") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value = "project_fee_budget对象", description = "项目经费预算") +public class ProjectFeeBudget implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private String id; + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + /** + * 创建日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private Date createTime; + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + /** + * 更新日期 + */ + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private Date updateTime; + /** + * 所属部门 + */ + @ApiModelProperty(value = "所属部门") + private String sysOrgCode; + /** + * 项目id + */ + @Excel(name = "项目id", width = 15) + @ApiModelProperty(value = "项目id") + private String projectId; + /** + * 预算科目 + */ + @Excel(name = "预算科目", width = 15) + @ApiModelProperty(value = "预算科目") + private String budgetSubject; + /** + * 合计 + */ + @Excel(name = "合计", width = 15) + @ApiModelProperty(value = "合计") + private BigDecimal totalFee; + /** + * 专项经费 + */ + @Excel(name = "专项经费", width = 15) + @ApiModelProperty(value = "专项经费") + private BigDecimal specialFee; + /** + * 自筹经费 + */ + @Excel(name = "自筹经费", width = 15) + @ApiModelProperty(value = "自筹经费") + private BigDecimal selfFee; + /** + * 专项经费说明 + */ + @Excel(name = "专项经费说明", width = 15) + @ApiModelProperty(value = "专项经费说明") + private String specialFeeMark; +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/ProjectFeeBudgetMapper.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/ProjectFeeBudgetMapper.java new file mode 100644 index 0000000..95db8a8 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/ProjectFeeBudgetMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.projectFeeBudget.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 项目经费预算 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +public interface ProjectFeeBudgetMapper extends BaseMapper { + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/xml/ProjectFeeBudgetMapper.xml b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/xml/ProjectFeeBudgetMapper.xml new file mode 100644 index 0000000..a26d9e2 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/mapper/xml/ProjectFeeBudgetMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/IProjectFeeBudgetService.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/IProjectFeeBudgetService.java new file mode 100644 index 0000000..374af4d --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/IProjectFeeBudgetService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.projectFeeBudget.service; + +import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 项目经费预算 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +public interface IProjectFeeBudgetService extends IService { + +} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/impl/ProjectFeeBudgetServiceImpl.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/impl/ProjectFeeBudgetServiceImpl.java new file mode 100644 index 0000000..0516b20 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/service/impl/ProjectFeeBudgetServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.projectFeeBudget.service.impl; + +import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; +import org.jeecg.modules.demo.projectFeeBudget.mapper.ProjectFeeBudgetMapper; +import org.jeecg.modules.demo.projectFeeBudget.service.IProjectFeeBudgetService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 项目经费预算 + * @Author: jeecg-boot + * @Date: 2024-10-29 + * @Version: V1.0 + */ +@Service +public class ProjectFeeBudgetServiceImpl extends ServiceImpl implements IProjectFeeBudgetService { + +} diff --git a/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.api.ts b/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.api.ts new file mode 100644 index 0000000..d8e9fab --- /dev/null +++ b/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.api.ts @@ -0,0 +1,64 @@ +import {defHttp} from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/projectFeeBudget/projectFeeBudget/list', + save='/projectFeeBudget/projectFeeBudget/add', + edit='/projectFeeBudget/projectFeeBudget/edit', + deleteOne = '/projectFeeBudget/projectFeeBudget/delete', + deleteBatch = '/projectFeeBudget/projectFeeBudget/deleteBatch', + importExcel = '/projectFeeBudget/projectFeeBudget/importExcel', + exportXls = '/projectFeeBudget/projectFeeBudget/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}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +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 + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.data.ts b/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.data.ts new file mode 100644 index 0000000..8d77919 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudget.data.ts @@ -0,0 +1,118 @@ +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: '项目id', + align:"center", + dataIndex: 'projectId' + }, + { + title: '预算科目', + align:"center", + dataIndex: 'budgetSubject' + }, + { + title: '合计', + align:"center", + dataIndex: 'totalFee' + }, + { + title: '专项经费', + align:"center", + dataIndex: 'specialFee' + }, + { + title: '自筹经费', + align:"center", + dataIndex: 'selfFee' + }, + { + title: '专项经费说明', + align:"center", + dataIndex: 'specialFeeMark' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '项目id', + field: 'projectId', + component: 'Input', + }, + { + label: '预算科目', + field: 'budgetSubject', + component: 'Input', + }, + { + label: '合计', + field: 'totalFee', + component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, + ]; + }, + }, + { + label: '专项经费', + field: 'specialFee', + component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, + ]; + }, + }, + { + label: '自筹经费', + field: 'selfFee', + component: 'InputNumber', + dynamicRules: ({model,schema}) => { + return [ + { required: false}, + { pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'}, + ]; + }, + }, + { + label: '专项经费说明', + field: 'specialFeeMark', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + projectId: {title: '项目id',order: 0,view: 'text', type: 'string',}, + budgetSubject: {title: '预算科目',order: 1,view: 'text', type: 'string',}, + totalFee: {title: '合计',order: 2,view: 'number', type: 'number',}, + specialFee: {title: '专项经费',order: 3,view: 'number', type: 'number',}, + selfFee: {title: '自筹经费',order: 4,view: 'number', type: 'number',}, + specialFeeMark: {title: '专项经费说明',order: 5,view: 'text', type: 'string',}, +}; + +/** +* 流程表单调用这个方法获取formSchema +* @param param +*/ +export function getBpmFormSchema(_formData): FormSchema[]{ + // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema + return formSchema; +} \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudgetList.vue b/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudgetList.vue new file mode 100644 index 0000000..bd6c168 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectFeeBudget/ProjectFeeBudgetList.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetForm.vue b/jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetForm.vue new file mode 100644 index 0000000..1d07b63 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetForm.vue @@ -0,0 +1,70 @@ + + + \ No newline at end of file diff --git a/jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetModal.vue b/jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetModal.vue new file mode 100644 index 0000000..38e3a88 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectFeeBudget/components/ProjectFeeBudgetModal.vue @@ -0,0 +1,76 @@ + + + + + \ No newline at end of file From 5e7a51cc7a5581068aac92c1e077f8426bd0fac8 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Tue, 29 Oct 2024 14:43:47 +0800 Subject: [PATCH 02/14] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E4=B8=93?= =?UTF-8?q?=E9=A1=B9=E7=BB=8F=E8=B4=B9=E9=A2=84=E7=AE=97=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=B7=BB=E5=8A=A0=2010.29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JVxeTableDemo/func-demo/JSBCDemo.vue | 2 +- .../yusuanshu/ProjectFeeBudgetDemo.vue | 224 ++++++++++++++++++ .../kejigongguan/yusuanshu/index.vue | 11 +- 3 files changed, 232 insertions(+), 5 deletions(-) create mode 100644 jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue diff --git a/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue b/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue index b44d4ef..d762b98 100644 --- a/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue +++ b/jeecgboot-vue3/src/views/demo/jeecg/JVxeTableDemo/func-demo/JSBCDemo.vue @@ -1,5 +1,5 @@ + + + + diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue index ac8cbcd..e1c5e0e 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue @@ -6,13 +6,14 @@ - - - + + + + - + @@ -28,6 +29,7 @@ import TianBaoShuMingDemo from './TianBaoShuMingDemo.vue'; import ProjectBaseInfoDemo from './ProjectBaseInfoDemo.vue'; import DepartBaseInfoDemo from './DepartBaseInfoDemo.vue'; + import ProjectFeeBudgetDemo from './ProjectFeeBudgetDemo.vue'; import XiangMuJiXiaoMuBiaoDemo from '../xiangmushu/XiangMuJiXiaoMuBiaoDemo.vue'; import YiJianDemo from '../xiangmushu/YiJianDemo.vue'; import HeZuoDanWeiDemo from '../xiangmushu/HeZuoDanWeiDemo.vue'; @@ -50,6 +52,7 @@ FengMianDemo: FengMianDemo, ProjectBaseInfoDemo: ProjectBaseInfoDemo, DepartBaseInfoDemo: DepartBaseInfoDemo, + ProjectFeeBudgetDemo: ProjectFeeBudgetDemo, ZhengWenDemo: ZhengWenDemo, XiangMuHeZuoKaiFaDemo: XiangMuHeZuoKaiFaDemo, XiangMuJiXiaoMuBiaoDemo: XiangMuJiXiaoMuBiaoDemo, From 6b31ff9d953ce9160269b855f705ed7d5e799522 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Tue, 29 Oct 2024 17:18:29 +0800 Subject: [PATCH 03/14] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E4=B8=93?= =?UTF-8?q?=E9=A1=B9=E7=BB=8F=E8=B4=B9=E9=A2=84=E7=AE=97=20=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E6=B7=BB=E5=8A=A0=2010.29?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vxe/controller/VxeMockController.java | 41 ++++++++- .../demo/mock/vxe/json/projectFeeBudget.json | 16 ++++ .../ProjectFeeBudgetController.java | 24 ++++++ .../yusuanshu/ProjectFeeBudgetDemo.vue | 83 +++++++++---------- 4 files changed, 117 insertions(+), 47 deletions(-) create mode 100644 jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/controller/VxeMockController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/controller/VxeMockController.java index e51b057..4d24e39 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/controller/VxeMockController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/controller/VxeMockController.java @@ -1,8 +1,10 @@ package org.jeecg.modules.demo.mock.vxe.controller; +import cn.hutool.core.util.ObjectUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -16,6 +18,9 @@ import org.jeecg.common.system.query.QueryCondition; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.modules.demo.mock.vxe.entity.MockEntity; import org.jeecg.modules.demo.mock.vxe.websocket.VxeSocket; +import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; +import org.jeecg.modules.demo.projectFeeBudget.service.IProjectFeeBudgetService; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -33,6 +38,9 @@ import java.util.*; @Slf4j public class VxeMockController { + @Autowired + private IProjectFeeBudgetService projectFeeBudgetService; + /** * 模拟更改状态 * @@ -65,7 +73,7 @@ public class VxeMockController { */ @Deprecated @GetMapping("/change2") - public Result mockChange2(@RequestParam("id") String id,@RequestParam("tug_status") String tugStatus) { + public Result mockChange2(@RequestParam("id") String id, @RequestParam("tug_status") String tugStatus) { /* id 为 行的id(rowId),只要获取到rowId,那么只需要调用 VXESocket.sendMessageToAll() 即可 */ // 封装行数据 @@ -200,6 +208,37 @@ public class VxeMockController { return Result.ok(page); } + + /** + * @description: 获取项目经费预算填报项 + * @param: [pageNo, pageSize, parentId] + * @return: org.jeecg.common.api.vo.Result + * @author: z.h.c + * @date: 24/10/29 15:47 + */ + @GetMapping("/getProjectFeeBudgetList/{projectId}") + public Result getProjectFeeBudgetList(@PathVariable("projectId") String projectId, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + // 父级id,根据父级id查询子级,如果为空则查询顶级 + @RequestParam(name = "parentId", required = false) String parentId) { + + JSONArray dataList; + List feeBudgetList = projectFeeBudgetService.list(new LambdaQueryWrapper().eq(ProjectFeeBudget::getProjectId,projectId)); + if (ObjectUtil.isNotEmpty(feeBudgetList)) { + dataList = JSONArray.parseArray(JSON.toJSONString(feeBudgetList)); + } else { + String path = "classpath:org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json"; + dataList = readJsonData(path); + /*// 读取JSON数据 + if (dataList == null) { + return Result.error("读取数据失败!"); + }*/ + } + IPage page = this.queryDataPage(dataList, parentId, pageNo, pageSize); + return Result.ok(page); + } + /** * 获取模拟“调度计划”页面的数据 * diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json new file mode 100644 index 0000000..e9936b2 --- /dev/null +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json @@ -0,0 +1,16 @@ +[ +{"budgetSubject":"设备费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""}, +{"budgetSubject":"材料费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"测试化验加工费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"燃料动力费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"差旅费/会议费/国际合作与交流费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"出版/文献/信息传播/知识产权事务费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"劳务费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"专家咨询费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"其他支出","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"本次申请省财政经费支持","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"本次申请省财政经费支持","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"其他财政拨款","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"单位自有货币资金","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +{"budgetSubject":"其他资金","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} +] diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java index f72784a..c0f9f5f 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java @@ -1,7 +1,10 @@ package org.jeecg.modules.demo.projectFeeBudget.controller; +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.ddl.history.IDdlGenerator; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -11,6 +14,7 @@ import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.UUIDGenerator; import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; import org.jeecg.modules.demo.projectFeeBudget.service.IProjectFeeBudgetService; import org.springframework.beans.factory.annotation.Autowired; @@ -20,6 +24,7 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.Arrays; +import java.util.List; /** * @Description: 项目经费预算 @@ -35,6 +40,25 @@ public class ProjectFeeBudgetController extends JeecgController().eq(ProjectFeeBudget::getProjectId,projectId)); + List list = JSONArray.parseArray(tableData.toJSONString(), ProjectFeeBudget.class); + list.forEach(obj->{ + obj.setProjectId(projectId); + obj.setId(UUIDGenerator.generate()); + }); + projectFeeBudgetService.saveBatch(list); + return Result.ok(); + } + /** * 分页列表查询 * diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue index 520af7a..d2bb459 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue @@ -1,5 +1,5 @@ diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue index cf9c267..9070b12 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/xiangmushu/index.vue @@ -4,7 +4,7 @@ - + diff --git a/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts b/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts index 2420cbb..4b916bd 100644 --- a/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts +++ b/jeecgboot-vue3/src/views/projectFile/ProjectFile.data.ts @@ -12,10 +12,20 @@ export const columns: BasicColumn[] = [ dataIndex: 'projectId' },*/ { + title: '附件名称', + align:"center", + dataIndex: 'fileName', + }, + { title: '附件', align:"center", dataIndex: 'fileUrl', }, + { + title: '类型', + align:"center", + dataIndex: 'fileType', + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ diff --git a/jeecgboot-vue3/src/views/projectFile/zhengwen/ProjectFile4ZhengWen.data.ts b/jeecgboot-vue3/src/views/projectFile/zhengwen/ProjectFile4ZhengWen.data.ts index 2420cbb..580eaba 100644 --- a/jeecgboot-vue3/src/views/projectFile/zhengwen/ProjectFile4ZhengWen.data.ts +++ b/jeecgboot-vue3/src/views/projectFile/zhengwen/ProjectFile4ZhengWen.data.ts @@ -11,11 +11,21 @@ export const columns: BasicColumn[] = [ align:"center", dataIndex: 'projectId' },*/ - { + { + title: '附件名称', + align:"center", + dataIndex: 'fileName', + }, + { title: '附件', align:"center", dataIndex: 'fileUrl', - }, + }, + { + title: '类型', + align:"center", + dataIndex: 'fileType', + }, ]; //查询数据 export const searchFormSchema: FormSchema[] = [ diff --git a/jeecgboot-vue3/src/views/projectFile/zhengwen/components/ProjectFileModal.vue b/jeecgboot-vue3/src/views/projectFile/zhengwen/components/ProjectFileModal.vue index 478cdf8..5fac07c 100644 --- a/jeecgboot-vue3/src/views/projectFile/zhengwen/components/ProjectFileModal.vue +++ b/jeecgboot-vue3/src/views/projectFile/zhengwen/components/ProjectFileModal.vue @@ -46,7 +46,7 @@ try { let values = await validate(); //设置项目id - values.porjectId = route.query.id + values.projectId = route.query.id values.fileFlag = 'zhengwen' setModalProps({confirmLoading: true}); //提交表单 From 572747de6cea0ae0ceee923f28775dbed545eb6d Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Wed, 30 Oct 2024 11:45:04 +0800 Subject: [PATCH 05/14] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E7=BB=8F?= =?UTF-8?q?=E8=B4=B9=E9=A2=84=E7=AE=97=E8=A1=A8=20=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=2010.30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/mock/vxe/json/projectFeeBudget.json | 1 - .../ProjectFeeBudgetController.java | 24 ++++++++-- .../yusuanshu/ProjectFeeBudgetDemo.vue | 48 +++++++++++++++---- 3 files changed, 58 insertions(+), 15 deletions(-) diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json index e9936b2..b1d2e61 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/mock/vxe/json/projectFeeBudget.json @@ -9,7 +9,6 @@ {"budgetSubject":"专家咨询费","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} {"budgetSubject":"其他支出","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} {"budgetSubject":"本次申请省财政经费支持","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} -{"budgetSubject":"本次申请省财政经费支持","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} {"budgetSubject":"其他财政拨款","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} {"budgetSubject":"单位自有货币资金","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} {"budgetSubject":"其他资金","totalFee":0.00,"specialFee":0.00,"selfFee":0.00,"specialFeeMark":""} diff --git a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java index c0f9f5f..dca9601 100644 --- a/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java +++ b/jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/projectFeeBudget/controller/ProjectFeeBudgetController.java @@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.ddl.history.IDdlGenerator; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -12,9 +11,12 @@ import lombok.extern.slf4j.Slf4j; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.jeecg.common.api.vo.Result; import org.jeecg.common.aspect.annotation.AutoLog; +import org.jeecg.common.exception.JeecgBootException; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.UUIDGenerator; +import org.jeecg.modules.demo.project.entity.Project; +import org.jeecg.modules.demo.project.service.IProjectService; import org.jeecg.modules.demo.projectFeeBudget.entity.ProjectFeeBudget; import org.jeecg.modules.demo.projectFeeBudget.service.IProjectFeeBudgetService; import org.springframework.beans.factory.annotation.Autowired; @@ -23,8 +25,11 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.math.BigDecimal; import java.util.Arrays; +import java.util.LinkedList; import java.util.List; +import java.util.Optional; /** * @Description: 项目经费预算 @@ -40,6 +45,9 @@ public class ProjectFeeBudgetController extends JeecgController().eq(ProjectFeeBudget::getProjectId,projectId)); + public Result saveAll(@PathVariable("projectId") String projectId, @RequestBody JSONArray tableData) { + Project project = iProjectService.getById(projectId); + Optional.ofNullable(project).orElseThrow(() -> new JeecgBootException("项目不存在")); + List list = JSONArray.parseArray(tableData.toJSONString(), ProjectFeeBudget.class); - list.forEach(obj->{ + list.forEach(obj -> { obj.setProjectId(projectId); obj.setId(UUIDGenerator.generate()); }); + BigDecimal sumFee = Optional.ofNullable(list).orElse(new LinkedList<>()).stream().map(ProjectFeeBudget::getTotalFee).reduce(BigDecimal.ZERO, BigDecimal::add); + //申请财政拨款与经费明细总各比较,不相等 异常退出 + /*if(project.getApplyFund().compareTo(sumFee) != 0){ + throw new JeecgBootException("申请财政拨款与项目经费预算表合计金额不等,请核对!"); + }*/ + projectFeeBudgetService.remove(new LambdaQueryWrapper().eq(ProjectFeeBudget::getProjectId, projectId)); projectFeeBudgetService.saveBatch(list); return Result.ok(); } diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue index d2bb459..0ee5015 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/ProjectFeeBudgetDemo.vue @@ -15,6 +15,7 @@ :loading="loading" :columns="columns" :dataSource="dataSource" + @valueChange="handleValueChange" @save="handleTableSave" /> @@ -68,11 +69,11 @@ const columns = ref([ // 列的宽度 width: 260, // 如果加上了该属性,就代表当前单元格是可编辑的,type就是表单的类型,input就是简单的输入框 - type: JVxeTypes.inputNumber, + type: JVxeTypes.normal, }, { key: 'specialFee', title: '专项经费', width: 260, type: JVxeTypes.inputNumber }, - { key: 'selfFee', title: '自筹经费', width: 260, type: JVxeTypes.inputNumber }, - { key: 'specialFeeMark', title: '专项经费说明', width: 260, type: JVxeTypes.textarea }, + { key: 'selfFee', title: '自筹经费', width: 130, type: JVxeTypes.inputNumber }, + { key: 'specialFeeMark', title: '专项经费说明', width: 380, type: JVxeTypes.textarea }, ]); // 查询url地址 @@ -88,6 +89,31 @@ enum Api { loadData(); + +// 当选择的行变化时触发的事件 +function handleSelectRowChange(event) { + /*console.log("handleSelectRowChange") + selectedRows.value = event.selectedRows; + console.log("handleSelectRowChange-event:", event) + const {type, row, column, value, target, $table} = event + // row.totalFee = event.value; + console.log('--------------------') + console.log('selfFee',row.selfFee) + console.log('totalFee',row.totalFee)*/ + // target.$refs.vxe.columns[4].options = this.stationIdList; + // target.$refs.vxe.columns[17].options = this.userIdList; +}; + +function handleValueChange(event) { + console.log('handleValueChange.event: ', event); + const {type, row, column, value, target, $table} = event + /*console.log('selfFee',row.specialFee) + console.log('selfFee',row.selfFee) + console.log('--------------------')*/ + row.totalFee = row.selfFee + row.specialFee; + console.log('the new totalFee',row.totalFee) +} + // 加载数据 async function loadData() { loading.value = true; @@ -140,6 +166,7 @@ function handleTableSave({ $table, target }) { }) .then(() => { createMessage.success(`保存成功!`); + loadData(); }) .finally(() => { loading.value = false; @@ -170,6 +197,7 @@ function handleTableSave({ $table, target }) { function handleEditClosed(event) { let { $table, row, column } = event; let field = column.property; + // console.log('field',field); // 判断单元格值是否被修改 if ($table.isUpdateByRow(row, field)) { // 校验当前行 @@ -177,9 +205,9 @@ function handleEditClosed(event) { // 校验通过 if (!errMap) { // 【模拟保存】 - let hideLoading = createMessage.loading(`正在保存"${column.title}"`, 0); - console.log('即时保存数据:', row); - defHttp + // let hideLoading = createMessage.loading(`正在保存"${column.title}"`, 0); + console.log('-----handleEditClosed()--即时保存行row数据:', JSON.stringify(row)); + /*defHttp .put({ url: Api.saveRow, params: row, @@ -191,7 +219,7 @@ function handleEditClosed(event) { }) .finally(() => { hideLoading(); - }); + });*/ } }); } @@ -207,9 +235,9 @@ function handlePageChange(event) { }*/ // 当选择的行变化时触发的事件 -function handleSelectRowChange(event) { - selectedRows.value = event.selectedRows; -} +// function handleSelectRowChange(event) { +// selectedRows.value = event.selectedRows; +// } From ff889860cc82af07b78cbee109b2a9b4725d1664 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Wed, 30 Oct 2024 16:12:08 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E8=B4=A2?= =?UTF-8?q?=E6=94=BF=E6=8B=A8=E6=AC=BE=E3=80=81=E5=B9=B4=E5=BA=A6=E9=A2=84?= =?UTF-8?q?=E7=AE=97=E8=A1=A8=20=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0=2010.?= =?UTF-8?q?30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yusuanshu/NianDuYuSuanDemo.vue | 75 +++++++++++++++++++ .../kejigongguan/yusuanshu/index.vue | 14 ++-- 2 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue new file mode 100644 index 0000000..71d106e --- /dev/null +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue @@ -0,0 +1,75 @@ + + diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue index e1c5e0e..7111a8e 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/index.vue @@ -7,6 +7,7 @@ + @@ -30,13 +31,14 @@ import ProjectBaseInfoDemo from './ProjectBaseInfoDemo.vue'; import DepartBaseInfoDemo from './DepartBaseInfoDemo.vue'; import ProjectFeeBudgetDemo from './ProjectFeeBudgetDemo.vue'; - import XiangMuJiXiaoMuBiaoDemo from '../xiangmushu/XiangMuJiXiaoMuBiaoDemo.vue'; + import NianDuYuSuanDemo from './NianDuYuSuanDemo.vue'; +/* import XiangMuJiXiaoMuBiaoDemo from '../xiangmushu/XiangMuJiXiaoMuBiaoDemo.vue'; import YiJianDemo from '../xiangmushu/YiJianDemo.vue'; import HeZuoDanWeiDemo from '../xiangmushu/HeZuoDanWeiDemo.vue'; import ZhuYaoRenYuanDemo from '../xiangmushu/ZhuYaoRenYuanDemo.vue'; import ZhengWenDemo from '../xiangmushu/ZhengWenDemo.vue'; import XiangMuHeZuoKaiFaDemo from '../xiangmushu/XiangMuHeZuoKaiFaDemo.vue'; - import JeecgPdfView from '../xiangmushu/JeecgPdfView.vue'; + import JeecgPdfView from '../xiangmushu/JeecgPdfView.vue';*/ import FuJianDemo from '../xiangmushu/FuJianDemo.vue'; import { useRouter } from 'vue-router'; @@ -53,13 +55,7 @@ ProjectBaseInfoDemo: ProjectBaseInfoDemo, DepartBaseInfoDemo: DepartBaseInfoDemo, ProjectFeeBudgetDemo: ProjectFeeBudgetDemo, - ZhengWenDemo: ZhengWenDemo, - XiangMuHeZuoKaiFaDemo: XiangMuHeZuoKaiFaDemo, - XiangMuJiXiaoMuBiaoDemo: XiangMuJiXiaoMuBiaoDemo, - YiJianDemo: YiJianDemo, - HeZuoDanWeiDemo: HeZuoDanWeiDemo, - ZhuYaoRenYuanDemo: ZhuYaoRenYuanDemo, - JeecgPdfView: JeecgPdfView, + NianDuYuSuanDemo: NianDuYuSuanDemo, FuJianDemo: FuJianDemo, }; return componentType[activeKey.value]; From 6586ac64a324478adada66ce918dda357c20180e Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Wed, 30 Oct 2024 17:39:09 +0800 Subject: [PATCH 07/14] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E8=B4=A2?= =?UTF-8?q?=E6=94=BF=E6=8B=A8=E6=AC=BE=E3=80=81=E5=B9=B4=E5=BA=A6=E9=A2=84?= =?UTF-8?q?=E7=AE=97=E8=A1=A8=20=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0=2010.?= =?UTF-8?q?30?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yusuanshu/NianDuYuSuanDemo.vue | 66 ++++++++++++++++++- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue index 71d106e..d6dfd59 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue @@ -1,25 +1,30 @@ + + diff --git a/jeecgboot-vue3/src/views/projectAnnualBudget/V20241031_1__menu_insert_ProjectAnnualBudget.sql b/jeecgboot-vue3/src/views/projectAnnualBudget/V20241031_1__menu_insert_ProjectAnnualBudget.sql new file mode 100644 index 0000000..a0cb840 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectAnnualBudget/V20241031_1__menu_insert_ProjectAnnualBudget.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/projectAnnualBudget文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2024103103163690040', NULL, '财政拨款分单位年度预算', '/projectAnnualBudget/projectAnnualBudgetList', 'projectAnnualBudget/ProjectAnnualBudgetList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-10-31 15:16:04', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024103103163690041', '2024103103163690040', '添加财政拨款分单位年度预算', NULL, NULL, 0, NULL, NULL, 2, 'projectAnnualBudget:project_annual_budget:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-31 15:16:04', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024103103163690042', '2024103103163690040', '编辑财政拨款分单位年度预算', NULL, NULL, 0, NULL, NULL, 2, 'projectAnnualBudget:project_annual_budget:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-31 15:16:04', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024103103163690043', '2024103103163690040', '删除财政拨款分单位年度预算', NULL, NULL, 0, NULL, NULL, 2, 'projectAnnualBudget:project_annual_budget:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-31 15:16:04', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024103103163690044', '2024103103163690040', '批量删除财政拨款分单位年度预算', NULL, NULL, 0, NULL, NULL, 2, 'projectAnnualBudget:project_annual_budget:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-31 15:16:04', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024103103163690045', '2024103103163690040', '导出excel_财政拨款分单位年度预算', NULL, NULL, 0, NULL, NULL, 2, 'projectAnnualBudget:project_annual_budget:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-31 15:16:04', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024103103163690046', '2024103103163690040', '导入excel_财政拨款分单位年度预算', NULL, NULL, 0, NULL, NULL, 2, 'projectAnnualBudget:project_annual_budget:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-10-31 15:16:04', NULL, NULL, 0, 0, '1', 0); diff --git a/jeecgboot-vue3/src/views/projectAnnualBudget/components/ProjectAnnualBudgetForm.vue b/jeecgboot-vue3/src/views/projectAnnualBudget/components/ProjectAnnualBudgetForm.vue new file mode 100644 index 0000000..72f5cbf --- /dev/null +++ b/jeecgboot-vue3/src/views/projectAnnualBudget/components/ProjectAnnualBudgetForm.vue @@ -0,0 +1,70 @@ + + + diff --git a/jeecgboot-vue3/src/views/projectAnnualBudget/components/ProjectAnnualBudgetModal.vue b/jeecgboot-vue3/src/views/projectAnnualBudget/components/ProjectAnnualBudgetModal.vue new file mode 100644 index 0000000..c210ec7 --- /dev/null +++ b/jeecgboot-vue3/src/views/projectAnnualBudget/components/ProjectAnnualBudgetModal.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue index 106bfc3..2e363d0 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue @@ -1,141 +1,102 @@ - + + From b657c9bb06976a04eab6248de90b58f9b6a142bd Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Thu, 31 Oct 2024 17:03:02 +0800 Subject: [PATCH 12/14] =?UTF-8?q?=E9=A2=84=E7=AE=97=E4=B9=A6-=E8=B4=A2?= =?UTF-8?q?=E6=94=BF=E6=8B=A8=E6=AC=BE=E3=80=81=E5=B9=B4=E5=BA=A6=E9=A2=84?= =?UTF-8?q?=E7=AE=97=E8=A1=A8=20=E5=8A=9F=E8=83=BD=E6=B7=BB=E5=8A=A0=2010.?= =?UTF-8?q?31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yusuanshu/NianDuYuSuanDemo.vue | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue index 2e363d0..6fbec47 100644 --- a/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue +++ b/jeecgboot-vue3/src/views/projectApplication/kejigongguan/yusuanshu/NianDuYuSuanDemo.vue @@ -12,7 +12,8 @@ transform: translate(-50%, -50%); " > - Primary Button + + 单位名称 分年预算 @@ -36,10 +37,19 @@ +
+ 保存 + 返回 +