浏览代码

1、新增项目信息登记表单功能

fuwb 4 月之前
父节点
当前提交
aba7a28b5a

+ 24 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/projectinfo/controller/ProjectInfoController.java

@@ -0,0 +1,24 @@
+package com.zjugis.module.business.flow.projectinfo.controller;
+
+import com.zjugis.framework.workflow.model.BaseController;
+import com.zjugis.module.business.flow.projectinfo.service.IProjectInfoService;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+/**
+ * 项目信息登记表 前端控制器
+ *
+ * @author fuwb
+ * @since 2025-03-07
+ */
+@RestController
+@RequestMapping("/projectInfo")
+public class ProjectInfoController extends BaseController {
+    @Resource
+    private IProjectInfoService projectInfoService;
+
+
+}

+ 158 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/projectinfo/entity/ProjectInfo.java

@@ -0,0 +1,158 @@
+package com.zjugis.module.business.flow.projectinfo.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-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("oa_project_info")
+public class ProjectInfo extends BaseEntity {
+    private static final long serialVersionUID = 1435540529988780899L;
+
+    @TableId(type = IdType.ASSIGN_UUID)
+    private String id;
+
+    /**
+     * 流程图ID
+     */
+    private String instanceId;
+
+    /**
+     * 项目编号
+     */
+    private String projectNumber;
+
+    /**
+     * 项目属性
+     */
+    private String projectAttribute;
+
+    /**
+     * 项目名称
+     */
+    private String projectName;
+
+    /**
+     * 项目类型
+     */
+    private String projectType;
+
+    /**
+     * 预算资金
+     */
+    private Double budgetFunds;
+
+    /**
+     * 委托采购单位
+     */
+    private String entrustedPurchasingUnit;
+
+    /**
+     * 采购方式
+     */
+    private String purchasingMethod;
+
+    /**
+     * 年度
+     */
+    private String projectYear;
+
+    /**
+     * 合同编号
+     */
+    private String contractNumber;
+
+    /**
+     * 签订日期
+     */
+    private LocalDateTime signingDate;
+
+    /**
+     * 供货单位
+     */
+    private String supplier;
+
+    /**
+     * 联系电话
+     */
+    private String contactPhone;
+
+    /**
+     * 联系人
+     */
+    private String contactPerson;
+
+    /**
+     * 项目总金额
+     */
+    private Double totalProjectAmount;
+
+    /**
+     * 已付金额
+     */
+    private Double paidAmount;
+
+    /**
+     * 未付金额
+     */
+    private Double unpaidAmount;
+
+    /**
+     * 是否完结
+     */
+    private Integer isCompleted;
+
+    /**
+     * 项目进度
+     */
+    private String projectProgress;
+
+    /**
+     * 经办人
+     */
+    private String handler;
+
+    /**
+     * 登记日期
+     */
+    private LocalDateTime registrationDate;
+
+    /**
+     * 备注
+     */
+    private String remarks;
+
+    /**
+     * 流程状态
+     */
+    private Integer flowStatus;
+
+    /**
+     * 流程结束时间
+     */
+    private LocalDateTime flowFinishtime;
+
+    /**
+     * 关联的预算编报的流程ID
+     */
+    private String budgetInstanceId;
+
+}

+ 14 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/projectinfo/mapper/ProjectInfoMapper.java

@@ -0,0 +1,14 @@
+package com.zjugis.module.business.flow.projectinfo.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.zjugis.module.business.flow.projectinfo.entity.ProjectInfo;
+
+/**
+ * 项目信息登记表 Mapper 接口
+ *
+ * @author fuwb
+ * @since 2025-03-07
+ */
+public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
+
+}

+ 11 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/projectinfo/service/IProjectInfoService.java

@@ -0,0 +1,11 @@
+package com.zjugis.module.business.flow.projectinfo.service;
+
+/**
+ * 项目信息登记表 服务类
+ *
+ * @author fuwb
+ * @since 2025-03-07
+ */
+public interface IProjectInfoService {
+
+}

+ 15 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/java/com/zjugis/module/business/flow/projectinfo/service/impl/ProjectInfoServiceImpl.java

@@ -0,0 +1,15 @@
+package com.zjugis.module.business.flow.projectinfo.service.impl;
+
+import com.zjugis.module.business.flow.projectinfo.service.IProjectInfoService;
+import org.springframework.stereotype.Service;
+
+/**
+ * 项目信息登记表 服务实现类
+ *
+ * @author fuwb
+ * @since 2025-03-07
+ */
+@Service
+public class ProjectInfoServiceImpl implements IProjectInfoService {
+
+}

+ 13 - 1
zjugis-module-business/zjugis-module-business-biz/src/main/resources/templates/BudgetReport/index.ftl

