Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
王晓迪 2 months ago
parent
commit
761b42fbcd
  1. 9
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java
  2. 4
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/vo/ErpDevelopModifyorderVo.java
  3. 9
      ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java
  4. 9
      ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml
  5. 69
      ruoyi-admin/src/main/resources/templates/erp/bom/add.html
  6. 93
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html
  7. 113
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html
  8. 1
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html
  9. 104
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

9
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java

@ -104,11 +104,12 @@ public class ErpDevelopModifyorderController extends BaseController
/**
* 查找所有的工程员
* */
@GetMapping ("/getEngineerList")
@ResponseBody
@PostMapping("/getEngineerList")
public AjaxResult getEngineerList(String roleKey){
List<SysUser> engineerList = sysUserService.getSpecificRoleList(roleKey);
return AjaxResult.success(engineerList);
public TableDataInfo getEngineerList(){
startPage();
List<SysUser> list = sysUserService.selectRoleToUserList("gcwyRole,gcjlRole,gczgRole,yfzjRole,");
return getDataTable(list);
}
/**

4
ruoyi-admin/src/main/java/com/ruoyi/erp/domain/vo/ErpDevelopModifyorderVo.java

@ -17,6 +17,10 @@ public class ErpDevelopModifyorderVo extends ErpDevelopModifyorder {
private String taskId;
/** 任务名称 */
private String taskName;
//当前状态
private String taskStatus;
/** 办理时间 */
private Date doneTime;
/** 创建人 */

9
ruoyi-admin/src/main/java/com/ruoyi/erp/service/impl/ErpDevelopModifyorderServiceImpl.java

@ -146,6 +146,15 @@ public class ErpDevelopModifyorderServiceImpl implements IErpDevelopModifyorderS
} else {
tempErpDevelopModifyorderVo.setTaskName("未启动");
}
tempErpDevelopModifyorderVo.setTaskStatus(tempErpDevelopModifyorderVo.getTaskName());
if(tempErpDevelopModifyorderVo.getAuditStatus()!=null){
if(tempErpDevelopModifyorderVo.getAuditStatus().equals("1")){
tempErpDevelopModifyorderVo.setTaskStatus("审核通过");
}else if(tempErpDevelopModifyorderVo.getAuditStatus().equals("2")){
tempErpDevelopModifyorderVo.setTaskStatus("审核拒绝");
}
}
returnList.add(tempErpDevelopModifyorderVo);
}
returnList.setTotal(org.springframework.util.CollectionUtils.isEmpty(list) ? 0 : list.getTotal());

9
ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml

@ -52,13 +52,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectErpDevelopModifyorderList" parameterType="ErpDevelopModifyorderVo" resultMap="ErpDevelopModifyorderResult">
<include refid="selectErpDevelopModifyorderVo"/>
<where>
<if test="developOrderCode != null and developOrderCode != ''"> and develop_order_code = #{developOrderCode}</if>
<if test="materialNo != null and materialNo != ''"> and material_no = #{materialNo}</if>
<if test="developOrderCode != null and developOrderCode != ''"> and develop_order_code like concat('%', #{developOrderCode}, '%')</if>
<if test="makeNo != null and makeNo != ''"> and make_no like concat('%', #{makeNo}, '%')</if>
<if test="materialNo != null and materialNo != ''"> and material_no like concat('%', #{materialNo}, '%')</if>
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="finshStatus != null and finshStatus != ''"> and finsh_status = #{finshStatus}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> and create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
</where>
order by audit_status asc ,create_time desc
</select>

69
ruoyi-admin/src/main/resources/templates/erp/bom/add.html

@ -464,31 +464,39 @@
}
}
}
function doSubmit(index, layero,uniqueId){
function doSubmit(index, layero, uniqueId) {
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
var selectedRows = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections');
if($("#materialNo").val()==rowData.materialNo){
$.modal.alertError("不能选择与主体bom相同的料号");
if (selectedRows.length === 0) {
$.modal.alertError("请选择至少一条物料信息");
return;
}
//判断是否重复
var rows = $("#bootstrap-sub-table-1").bootstrapTable('getData').length;
for(var i=0;i<rows;i++){
var data = $("#bootstrap-sub-table-1").bootstrapTable('getData')[i];
if(data.materialNo==rowData.materialNo){
$.modal.alertError("不能选择已添加过的相同料号");
return;
var existingData = $("#bootstrap-sub-table-1").bootstrapTable('getData');
// 存储要插入的新行
var newRows = [];
// 遍历选中的每一行物料信息
for (var i = 0; i < selectedRows.length; i++) {
var rowData = selectedRows[i];
// 检查是否已经存在相同的物料
var isDuplicate = false;
for (var j = 0; j < existingData.length; j++) {
if (existingData[j].materialNo === rowData.materialNo) {
isDuplicate = true;
break;
}
}
var totalNum = $("#bootstrap-sub-table-1").bootstrapTable('getData').length;
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-1").bootstrapTable('insertRow',{
index: 1,
row: {
id:rowData.id,
bomNo:rowData.bomNo,
if (!isDuplicate && $("#materialNo").val() !== rowData.materialNo) {
// 如果不存在,并且不与主体BOM相同,则准备插入新行
newRows.push({
id: rowData.id,
bomNo: rowData.bomNo,
materialNo: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
@ -498,12 +506,31 @@
brand: rowData.brand,
warehouseDept: rowData.warehouseDept,
level: "1",
useNum:'',
lossRate:''
useNum: '',
lossRate: ''
});
} else if ($("#materialNo").val() === rowData.materialNo) {
$.modal.alertError("不能选择与主体BOM相同的料号");
} else {
$.modal.alertError("不能选择已添加过的相同料号");
}
})
}
// 批量插入新行
if (newRows.length > 0) {
// 插入第一行
$("#bootstrap-sub-table-1").bootstrapTable('insertRow', { index: 1, row: newRows[0] });
// 插入剩余行
for (var k = 1; k < newRows.length; k++) {
$("#bootstrap-sub-table-1").bootstrapTable('insertRow', { index: 1, row: newRows[k] });
}
}
layer.close(index);
}
/* 新增表格行 */
function insertRow(){
var url = ctx + "erp/material/select";

93
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html

@ -24,6 +24,12 @@
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">工程员:</label>
<div class="col-sm-8">
<input name="userName" id="userName_add" class="form-control m-b" readonly required />
</div>
</div>
</form>
<div class="container">
<div class="form-row my-5"> <!-- 添加my-4类 -->
@ -627,38 +633,67 @@
},
});
}
function purchaseDoSubmit(index, layero,uniqueId){
function purchaseDoSubmit(index, layero, uniqueId) {
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-purchaseMaterialSelect-table').bootstrapTable('getSelections')[0];
var selectedRows = iframeWin.$('#bootstrap-purchaseMaterialSelect-table').bootstrapTable('getSelections');
//判断是否重复
var rows = $("#bootstrap-table-purchase").bootstrapTable('getData').length;
for(var i=0;i<rows;i++){
var data = $("#bootstrap-table-purchase").bootstrapTable('getData')[i];
if(data.materialNo==rowData.materialNo){
$.modal.alertError("不能选择已添加过的相同物料");
if (selectedRows.length === 0) {
$.modal.alertError("请选择至少一条物料信息");
return;
}
var existingData = $("#bootstrap-table-purchase").bootstrapTable('getData');
// 存储要插入的新行
var newRows = [];
// 遍历选中的每一行物料信息
for (var i = 0; i < selectedRows.length; i++) {
var rowData = selectedRows[i];
// 检查是否已经存在相同的物料
var isDuplicate = false;
for (var j = 0; j < existingData.length; j++) {
if (existingData[j].materialNo === rowData.materialNo) {
isDuplicate = true;
break;
}
}
console.log("rowData: "+rowData);
$("#bootstrap-table-purchase").bootstrapTable('insertRow', {
index:1,
row: {
bomId:rowData.bomId,
materialNo:rowData.materialNo,
materialPhotourl:rowData.materialPhotourl,
if (!isDuplicate) {
// 如果不存在,则准备插入新行
newRows.push({
bomId: rowData.bomId,
materialNo: rowData.materialNo,
materialPhotourl: rowData.materialPhotourl,
materialName: rowData.materialName,
materialType: rowData.materialType,
materialDescribe: rowData.describe,
materialBrand: rowData.brand,
materialUnit: rowData.unit,
materialProcessMethod:rowData.processMethod,
materialNum:'0',
warehouseDept:rowData.warehouseDept
materialProcessMethod: rowData.processMethod,
materialNum: '0',
warehouseDept: rowData.warehouseDept
});
} else {
$.modal.alertError("不能选择已添加过的相同物料");
}
})
}
// 批量插入新行
if (newRows.length > 0) {
// 插入第一行
$("#bootstrap-table-purchase").bootstrapTable('insertRow', { index: 1, row: newRows[0] });
// 插入剩余行
for (var k = 1; k < newRows.length; k++) {
$("#bootstrap-table-purchase").bootstrapTable('insertRow', { index: 1, row: newRows[k] });
}
}
layer.close(index);
}
@ -670,6 +705,26 @@
})
}
//查询工程员
// function engineer(){
// $.ajax({
// url: ctx + 'erp/material/getEngineerList',
// type: 'get',
// success: function (res) {
// if (res.rows.length > 0) {
// var usertData = res.rows;
// for (let i in usertData) {
// $("select[name='userName']").append(
// "<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
// }
// } else {
// $.modal.msgError(res.msg);
// }
// }
// });
// }
$("#userName_add").val(loginName);
</script>
</body>
</html>

113
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html

@ -12,7 +12,11 @@
<ul>
<li>
<label>开发修改单号:</label>
<input type="text" name="developOderCode"/>
<input type="text" name="developOrderCode"/>
</li>
<li>
<label>关联生产单号:</label>
<input type="text" name="makeNo"/>
</li>
<li>
<label>料号:</label>
@ -31,7 +35,7 @@
</li>
<li>
<label>工程员:</label>
<select name="userId">
<select name="userName">
<option value="">所有</option>
</select>
</li>
@ -42,9 +46,11 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" placeholder="请选择录入时间" name="createTime"/>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
@ -61,7 +67,7 @@
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
<table id="bootstrap-table" style="white-space:nowrap"></table>
</div>
</div>
</div>
@ -84,11 +90,12 @@
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "erp/developModifyOrder";
$(function() {
engineer();
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
@ -132,17 +139,6 @@
title: '申请人ID',
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: '申请时间'
},
{
field: 'taskId',
title: '当前任务ID',
@ -157,6 +153,7 @@
field: 'taskName',
title: '当前任务名称',
align: 'center',
visible: false,
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
@ -164,32 +161,24 @@
{
title: '审核状态',
field: 'auditStatus',
visible: false,
formatter: function (value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);
}
},
{title: '完成状态',field: 'finshStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(finshStatusDatas, value);
{title: '当前状态',field: 'taskStatus',align: 'center',
formatter: function(value, row, index) {
if(row.auditStatus!="1"&&value != "未启动"){
return '<span class="badge badge-danger">' + value + '</span>';
}
},
{title: '确认状态',field: 'completeStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(completeStatusDatas, value);
if(value === "未启动"){
return '<span class="badge badge-primary">' + value + '</span>';
}
return '<span class="badge badge-primary">' + value + '</span>';}
},
{title: '开发修改单号',field: 'developOrderCode',},
{title: '采购入库状态',field: 'purchaseStorageStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(purchaseStorageStatusDatas, value);
}
},
{title: '品质状态',field: 'qualityStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(qualityStatusDatas, value);
}
},
{title: '工程员',field: 'userName',},
{title: '关联生产单号',field: 'makeNo',},
{title: '料号',field: 'materialNo',},
{title: '图片',field: 'materialPhotoUrl',},
{title: '物料名称',field: 'materialName',},
@ -207,6 +196,41 @@
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
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: '完成状态',field: 'finshStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(finshStatusDatas, value);
}
},
{title: '确认状态',field: 'completeStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(completeStatusDatas, value);
}
},
{title: '采购入库状态',field: 'purchaseStorageStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(purchaseStorageStatusDatas, value);
}
},
{title: '品质状态',field: 'qualityStatus',
formatter: function (value, row, index) {
return $.table.selectDictLabel(qualityStatusDatas, value);
}
},
{title: '工程员',field: 'userName',},
{title: '录入时间',field: 'createTime',},
{title: '更新人',field: 'updateBy',},
{title: '上次更新时间',field: 'updateTime',},
@ -273,7 +297,24 @@
$.modal.open("添加领料单",url);
}
//查询工程员
function engineer(){
$.ajax({
url: prefix + '/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='userName']").append(
"<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
}
</script>
</body>

1
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/purchaseOrderMaterialSelect.html

@ -44,7 +44,6 @@
showRefresh: false,
showToggle: false,
clickToSelect: true, // 点击选中行
singleSelect: true, // 单选
url: prefix + "/getPurchaseMaterialList",
modalName: "物料信息",
columns: [{

104
ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html

@ -296,53 +296,10 @@
return '<span class="badge badge-primary">' + value + '</span>';}
},
{
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: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName',visible: false,
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{title: '审核状态',field: 'auditStatus',visible: false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);}
},
{title: '使用状态',field: 'useStatus',formatter:function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);}
},
{title: '生产状态',field: 'makeStatus',formatter:function(value, row, index) {
return $.table.selectDictLabel(makeStatusDatas, value);}
},
{title: '出货状态',field: 'deliveryStatus',formatter:function(value, row, index) {
return $.table.selectDictLabel(deliveryStatusDatas, value);}
},
{title: '收款结案状态',field:'closeStatus',formatter:function(value, row, index){
return $.table.selectDictLabel(closeStatusDatas, value);
}
},
{title: '业务人员',field: 'businessMembers',visible: false},
{title: '是否开票',field:'invoice',formatter:function(value, row, index){
return $.table.selectDictLabel(sysWhetherDatas, value);
}
},
{title: '销售单号',field: 'salesOrderCode'},
{title: '订单类型',field: 'salesOrderType',formatter: function(value, row, index) {
return $.table.selectDictLabel(salesOrderTypeDatas, value);
}
},
{title: '销售订单编号',field: 'salesOrderCode'},
{title: '客户订单编号',field: 'salesOrderNumber'},
{title: '客户ID',field: 'enterpriseCode',},
{title: '客户名称',field: 'enterpriseName'},
{title: '客户订单号',field: 'salesOrderNumber'},
{title: '物料数合计',field: 'materialSum',
footerFormatter: function (value) {
var sum = 0;
@ -361,10 +318,7 @@
return "总数量: " + sum;
}
},
{title: '是否含税',field:'confirmTax',formatter:function(value, row, index) {
return $.table.selectDictLabel(confirmTaxDatas, value);
}
},
{title: '不含税单价(RMB)',field: 'noRmbPrice',visible:false},
{title: '含税单价(RMB)',field: 'rmbTaxPrice',visible:false},
{title: '不含税单价(美元)',field: 'noUsdPrice',visible:false},
@ -405,6 +359,58 @@
return "总含税总价: " + sum.toFixed(2);
}
},
{
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: 'todoUserId', visible: false},
{ title: '当前任务名称',field: 'taskName',visible: false,
formatter: function(value, row, index) {
return '<span class="badge badge-primary">' + value + '</span>';
}
},
{title: '审核状态',field: 'auditStatus',visible: false,
formatter: function(value, row, index) {
return $.table.selectDictLabel(auditStatusDatas, value);}
},
{title: '使用状态',field: 'useStatus',formatter:function(value, row, index) {
return $.table.selectDictLabel(useStatusDatas, value);}
},
{title: '生产状态',field: 'makeStatus',formatter:function(value, row, index) {
return $.table.selectDictLabel(makeStatusDatas, value);}
},
{title: '出货状态',field: 'deliveryStatus',formatter:function(value, row, index) {
return $.table.selectDictLabel(deliveryStatusDatas, value);}
},
{title: '收款结案状态',field:'closeStatus',formatter:function(value, row, index){
return $.table.selectDictLabel(closeStatusDatas, value);
}
},
{title: '业务人员',field: 'businessMembers',visible: false},
{title: '是否开票',field:'invoice',formatter:function(value, row, index){
return $.table.selectDictLabel(sysWhetherDatas, value);
}
},
{title: '订单类型',field: 'salesOrderType',formatter: function(value, row, index) {
return $.table.selectDictLabel(salesOrderTypeDatas, value);
}
},
{title: '是否含税',field:'confirmTax',formatter:function(value, row, index) {
return $.table.selectDictLabel(confirmTaxDatas, value);
}
},
{title: '计划交付时间',field:'deliveryTime' ,visible: false},
{title: '付款条件',field: 'paymentTerms'},
{title: '交货条件',field: 'deliveryConditions'},

Loading…
Cancel
Save