Browse Source

[fix]

委外加工 委外报价
修改委外报价实体类,调整导出字段及顺序,修改日期类型导出格式;
修改查询委外报价列表方法,添加判断审核结束后设置当前状态为审核通过/拒绝;
修改委外报价导出后端接口;
修改委外报价前端页面搜索字段顺序、绑定字典数据及导出按钮绑定方法;
dev
王晓迪 4 months ago
parent
commit
2beea76a08
  1. 4
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/OutsourceQuoteController.java
  2. 64
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/OutsourceQuote.java
  3. 92
      ruoyi-admin/src/main/resources/templates/system/outsource_quote/outsource_quote.html

4
ruoyi-admin/src/main/java/com/ruoyi/system/controller/OutsourceQuoteController.java

@ -90,9 +90,9 @@ public class OutsourceQuoteController extends BaseController
@Log(title = "委外报价", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(OutsourceQuoteVO outsourceQuoteVo)
public AjaxResult export(OutsourceQuoteVO outsourceQuoteVO)
{
List<OutsourceQuoteVO> list = outsourceQuoteService.selectOutsourceQuoteList(outsourceQuoteVo);
List<OutsourceQuoteVO> list = outsourceQuoteService.getExportList(outsourceQuoteVO);
ExcelUtil<OutsourceQuoteVO> util = new ExcelUtil<OutsourceQuoteVO>(OutsourceQuoteVO.class);
return util.exportExcel(list, "委外报价数据");
}

64
ruoyi-admin/src/main/java/com/ruoyi/system/domain/OutsourceQuote.java

@ -2,6 +2,8 @@ package com.ruoyi.system.domain;
import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -22,31 +24,32 @@ public class OutsourceQuote extends BaseEntity
private Long outsourceQuoteId;
/** 委外报价单号 */
@Excel(name = "委外报价单号")
@Excel(name = "委外报价单号",sort = 1)
private String outsourceQuoteCode;
/** 供应商编号 */
@Excel(name = "供应商编号")
@Excel(name = "供应商ID",sort = 2)
private String supplierQuoteCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
@Excel(name = "供应商名称",sort = 3)
private String supplierName;
/** 工序合计 */
@Excel(name = "工序合计")
@Excel(name = "工序合计",sort = 4)
private int processAmount;
/** 税率 */
@Excel(name = "税率")
// @Excel(name = "税率")
private BigDecimal taxRate;
/** 定价日期 */
@Excel(name = "定价日期")
@Excel(name = "定价日期",dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 5)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date pricingDate;
/** 审核状态 */
@Excel(name = "审核状态")
@Excel(name = "审核状态",sort = 8,dictType = "auditStatus")
private String auditStatus;
/** 流程实例ID */
@ -62,9 +65,12 @@ public class OutsourceQuote extends BaseEntity
private String applyTitle;
/** 申请时间 */
@Excel(name = "申请时间",dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 7)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime;
/** 申请人 */
@Excel(name = "申请人",sort = 6)
private String applyUser;
/** 流程作废实例ID */
@ -73,6 +79,20 @@ public class OutsourceQuote extends BaseEntity
/** 流程恢复实例ID */
private String restoreInstanceId;
// 录入时间
@Excel(name = "录入时间",dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 9)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
// 更新人
@Excel(name = "更新人",sort = 10)
private String updateBy;
// 上次更新时间
@Excel(name = "上次更新时间",dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 11)
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
/** 委外报价工序信息信息 */
private List<OutsourceQuoteChild> outsourceQuoteChildList;
@ -145,6 +165,36 @@ public class OutsourceQuote extends BaseEntity
this.restoreInstanceId = restoreInstanceId;
}
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String getUpdateBy() {
return updateBy;
}
@Override
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
@Override
public Date getUpdateTime() {
return updateTime;
}
@Override
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Long getOutsourceQuoteId()
{
return outsourceQuoteId;

92
ruoyi-admin/src/main/resources/templates/system/outsource_quote/outsource_quote.html

@ -15,43 +15,39 @@
<input type="text" name="outsourceQuoteCode"/>
</li>
<li>
<label>委外工序ID:</label>
<input type="text" name="outsourceProcessCode"/>
</li>
<li>
<label>供应商编号:</label>
<label>供应商ID:</label>
<input type="text" name="supplierQuoteCode"/>
</li>
<li>
<label>供应商名称:</label>
<label>供应商公司名称:</label>
<input type="text" name="supplierName"/>
</li>
<!-- <li>-->
<!-- <label>料号:</label>-->
<!-- <input type="text" name="materialNo"/>-->
<!-- </li>-->
<li>
<label>税率:</label>
<input type="text" name="taxRate"/>
<label>审核状态:</label>
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>定价日期:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<label>录入时间</label>
<input type="text" class="time-input" id="createstartTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
<input type="text" class="time-input" id="createendTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<label>录入人:</label>
<input type="text" name="createBy"/>
</li>
<li>
<label>录入时间</label>
<input type="text" class="time-input" id="createstartTime" placeholder="开始时间" name="params[beginTime]"/>
<label>定价日期</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" class="time-input" id="createendTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<label>审核状态:</label>
<select name="auditStatus" th:with="type=${@dict.getType('audit_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -129,20 +125,17 @@
visible: false
},
{
field: 'applyUser',
title: '申请人ID',
visible: false
},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
field: 'auditStatus',
title: '审核状态',
visible: false,
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{
field: 'applyTime',
title: '申请时间'
field: 'applyUser',
title: '申请人ID',
visible: false
},
{
field: 'taskId',
@ -154,21 +147,6 @@
title: '待办用户ID',
visible: false
},
{
field: 'taskName',
title: '当前任务名称',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{
field: 'auditStatus',
title: '审核状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
// {
// field: 'createBy',
// title: '采购员'
@ -179,7 +157,7 @@
},
{
field: 'supplierQuoteCode',
title: '供应商编号'
title: '供应商ID'
},
{
field: 'supplierName',
@ -193,7 +171,25 @@
field: 'pricingDate',
title: '定价日期'
},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{
field: 'applyTime',
title: '申请时间'
},
{
field: 'taskName',
title: '当前状态',
align: 'center',
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{
field: 'createTime',
title: '录入时间'

Loading…
Cancel
Save