Browse Source

1、新增预算编报表单接口

fuwb 4 months ago
parent
commit
9ce13392e8

+ 5 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/constants/DictConstants.java

@@ -79,6 +79,11 @@ public class DictConstants {
      */
     public static final String APPLICATION_INFO_PICK_TYPE = "application_info_pick_type";
 
+    /**
+     * 预算类型
+     */
+    public static final String BUDGET_TYPE = "budget_type";
+
     /**
      * 性别
      */

+ 65 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/budgetreport/controller/BudgetReportController.java

@@ -0,0 +1,65 @@
+package com.zjugis.module.business.flow.budgetreport.controller;
+
+import com.zjugis.framework.workflow.model.BaseController;
+import com.zjugis.framework.workflow.workflow.WorkFlow;
+import com.zjugis.module.business.flow.budgetreport.service.IBudgetReportService;
+import com.zjugis.module.business.flow.budgetreport.vo.BudgetReportVO;
+import com.zjugis.module.business.flow.procurement.vo.ProcurementVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+import java.util.Map;
+
+/**
+ * 预算编报表 前端控制器
+ *
+ * @author fuwb
+ * @since 2025-03-06
+ */
+@RestController
+@RequestMapping("/budgetReport")
+public class BudgetReportController extends BaseController {
+    @Resource
+    private IBudgetReportService reportService;
+
+    /**
+     * 获取预算编报流程表单
+     *
+     * @param activityTemplateId
+     * @param flowInstanceId
+     * @param userId
+     * @return
+     * @throws Exception
+     */
+    @WorkFlow(isReceiveMaterial = true, isReceiveOpinion = true)
+    @GetMapping("/index")
+    @ResponseBody
+    public String index(String activityTemplateId, String flowInstanceId, String userId) throws Exception {
+        Map<String, Object> map = reportService.getFormParams(flowInstanceId, userId);
+        return resultPage(map);
+    }
+
+    /**
+     * 更新预算编报
+     * @param updateReqVO
+     * @return
+     */
+    @PostMapping("/update")
+    public String updateBudgetReport(@Valid @RequestBody BudgetReportVO updateReqVO) {
+        reportService.updateBudgetReport(updateReqVO);
+        return success(true);
+    }
+
+    /**
+     * 删除预算编报
+     * @param id
+     * @return
+     */
+    @DeleteMapping("/delete")
+    public String deleteBudgetReport(@RequestParam("id") String id) {
+        reportService.deleteBudgetReport(id);
+        return success(true);
+    }
+
+}

+ 88 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/budgetreport/entity/BudgetReport.java

@@ -0,0 +1,88 @@
+package com.zjugis.module.business.flow.budgetreport.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+import com.zjugis.module.business.mybatis.entity.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * 预算编报表
+ *
+ * @author fuwb
+ * @since 2025-03-06
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("oa_budget_report")
+public class BudgetReport extends BaseEntity {
+    private static final long serialVersionUID = -4442895709659133644L;
+
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 与采购申请流程关联的工作流ID
+     */
+    private String instanceId;
+
+    /**
+     * 预算编号
+     */
+    private String budgetNumber;
+
+    /**
+     * 年度
+     */
+    private String budgetYear;
+
+    /**
+     * 预算名称
+     */
+    private String budgetName;
+
+    /**
+     * 预算资金
+     */
+    private Double budgetFunds;
+
+    /**
+     * 预算类型
+     */
+    private String budgetType;
+
+    /**
+     * 申请依据
+     */
+    private String applicationBasis;
+
+    /**
+     * 编报日期
+     */
+    private LocalDateTime reportDate;
+
+    /**
+     * 编报人
+     */
+    private String reporter;
+
+    /**
+     * 流程状态
+     */
+    private Integer flowStatus;
+
+    /**
+     * 流程结束时间
+     */
+    private LocalDateTime flowFinishtime;
+
+}

+ 181 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/budgetreport/event/BudgetReportEvent.java

@@ -0,0 +1,181 @@
+package com.zjugis.module.business.flow.budgetreport.event;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.zjugis.framework.common.util.date.LocalDateTimeUtils;
+import com.zjugis.framework.workflow.exception.BusinessException;
+import com.zjugis.framework.workflow.model.BaseController;
+import com.zjugis.framework.workflow.rpc.remote.WorkflowClient;
+import com.zjugis.framework.workflow.spring.resovler.ParamModel;
+import com.zjugis.module.business.converter.procurement.ProcurementConvert;
+import com.zjugis.module.business.flow.applicationinfo.vo.ApplicationInfoVO;
+import com.zjugis.module.business.flow.budgetreport.entity.BudgetReport;
+import com.zjugis.module.business.flow.budgetreport.service.IBudgetReportService;
+import com.zjugis.module.business.flow.budgetreport.vo.BudgetReportVO;
+import com.zjugis.module.business.flow.procurement.entity.ProcurementApplication;
+import com.zjugis.module.business.mapper.BudgetReportMapper;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.Map;
+import java.util.Objects;
+
+import static com.zjugis.module.business.constants.FlowStatusConstants.*;
+
+/**
+ * 预算编报表 前端控制器
+ *
+ * @author fuwb
+ * @since 2025-03-06
+ */
+@RestController
+@RequestMapping("/budget-report")
+public class BudgetReportEvent extends BaseController {
+    public static final Logger log = LoggerFactory.getLogger(BudgetReportEvent.class);
+    @Resource
+    private WorkflowClient workflowClient;
+    @Resource
+    private IBudgetReportService reportService;
+
+    /**
+     * 设置流程描述
+     *
+     * @param flowInstance     流程实例
+     * @param activityInstance 活动实例
+     * @return true/false
+     */
+    @PostMapping("/setFlowDesc")
+    public String setFlowDesc(@ParamModel Map flowInstance, @ParamModel Map activityInstance) {
+        try {
+            if (!Objects.isNull(activityInstance) && activityInstance.containsKey("flowInstanceId")) {
+                String flowInstanceId = activityInstance.get("flowInstanceId").toString();
+                BudgetReport entity = reportService.findByInstanceId(flowInstanceId);
+                String applyTime = LocalDateTimeUtils.format(entity.getCreateTime(), null);
+                String flowDesc = StringUtils.join(Arrays.asList(entity.getReporter(), applyTime, entity.getBudgetName()), "/");
+                entity.setFlowStatus(FLOW_PROCESS);
+                reportService.updateBudgetReport(BeanUtil.copyProperties(entity, BudgetReportVO.class));
+                workflowClient.saveFlowDescribe(flowInstanceId, flowDesc);
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 流程归档事件
+     *
+     * @param flowInstance                  流程实例
+     * @param triggerFinishActivityInstance 触发归档的结束活动实例
+     * @return
+     */
+    @PostMapping("/flowArchingEvent")
+    public String flowArchingEvent(@ParamModel Map flowInstance, @ParamModel Map triggerFinishActivityInstance) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                BudgetReport entity = reportService.findByInstanceId(flowInstanceId);
+                entity.setFlowStatus(FLOW_FINISHED);
+                entity.setFlowFinishtime(LocalDateTime.now());
+                reportService.updateBudgetReport(BeanUtil.copyProperties(entity, BudgetReportVO.class));
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception ex) {
+            log.error(ex.getMessage(), ex);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 作废事件
+     *
+     * @param flowInstance     流程实例
+     * @param activityInstance 申请作废所在活动实例
+     * @param nullyApplyUserId 作废申请人ID
+     * @return
+     */
+    @PostMapping("/nullyEvent")
+    public String nullyEvent(@ParamModel Map flowInstance, @ParamModel Map activityInstance, String nullyApplyUserId) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                BudgetReport entity = reportService.findByInstanceId(flowInstanceId);
+                entity.setFlowStatus(FLOW_NULLY);
+                entity.setIsvalid(0);
+                reportService.updateBudgetReport(BeanUtil.copyProperties(entity, BudgetReportVO.class));
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 作废恢复事件
+     *
+     * @param flowInstance      流程实例
+     * @param activityInstance  申请作废所在活动实例
+     * @param nullyApplyUserId  作废申请人ID
+     * @param nullyRecoverserId 作废恢复人ID
+     * @return
+     */
+    @PostMapping("/nullyRecoverEvent")
+    public String nullyRecoverEvent(@ParamModel Map flowInstance, @ParamModel Map activityInstance, String nullyApplyUserId, String nullyRecoverserId) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                BudgetReport entity = reportService.findByInstanceId(flowInstanceId);
+                entity.setFlowStatus(FLOW_PROCESS);
+                entity.setIsvalid(1);
+                reportService.updateBudgetReport(BeanUtil.copyProperties(entity, BudgetReportVO.class));
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+    /**
+     * 彻底作废事件
+     *
+     * @param flowInstance        流程实例
+     * @param activityInstance    申请作废所在活动实例
+     * @param nullyApplyUserId    作废申请人ID
+     * @param nullyCompleteUserId 彻底作废人ID
+     * @return
+     */
+    @PostMapping("/nullyCompleteEvent")
+    public String nullyCompleteEvent(@ParamModel Map flowInstance, @ParamModel Map activityInstance, String nullyApplyUserId, String nullyCompleteUserId) {
+        try {
+            if (!Objects.isNull(flowInstance) && flowInstance.containsKey("id")) {
+                String flowInstanceId = flowInstance.get("id").toString();
+                BudgetReport entity = reportService.findByInstanceId(flowInstanceId);
+                reportService.deleteBudgetReport(entity.getId());
+                return ok("true");
+            } else {
+                throw new BusinessException("执行事件出错,请联系管理员!");
+            }
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw new BusinessException("执行事件出错,请联系管理员!");
+        }
+    }
+
+}

+ 26 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/budgetreport/service/IBudgetReportService.java

@@ -0,0 +1,26 @@
+package com.zjugis.module.business.flow.budgetreport.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zjugis.module.business.flow.budgetreport.entity.BudgetReport;
+import com.zjugis.module.business.flow.budgetreport.vo.BudgetReportVO;
+import com.zjugis.module.business.flow.procurement.vo.ProcurementVO;
+
+import java.util.Map;
+
+/**
+ * 预算编报表 服务类
+ *
+ * @author fuwb
+ * @since 2025-03-06
+ */
+public interface IBudgetReportService {
+
+    Map<String, Object> getFormParams(String flowInstanceId, String userId);
+
+    BudgetReport findByInstanceId(String flowInstanceId);
+
+
+    void updateBudgetReport(BudgetReportVO updateReqVO);
+
+    void deleteBudgetReport(String id);
+}

+ 119 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/budgetreport/service/impl/BudgetReportServiceImpl.java

@@ -0,0 +1,119 @@
+package com.zjugis.module.business.flow.budgetreport.service.impl;
+
+import cn.hutool.core.bean.BeanUtil;
+import com.alibaba.fastjson2.JSON;
+import com.zjugis.framework.common.pojo.CommonResult;
+import com.zjugis.framework.security.core.util.SecurityFrameworkUtils;
+import com.zjugis.framework.workflow.model.IFlowInstance;
+import com.zjugis.framework.workflow.rpc.remote.WorkflowClient;
+import com.zjugis.framework.workflow.utils.Select;
+import com.zjugis.module.business.constants.DictConstants;
+import com.zjugis.module.business.converter.common.SelectConvert;
+import com.zjugis.module.business.flow.budgetreport.entity.BudgetReport;
+import com.zjugis.module.business.flow.budgetreport.service.IBudgetReportService;
+import com.zjugis.module.business.flow.budgetreport.vo.BudgetReportVO;
+import com.zjugis.module.business.mapper.BudgetReportMapper;
+import com.zjugis.module.system.api.dict.DictDataApi;
+import com.zjugis.module.system.api.user.AdminUserApi;
+import com.zjugis.module.system.api.user.dto.AdminUserRespDTO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+import static com.zjugis.framework.common.exception.util.ServiceExceptionUtil.exception;
+import static com.zjugis.module.business.enums.ErrorCodeConstants.APPLICATION_INFO_NOT_EXISTS;
+
+/**
+ * 预算编报表 服务实现类
+ *
+ * @author fuwb
+ * @since 2025-03-06
+ */
+@Service
+public class BudgetReportServiceImpl implements IBudgetReportService {
+    @Resource
+    private BudgetReportMapper reportMapper;
+    @Resource
+    private WorkflowClient workflowClient;
+    @Resource
+    private DictDataApi dictDataApi;
+    @Resource
+    private AdminUserApi adminUserApi;
+
+
+    @Override
+    public Map<String, Object> getFormParams(String flowInstanceId, String userId) {
+        if (StringUtils.isNotBlank(SecurityFrameworkUtils.getLoginUserId())) {
+            userId = SecurityFrameworkUtils.getLoginUserId();
+        }
+        CommonResult<IFlowInstance> flowResult = workflowClient.flowInstance(flowInstanceId);
+        if (flowResult.isSuccess()) {
+            IFlowInstance flowInstance = flowResult.getData();
+            BudgetReport entity = findByInstanceId(flowInstanceId);
+            if (Objects.isNull(entity)) {
+                entity = new BudgetReport();
+                entity.setInstanceId(flowInstanceId);
+                entity.setBudgetNumber(flowInstance.getCode());
+                entity.setReportDate(LocalDateTime.now());
+                entity.setCreateTime(LocalDateTime.now());
+                entity.setIsvalid(1);
+                CommonResult<AdminUserRespDTO> result = adminUserApi.getUser(userId);
+                if (result.isSuccess()) {
+                    entity.setReporter(result.getData().getNickname());
+                }
+                reportMapper.insert(entity);
+            }
+            return createMap(flowInstanceId, entity, userId);
+        }
+        return createModelMap();
+    }
+
+    @Override
+    public BudgetReport findByInstanceId(String flowInstanceId) {
+        return reportMapper.findByInstanceId(flowInstanceId);
+    }
+
+    @Override
+    public void updateBudgetReport(BudgetReportVO updateReqVO) {
+        validateExists(updateReqVO.getId());
+        BudgetReport budgetReport = BeanUtil.copyProperties(updateReqVO, BudgetReport.class);
+        reportMapper.updateById(budgetReport);
+    }
+
+    @Override
+    public void deleteBudgetReport(String id) {
+        validateExists(id);
+        reportMapper.deleteById(id);
+    }
+
+    private Map<String, Object> createMap(String flowInstanceId, BudgetReport entity, String userId) {
+        Map<String, Object> map = new HashMap<>();
+        map.put("formEntity", entity);
+        List<Select> sealTypeList = SelectConvert.INSTANCE.convertList(dictDataApi.getDictDataList(DictConstants.BUDGET_TYPE).getCheckedData());
+        map.put("budgetTypeList", JSON.toJSONString(sealTypeList));
+        return map;
+    }
+
+    private Map<String, Object> createModelMap() {
+        Map<String, Object> map = new HashMap<>();
+        map.put("formEntity", new HashMap<>());
+        return map;
+    }
+
+    /**
+     * 根据ID判断数据是否存在
+     *
+     * @param id
+     */
+    private void validateExists(String id) {
+        if (reportMapper.selectById(id) == null) {
+            throw exception(APPLICATION_INFO_NOT_EXISTS);
+        }
+    }
+}

+ 75 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/budgetreport/vo/BudgetReportVO.java

@@ -0,0 +1,75 @@
+package com.zjugis.module.business.flow.budgetreport.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * @author: Fuwb
+ * @date: 2025/3/7
+ * @time: 9:43
+ * @description:
+ */
+@Data
+public class BudgetReportVO implements Serializable {
+    private static final long serialVersionUID = -5309035025739454996L;
+
+    private String id;
+
+    /**
+     * 与采购申请流程关联的工作流ID
+     */
+    private String instanceId;
+
+    /**
+     * 预算编号
+     */
+    private String budgetNumber;
+
+    /**
+     * 年度
+     */
+    private String budgetYear;
+
+    /**
+     * 预算名称
+     */
+    private String budgetName;
+
+    /**
+     * 预算资金
+     */
+    private Double budgetFunds;
+
+    /**
+     * 预算类型
+     */
+    private String budgetType;
+
+    /**
+     * 申请依据
+     */
+    private String applicationBasis;
+
+    /**
+     * 编报日期
+     */
+    private LocalDateTime reportDate;
+
+    /**
+     * 编报人
+     */
+    private String reporter;
+
+    /**
+     * 流程状态
+     */
+    private Integer flowStatus;
+
+    /**
+     * 流程结束时间
+     */
+    private LocalDateTime flowFinishtime;
+
+}

+ 19 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/mapper/BudgetReportMapper.java

@@ -0,0 +1,19 @@
+package com.zjugis.module.business.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zjugis.framework.mybatis.core.query.LambdaQueryWrapperX;
+import com.zjugis.module.business.flow.budgetreport.entity.BudgetReport;
+
+/**
+ * 预算编报表 Mapper 接口
+ *
+ * @author fuwb
+ * @since 2025-03-06
+ */
+public interface BudgetReportMapper extends BaseMapper<BudgetReport> {
+
+    default BudgetReport findByInstanceId(String flowInstanceId) {
+        return selectOne(new LambdaQueryWrapperX<BudgetReport>().eqIfPresent(BudgetReport::getInstanceId, flowInstanceId));
+    }
+
+}

+ 183 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/resources/templates/BudgetReport/index.ftl

@@ -0,0 +1,183 @@
+<@w.workFlow javascripts=['/BudgetReport/js/index.js','/js/moment.js','/flow/js/formCommon.js','/OwCommon/OwCommon.js']
+styles=[ '/flow/css/formCommon.css','/OwCommon/OwCommon.css' ]>
+    <div class="z-position form-boss ow-tabs" name="createReqVO">
+        <div class="z-form-row" style="display: none;">
+            <input type="text" value="${formEntity.instanceId!}" name="createReqVO$instanceId">
+            <input type="text" value="${formEntity.id!}" name="createReqVO$id">
+        </div>
+
+
+
+        <ul class="ow-tab-nav oa_tabBox">
+            <li z-tabindex="0" class="ow-tab-item on" data-name="jbxx">基础信息</li>
+            <#if WORKFLOW.OPINION! !="">
+                <li z-tabindex="1" class="ow-tab-item" data-name="yj">审批意见</li>
+            </#if>
+        </ul>
+
+
+
+        <div class="ow-tab-scroll z-tab-content">
+            <div class="ow-tab-content on" name="jbxx">
+                <div class="form-title" style="margin-top: 0px;">
+                    <div class="form-icon">
+                        <img src="/imgs/titleIcon.png" alt="">
+                        <span>基本信息</span>
+                    </div>
+                    <div class="form-btn">
+                    </div>
+                </div>
+                <div class="jbxx-box jbxx-box-flex">
+                    <table class="jbxx-table-info">
+                        <tr>
+                            <td class="th">
+                                <div class="form-label">预算编号:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-input  z-readonly" name="createReqVO$budgetNumber">
+                                            <input type="text" value="${formEntity.budgetNumber!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                            <td class="th">
+                                <div class="form-label">年度:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-input" name="createReqVO$budgetYear">
+                                            <input type="text" value="${(formEntity.budgetYear)!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="th">
+                                <div class="form-label">预算名称:</div>
+                            </td>
+                            <td clospan="3">
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-select" name="createReqVO$budgetName">
+                                             <input type="text" value="${formEntity.budgetName!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="th">
+                                <div class="form-label">预算资金:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-input" name="createReqVO$budgetFunds">
+                                            <input type="text" value="${formEntity.budgetFunds!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                            <td class="th">
+                                <div class="form-label">预算类型:</div>
+                            </td>
+                            <td>
+                                <div class="form-group">
+                                    <div class="form-item">
+                                         <div class="z-comp-select" name="createReqVO$budgetType"
+                                             data='${budgetTypeList!}' value="${formEntity.budgetType!}">
+                                            <div class="z-inputselect-bar">
+                                                <span></span><i></i>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="th">
+                                <div class="form-label">申请依据:</div>
+                            </td>
+                            <td>
+                                <div class="z-form-row">
+                                    <div class="z-form-control z-col-85 z-form-table">
+                                        <div class="z-comp-textarea" name="TableName$applicationBasis">
+                                            <textarea></textarea>
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="th">
+                                <div class="form-label"></div>
+                            </td>
+                            <td>
+                                 <div class="form-group">
+                                    <div class="form-item">
+
+                                    </div>
+                                </div>
+                            </td>
+                            <td class="th">
+                                <div class="form-label">编报日期:</div>
+                            </td>
+                            <td>
+                                 <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-input z-readonly" name="createReqVO$reportDate">
+                                            <input type="text" value="${(formEntity.reportDate?date)!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                            <td class="th">
+                                <div class="form-label">编报人:</div>
+                            </td>
+                            <td>
+                                 <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-input z-readonly" name="createReqVO$reporter">
+                                            <input type="text" value="${formEntity.reporter!}">
+                                        </div>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+                    </table>
+                </div>
+            </div>
+
+            <#if WORKFLOW.OPINION! !="">
+                <div class="ow-tab-content" name="yj">
+                    <div class="form-title">
+                        <div class="form-icon">
+                            <img src="/imgs/titleIcon.png" alt="">
+                            <span>审批意见</span>
+                        </div>
+                        <div class="form-btn">
+                        </div>
+                    </div>
+                    <div class="qjsjxx-box">
+                        <div class="z-form-wrap" name="opinionsDiv">
+                            <div class="z-form-row"> ${WORKFLOW.OPINION!} </div>
+                        </div>
+                    </div>
+                </div>
+            </#if>
+        </div>
+
+
+    </div>
+    <script language="javascript">
+        ;
+        (function () {
+        })();
+    </script>
+    <style type="text/css">
+    </style>
+</@w.workFlow>

+ 45 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/resources/templates/BudgetReport/js/index.js

@@ -0,0 +1,45 @@
+(function () {
+    let flowInstanceId = "";
+    window.onload = function () {
+        flowInstanceId = z.ui.comm.getUrlParam("flowInstanceId");
+        bindEvents();
+    };
+
+    function bindEvents() {
+        z.workflow.saveBtn.addListener("onSaveClick", submit);
+    }
+
+    function submit(all, istransfer) {
+        var postData = z.ui.form.getFormFields($("[name=createReqVO]"));
+        console.log(postData)
+        if (postData === false) {
+            all({ success: false });
+            return;
+        }
+
+        for (let key of Object.keys(postData)) {
+            let mealName = postData[key];
+            if (key.startsWith("createReqVO")) {
+//                mealName.receiveTime = Date.parse(mealName.receiveTime + "");
+                postData.createReqVO = mealName;
+            }
+        }
+
+
+        console.log(JSON.stringify(postData.createReqVO))
+        z.ui.ajax({
+            type: "post",
+            url: "/budgetReport/update",
+            data: JSON.stringify(postData.createReqVO),
+
+            contentType: "application/json",
+            success: function () {
+                all({ success: true });
+            },
+            error: function () {
+                all({ success: false });
+            }
+        })
+    }
+
+}());