Browse Source

[feat]采购管理

修改采购报价详情前端页面内容都不可编辑,加上报价历史数据
修改采购报价副总经理审批前端页面内容都不可编辑,加上报价历史数据
修改采购报价采购经理审批前端页面内容都不可编辑,加上报价历史数据
新增 采购报价更新的时候更新采购报价历史数据方法
修改采购报价审批接口。加上更新采购报价历史的方法
采购报价历史新增 通过供应商编号和物料编号更新采购报价历史数据方法
更新采购报价查询采购物料历史报价信息列表方法。加上对最新报价的处理和非空校验
修改客户报价的查询接口。加上非空校验
dev
liuxiaoxu 3 days ago
parent
commit
a84f8a6bf1
  1. 3
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java
  2. 1
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteChildMapper.java
  3. 5
      ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteHistoryMapper.java
  4. 7
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteHistoryService.java
  5. 61
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteHistoryServiceImpl.java
  6. 22
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteHistoryServiceImpl.java
  7. 40
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteHistoryMapper.xml
  8. 39
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/detail.html
  9. 2
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/recentQuotationHistory.html
  10. 37
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskCgjlVerify.html
  11. 39
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/taskFzjlVerify.html

3
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java

@ -252,6 +252,7 @@ public class PurchaseQuoteController extends BaseController
if(!approvedFlag){ if(!approvedFlag){
// 审核状态-审核拒绝 // 审核状态-审核拒绝
purchaseQuoteVo.setAuditStatus("2"); purchaseQuoteVo.setAuditStatus("2");
purchaseQuoteHistoryService.updatePurchaseQuoteHistoryByPurchaseQuote(purchaseQuoteVo);
} }
// 如果任务已结束更新业务表状态 // 如果任务已结束更新业务表状态
boolean processIsFinish = processService.judgeProcessIsFinish(instanceId); boolean processIsFinish = processService.judgeProcessIsFinish(instanceId);
@ -262,6 +263,7 @@ public class PurchaseQuoteController extends BaseController
if("submit".equals(instanceType)){ if("submit".equals(instanceType)){
// 使用状态-是 // 使用状态-是
purchaseQuoteVo.setUseStatus("1"); purchaseQuoteVo.setUseStatus("1");
purchaseQuoteHistoryService.updatePurchaseQuoteHistoryByPurchaseQuote(purchaseQuoteVo);
} }
// 作废 // 作废
else if("cancel".equals(instanceType)){ else if("cancel".equals(instanceType)){
@ -353,7 +355,6 @@ public class PurchaseQuoteController extends BaseController
/** /**
* 查询最新报价历史数据 * 查询最新报价历史数据
* */ * */

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

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

5
ruoyi-admin/src/main/java/com/ruoyi/purchase/mapper/PurchaseQuoteHistoryMapper.java

@ -89,4 +89,9 @@ public interface PurchaseQuoteHistoryMapper
* @return 结果 * @return 结果
*/ */
public int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId); public int restorePurchaseQuoteHistoryById(Long purchaseQuoteChildId);
/**
* 通过供应商编号和物料编号更新采购报价历史数据
* */
public int updatePurchaseQuoteHistoryByCode(PurchaseQuoteHistory purchaseQuoteHistory);
} }

7
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/IPurchaseQuoteHistoryService.java

@ -4,6 +4,7 @@ import java.util.List;
import com.ruoyi.purchase.domain.PurchaseQuote; import com.ruoyi.purchase.domain.PurchaseQuote;
import com.ruoyi.purchase.domain.PurchaseQuoteHistory; import com.ruoyi.purchase.domain.PurchaseQuoteHistory;
import com.ruoyi.purchase.domain.Vo.PurchaseQuoteVo;
/** /**
* 采购物料历史报价信息Service接口 * 采购物料历史报价信息Service接口
@ -80,4 +81,10 @@ public interface IPurchaseQuoteHistoryService
* *
* */ * */
int generatePurchaseQuoteHistory(PurchaseQuote purchaseQuote); int generatePurchaseQuoteHistory(PurchaseQuote purchaseQuote);
/**
* 采购报价更新的时候更新采购报价历史数据
*
* */
void updatePurchaseQuoteHistoryByPurchaseQuote(PurchaseQuoteVo purchaseQuoteVo);
} }

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

