init
parent
8b2ba50037
commit
24cb83b1a6
14
pom.xml
14
pom.xml
|
@ -163,6 +163,20 @@
|
|||
<version>${yanzhu.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- manage模块-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-manage</artifactId>
|
||||
<version>${yanzhu.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- mapper模块-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-mapper</artifactId>
|
||||
<version>${yanzhu.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
|
|
|
@ -61,11 +61,19 @@
|
|||
<artifactId>yanzhu-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统核心-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-flowable</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统模块-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-manage</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -11,9 +11,46 @@
|
|||
|
||||
<artifactId>yanzhu-manage</artifactId>
|
||||
|
||||
<description>
|
||||
manage管理模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统模块-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统模块-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-mapper</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,104 @@
|
|||
package com.yanzhu.project.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.yanzhu.common.annotation.Log;
|
||||
import com.yanzhu.common.core.controller.BaseController;
|
||||
import com.yanzhu.common.core.domain.AjaxResult;
|
||||
import com.yanzhu.common.enums.BusinessType;
|
||||
import com.yanzhu.project.domain.ProProjectApply;
|
||||
import com.yanzhu.project.service.IProProjectApplyService;
|
||||
import com.yanzhu.common.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目申请Controller
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mapper/project/projectApply")
|
||||
public class ProProjectApplyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProProjectApplyService proProjectApplyService;
|
||||
|
||||
/**
|
||||
* 查询项目申请列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectApply:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProProjectApply proProjectApply)
|
||||
{
|
||||
startPage();
|
||||
List<ProProjectApply> list = proProjectApplyService.selectProProjectApplyList(proProjectApply);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目申请列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectApply:export')")
|
||||
@Log(title = "项目申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProProjectApply proProjectApply)
|
||||
{
|
||||
List<ProProjectApply> list = proProjectApplyService.selectProProjectApplyList(proProjectApply);
|
||||
ExcelUtil<ProProjectApply> util = new ExcelUtil<ProProjectApply>(ProProjectApply.class);
|
||||
util.exportExcel(response, list, "项目申请数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目申请详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectApply:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(proProjectApplyService.selectProProjectApplyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目申请
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectApply:add')")
|
||||
@Log(title = "项目申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProProjectApply proProjectApply)
|
||||
{
|
||||
return toAjax(proProjectApplyService.insertProProjectApply(proProjectApply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目申请
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectApply:edit')")
|
||||
@Log(title = "项目申请", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProProjectApply proProjectApply)
|
||||
{
|
||||
return toAjax(proProjectApplyService.updateProProjectApply(proProjectApply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目申请
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectApply:remove')")
|
||||
@Log(title = "项目申请", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(proProjectApplyService.deleteProProjectApplyByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package com.yanzhu.project.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.yanzhu.common.annotation.Log;
|
||||
import com.yanzhu.common.core.controller.BaseController;
|
||||
import com.yanzhu.common.core.domain.AjaxResult;
|
||||
import com.yanzhu.common.enums.BusinessType;
|
||||
import com.yanzhu.project.domain.ProProjectInfo;
|
||||
import com.yanzhu.project.service.IProProjectInfoService;
|
||||
import com.yanzhu.common.utils.poi.ExcelUtil;
|
||||
import com.yanzhu.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目信息Controller
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mapper/project/projectInfo")
|
||||
public class ProProjectInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProProjectInfoService proProjectInfoService;
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectInfo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ProProjectInfo proProjectInfo)
|
||||
{
|
||||
startPage();
|
||||
List<ProProjectInfo> list = proProjectInfoService.selectProProjectInfoList(proProjectInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectInfo:export')")
|
||||
@Log(title = "项目信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProProjectInfo proProjectInfo)
|
||||
{
|
||||
List<ProProjectInfo> list = proProjectInfoService.selectProProjectInfoList(proProjectInfo);
|
||||
ExcelUtil<ProProjectInfo> util = new ExcelUtil<ProProjectInfo>(ProProjectInfo.class);
|
||||
util.exportExcel(response, list, "项目信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectInfo:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(proProjectInfoService.selectProProjectInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectInfo:add')")
|
||||
@Log(title = "项目信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ProProjectInfo proProjectInfo)
|
||||
{
|
||||
return toAjax(proProjectInfoService.insertProProjectInfo(proProjectInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectInfo:edit')")
|
||||
@Log(title = "项目信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ProProjectInfo proProjectInfo)
|
||||
{
|
||||
return toAjax(proProjectInfoService.updateProProjectInfo(proProjectInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('project:projectInfo:remove')")
|
||||
@Log(title = "项目信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(proProjectInfoService.deleteProProjectInfoByIds(ids));
|
||||
}
|
||||
}
|
|
@ -11,9 +11,29 @@
|
|||
|
||||
<artifactId>yanzhu-mapper</artifactId>
|
||||
|
||||
<description>
|
||||
mapper系统模块
|
||||
</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统模块-->
|
||||
<dependency>
|
||||
<groupId>com.yanzhu</groupId>
|
||||
<artifactId>yanzhu-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,186 @@
|
|||
package com.yanzhu.project.domain;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.yanzhu.common.annotation.Excel;
|
||||
import com.yanzhu.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目申请对象 pro_project_apply
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
public class ProProjectApply extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 部门主键 */
|
||||
@Excel(name = "部门主键")
|
||||
private Long deptId;
|
||||
|
||||
/** 项目主键 */
|
||||
@Excel(name = "项目主键")
|
||||
private Long projId;
|
||||
|
||||
/** 申请类型 */
|
||||
@Excel(name = "申请类型")
|
||||
private String applyType;
|
||||
|
||||
/** 申请状态 */
|
||||
@Excel(name = "申请状态")
|
||||
private String applyStatus;
|
||||
|
||||
/** 申请原因 */
|
||||
@Excel(name = "申请原因")
|
||||
private String applyReason;
|
||||
|
||||
/** 申请附件 */
|
||||
@Excel(name = "申请附件")
|
||||
private String applyFiles;
|
||||
|
||||
/** 申请用户主键 */
|
||||
@Excel(name = "申请用户主键")
|
||||
private Long applyUser;
|
||||
|
||||
/** 使用时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date useTime;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private String isDel;
|
||||
|
||||
/** 项目申请明细信息 */
|
||||
private List<ProProjectApplyDetail> proProjectApplyDetailList;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
public void setProjId(Long projId)
|
||||
{
|
||||
this.projId = projId;
|
||||
}
|
||||
|
||||
public Long getProjId()
|
||||
{
|
||||
return projId;
|
||||
}
|
||||
public void setApplyType(String applyType)
|
||||
{
|
||||
this.applyType = applyType;
|
||||
}
|
||||
|
||||
public String getApplyType()
|
||||
{
|
||||
return applyType;
|
||||
}
|
||||
public void setApplyStatus(String applyStatus)
|
||||
{
|
||||
this.applyStatus = applyStatus;
|
||||
}
|
||||
|
||||
public String getApplyStatus()
|
||||
{
|
||||
return applyStatus;
|
||||
}
|
||||
public void setApplyReason(String applyReason)
|
||||
{
|
||||
this.applyReason = applyReason;
|
||||
}
|
||||
|
||||
public String getApplyReason()
|
||||
{
|
||||
return applyReason;
|
||||
}
|
||||
public void setApplyFiles(String applyFiles)
|
||||
{
|
||||
this.applyFiles = applyFiles;
|
||||
}
|
||||
|
||||
public String getApplyFiles()
|
||||
{
|
||||
return applyFiles;
|
||||
}
|
||||
public void setApplyUser(Long applyUser)
|
||||
{
|
||||
this.applyUser = applyUser;
|
||||
}
|
||||
|
||||
public Long getApplyUser()
|
||||
{
|
||||
return applyUser;
|
||||
}
|
||||
public void setUseTime(Date useTime)
|
||||
{
|
||||
this.useTime = useTime;
|
||||
}
|
||||
|
||||
public Date getUseTime()
|
||||
{
|
||||
return useTime;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
public List<ProProjectApplyDetail> getProProjectApplyDetailList()
|
||||
{
|
||||
return proProjectApplyDetailList;
|
||||
}
|
||||
|
||||
public void setProProjectApplyDetailList(List<ProProjectApplyDetail> proProjectApplyDetailList)
|
||||
{
|
||||
this.proProjectApplyDetailList = proProjectApplyDetailList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("projId", getProjId())
|
||||
.append("applyType", getApplyType())
|
||||
.append("applyStatus", getApplyStatus())
|
||||
.append("applyReason", getApplyReason())
|
||||
.append("applyFiles", getApplyFiles())
|
||||
.append("applyUser", getApplyUser())
|
||||
.append("useTime", getUseTime())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("proProjectApplyDetailList", getProProjectApplyDetailList())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,242 @@
|
|||
package com.yanzhu.project.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.yanzhu.common.annotation.Excel;
|
||||
import com.yanzhu.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目申请明细对象 pro_project_apply_detail
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
public class ProProjectApplyDetail extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 申请主键 */
|
||||
@Excel(name = "申请主键")
|
||||
private Long applyId;
|
||||
|
||||
/** 大类主键 */
|
||||
@Excel(name = "大类主键")
|
||||
private Long superTypeId;
|
||||
|
||||
/** 大类名称 */
|
||||
@Excel(name = "大类名称")
|
||||
private String superTypeName;
|
||||
|
||||
/** 类型主键 */
|
||||
@Excel(name = "类型主键")
|
||||
private Long typeId;
|
||||
|
||||
/** 类型名称 */
|
||||
@Excel(name = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
/** 资产主键 */
|
||||
@Excel(name = "资产主键")
|
||||
private Long assetsId;
|
||||
|
||||
/** 资产名称 */
|
||||
@Excel(name = "资产名称")
|
||||
private String assetsName;
|
||||
|
||||
/** 资产单位 */
|
||||
@Excel(name = "资产单位")
|
||||
private String assetsUnit;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Long number;
|
||||
|
||||
/** 使用时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "使用时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date useTime;
|
||||
|
||||
/** 使用原因 */
|
||||
@Excel(name = "使用原因")
|
||||
private String useReason;
|
||||
|
||||
/** 单价 */
|
||||
@Excel(name = "单价")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 总价 */
|
||||
@Excel(name = "总价")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private String isDel;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setApplyId(Long applyId)
|
||||
{
|
||||
this.applyId = applyId;
|
||||
}
|
||||
|
||||
public Long getApplyId()
|
||||
{
|
||||
return applyId;
|
||||
}
|
||||
public void setSuperTypeId(Long superTypeId)
|
||||
{
|
||||
this.superTypeId = superTypeId;
|
||||
}
|
||||
|
||||
public Long getSuperTypeId()
|
||||
{
|
||||
return superTypeId;
|
||||
}
|
||||
public void setSuperTypeName(String superTypeName)
|
||||
{
|
||||
this.superTypeName = superTypeName;
|
||||
}
|
||||
|
||||
public String getSuperTypeName()
|
||||
{
|
||||
return superTypeName;
|
||||
}
|
||||
public void setTypeId(Long typeId)
|
||||
{
|
||||
this.typeId = typeId;
|
||||
}
|
||||
|
||||
public Long getTypeId()
|
||||
{
|
||||
return typeId;
|
||||
}
|
||||
public void setTypeName(String typeName)
|
||||
{
|
||||
this.typeName = typeName;
|
||||
}
|
||||
|
||||
public String getTypeName()
|
||||
{
|
||||
return typeName;
|
||||
}
|
||||
public void setAssetsId(Long assetsId)
|
||||
{
|
||||
this.assetsId = assetsId;
|
||||
}
|
||||
|
||||
public Long getAssetsId()
|
||||
{
|
||||
return assetsId;
|
||||
}
|
||||
public void setAssetsName(String assetsName)
|
||||
{
|
||||
this.assetsName = assetsName;
|
||||
}
|
||||
|
||||
public String getAssetsName()
|
||||
{
|
||||
return assetsName;
|
||||
}
|
||||
public void setAssetsUnit(String assetsUnit)
|
||||
{
|
||||
this.assetsUnit = assetsUnit;
|
||||
}
|
||||
|
||||
public String getAssetsUnit()
|
||||
{
|
||||
return assetsUnit;
|
||||
}
|
||||
public void setNumber(Long number)
|
||||
{
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public Long getNumber()
|
||||
{
|
||||
return number;
|
||||
}
|
||||
public void setUseTime(Date useTime)
|
||||
{
|
||||
this.useTime = useTime;
|
||||
}
|
||||
|
||||
public Date getUseTime()
|
||||
{
|
||||
return useTime;
|
||||
}
|
||||
public void setUseReason(String useReason)
|
||||
{
|
||||
this.useReason = useReason;
|
||||
}
|
||||
|
||||
public String getUseReason()
|
||||
{
|
||||
return useReason;
|
||||
}
|
||||
public void setPrice(BigDecimal price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
public void setTotalPrice(BigDecimal totalPrice)
|
||||
{
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPrice()
|
||||
{
|
||||
return totalPrice;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("applyId", getApplyId())
|
||||
.append("superTypeId", getSuperTypeId())
|
||||
.append("superTypeName", getSuperTypeName())
|
||||
.append("typeId", getTypeId())
|
||||
.append("typeName", getTypeName())
|
||||
.append("assetsId", getAssetsId())
|
||||
.append("assetsName", getAssetsName())
|
||||
.append("assetsUnit", getAssetsUnit())
|
||||
.append("number", getNumber())
|
||||
.append("useTime", getUseTime())
|
||||
.append("useReason", getUseReason())
|
||||
.append("price", getPrice())
|
||||
.append("totalPrice", getTotalPrice())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,196 @@
|
|||
package com.yanzhu.project.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.yanzhu.common.annotation.Excel;
|
||||
import com.yanzhu.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目信息对象 pro_project_info
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
public class ProProjectInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String name;
|
||||
|
||||
/** 部门主键 */
|
||||
@Excel(name = "部门主键")
|
||||
private Long deptId;
|
||||
|
||||
/** 项目地址 */
|
||||
@Excel(name = "项目地址")
|
||||
private String address;
|
||||
|
||||
/** 项目描述 */
|
||||
@Excel(name = "项目描述")
|
||||
private String infos;
|
||||
|
||||
/** 负责人名称 */
|
||||
@Excel(name = "负责人名称")
|
||||
private String personName;
|
||||
|
||||
/** 负责人电话 */
|
||||
@Excel(name = "负责人电话")
|
||||
private String personPhone;
|
||||
|
||||
/** 项目主图 */
|
||||
@Excel(name = "项目主图")
|
||||
private String mainImage;
|
||||
|
||||
/** 图片列表 */
|
||||
@Excel(name = "图片列表")
|
||||
private String images;
|
||||
|
||||
/** 项目状态 */
|
||||
@Excel(name = "项目状态")
|
||||
private String projStatus;
|
||||
|
||||
/** 是否删除 */
|
||||
@Excel(name = "是否删除")
|
||||
private String isDel;
|
||||
|
||||
/** 项目级单位 */
|
||||
@Excel(name = "项目级单位")
|
||||
private String unit;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setInfos(String infos)
|
||||
{
|
||||
this.infos = infos;
|
||||
}
|
||||
|
||||
public String getInfos()
|
||||
{
|
||||
return infos;
|
||||
}
|
||||
public void setPersonName(String personName)
|
||||
{
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getPersonName()
|
||||
{
|
||||
return personName;
|
||||
}
|
||||
public void setPersonPhone(String personPhone)
|
||||
{
|
||||
this.personPhone = personPhone;
|
||||
}
|
||||
|
||||
public String getPersonPhone()
|
||||
{
|
||||
return personPhone;
|
||||
}
|
||||
public void setMainImage(String mainImage)
|
||||
{
|
||||
this.mainImage = mainImage;
|
||||
}
|
||||
|
||||
public String getMainImage()
|
||||
{
|
||||
return mainImage;
|
||||
}
|
||||
public void setImages(String images)
|
||||
{
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getImages()
|
||||
{
|
||||
return images;
|
||||
}
|
||||
public void setProjStatus(String projStatus)
|
||||
{
|
||||
this.projStatus = projStatus;
|
||||
}
|
||||
|
||||
public String getProjStatus()
|
||||
{
|
||||
return projStatus;
|
||||
}
|
||||
public void setIsDel(String isDel)
|
||||
{
|
||||
this.isDel = isDel;
|
||||
}
|
||||
|
||||
public String getIsDel()
|
||||
{
|
||||
return isDel;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("deptId", getDeptId())
|
||||
.append("address", getAddress())
|
||||
.append("infos", getInfos())
|
||||
.append("personName", getPersonName())
|
||||
.append("personPhone", getPersonPhone())
|
||||
.append("mainImage", getMainImage())
|
||||
.append("images", getImages())
|
||||
.append("projStatus", getProjStatus())
|
||||
.append("isDel", getIsDel())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("unit", getUnit())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
package com.yanzhu.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.project.domain.ProProjectApply;
|
||||
import com.yanzhu.project.domain.ProProjectApplyDetail;
|
||||
|
||||
/**
|
||||
* 项目申请Mapper接口
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
public interface ProProjectApplyMapper
|
||||
{
|
||||
/**
|
||||
* 查询项目申请
|
||||
*
|
||||
* @param id 项目申请主键
|
||||
* @return 项目申请
|
||||
*/
|
||||
public ProProjectApply selectProProjectApplyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目申请列表
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 项目申请集合
|
||||
*/
|
||||
public List<ProProjectApply> selectProProjectApplyList(ProProjectApply proProjectApply);
|
||||
|
||||
/**
|
||||
* 新增项目申请
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProProjectApply(ProProjectApply proProjectApply);
|
||||
|
||||
/**
|
||||
* 修改项目申请
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProProjectApply(ProProjectApply proProjectApply);
|
||||
|
||||
/**
|
||||
* 删除项目申请
|
||||
*
|
||||
* @param id 项目申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectApplyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除项目申请
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectApplyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量删除项目申请明细
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectApplyDetailByApplyIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 批量新增项目申请明细
|
||||
*
|
||||
* @param proProjectApplyDetailList 项目申请明细列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchProProjectApplyDetail(List<ProProjectApplyDetail> proProjectApplyDetailList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过项目申请主键删除项目申请明细信息
|
||||
*
|
||||
* @param id 项目申请ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectApplyDetailByApplyId(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.project.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.project.domain.ProProjectInfo;
|
||||
|
||||
/**
|
||||
* 项目信息Mapper接口
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
public interface ProProjectInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询项目信息
|
||||
*
|
||||
* @param id 项目信息主键
|
||||
* @return 项目信息
|
||||
*/
|
||||
public ProProjectInfo selectProProjectInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 项目信息集合
|
||||
*/
|
||||
public List<ProProjectInfo> selectProProjectInfoList(ProProjectInfo proProjectInfo);
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProProjectInfo(ProProjectInfo proProjectInfo);
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProProjectInfo(ProProjectInfo proProjectInfo);
|
||||
|
||||
/**
|
||||
* 删除项目信息
|
||||
*
|
||||
* @param id 项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除项目信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectInfoByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.project.domain.ProProjectApply;
|
||||
|
||||
/**
|
||||
* 项目申请Service接口
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
public interface IProProjectApplyService
|
||||
{
|
||||
/**
|
||||
* 查询项目申请
|
||||
*
|
||||
* @param id 项目申请主键
|
||||
* @return 项目申请
|
||||
*/
|
||||
public ProProjectApply selectProProjectApplyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目申请列表
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 项目申请集合
|
||||
*/
|
||||
public List<ProProjectApply> selectProProjectApplyList(ProProjectApply proProjectApply);
|
||||
|
||||
/**
|
||||
* 新增项目申请
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProProjectApply(ProProjectApply proProjectApply);
|
||||
|
||||
/**
|
||||
* 修改项目申请
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProProjectApply(ProProjectApply proProjectApply);
|
||||
|
||||
/**
|
||||
* 批量删除项目申请
|
||||
*
|
||||
* @param ids 需要删除的项目申请主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectApplyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除项目申请信息
|
||||
*
|
||||
* @param id 项目申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectApplyById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.yanzhu.project.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.project.domain.ProProjectInfo;
|
||||
|
||||
/**
|
||||
* 项目信息Service接口
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
public interface IProProjectInfoService
|
||||
{
|
||||
/**
|
||||
* 查询项目信息
|
||||
*
|
||||
* @param id 项目信息主键
|
||||
* @return 项目信息
|
||||
*/
|
||||
public ProProjectInfo selectProProjectInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 项目信息集合
|
||||
*/
|
||||
public List<ProProjectInfo> selectProProjectInfoList(ProProjectInfo proProjectInfo);
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProProjectInfo(ProProjectInfo proProjectInfo);
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProProjectInfo(ProProjectInfo proProjectInfo);
|
||||
|
||||
/**
|
||||
* 批量删除项目信息
|
||||
*
|
||||
* @param ids 需要删除的项目信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除项目信息信息
|
||||
*
|
||||
* @param id 项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProProjectInfoById(Long id);
|
||||
}
|
|
@ -0,0 +1,134 @@
|
|||
package com.yanzhu.project.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.yanzhu.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.yanzhu.project.domain.ProProjectApplyDetail;
|
||||
import com.yanzhu.project.mapper.ProProjectApplyMapper;
|
||||
import com.yanzhu.project.domain.ProProjectApply;
|
||||
import com.yanzhu.project.service.IProProjectApplyService;
|
||||
|
||||
/**
|
||||
* 项目申请Service业务层处理
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
@Service
|
||||
public class ProProjectApplyServiceImpl implements IProProjectApplyService
|
||||
{
|
||||
@Autowired
|
||||
private ProProjectApplyMapper proProjectApplyMapper;
|
||||
|
||||
/**
|
||||
* 查询项目申请
|
||||
*
|
||||
* @param id 项目申请主键
|
||||
* @return 项目申请
|
||||
*/
|
||||
@Override
|
||||
public ProProjectApply selectProProjectApplyById(Long id)
|
||||
{
|
||||
return proProjectApplyMapper.selectProProjectApplyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目申请列表
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 项目申请
|
||||
*/
|
||||
@Override
|
||||
public List<ProProjectApply> selectProProjectApplyList(ProProjectApply proProjectApply)
|
||||
{
|
||||
return proProjectApplyMapper.selectProProjectApplyList(proProjectApply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目申请
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertProProjectApply(ProProjectApply proProjectApply)
|
||||
{
|
||||
proProjectApply.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = proProjectApplyMapper.insertProProjectApply(proProjectApply);
|
||||
insertProProjectApplyDetail(proProjectApply);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目申请
|
||||
*
|
||||
* @param proProjectApply 项目申请
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateProProjectApply(ProProjectApply proProjectApply)
|
||||
{
|
||||
proProjectApply.setUpdateTime(DateUtils.getNowDate());
|
||||
proProjectApplyMapper.deleteProProjectApplyDetailByApplyId(proProjectApply.getId());
|
||||
insertProProjectApplyDetail(proProjectApply);
|
||||
return proProjectApplyMapper.updateProProjectApply(proProjectApply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目申请
|
||||
*
|
||||
* @param ids 需要删除的项目申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteProProjectApplyByIds(Long[] ids)
|
||||
{
|
||||
proProjectApplyMapper.deleteProProjectApplyDetailByApplyIds(ids);
|
||||
return proProjectApplyMapper.deleteProProjectApplyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目申请信息
|
||||
*
|
||||
* @param id 项目申请主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteProProjectApplyById(Long id)
|
||||
{
|
||||
proProjectApplyMapper.deleteProProjectApplyDetailByApplyId(id);
|
||||
return proProjectApplyMapper.deleteProProjectApplyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目申请明细信息
|
||||
*
|
||||
* @param proProjectApply 项目申请对象
|
||||
*/
|
||||
public void insertProProjectApplyDetail(ProProjectApply proProjectApply)
|
||||
{
|
||||
List<ProProjectApplyDetail> proProjectApplyDetailList = proProjectApply.getProProjectApplyDetailList();
|
||||
Long id = proProjectApply.getId();
|
||||
if (StringUtils.isNotNull(proProjectApplyDetailList))
|
||||
{
|
||||
List<ProProjectApplyDetail> list = new ArrayList<ProProjectApplyDetail>();
|
||||
for (ProProjectApplyDetail proProjectApplyDetail : proProjectApplyDetailList)
|
||||
{
|
||||
proProjectApplyDetail.setApplyId(id);
|
||||
list.add(proProjectApplyDetail);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
proProjectApplyMapper.batchProProjectApplyDetail(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.yanzhu.project.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.yanzhu.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.yanzhu.project.mapper.ProProjectInfoMapper;
|
||||
import com.yanzhu.project.domain.ProProjectInfo;
|
||||
import com.yanzhu.project.service.IProProjectInfoService;
|
||||
|
||||
/**
|
||||
* 项目信息Service业务层处理
|
||||
*
|
||||
* @author yanZhu
|
||||
* @date 2024-02-23
|
||||
*/
|
||||
@Service
|
||||
public class ProProjectInfoServiceImpl implements IProProjectInfoService
|
||||
{
|
||||
@Autowired
|
||||
private ProProjectInfoMapper proProjectInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询项目信息
|
||||
*
|
||||
* @param id 项目信息主键
|
||||
* @return 项目信息
|
||||
*/
|
||||
@Override
|
||||
public ProProjectInfo selectProProjectInfoById(Long id)
|
||||
{
|
||||
return proProjectInfoMapper.selectProProjectInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目信息列表
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 项目信息
|
||||
*/
|
||||
@Override
|
||||
public List<ProProjectInfo> selectProProjectInfoList(ProProjectInfo proProjectInfo)
|
||||
{
|
||||
return proProjectInfoMapper.selectProProjectInfoList(proProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProProjectInfo(ProProjectInfo proProjectInfo)
|
||||
{
|
||||
proProjectInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return proProjectInfoMapper.insertProProjectInfo(proProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*
|
||||
* @param proProjectInfo 项目信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProProjectInfo(ProProjectInfo proProjectInfo)
|
||||
{
|
||||
proProjectInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return proProjectInfoMapper.updateProProjectInfo(proProjectInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目信息
|
||||
*
|
||||
* @param ids 需要删除的项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProProjectInfoByIds(Long[] ids)
|
||||
{
|
||||
return proProjectInfoMapper.deleteProProjectInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目信息信息
|
||||
*
|
||||
* @param id 项目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProProjectInfoById(Long id)
|
||||
{
|
||||
return proProjectInfoMapper.deleteProProjectInfoById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.project.mapper.ProProjectApplyMapper">
|
||||
|
||||
<resultMap type="ProProjectApply" id="ProProjectApplyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="projId" column="proj_id" />
|
||||
<result property="applyType" column="apply_type" />
|
||||
<result property="applyStatus" column="apply_status" />
|
||||
<result property="applyReason" column="apply_reason" />
|
||||
<result property="applyFiles" column="apply_files" />
|
||||
<result property="applyUser" column="apply_user" />
|
||||
<result property="useTime" column="use_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ProProjectApplyProProjectApplyDetailResult" type="ProProjectApply" extends="ProProjectApplyResult">
|
||||
<collection property="proProjectApplyDetailList" notNullColumn="sub_id" javaType="java.util.List" resultMap="ProProjectApplyDetailResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ProProjectApplyDetail" id="ProProjectApplyDetailResult">
|
||||
<result property="id" column="sub_id" />
|
||||
<result property="applyId" column="sub_apply_id" />
|
||||
<result property="superTypeId" column="sub_super_type_id" />
|
||||
<result property="superTypeName" column="sub_super_type_name" />
|
||||
<result property="typeId" column="sub_type_id" />
|
||||
<result property="typeName" column="sub_type_name" />
|
||||
<result property="assetsId" column="sub_assets_id" />
|
||||
<result property="assetsName" column="sub_assets_name" />
|
||||
<result property="assetsUnit" column="sub_assets_unit" />
|
||||
<result property="number" column="sub_number" />
|
||||
<result property="useTime" column="sub_use_time" />
|
||||
<result property="useReason" column="sub_use_reason" />
|
||||
<result property="price" column="sub_price" />
|
||||
<result property="totalPrice" column="sub_total_price" />
|
||||
<result property="isDel" column="sub_is_del" />
|
||||
<result property="createBy" column="sub_create_by" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="updateBy" column="sub_update_by" />
|
||||
<result property="updateTime" column="sub_update_time" />
|
||||
<result property="remark" column="sub_remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProProjectApplyVo">
|
||||
select id, dept_id, proj_id, apply_type, apply_status, apply_reason, apply_files, apply_user, use_time, is_del, create_by, create_time, update_by, update_time, remark from pro_project_apply
|
||||
</sql>
|
||||
|
||||
<select id="selectProProjectApplyList" parameterType="ProProjectApply" resultMap="ProProjectApplyResult">
|
||||
<include refid="selectProProjectApplyVo"/>
|
||||
<where>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="projId != null "> and proj_id = #{projId}</if>
|
||||
<if test="applyType != null and applyType != ''"> and apply_type = #{applyType}</if>
|
||||
<if test="applyStatus != null and applyStatus != ''"> and apply_status = #{applyStatus}</if>
|
||||
<if test="applyUser != null "> and apply_user = #{applyUser}</if>
|
||||
<if test="useTime != null "> and use_time = #{useTime}</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProProjectApplyById" parameterType="Long" resultMap="ProProjectApplyProProjectApplyDetailResult">
|
||||
select a.id, a.dept_id, a.proj_id, a.apply_type, a.apply_status, a.apply_reason, a.apply_files, a.apply_user, a.use_time, a.is_del, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,
|
||||
b.id as sub_id, b.apply_id as sub_apply_id, b.super_type_id as sub_super_type_id, b.super_type_name as sub_super_type_name, b.type_id as sub_type_id, b.type_name as sub_type_name, b.assets_id as sub_assets_id, b.assets_name as sub_assets_name, b.assets_unit as sub_assets_unit, b.number as sub_number, b.use_time as sub_use_time, b.use_reason as sub_use_reason, b.price as sub_price, b.total_price as sub_total_price, b.is_del as sub_is_del, b.create_by as sub_create_by, b.create_time as sub_create_time, b.update_by as sub_update_by, b.update_time as sub_update_time, b.remark as sub_remark
|
||||
from pro_project_apply a
|
||||
left join pro_project_apply_detail b on b.apply_id = a.id
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProProjectApply" parameterType="ProProjectApply">
|
||||
insert into pro_project_apply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="projId != null">proj_id,</if>
|
||||
<if test="applyType != null">apply_type,</if>
|
||||
<if test="applyStatus != null">apply_status,</if>
|
||||
<if test="applyReason != null">apply_reason,</if>
|
||||
<if test="applyFiles != null">apply_files,</if>
|
||||
<if test="applyUser != null">apply_user,</if>
|
||||
<if test="useTime != null">use_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="projId != null">#{projId},</if>
|
||||
<if test="applyType != null">#{applyType},</if>
|
||||
<if test="applyStatus != null">#{applyStatus},</if>
|
||||
<if test="applyReason != null">#{applyReason},</if>
|
||||
<if test="applyFiles != null">#{applyFiles},</if>
|
||||
<if test="applyUser != null">#{applyUser},</if>
|
||||
<if test="useTime != null">#{useTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProProjectApply" parameterType="ProProjectApply">
|
||||
update pro_project_apply
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="projId != null">proj_id = #{projId},</if>
|
||||
<if test="applyType != null">apply_type = #{applyType},</if>
|
||||
<if test="applyStatus != null">apply_status = #{applyStatus},</if>
|
||||
<if test="applyReason != null">apply_reason = #{applyReason},</if>
|
||||
<if test="applyFiles != null">apply_files = #{applyFiles},</if>
|
||||
<if test="applyUser != null">apply_user = #{applyUser},</if>
|
||||
<if test="useTime != null">use_time = #{useTime},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProjectApplyById" parameterType="Long">
|
||||
delete from pro_project_apply where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProjectApplyByIds" parameterType="String">
|
||||
delete from pro_project_apply where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProjectApplyDetailByApplyIds" parameterType="String">
|
||||
delete from pro_project_apply_detail where apply_id in
|
||||
<foreach item="applyId" collection="array" open="(" separator="," close=")">
|
||||
#{applyId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProjectApplyDetailByApplyId" parameterType="Long">
|
||||
delete from pro_project_apply_detail where apply_id = #{applyId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchProProjectApplyDetail">
|
||||
insert into pro_project_apply_detail( id, apply_id, super_type_id, super_type_name, type_id, type_name, assets_id, assets_name, assets_unit, number, use_time, use_reason, price, total_price, is_del, create_by, create_time, update_by, update_time, remark) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.applyId}, #{item.superTypeId}, #{item.superTypeName}, #{item.typeId}, #{item.typeName}, #{item.assetsId}, #{item.assetsName}, #{item.assetsUnit}, #{item.number}, #{item.useTime}, #{item.useReason}, #{item.price}, #{item.totalPrice}, #{item.isDel}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime}, #{item.remark})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yanzhu.project.mapper.ProProjectInfoMapper">
|
||||
|
||||
<resultMap type="ProProjectInfo" id="ProProjectInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="address" column="address" />
|
||||
<result property="infos" column="infos" />
|
||||
<result property="personName" column="person_name" />
|
||||
<result property="personPhone" column="person_phone" />
|
||||
<result property="mainImage" column="main_image" />
|
||||
<result property="images" column="images" />
|
||||
<result property="projStatus" column="proj_status" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="unit" column="unit" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProProjectInfoVo">
|
||||
select id, name, dept_id, address, infos, person_name, person_phone, main_image, images, proj_status, is_del, create_by, create_time, update_by, update_time, remark, unit from pro_project_info
|
||||
</sql>
|
||||
|
||||
<select id="selectProProjectInfoList" parameterType="ProProjectInfo" resultMap="ProProjectInfoResult">
|
||||
<include refid="selectProProjectInfoVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="deptId != null "> and dept_id = #{deptId}</if>
|
||||
<if test="personName != null and personName != ''"> and person_name like concat('%', #{personName}, '%')</if>
|
||||
<if test="personPhone != null and personPhone != ''"> and person_phone = #{personPhone}</if>
|
||||
<if test="projStatus != null and projStatus != ''"> and proj_status = #{projStatus}</if>
|
||||
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProProjectInfoById" parameterType="Long" resultMap="ProProjectInfoResult">
|
||||
<include refid="selectProProjectInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProProjectInfo" parameterType="ProProjectInfo">
|
||||
insert into pro_project_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="infos != null">infos,</if>
|
||||
<if test="personName != null">person_name,</if>
|
||||
<if test="personPhone != null">person_phone,</if>
|
||||
<if test="mainImage != null">main_image,</if>
|
||||
<if test="images != null">images,</if>
|
||||
<if test="projStatus != null">proj_status,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="infos != null">#{infos},</if>
|
||||
<if test="personName != null">#{personName},</if>
|
||||
<if test="personPhone != null">#{personPhone},</if>
|
||||
<if test="mainImage != null">#{mainImage},</if>
|
||||
<if test="images != null">#{images},</if>
|
||||
<if test="projStatus != null">#{projStatus},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateProProjectInfo" parameterType="ProProjectInfo">
|
||||
update pro_project_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="infos != null">infos = #{infos},</if>
|
||||
<if test="personName != null">person_name = #{personName},</if>
|
||||
<if test="personPhone != null">person_phone = #{personPhone},</if>
|
||||
<if test="mainImage != null">main_image = #{mainImage},</if>
|
||||
<if test="images != null">images = #{images},</if>
|
||||
<if test="projStatus != null">proj_status = #{projStatus},</if>
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteProProjectInfoById" parameterType="Long">
|
||||
delete from pro_project_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProProjectInfoByIds" parameterType="String">
|
||||
delete from pro_project_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,2 @@
|
|||
engine-strict=true
|
||||
engine-override.npm=8.19.2
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目申请列表
|
||||
export function listProjectApply(query) {
|
||||
return request({
|
||||
url: '/project/projectApply/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目申请详细
|
||||
export function getProjectApply(id) {
|
||||
return request({
|
||||
url: '/project/projectApply/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增项目申请
|
||||
export function addProjectApply(data) {
|
||||
return request({
|
||||
url: '/project/projectApply',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改项目申请
|
||||
export function updateProjectApply(data) {
|
||||
return request({
|
||||
url: '/project/projectApply',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除项目申请
|
||||
export function delProjectApply(id) {
|
||||
return request({
|
||||
url: '/project/projectApply/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目信息列表
|
||||
export function listProjectInfo(query) {
|
||||
return request({
|
||||
url: '/project/projectInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目信息详细
|
||||
export function getProjectInfo(id) {
|
||||
return request({
|
||||
url: '/project/projectInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增项目信息
|
||||
export function addProjectInfo(data) {
|
||||
return request({
|
||||
url: '/project/projectInfo',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改项目信息
|
||||
export function updateProjectInfo(data) {
|
||||
return request({
|
||||
url: '/project/projectInfo',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除项目信息
|
||||
export function delProjectInfo(id) {
|
||||
return request({
|
||||
url: '/project/projectInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,528 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="部门主键" prop="deptId">
|
||||
<el-input
|
||||
v-model="queryParams.deptId"
|
||||
placeholder="请输入部门主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projId">
|
||||
<el-input
|
||||
v-model="queryParams.projId"
|
||||
placeholder="请输入项目主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请类型" prop="applyType">
|
||||
<el-select v-model="queryParams.applyType" placeholder="请选择申请类型" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.pro_apply_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请状态" prop="applyStatus">
|
||||
<el-select v-model="queryParams.applyStatus" placeholder="请选择申请状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.pro_apply_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请用户主键" prop="applyUser">
|
||||
<el-input
|
||||
v-model="queryParams.applyUser"
|
||||
placeholder="请输入申请用户主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="使用时间" prop="useTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.useTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择使用时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="isDel">
|
||||
<el-select v-model="queryParams.isDel" placeholder="请选择是否删除" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_is_del"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:projectApply:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['project:projectApply:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['project:projectApply:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['project:projectApply:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="projectApplyList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="部门主键" align="center" prop="deptId" />
|
||||
<el-table-column label="项目主键" align="center" prop="projId" />
|
||||
<el-table-column label="申请类型" align="center" prop="applyType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.pro_apply_type" :value="scope.row.applyType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请状态" align="center" prop="applyStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.pro_apply_status" :value="scope.row.applyStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请原因" align="center" prop="applyReason" />
|
||||
<el-table-column label="申请附件" align="center" prop="applyFiles" />
|
||||
<el-table-column label="申请用户主键" align="center" prop="applyUser" />
|
||||
<el-table-column label="使用时间" align="center" prop="useTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.useTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否删除" align="center" prop="isDel">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_is_del" :value="scope.row.isDel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:projectApply:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:projectApply:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目申请对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="部门主键" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主键" prop="projId">
|
||||
<el-input v-model="form.projId" placeholder="请输入项目主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请类型" prop="applyType">
|
||||
<el-select v-model="form.applyType" placeholder="请选择申请类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.pro_apply_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请状态" prop="applyStatus">
|
||||
<el-select v-model="form.applyStatus" placeholder="请选择申请状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.pro_apply_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请原因" prop="applyReason">
|
||||
<el-input v-model="form.applyReason" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请附件" prop="applyFiles">
|
||||
<el-input v-model="form.applyFiles" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="申请用户主键" prop="applyUser">
|
||||
<el-input v-model="form.applyUser" placeholder="请输入申请用户主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="使用时间" prop="useTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.useTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择使用时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="isDel">
|
||||
<el-select v-model="form.isDel" placeholder="请选择是否删除">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_is_del"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-divider content-position="center">项目申请明细信息</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddProProjectApplyDetail">添加</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteProProjectApplyDetail">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="proProjectApplyDetailList" :row-class-name="rowProProjectApplyDetailIndex" @selection-change="handleProProjectApplyDetailSelectionChange" ref="proProjectApplyDetail">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="大类主键" prop="superTypeId" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.superTypeId" placeholder="请输入大类主键" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="大类名称" prop="superTypeName" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.superTypeName" placeholder="请输入大类名称" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型主键" prop="typeId" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.typeId" placeholder="请输入类型主键" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型名称" prop="typeName" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.typeName" placeholder="请输入类型名称" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产主键" prop="assetsId" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.assetsId" placeholder="请输入资产主键" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产名称" prop="assetsName" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.assetsName" placeholder="请输入资产名称" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产单位" prop="assetsUnit" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.assetsUnit" placeholder="请输入资产单位" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="number" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.number" placeholder="请输入数量" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用时间" prop="useTime" width="240">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker clearable v-model="scope.row.useTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择使用时间" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" prop="price" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.price" placeholder="请输入单价" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总价" prop="totalPrice" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.totalPrice" placeholder="请输入总价" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否删除" prop="isDel" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.isDel" placeholder="请选择是否删除">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_is_del"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark" placeholder="请输入备注" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProjectApply, getProjectApply, delProjectApply, addProjectApply, updateProjectApply } from "@/api/project/projectApply";
|
||||
|
||||
export default {
|
||||
name: "ProjectApply",
|
||||
dicts: ['pro_apply_status', 'pro_apply_type', 'sys_is_del'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 子表选中数据
|
||||
checkedProProjectApplyDetail: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目申请表格数据
|
||||
projectApplyList: [],
|
||||
// 项目申请明细表格数据
|
||||
proProjectApplyDetailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
deptId: null,
|
||||
projId: null,
|
||||
applyType: null,
|
||||
applyStatus: null,
|
||||
applyUser: null,
|
||||
useTime: null,
|
||||
isDel: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目申请列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProjectApply(this.queryParams).then(response => {
|
||||
this.projectApplyList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
deptId: null,
|
||||
projId: null,
|
||||
applyType: null,
|
||||
applyStatus: null,
|
||||
applyReason: null,
|
||||
applyFiles: null,
|
||||
applyUser: null,
|
||||
useTime: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null
|
||||
};
|
||||
this.proProjectApplyDetailList = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加项目申请";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getProjectApply(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.proProjectApplyDetailList = response.data.proProjectApplyDetailList;
|
||||
this.open = true;
|
||||
this.title = "修改项目申请";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.proProjectApplyDetailList = this.proProjectApplyDetailList;
|
||||
if (this.form.id != null) {
|
||||
updateProjectApply(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProjectApply(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目申请编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delProjectApply(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 项目申请明细序号 */
|
||||
rowProProjectApplyDetailIndex({ row, rowIndex }) {
|
||||
row.index = rowIndex + 1;
|
||||
},
|
||||
/** 项目申请明细添加按钮操作 */
|
||||
handleAddProProjectApplyDetail() {
|
||||
let obj = {};
|
||||
obj.superTypeId = "";
|
||||
obj.superTypeName = "";
|
||||
obj.typeId = "";
|
||||
obj.typeName = "";
|
||||
obj.assetsId = "";
|
||||
obj.assetsName = "";
|
||||
obj.assetsUnit = "";
|
||||
obj.number = "";
|
||||
obj.useTime = "";
|
||||
obj.useReason = "";
|
||||
obj.price = "";
|
||||
obj.totalPrice = "";
|
||||
obj.isDel = "";
|
||||
obj.remark = "";
|
||||
this.proProjectApplyDetailList.push(obj);
|
||||
},
|
||||
/** 项目申请明细删除按钮操作 */
|
||||
handleDeleteProProjectApplyDetail() {
|
||||
if (this.checkedProProjectApplyDetail.length == 0) {
|
||||
this.$modal.msgError("请先选择要删除的项目申请明细数据");
|
||||
} else {
|
||||
const proProjectApplyDetailList = this.proProjectApplyDetailList;
|
||||
const checkedProProjectApplyDetail = this.checkedProProjectApplyDetail;
|
||||
this.proProjectApplyDetailList = proProjectApplyDetailList.filter(function(item) {
|
||||
return checkedProProjectApplyDetail.indexOf(item.index) == -1
|
||||
});
|
||||
}
|
||||
},
|
||||
/** 复选框选中数据 */
|
||||
handleProProjectApplyDetailSelectionChange(selection) {
|
||||
this.checkedProProjectApplyDetail = selection.map(item => item.index)
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('project/projectApply/export', {
|
||||
...this.queryParams
|
||||
}, `projectApply_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,357 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="部门主键" prop="deptId">
|
||||
<el-input
|
||||
v-model="queryParams.deptId"
|
||||
placeholder="请输入部门主键"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人名称" prop="personName">
|
||||
<el-input
|
||||
v-model="queryParams.personName"
|
||||
placeholder="请输入负责人名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="personPhone">
|
||||
<el-input
|
||||
v-model="queryParams.personPhone"
|
||||
placeholder="请输入负责人电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="isDel">
|
||||
<el-select v-model="queryParams.isDel" placeholder="请选择是否删除" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_is_del"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:projectInfo:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['project:projectInfo:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['project:projectInfo:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['project:projectInfo:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="projectInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="项目名称" align="center" prop="name" />
|
||||
<el-table-column label="部门主键" align="center" prop="deptId" />
|
||||
<el-table-column label="项目地址" align="center" prop="address" />
|
||||
<el-table-column label="项目描述" align="center" prop="infos" />
|
||||
<el-table-column label="负责人名称" align="center" prop="personName" />
|
||||
<el-table-column label="负责人电话" align="center" prop="personPhone" />
|
||||
<el-table-column label="项目主图" align="center" prop="mainImage" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.mainImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图片列表" align="center" prop="images" />
|
||||
<el-table-column label="项目状态" align="center" prop="projStatus" />
|
||||
<el-table-column label="是否删除" align="center" prop="isDel">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_is_del" :value="scope.row.isDel"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="项目级单位" align="center" prop="unit" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:projectInfo:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:projectInfo:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="部门主键" prop="deptId">
|
||||
<el-input v-model="form.deptId" placeholder="请输入部门主键" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入项目地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目描述" prop="infos">
|
||||
<el-input v-model="form.infos" placeholder="请输入项目描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人名称" prop="personName">
|
||||
<el-input v-model="form.personName" placeholder="请输入负责人名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="负责人电话" prop="personPhone">
|
||||
<el-input v-model="form.personPhone" placeholder="请输入负责人电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目主图" prop="mainImage">
|
||||
<image-upload v-model="form.mainImage"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片列表" prop="images">
|
||||
<el-input v-model="form.images" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否删除" prop="isDel">
|
||||
<el-select v-model="form.isDel" placeholder="请选择是否删除">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_is_del"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目级单位" prop="unit">
|
||||
<el-input v-model="form.unit" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listProjectInfo, getProjectInfo, delProjectInfo, addProjectInfo, updateProjectInfo } from "@/api/project/projectInfo";
|
||||
|
||||
export default {
|
||||
name: "ProjectInfo",
|
||||
dicts: ['sys_is_del'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目信息表格数据
|
||||
projectInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
deptId: null,
|
||||
personName: null,
|
||||
personPhone: null,
|
||||
projStatus: null,
|
||||
isDel: null,
|
||||
unit: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProjectInfo(this.queryParams).then(response => {
|
||||
this.projectInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
deptId: null,
|
||||
address: null,
|
||||
infos: null,
|
||||
personName: null,
|
||||
personPhone: null,
|
||||
mainImage: null,
|
||||
images: null,
|
||||
projStatus: null,
|
||||
isDel: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
remark: null,
|
||||
unit: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加项目信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getProjectInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateProjectInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addProjectInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delProjectInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('project/projectInfo/export', {
|
||||
...this.queryParams
|
||||
}, `projectInfo_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue