|
@ -22,24 +22,24 @@ |
|
|
</select> |
|
|
</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-3 control-label">销售订单号:</label>--> |
|
|
<div class="col-sm-8"> |
|
|
<!-- <div class="col-sm-8">--> |
|
|
<input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" readonly> |
|
|
<!-- <input name="salesOrderCode" th:field="*{salesOrderCode}" class="form-control" type="text" 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="applyName" th:field="*{applyName}" class="form-control" type="text" readonly> |
|
|
<input name="applyName" th:field="*{applyName}" class="form-control" type="text" 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="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly> |
|
|
<!-- <input name="makeNo" th:field="*{makeNo}" class="form-control" type="text" readonly>--> |
|
|
</div> |
|
|
<!-- </div>--> |
|
|
</div> |
|
|
<!-- </div>--> |
|
|
<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"> |
|
@ -94,6 +94,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var warehouseOutOrder = [[${warehouseOutOrder}]]; |
|
|
var warehouseOutOrder = [[${warehouseOutOrder}]]; |
|
|
|
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
|
|
|
var processMethodDatas = [[${@dict.getType('processMethod')}]]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var prefix = ctx + "warehouse/warehouseOutOrder"; |
|
|
var prefix = ctx + "warehouse/warehouseOutOrder"; |
|
|
$("#form-prepareMaterial-edit").validate({ |
|
|
$("#form-prepareMaterial-edit").validate({ |
|
@ -121,11 +124,10 @@ |
|
|
"materialType": item.materialType, |
|
|
"materialType": item.materialType, |
|
|
"materialPhotourl": item.materialPhotourl, |
|
|
"materialPhotourl": item.materialPhotourl, |
|
|
"materialDescribe": item.materialDescribe, |
|
|
"materialDescribe": item.materialDescribe, |
|
|
|
|
|
"materialModel": item.materialModel, |
|
|
"materialBrand": item.materialBrand, |
|
|
"materialBrand": item.materialBrand, |
|
|
"materialUnit": item.materialUnit, |
|
|
"materialUnit": item.materialUnit, |
|
|
"materialProcessMethod": item.materialProcessMethod, |
|
|
"materialProcessMethod": item.materialProcessMethod, |
|
|
"makeNum": item.makeNum, |
|
|
|
|
|
"hasOutOrderSum": item.hasOutOrderSum, |
|
|
|
|
|
"applyOutOrderSum": item.applyOutOrderSum, |
|
|
"applyOutOrderSum": item.applyOutOrderSum, |
|
|
"prepareOutOrderSum": item.prepareOutOrderSum, |
|
|
"prepareOutOrderSum": item.prepareOutOrderSum, |
|
|
// ...其他字段 |
|
|
// ...其他字段 |
|
@ -183,11 +185,18 @@ |
|
|
{ |
|
|
{ |
|
|
title: '物料类型', |
|
|
title: '物料类型', |
|
|
field: 'materialType', |
|
|
field: 'materialType', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '描述', |
|
|
title: '描述', |
|
|
field: 'materialDescribe', |
|
|
field: 'materialDescribe', |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
title: '型号', |
|
|
|
|
|
field: 'materialModel', |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '品牌', |
|
|
title: '品牌', |
|
|
field: 'materialBrand', |
|
|
field: 'materialBrand', |
|
@ -199,6 +208,9 @@ |
|
|
{ |
|
|
{ |
|
|
title: '加工方式', |
|
|
title: '加工方式', |
|
|
field: 'materialProcessMethod', |
|
|
field: 'materialProcessMethod', |
|
|
|
|
|
formatter: function(value, row, index) { |
|
|
|
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
title: '订单数量', |
|
|
title: '订单数量', |
|
@ -215,7 +227,41 @@ |
|
|
{ |
|
|
{ |
|
|
title: '准备出库数', |
|
|
title: '准备出库数', |
|
|
field: 'prepareOutOrderSum', |
|
|
field: 'prepareOutOrderSum', |
|
|
editable:true, |
|
|
editable: { |
|
|
|
|
|
validate: function(value) { |
|
|
|
|
|
if ($.trim(value) === '') { |
|
|
|
|
|
return '准备出库数不能为空'; |
|
|
|
|
|
} |
|
|
|
|
|
if (isNaN(value)) { |
|
|
|
|
|
return '请输入有效的数字'; |
|
|
|
|
|
} |
|
|
|
|
|
if (value <= 0) { |
|
|
|
|
|
return '准备出库数必须大于0'; |
|
|
|
|
|
} |
|
|
|
|
|
//不能为小数 |
|
|
|
|
|
if (value % 1 !== 0) { |
|
|
|
|
|
return '准备出库数不能为小数'; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
|
|
|
formatter: function (value, row) { |
|
|
|
|
|
// 检查 row 是否存在 |
|
|
|
|
|
if (!row) { |
|
|
|
|
|
return ""; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 检查 prepareOutOrderSum 是否存在 |
|
|
|
|
|
if (row.prepareOutOrderSum === undefined || row.prepareOutOrderSum === null) { |
|
|
|
|
|
return ""; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 根据 prepareOutOrderSum 的值决定返回值 |
|
|
|
|
|
if (row.prepareOutOrderSum) { |
|
|
|
|
|
return row.prepareOutOrderSum; |
|
|
|
|
|
} else { |
|
|
|
|
|
return value; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
] |
|
|
] |
|
|
}; |
|
|
}; |
|
|