@@ -104,7 +104,7 @@ styles=[ '/flow/css/formCommon.css','/OwCommon/OwCommon.css' ]>
                             </td>
                             <td>
                                 <div class="z-form-row">
-                                    <div class="z-form-control z-col-85 z-form-table">
+                                    <div class="z-form-control z-col-100 z-form-table">
                                         <div class="z-comp-textarea" name="createReqVO$applicationBasis">
                                             <textarea></textarea>
                                         </div>
@@ -150,6 +150,18 @@ styles=[ '/flow/css/formCommon.css','/OwCommon/OwCommon.css' ]>
                         </tr>
                     </table>
                 </div>
+                <div class="form-title">
+                  <div class="form-icon">
+                    <img src="/imgs/titleIcon.png" alt="">
+                    <span>分期支付详情</span>
+                  </div>
+                  <div class="form-btn">
+                    <button id="addData" name="addData">
+                      <img src="/imgs/addIcon.png" alt="">
+                      <span>新增</span>
+                    </button>
+                  </div>
+                </div>
             </div>
 
             <#if WORKFLOW.OPINION! !="">

+ 353 - 0
zjugis-module-business/zjugis-module-business-biz/src/main/resources/templates/ProjectInfo/index.ftl

@@ -0,0 +1,353 @@
+<@w.workFlow javascripts=['/ProjectInfo/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">
+            <input type="text" value="${formEntity.budgetInstanceId!}" name="createReqVO$budgetInstanceId">
+        </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$projectNumber">
+                                            <input type="text" value="${formEntity.projectNumber!}">
+                                        </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$projectAttribute"
+                                             data='${projectAttributeList!}' value="${formEntity.projectAttribute!}">
+                                            <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 clospan="3">
+                                <div class="form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-input" name="createReqVO$projectName">
+                                             <input type="text" value="${formEntity.projectName!}">
+                                        </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-select" name="createReqVO$projectType"
+                                            data='${projectTypeList!}' value="${formEntity.projectType!}">
+                                            <div class="z-inputselect-bar">
+                                                <span></span><i></i>
+                                            </div>
+                                        </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$budgetFunds">
+                                              <input type="text" value="${formEntity.budgetFunds!}">
+                                         </div>
+                                    </div>
+                                </div>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td class="th">
+                                <div class="form-label">委托采购单位:</div>
+                            </td>
+                            <td clospan="3">
+                                <div class="z-form-group">
+                                    <div class="form-item">
+                                        <div class="z-comp-input" name="createReqVO$entrustedPurchasingUnit">
+                                            <input type="text" value="${formEntity.entrustedPurchasingUnit!}">
+                                        </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-select" name="createReqVO$purchasingMethod"
+                                            data='${purchasingMethodList!}' value="${formEntity.purchasingMethod!}">
+                                            <div class="z-inputselect-bar">
+                                                <span></span><i></i>
+                                            </div>
+                                        </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$projectYear">
+                                            <input type="text" value="${formEntity.projectYear!}">
+                                        </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$contractNumber">
+                                            <input type="text" value="${formEntity.contractNumber!}">
+                                        </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$signingDate">
+                                            <input type="text" value="${(formEntity.signingDate?date)!}">
+                                        </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$supplier">
+                                            <input type="text" value="${formEntity.supplier!}">
+                                        </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$contactPhone">
+                                            <input type="text" value="${formEntity.contactPhone!}">
+                                        </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$contactPerson">
+                                            <input type="text" value="${formEntity.contactPerson!}">
+                                        </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$totalProjectAmount">
+                                            <input type="text" value="${formEntity.totalProjectAmount!}">
+                                        </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$paidAmount">
+                                            <input type="text" value="${formEntity.paidAmount!}">
+                                        </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$unpaidAmount">
+                                            <input type="text" value="${formEntity.unpaidAmount!}">
+                                        </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-select" name="createReqVO$isCompleted"
+                                            data='${isCompletedList}' value="${formEntity.isCompleted!}">
+                                            <div class="z-inputselect-bar">
+                                                <span></span><i></i>
+                                            </div>
+                                        </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$projectProgress">
+                                            <input type="text" value="${formEntity.projectProgress!}">
+                                        </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$handler">
+                                           <input type="text" value="${formEntity.handler!}">
+                                        </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$registrationDate">
+                                            <input type="text" value="${(formEntity.registrationDate?date)!}">
+                                        </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-100 z-form-table">
+                                        <div class="z-comp-textarea" name="createReqVO$remarks">
+                                            <textarea></textarea>
+                                        </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/ProjectInfo/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 });
+            }
+        })
+    }
+
+}());