Browse Source

[feat]采购管理

修改采购报价前端列表页面:表头、列表、操作栏调整为统一样式
新增页面、修改页面、审批页面去掉没用的备注字段
采购报价子表新增 通过采购报价编码查找所有采购报价子表集合方法
修复 根据采购报价信息更新采购报价最新报价记录报错问题
修改采购报价分页查询方法:加上审核通过和审核拒绝字段
采购报价Vo类加上当前状态字段
dev
liuxiaoxu 3 days ago
parent
commit
c386df0c99
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/PurchaseQuoteVo.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java
  3. 5
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteHistoryServiceImpl.java
  4. 6
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  5. 5
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml
  6. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html
  7. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/detail.html
  8. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html
  9. 34
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html
  10. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskCgjlVerify.html
  11. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskFzjlVerify.html
  12. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskModifyApply.html

13
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/Vo/PurchaseQuoteVo.java

@ -19,6 +19,11 @@ public class PurchaseQuoteVo extends PurchaseQuote {
private String taskId; private String taskId;
/** 任务名称 */ /** 任务名称 */
private String taskName; private String taskName;
// 当前状态
private String taskStatus;
/** 办理时间 */ /** 办理时间 */
private Date doneTime; private Date doneTime;
/** 创建人 */ /** 创建人 */
@ -96,6 +101,13 @@ public class PurchaseQuoteVo extends PurchaseQuote {
this.instanceTypeName = instanceTypeName; this.instanceTypeName = instanceTypeName;
} }
public String getTaskStatus() {
return taskStatus;
}
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
@Override @Override
public String toString() { public String toString() {
@ -103,6 +115,7 @@ public class PurchaseQuoteVo extends PurchaseQuote {
"applyUserName='" + applyUserName + '\'' + "applyUserName='" + applyUserName + '\'' +
", taskId='" + taskId + '\'' + ", taskId='" + taskId + '\'' +
", taskName='" + taskName + '\'' + ", taskName='" + taskName + '\'' +
", taskStatus='" + taskStatus + '\'' +
", doneTime=" + doneTime + ", doneTime=" + doneTime +
", createUserName='" + createUserName + '\'' + ", createUserName='" + createUserName + '\'' +
", suspendState='" + suspendState + '\'' + ", suspendState='" + suspendState + '\'' +

4
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java

@ -95,4 +95,8 @@ public interface PurchaseQuoteChildMapper
* */ * */
List<PurchaseQuoteChild> selectQuoteChildBySupplierCode(String supplierCode); List<PurchaseQuoteChild> selectQuoteChildBySupplierCode(String supplierCode);
/**
* 通过采购报价编码查找所有采购报价子表集合
* */
List<PurchaseQuoteChild> selectQuoteChildByPurchaseQuoteCode(String purchaseQuoteCode);
} }

5
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteHistoryServiceImpl.java

@ -18,6 +18,7 @@ import com.ruoyi.purchase.mapper.PurchaseQuoteHistoryMapper;
import com.ruoyi.purchase.domain.PurchaseQuoteHistory; import com.ruoyi.purchase.domain.PurchaseQuoteHistory;
import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService; import com.ruoyi.purchase.service.IPurchaseQuoteHistoryService;
import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 采购物料历史报价信息Service业务层处理 * 采购物料历史报价信息Service业务层处理
@ -199,9 +200,9 @@ public class PurchaseQuoteHistoryServiceImpl implements IPurchaseQuoteHistorySer
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
String supplierCode = purchaseQuoteVo.getSupplierQuoteCode(); String supplierCode = purchaseQuoteVo.getSupplierQuoteCode();
String auditStatus = purchaseQuoteVo.getAuditStatus(); String auditStatus = purchaseQuoteVo.getAuditStatus();
String purchaseQuoteCode = purchaseQuoteVo.getPurchaseQuoteCode();
// 获取所有的子项 // 获取所有的子项
List<PurchaseQuoteChild> purchaseQuoteChildList= purchaseQuoteChildMapper.selectQuoteChildBySupplierCode(supplierCode); List<PurchaseQuoteChild> purchaseQuoteChildList= purchaseQuoteChildMapper.selectQuoteChildByPurchaseQuoteCode(purchaseQuoteCode);
for (PurchaseQuoteChild purchaseQuoteChild : purchaseQuoteChildList) { for (PurchaseQuoteChild purchaseQuoteChild : purchaseQuoteChildList) {
PurchaseQuoteHistory purchaseQuoteHistory = new PurchaseQuoteHistory(); PurchaseQuoteHistory purchaseQuoteHistory = new PurchaseQuoteHistory();

6
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java

@ -148,6 +148,12 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
} else { } else {
purchaseQuoteVo.setTaskName("未启动"); purchaseQuoteVo.setTaskName("未启动");
} }
purchaseQuoteVo.setTaskStatus(purchaseQuoteVo.getTaskName());
if(purchaseQuoteVo.getAuditStatus()!=null && purchaseQuoteVo.getAuditStatus().equals("1")){
purchaseQuoteVo.setTaskStatus("审核通过");
}else if(purchaseQuoteVo.getAuditStatus()!=null && purchaseQuoteVo.getAuditStatus().equals("2")){
purchaseQuoteVo.setTaskStatus("审核拒绝");
}
returnList.add(purchaseQuoteVo); returnList.add(purchaseQuoteVo);
} }
returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal()); returnList.setTotal(CollectionUtils.isEmpty(list) ? 0 : list.getTotal());

