Browse Source

[fix]

仓库管理 库存报损
修改库存报损添加页面生产订单号输入框为下拉框,修改添加和编辑页面的回调函数;
新增库存报损实体类和mapper报销类型字段;
dev
王晓迪 1 month ago
parent
commit
f7007f5260
  1. 11
      ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamage.java
  2. 4
      ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryReportDamageMapper.xml
  3. 101
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html
  4. 122
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/edit.html
  5. 17
      ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/inventoryReportDamage.html

11
ruoyi-admin/src/main/java/com/ruoyi/warehouse/domain/WarehouseInventoryReportDamage.java

@ -76,6 +76,9 @@ public class WarehouseInventoryReportDamage extends BaseEntity
@Excel(name = "仓库存放地址") @Excel(name = "仓库存放地址")
private String warehouseStoreAddress; private String warehouseStoreAddress;
/** 报废类型 */
private String scrapType;
/** 流程实例ID */ /** 流程实例ID */
private String instanceId; private String instanceId;
@ -321,6 +324,14 @@ public class WarehouseInventoryReportDamage extends BaseEntity
this.removeFileIdStr = removeFileIdStr; this.removeFileIdStr = removeFileIdStr;
} }
public String getScrapType() {
return scrapType;
}
public void setScrapType(String scrapType) {
this.scrapType = scrapType;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

4
ruoyi-admin/src/main/resources/mapper/warehouse/WarehouseInventoryReportDamageMapper.xml

@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyTime" column="apply_time" /> <result property="applyTime" column="apply_time" />
<result property="materialNo" column="material_no" /> <result property="materialNo" column="material_no" />
<result property="materialName" column="material_name" /> <result property="materialName" column="material_name" />
<result property="scrapType" column="scrap_type" />
<result property="materialTotal" column="material_total" /> <result property="materialTotal" column="material_total" />
<result property="numTotal" column="num_total" /> <result property="numTotal" column="num_total" />
<result property="warehouseCode" column="warehouse_code" /> <result property="warehouseCode" column="warehouse_code" />
@ -46,6 +47,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialName != null and materialName != ''"> <if test="materialName != null and materialName != ''">
and report_damage_code in ( select report_damage_code from warehouse_inventory_report_damage_child where material_name like concat('%', #{materialName}, '%') ) and report_damage_code in ( select report_damage_code from warehouse_inventory_report_damage_child where material_name like concat('%', #{materialName}, '%') )
</if> </if>
<if test="scrapType != null and scrapType != ''">
and report_damage_code in ( select report_damage_code from warehouse_inventory_report_damage_child where scrap_type like concat('%', #{scrapType}, '%') )
</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> <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> </where>
</select> </select>

101
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/add.html

@ -19,13 +19,13 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">申请部门:</label> <label class="col-sm-4 control-label is-required">申请部门:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="applyDept" name="applyDept" class="form-control" type="text" required disabled></select> <select id="applyDept" name="applyDept" class="form-control" type="text" required disabled></select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">申请时间:</label> <label class="col-sm-4 control-label is-required">申请时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="applyTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required> <input name="applyTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
@ -34,7 +34,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">是否关联生产单号:</label> <label class="col-sm-4 control-label is-required">是否关联生产单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('yes_or_no')}">--> <!-- <div class="radio-box" th:each="dict : ${@dict.getType('yes_or_no')}">-->
<!-- <input type="radio" th:id="${'whetherMakeNo_' + dict.dictCode}" name="whetherMakeNo" th:value="${dict.dictValue}" th:checked="${dict.default}">--> <!-- <input type="radio" th:id="${'whetherMakeNo_' + dict.dictCode}" name="whetherMakeNo" th:value="${dict.dictValue}" th:checked="${dict.default}">-->
@ -49,13 +49,15 @@
</div> </div>
</div> </div>
<div class="form-group" id="makeNoInput"> <div class="form-group" id="makeNoInput">
<label class="col-sm-3 control-label is-required">关联生产单号:</label> <label class="col-sm-4 control-label is-required">关联生产单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makeNo" class="form-control" type="text" required> <!-- <input name="makeNo" class="form-control" type="text" required>-->
<select name="makeNo" id="selectMakeNo" class="form-control select2-multiple" type="text" required>
</select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">仓库名称:</label> <label class="col-sm-4 control-label is-required">仓库名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="stockNameSelct" name="warehouseName" class="form-control" type="text" required> <select id="stockNameSelct" name="warehouseName" class="form-control" type="text" required>
@ -63,20 +65,20 @@
</div> </div>
</div> </div>
<div class="form-group is-required"> <div class="form-group is-required">
<label class="col-sm-3 control-label is-required">仓库ID:</label> <label class="col-sm-4 control-label is-required">仓库ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="warehouseCode" class="form-control" required> <input name="warehouseCode" class="form-control" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">仓库存放地址:</label> <label class="col-sm-4 control-label is-required">仓库存放地址:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="warehouseStoreAddress" class="form-control" type="text" required> <input name="warehouseStoreAddress" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">备注:</label> <label class="col-sm-4 control-label">备注:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea> <textarea name="remark" class="form-control"></textarea>
</div> </div>
@ -124,7 +126,7 @@
var whetherMakeNo = $("input[name='whetherMakeNo']:checked").val(); var whetherMakeNo = $("input[name='whetherMakeNo']:checked").val();
warehouseInventoryReportDamage.whetherMakeNo = whetherMakeNo; warehouseInventoryReportDamage.whetherMakeNo = whetherMakeNo;
if(whetherMakeNo === "1"){ if(whetherMakeNo === "1"){
var makeNo = $("input[name='makeNo']").val(); var makeNo = $("select[name='makeNo']").val();
warehouseInventoryReportDamage.makeNo = makeNo; warehouseInventoryReportDamage.makeNo = makeNo;
} }
warehouseInventoryReportDamage.warehouseName = $("select[name='warehouseName']").val(); warehouseInventoryReportDamage.warehouseName = $("select[name='warehouseName']").val();
@ -168,7 +170,8 @@
function insertRow() { function insertRow() {
var ifMakeNo = $("input[name='whetherMakeNo']:checked").val(); var ifMakeNo = $("input[name='whetherMakeNo']:checked").val();
if(ifMakeNo === "1"){ if(ifMakeNo === "1"){
var makeNo = $("input[name='makeNo']").val(); var makeNo = $("select[name='makeNo']").val();
console.log(makeNo);
if(!makeNo){ if(!makeNo){
$.modal.alertWarning("请输入生产单号!") $.modal.alertWarning("请输入生产单号!")
}else{ }else{
@ -181,7 +184,7 @@
$.modal.openOptions(options); $.modal.openOptions(options);
} }
}else{ }else{
var url = ctx + 'warehouse/inventoryCheck/materialSelect'; var url = ctx + "erp/material/select";
var options = { var options = {
title: '选择物料', title: '选择物料',
url: url, url: url,
@ -191,35 +194,36 @@
} }
} }
function doSubmit(index, layero,uniqueId){ function doSubmit(index, layero,uniqueId){
// console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']]; var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-materialSelect-table').bootstrapTable('getSelections')[0]; var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections');
var rows = $("#bootstrap-table-reportDamage-child").bootstrapTable('getData'); //判断是否重复
if(rows.length > 0){ var data = $("#bootstrap-table-reportDamage-child").bootstrapTable('getData');
for(var i=0;i<rows.length;i++){ var rows = data.length;
var data = rows[i]; if(rows > 0){
if(data.materialNo == rowData.materialNo){ for(var i=0;i<rows;i++){
$.modal.alertError("不能选择已添加过的相同物料"); for(var j=0;j<rowData.length;j++){
return; if(data[i].materialNo===rowData[j].materialNo){
$.modal.alertError("不能选择已添加过的相同物料");
rowData.split(j,1);
break;
}
} }
}; };
insertTable(rowData); }
}else{ for(i=0;i<rowData.length;i++){
insertTable(rowData); insertTable(rowData[i]);
} }
layer.close(index); layer.close(index);
} }
function insertTable(rowData){ function insertTable(rowData){
$("#bootstrap-table-reportDamage-child").bootstrapTable('insertRow', { var newRow = {
index:1, materialNo:rowData.materialNo,
row: {
materialNo:rowData.materialNo,
materialName: rowData.materialName, materialName: rowData.materialName,
materialType: rowData.materialType, materialType: rowData.materialType,
materialBrand: rowData.materialBrand, materialBrand: rowData.brand,
materialPhotourl: rowData.materialPhotourl, materialPhotourl: rowData.materialPhotourl,
materialDescribe: rowData.materialDescribe, materialDescribe: rowData.describe,
materialUnit: rowData.materialUnit, materialUnit: rowData.unit,
actualScrapQuantity: "", actualScrapQuantity: "",
scrapType: "", scrapType: "",
scrapDetail: "", scrapDetail: "",
@ -227,8 +231,8 @@
estimatedValueRmb: "", estimatedValueRmb: "",
responsibleUnit: "", responsibleUnit: "",
remark : "" remark : ""
} }
}) $("#bootstrap-table-reportDamage-child").bootstrapTable('append',newRow);
} }
// 逻辑删除前端的一行数据 // 逻辑删除前端的一行数据
@ -240,6 +244,11 @@
var options = { var options = {
id : 'bootstrap-table-reportDamage-child', id : 'bootstrap-table-reportDamage-child',
modalName: "仓库库存报损物料信息", modalName: "仓库库存报损物料信息",
showColumns: false,
showSearch: false,
showRefresh:false,
showToggle:false,
width: 1000,
columns: [ columns: [
{title: '库存报损id', field: 'reportDamageChildId', visible: false}, {title: '库存报损id', field: 'reportDamageChildId', visible: false},
{title: '报损单号', field: 'reportDamageCode',visible: false}, {title: '报损单号', field: 'reportDamageCode',visible: false},
@ -314,6 +323,7 @@
}; };
$.table.init(options); $.table.init(options);
loadWarehouseCodes(); loadWarehouseCodes();
loadMakeNo();
changeWhetherMakeNo(); changeWhetherMakeNo();
getDeptName(); getDeptName();
//单选改变是否关联生产单号显示关联生产单号输入框 //单选改变是否关联生产单号显示关联生产单号输入框
@ -383,6 +393,31 @@
}); });
} }
function loadMakeNo() {
var options = [];
options.push({id: '',text: '',value: ''})
$.ajax({
url: ctx + 'system/makeorder/getAllMakeNos',
type: "GET",
dataType: "json",
success: function (result) {
if (result != null) {
result.forEach(function (re){
var option = {};
option.id = re.makeNo;
option.text = re.makeNo;
option.value = re.makeNo;
options.push(option);
});
$("#selectMakeNo").select2({
data: options,
});
} else {
$.modal.msgError("生产订单编号获取失败!");
}
}
});
}
function getDeptName(){ function getDeptName(){
$.ajax({ $.ajax({
url: prefix + "/getUserDeptName", url: prefix + "/getUserDeptName",

122
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/edit.html

@ -21,13 +21,13 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">申请部门:</label> <label class="col-sm-4 control-label is-required">申请部门:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="applyDept" th:field="*{applyDept}" class="form-control" type="text" required disabled></select> <select name="applyDept" th:field="*{applyDept}" class="form-control" type="text" required disabled></select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">申请时间:</label> <label class="col-sm-4 control-label">申请时间:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="applyTime" th:value="${#dates.format(warehouseInventoryReportDamage.applyTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="applyTime" th:value="${#dates.format(warehouseInventoryReportDamage.applyTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
@ -36,7 +36,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">是否关联生产单号:</label> <label class="col-sm-4 control-label is-required">是否关联生产单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<!-- <div class="radio-box" th:each="dict : ${@dict.getType('yes_or_no')}" required>--> <!-- <div class="radio-box" th:each="dict : ${@dict.getType('yes_or_no')}" required>-->
<!-- <input type="radio" th:id="${'whetherMakeNo_' + dict.dictCode}" name="whetherMakeNo" th:value="${dict.dictValue}" th:field="*{whetherMakeNo}">--> <!-- <input type="radio" th:id="${'whetherMakeNo_' + dict.dictCode}" name="whetherMakeNo" th:value="${dict.dictValue}" th:field="*{whetherMakeNo}">-->
@ -51,9 +51,10 @@
</div> </div>
</div> </div>
<div class="form-group" id="makeNoInput"> <div class="form-group" id="makeNoInput">
<label class="col-sm-3 control-label is-required">关联生产单号:</label> <label class="col-sm-4 control-label is-required">关联生产单号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" required> <input id="selectMakeNo" name="makeNo" th:field="*{makeNo}" class="form-control select2-multiple" type="text" required>
</input>
</div> </div>
</div> </div>
<!-- <div class="form-group"> --> <!-- <div class="form-group"> -->
@ -69,25 +70,25 @@
<!-- </div>--> <!-- </div>-->
<!-- </div>--> <!-- </div>-->
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">仓库ID:</label> <label class="col-sm-4 control-label is-required">仓库ID:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" required> <input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">仓库名称:</label> <label class="col-sm-4 control-label is-required">仓库名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select id="stockNameSelct" name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text" required></select> <select id="stockNameSelct" name="warehouseName" th:field="*{warehouseName}" class="form-control" type="text" required></select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">仓库存放地址:</label> <label class="col-sm-4 control-label is-required">仓库存放地址:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="warehouseStoreAddress" th:field="*{warehouseStoreAddress}" class="form-control" type="text" required> <input name="warehouseStoreAddress" th:field="*{warehouseStoreAddress}" class="form-control" type="text" required>
</div> </div>
</div> </div>
<div class="form-group "> <div class="form-group ">
<label class="col-sm-3 control-label ">备注:</label> <label class="col-sm-4 control-label ">备注:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea name="remark" class="form-control">[[*{remark}]]</textarea> <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
</div> </div>
@ -127,6 +128,7 @@
$("#form-inventoryReportDamage-edit").validate({focusCleanup: true}); $("#form-inventoryReportDamage-edit").validate({focusCleanup: true});
var warehouseInventoryReportDamage = [[${warehouseInventoryReportDamage}]]; var warehouseInventoryReportDamage = [[${warehouseInventoryReportDamage}]];
var stockData = []; var stockData = [];
var makeNo = [[${warehouseInventoryReportDamage.makeNo}]]
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var warehouseInventoryReportDamage = { var warehouseInventoryReportDamage = {
@ -192,6 +194,10 @@
var options = { var options = {
id : 'bootstrap-table-reportDamage-child', id : 'bootstrap-table-reportDamage-child',
modalName: "仓库库存报损物料信息", modalName: "仓库库存报损物料信息",
showColumns: false,
showSearch: false,
showRefresh:false,
showToggle:false,
data: [[${warehouseInventoryReportDamage.warehouseInventoryReportDamageChildList}]], data: [[${warehouseInventoryReportDamage.warehouseInventoryReportDamageChildList}]],
columns: [ columns: [
{title: '库存报损id', field: 'reportDamageChildId', visible: false}, {title: '库存报损id', field: 'reportDamageChildId', visible: false},
@ -273,6 +279,8 @@
var stockName = warehouseInventoryReportDamage.warehouseName; var stockName = warehouseInventoryReportDamage.warehouseName;
loadWarehouseCodes(stockName); loadWarehouseCodes(stockName);
// loadMakeNo();
$("#selectMakeNo").val(makeNo);
changeWhetherMakeNo(); changeWhetherMakeNo();
getDeptName(); getDeptName();
@ -330,7 +338,38 @@
} }
}); });
} }
function loadMakeNo() {
var options = [];
options.push({id: '',text: '',value: ''})
$.ajax({
url: ctx + 'system/makeorder/getAllMakeNos',
type: "GET",
dataType: "json",
success: function (result) {
if (result != null) {
result.forEach(function (re){
var option = {};
option.id = re.makeNo;
option.text = re.makeNo;
option.value = re.makeNo;
options.push(option);
});
$("#selectMakeNo").select2({
data: options,
}).on('select2:loaded', function(e) {
// 打印所有选项
var allOptions = $("#selectMakeNo").select2('data');
console.log("All Options from Select2:", allOptions);
allOptions.forEach(function(option) {
console.log("ID: " + option.id + ", Text: " + option.text);
});
});
} else {
$.modal.msgError("生产订单编号获取失败!");
}
}
});
}
function getDeptName(){ function getDeptName(){
$.ajax({ $.ajax({
url: prefix + "/getUserDeptName", url: prefix + "/getUserDeptName",
@ -378,44 +417,45 @@
} }
} }
function doSubmit(index, layero,uniqueId){ function doSubmit(index, layero,uniqueId){
// console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']]; var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-materialSelect-table').bootstrapTable('getSelections')[0]; var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections');
var rows = $("#bootstrap-table-reportDamage-child").bootstrapTable('getData'); //判断是否重复
if(rows.length > 0){ var data = $("#bootstrap-table-reportDamage-child").bootstrapTable('getData');
for(var i=0;i<rows.length;i++){ var rows = data.length;
var data = rows[i]; if(rows > 0){
if(data.materialNo == rowData.materialNo){ for(var i=0;i<rows;i++){
$.modal.alertError("不能选择已添加过的相同物料"); for(var j=0;j<rowData.length;j++){
return; if(data[i].materialNo===rowData[j].materialNo){
$.modal.alertError("不能选择已添加过的相同物料");
rowData.split(j,1);
break;
}
} }
}; };
insertTable(rowData); }
}else{ for(i=0;i<rowData.length;i++){
insertTable(rowData); insertTable(rowData[i]);
} }
layer.close(index); layer.close(index);
} }
function insertTable(rowData){ function insertTable(rowData){
$("#bootstrap-table-reportDamage-child").bootstrapTable('insertRow', { var newRow = {
index:1, materialNo:rowData.materialNo,
row: { materialName: rowData.materialName,
materialNo:rowData.materialNo, materialType: rowData.materialType,
materialName: rowData.materialName, materialBrand: rowData.brand,
materialType: rowData.materialType, materialPhotourl: rowData.materialPhotourl,
materialBrand: rowData.materialBrand, materialDescribe: rowData.describe,
materialPhotourl: rowData.materialPhotourl, materialUnit: rowData.unit,
materialDescribe: rowData.materialDescribe, actualScrapQuantity: "",
materialUnit: rowData.materialUnit, scrapType: "",
actualScrapQuantity: "", scrapDetail: "",
scrapType: "", qualityAssessment: "",
scrapDetail: "", estimatedValueRmb: "",
qualityAssessment: "", responsibleUnit: "",
estimatedValueRmb: "", remark : ""
responsibleUnit: "", }
remark : "" $("#bootstrap-table-reportDamage-child").bootstrapTable('append',newRow);
}
})
} }
// 逻辑删除前端的一行数据 // 逻辑删除前端的一行数据

17
ruoyi-admin/src/main/resources/templates/warehouse/inventoryReportDamage/inventoryReportDamage.html

@ -2,6 +2,8 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head> <head>
<th:block th:include="include :: header('仓库库存报损列表')" /> <th:block th:include="include :: header('仓库库存报损列表')" />
<th:block th:include="include :: select2-css" />
</head> </head>
<body class="gray-bg"> <body class="gray-bg">
<div class="container-div"> <div class="container-div">
@ -20,14 +22,15 @@
</li> </li>
<li> <li>
<label>报废类型:</label> <label>报废类型:</label>
<select name="warehousScrapType" th:with="type=${@dict.getType('warehous_scrap_type')}"> <input type="text" name="scrapType">
<option value="">所有</option> <!-- th:with="type=${@dict.getType('warehous_scrap_type')}"-->
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <!-- <option value="">所有</option>-->
</select> <!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
</input>
</li> </li>
<li> <li>
<label>是否关联生产单号:</label> <label>是否关联生产单号:</label>
<select name="whetherMakeNo" th:with="type=${@dict.getType('yes_or_no')}"> <select name="whetherMakeNo" class="select2-multiple" th:with="type=${@dict.getType('yes_or_no')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
@ -74,6 +77,8 @@
</div> </div>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
<th:block th:include="include :: select2-js" />
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:edit')}]]; var editFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:edit')}]];
var detailFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:detail')}]]; var detailFlag = [[${@permission.hasPermi('warehouse:inventoryReportDamage:detail')}]];
@ -122,7 +127,7 @@
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>详情</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="detail(\'' + row.reportDamageId + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join(''); return actions.join('');
} }
} }

Loading…
Cancel
Save