@ -1,11 +1,17 @@
package com.ruoyi.purchase.service.impl; package com.ruoyi.purchase.service.impl;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Objects;
import com.ruoyi.common.exception.BusinessException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.purchase.domain.PurchaseQuote; import com.ruoyi.purchase.domain.PurchaseQuote;
import com.ruoyi.purchase.domain.PurchaseQuoteChild; import com.ruoyi.purchase.domain.PurchaseQuoteChild;
import com.ruoyi.purchase.domain.Vo.PurchaseQuoteVo;
import com.ruoyi.purchase.mapper.PurchaseQuoteChildMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.PurchaseQuoteHistoryMapper; import com.ruoyi.purchase.mapper.PurchaseQuoteHistoryMapper;
@ -25,6 +31,9 @@ public class PurchaseQuoteHistoryServiceImpl implements IPurchaseQuoteHistorySer
@Autowired @Autowired
private PurchaseQuoteHistoryMapper purchaseQuoteHistoryMapper; private PurchaseQuoteHistoryMapper purchaseQuoteHistoryMapper;
@Autowired
private PurchaseQuoteChildMapper purchaseQuoteChildMapper;
/** /**
* 查询采购物料历史报价信息 * 查询采购物料历史报价信息
* *
@ -46,7 +55,21 @@ public class PurchaseQuoteHistoryServiceImpl implements IPurchaseQuoteHistorySer
@Override @Override
public List<PurchaseQuoteHistory> selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory) public List<PurchaseQuoteHistory> selectPurchaseQuoteHistoryList(PurchaseQuoteHistory purchaseQuoteHistory)
{ {
//最新的报价
PurchaseQuoteHistory latestQuoteHistory = purchaseQuoteHistoryMapper.findLatestPurchaseQuoteHistory(purchaseQuoteHistory);
if (latestQuoteHistory != null){
List<PurchaseQuoteHistory> purchaseQuoteHistories = purchaseQuoteHistoryMapper.selectPurchaseQuoteHistoryList(purchaseQuoteHistory);
purchaseQuoteHistories.forEach(item -> {
if (Objects.equals(item.getPurchaseQuoteChildId(), latestQuoteHistory.getPurchaseQuoteChildId())) {
item.setIsLatest("1");
} else {
item.setIsLatest("0");
}
});
return purchaseQuoteHistories;
}
return purchaseQuoteHistoryMapper.selectPurchaseQuoteHistoryList(purchaseQuoteHistory); return purchaseQuoteHistoryMapper.selectPurchaseQuoteHistoryList(purchaseQuoteHistory);
} }
/** /**
@ -162,4 +185,42 @@ public class PurchaseQuoteHistoryServiceImpl implements IPurchaseQuoteHistorySer
} }
return purchaseQuoteHistoryMapper.insertBatchPurchaseQuoteHistory(purchaseQuoteHistoryChildren); return purchaseQuoteHistoryMapper.insertBatchPurchaseQuoteHistory(purchaseQuoteHistoryChildren);
} }
/**
* 根据采购报价信息更新采购报价最新报价记录
* @param purchaseQuoteVo
*/
@Override
public void updatePurchaseQuoteHistoryByPurchaseQuote(PurchaseQuoteVo purchaseQuoteVo) {
String loginName = ShiroUtils.getLoginName();
String supplierCode = purchaseQuoteVo.getSupplierQuoteCode();
String auditStatus = purchaseQuoteVo.getAuditStatus();
// 获取所有的子项
List<PurchaseQuoteChild> purchaseQuoteChildList= purchaseQuoteChildMapper.selectQuoteChildBySupplierCode(supplierCode);
for (PurchaseQuoteChild purchaseQuoteChild : purchaseQuoteChildList) {
PurchaseQuoteHistory purchaseQuoteHistory = new PurchaseQuoteHistory();
// 设置审核状态
purchaseQuoteHistory.setAuditStatus(auditStatus.equals("1") ? "1" : "2");
purchaseQuoteHistory.setSupplierCode(supplierCode);
// 设置其他字段
purchaseQuoteHistory.setMaterialCode(purchaseQuoteChild.getMaterialCode());
purchaseQuoteHistory.setUpdateBy(loginName);
purchaseQuoteHistory.setUpdateTime(new Date());
// 更新报价历史记录
int result = purchaseQuoteHistoryMapper.updatePurchaseQuoteHistoryByCode(purchaseQuoteHistory);
if (result <= 0){
throw new BusinessException("更新采购报价历史数据失败");
}
}
}
} }