5
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml

@ -90,6 +90,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where supplier_code = #{supplierCode} where supplier_code = #{supplierCode}
</select> </select>
<select id="selectQuoteChildByPurchaseQuoteCode" parameterType="String" resultMap="PurchaseQuoteChildResult">
<include refid="selectPurchaseQuoteChildVo"/>
where purchase_quote_code = #{purchaseQuoteCode}
</select>
<insert id="insertPurchaseQuoteChild" parameterType="PurchaseQuoteChild" useGeneratedKeys="true" keyProperty="purchaseQuoteChildId"> <insert id="insertPurchaseQuoteChild" parameterType="PurchaseQuoteChild" useGeneratedKeys="true" keyProperty="purchaseQuoteChildId">
insert into purchase_quote_child insert into purchase_quote_child

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/add.html

@ -201,7 +201,6 @@
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, {title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, {title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
{title: '操作', align: 'center', {title: '操作', align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/detail.html

@ -218,7 +218,6 @@
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, {title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, {title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
], ],
}; };
$.table.init(options); $.table.init(options);

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html

@ -240,7 +240,6 @@
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, {title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, {title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
{title: '操作', align: 'center', {title: '操作', align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];

34
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html

@ -109,7 +109,7 @@
columns: [ columns: [
{checkbox: true}, {checkbox: true},
{title: '采购报价索引id',field: 'purchaseQuoteId',visible: false}, {title: '采购报价索引id',field: 'purchaseQuoteId',visible: false},
{title: '审核状态',field: 'auditStatus', {title: '审核状态',field: 'auditStatus',visible: false,
formatter: function (value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);} formatter: function (value, row, index) {return $.table.selectDictLabel(auditStatusDatas, value);}
}, },
{title: '流程实例ID',field: 'instanceId',visible: false}, {title: '流程实例ID',field: 'instanceId',visible: false},
@ -118,29 +118,39 @@
{title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false}, {title: '流程恢复实例ID',field: 'restoreInstanceId', visible: false},
{ title: '流程实例类型', field: 'instanceTypeName',visible: false}, { title: '流程实例类型', field: 'instanceTypeName',visible: false},
{title: '申请人ID',field: 'applyUser', visible: false}, {title: '申请人ID',field: 'applyUser', visible: false},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{field: 'applyTime',title: '申请时间'
},
{title: '当前任务ID',field: 'taskId',visible: false}, {title: '当前任务ID',field: 'taskId',visible: false},
{ title: '待办用户ID',field: 'todoUserId', visible: false}, { title: '待办用户ID',field: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName', { title: '当前任务名称',field: 'taskName', visible: false,
align: 'center', align: 'center',
formatter: function(value, row, index) { formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>'; return '<span class="badge badge-primary">' + value + '</span>';
} }
}, },
{title: '采购员',field: 'purchaseBuyer',}, {title: '当前状态',field: 'taskStatus',
formatter: function(value, row, index) {
if(row.auditStatus!="1"&&value != "未启动"){
return '<span class="badge badge-danger">' + value + '</span>';
}
if(value === "未启动"){
return '<span class="badge badge-primary">' + value + '</span>';
}
return '<span class="badge badge-primary">' + value + '</span>';}
},
{title: '采购报价单号',field: 'purchaseQuoteCode',}, {title: '采购报价单号',field: 'purchaseQuoteCode',},
{title: '供应商ID',field: 'supplierQuoteCode',}, {title: '供应商ID',field: 'supplierQuoteCode',},
{title: '供应商名称',field: 'supplierName',}, {title: '供应商名称',field: 'supplierName',},
{title: '物料合计',field: 'materialAmount',}, {title: '物料合计',field: 'materialAmount',},
{title: '定价时间',field: 'pricingDate',}, {title: '定价时间',field: 'pricingDate',},
{field: 'applyTime',title: '申请时间'
},
{
field: 'applyUserName',
title: '<span style="color: red;">申请人</span>',
formatter: function(value, row, index) {
return '<span style="color: red;">' + (value ? value : "-") + '</span>';
}
},
{title: '采购员',field: 'purchaseBuyer',},
{title: '录入时间',field: 'createTime',}, {title: '录入时间',field: 'createTime',},
{title: '更新人',field: 'updateBy',}, {title: '更新人',field: 'updateBy',},
{title: '上次更新时间',field: 'updateTime',}, {title: '上次更新时间',field: 'updateTime',},

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskCgjlVerify.html

@ -261,7 +261,6 @@
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, {title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, {title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
], ],
}; };
$.table.init(options); $.table.init(options);

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskFzjlVerify.html

@ -263,7 +263,6 @@
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, {title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, {title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
], ],
}; };
$.table.init(options); $.table.init(options);

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskModifyApply.html

@ -257,7 +257,6 @@
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, {title: '录入时间',field: 'createTime',align: 'center',visible: false },
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, {title: '更新人',field: 'updateBy',align: 'center',visible: false},
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, {title: '上次更新时间',field: 'updateTime',align: 'center',visible: false},
{title: '备注',field: 'remark',align: 'center'},
{title: '操作', align: 'center', {title: '操作', align: 'center',
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];

Loading…
Cancel
Save