22
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteHistoryServiceImpl.java

@ -56,15 +56,19 @@ public class SysCustomerQuoteHistoryServiceImpl implements ISysCustomerQuoteHist
//最新的报价 //最新的报价
SysCustomerQuoteHistory latestQuoteHistory = sysCustomerQuoteHistoryMapper.findLatestQuoteHistory(sysCustomerQuoteHistory); SysCustomerQuoteHistory latestQuoteHistory = sysCustomerQuoteHistoryMapper.findLatestQuoteHistory(sysCustomerQuoteHistory);
List<SysCustomerQuoteHistory> sysCustomerQuoteHistories = sysCustomerQuoteHistoryMapper.selectSysCustomerQuoteHistoryList(sysCustomerQuoteHistory); List<SysCustomerQuoteHistory> sysCustomerQuoteHistories = sysCustomerQuoteHistoryMapper.selectSysCustomerQuoteHistoryList(sysCustomerQuoteHistory);
sysCustomerQuoteHistories.forEach(customerQuoteHistory -> { if (latestQuoteHistory != null){
if (Objects.equals(customerQuoteHistory.getQuoteHistoryId(), latestQuoteHistory.getQuoteHistoryId())) { sysCustomerQuoteHistories.forEach(customerQuoteHistory -> {
customerQuoteHistory.setIsLatest("1"); if (Objects.equals(customerQuoteHistory.getQuoteHistoryId(), latestQuoteHistory.getQuoteHistoryId())) {
} else { customerQuoteHistory.setIsLatest("1");
customerQuoteHistory.setIsLatest("0"); } else {
} customerQuoteHistory.setIsLatest("0");
}); }
});
return sysCustomerQuoteHistories;
return sysCustomerQuoteHistories;
}
return sysCustomerQuoteHistoryMapper.selectSysCustomerQuoteHistoryList(sysCustomerQuoteHistory);
} }
/** /**

40
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteHistoryMapper.xml

@ -172,12 +172,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</insert> </insert>
<update id="updatePurchaseQuoteHistory" parameterType="PurchaseQuoteHistory"> <update id="updatePurchaseQuoteHistory" parameterType="PurchaseQuoteHistory">
update purchase_quote_history update purchase_quote_history
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
@ -211,6 +205,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where purchase_quote_child_id = #{purchaseQuoteChildId} where purchase_quote_child_id = #{purchaseQuoteChildId}
</update> </update>
<update id="updatePurchaseQuoteHistoryByCode" parameterType="PurchaseQuoteHistory">
update purchase_quote_history
<trim prefix="SET" suffixOverrides=",">
<if test="purchaseQuoteCode != null">purchase_quote_code = #{purchaseQuoteCode},</if>
<if test="materialId != null">material_id = #{materialId},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="materialName != null">material_name = #{materialName},</if>
<if test="materialSole != null">material_sole = #{materialSole},</if>
<if test="materialRmb != null">material_rmb = #{materialRmb},</if>
<if test="materialNormb != null">material_noRmb = #{materialNormb},</if>
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
<if test="supplierName != null">supplier_name = #{supplierName},</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="useStatus != null">use_status = #{useStatus},</if>
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
<if test="isLatest != null">is_latest = #{isLatest},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where material_code = #{materialCode} and supplier_code = #{supplierCode}
</update>
<delete id="deletePurchaseQuoteHistoryById" parameterType="Long"> <delete id="deletePurchaseQuoteHistoryById" parameterType="Long">
delete from purchase_quote_history where purchase_quote_child_id = #{purchaseQuoteChildId} delete from purchase_quote_history where purchase_quote_child_id = #{purchaseQuoteChildId}
</delete> </delete>
@ -233,7 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="findLatestPurchaseQuoteHistory" parameterType="String" resultMap="PurchaseQuoteHistoryResult" > <select id="findLatestPurchaseQuoteHistory" parameterType="String" resultMap="PurchaseQuoteHistoryResult" >
<include refid="selectPurchaseQuoteHistoryVo"/> <include refid="selectPurchaseQuoteHistoryVo"/>
where purchase_quote_code = #{purchaseQuoteCode} and material_code = #{materialCode} and audit_status = '1' where supplier_code = #{supplierCode} and material_code = #{materialCode} and audit_status = '1'
order by update_time desc order by update_time desc
limit 1 limit 1
</select> </select>

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

@ -20,26 +20,26 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">供应商ID:</label> <label class="col-sm-3 control-label">供应商ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" /> <input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">供应商名称:</label> <label class="col-sm-3 control-label">供应商名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control"> <input name="supplierName" th:field="*{supplierName}" class="form-control" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">定价日期:</label> <label class="col-sm-3 control-label">定价日期:</label>
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" readonly>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注说明:</label> <label class="col-sm-3 control-label">备注说明:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control" th:field="*{remark}"></textarea> <textarea name="remark" class="form-control" th:field="*{remark}" readonly></textarea>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -68,18 +68,13 @@
<label class="col-sm-3 control-label">税率:</label> <label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group"> <div class="input-group">
<input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" /> <input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" readonly>
<span class="input-group-addon">%</span> <span class="input-group-addon">%</span>
</div> </div>
</div> </div>
</div> </div>
</form> </form>
<div class="container"> <div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-purchaseQuoteChild"></table> <table id="bootstrap-sub-table-purchaseQuoteChild"></table>
@ -208,9 +203,17 @@
} }
}, },
{title:'最新报价',field: 'materialSole',align: 'center',}, {title:'最新报价',field: 'materialSole',align: 'center',},
{ title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, {title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',editable: true,}, {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',editable: true,}, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false}, {title: '录入人',field: 'createBy',align: 'center',visible: false},
{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},
@ -269,6 +272,18 @@
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
//最新报价历史
function recentQuotationHistory(materialCode){
var supplierQuoteCode = $("#supplierQuoteCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("supplierQuoteCode", encodeURIComponent(supplierQuoteCode));
var url = ctx +'purchase/purchaseQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script> </script>
</body> </body>
</html> </html>

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

@ -29,7 +29,7 @@
showToggle: false, showToggle: false,
queryParams: { queryParams: {
materialCode: materialCode, materialCode: materialCode,
supplierQuoteCode: supplierQuoteCode supplierCode: supplierQuoteCode
}, },
columns: [{ columns: [{
checkbox: true checkbox: true

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

@ -46,26 +46,26 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">供应商ID:</label> <label class="col-sm-3 control-label">供应商ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" /> <input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">供应商名称:</label> <label class="col-sm-3 control-label">供应商名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control"> <input name="supplierName" th:field="*{supplierName}" class="form-control" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">定价日期:</label> <label class="col-sm-3 control-label">定价日期:</label>
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" readonly>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注说明:</label> <label class="col-sm-3 control-label">备注说明:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control" th:field="*{remark}"></textarea> <textarea name="remark" class="form-control" th:field="*{remark}" readonly></textarea>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -94,7 +94,7 @@
<label class="col-sm-3 control-label">税率:</label> <label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group"> <div class="input-group">
<input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" /> <input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" readonly>
<span class="input-group-addon">%</span> <span class="input-group-addon">%</span>
</div> </div>
</div> </div>
@ -118,11 +118,6 @@
<input id="purchaseQuoteChildList_cgjl" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" /> <input id="purchaseQuoteChildList_cgjl" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" />
</form> </form>
<div class="container"> <div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-purchaseQuoteChild"></table> <table id="bootstrap-sub-table-purchaseQuoteChild"></table>
@ -251,7 +246,15 @@
} }
}, },
{title:'最新报价',field: 'materialSole',align: 'center',}, {title:'最新报价',field: 'materialSole',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, { title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '物料的数量', field: 'materialNum',align: 'center',visible: false},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',},
{title: '录入人',field: 'createBy',align: 'center',visible: false}, {title: '录入人',field: 'createBy',align: 'center',visible: false},
@ -323,6 +326,18 @@
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
//最新报价历史
function recentQuotationHistory(materialCode){
var supplierQuoteCode = $("#supplierQuoteCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("supplierQuoteCode", encodeURIComponent(supplierQuoteCode));
var url = ctx +'purchase/purchaseQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script> </script>
</body> </body>
</html> </html>

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

@ -46,26 +46,26 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">供应商ID:</label> <label class="col-sm-3 control-label">供应商ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" /> <input name="supplierQuoteCode" th:field="*{supplierQuoteCode}" class="form-control" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">供应商名称:</label> <label class="col-sm-3 control-label">供应商名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="supplierName" th:field="*{supplierName}" class="form-control"> <input name="supplierName" th:field="*{supplierName}" class="form-control" readonly>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">定价日期:</label> <label class="col-sm-3 control-label">定价日期:</label>
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" readonly>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注说明:</label> <label class="col-sm-3 control-label">备注说明:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control" th:field="*{remark}"></textarea> <textarea name="remark" class="form-control" th:field="*{remark}" readonly></textarea>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -94,7 +94,7 @@
<label class="col-sm-3 control-label">税率:</label> <label class="col-sm-3 control-label">税率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group"> <div class="input-group">
<input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" /> <input name="taxRate" id="taxRate" th:field="*{taxRate}" class="form-control" placeholder="13" readonly>
<span class="input-group-addon">%</span> <span class="input-group-addon">%</span>
</div> </div>
</div> </div>
@ -118,11 +118,6 @@
<input id="purchaseQuoteChildList_fzjl" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" /> <input id="purchaseQuoteChildList_fzjl" type="hidden" name="purchaseQuoteChildLists" class="form-control m-b" />
</form> </form>
<div class="container"> <div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择报价信息</span>
</div>
</div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-purchaseQuoteChild"></table> <table id="bootstrap-sub-table-purchaseQuoteChild"></table>
@ -251,7 +246,17 @@
} }
}, },
{title:'最新报价',field: 'materialSole',align: 'center',}, {title:'最新报价',field: 'materialSole',align: 'center',},
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,visible: false}, { title: '最新报价历史',align: 'center',
formatter: function (value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="recentQuotationHistory(\'' + row.materialCode + '\')"><i class="fa fa-edit"></i>最新报价历史</a> ');
return actions.join('');
}
},
{title: '物料的数量', field: 'materialNum',align: 'center',visible: false},
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center'}, {title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center'},
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'}, {title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center'},
{title: '录入人',field: 'createBy',align: 'center',visible: false}, {title: '录入人',field: 'createBy',align: 'center',visible: false},
@ -330,6 +335,18 @@
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
//最新报价历史
function recentQuotationHistory(materialCode){
var supplierQuoteCode = $("#supplierQuoteCode").val();
var queryParams = new URLSearchParams();
queryParams.append("materialCode", materialCode);
queryParams.append("supplierQuoteCode", encodeURIComponent(supplierQuoteCode));
var url = ctx +'purchase/purchaseQuote/recentQuotationHistory?'+queryParams.toString();
$.modal.open("最新报价历史", url);
}
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save