|
|
@ -2,6 +2,8 @@ |
|
|
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|
|
|
<head> |
|
|
|
<th:block th:include="include :: header('新增员工领料单')" /> |
|
|
|
<th:block th:include="include :: bootstrap-editable-css"/> |
|
|
|
<th:block th:include="include :: bootstrap-fileinput-css"/> |
|
|
|
</head> |
|
|
|
<body class="white-bg"> |
|
|
|
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|
|
@ -13,11 +15,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<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"> |
|
|
|
<select name="correlationCode" class="form-control" > |
|
|
|
<option value="">请选择</option> |
|
|
|
</select> |
|
|
|
<input name="correlationCode" class="form-control" type="text"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -45,6 +45,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<th:block th:include="include :: footer" /> |
|
|
|
<th:block th:include="include :: bootstrap-table-editable-js"/> |
|
|
|
<th:block th:include="include :: bootstrap-fileinput-js"/> |
|
|
|
<script th:inline="javascript"> |
|
|
|
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; |
|
|
|
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; |
|
|
@ -55,7 +57,7 @@ |
|
|
|
//获取子表信息 |
|
|
|
$(function() { |
|
|
|
getRequisitieCode(); |
|
|
|
selectSaleOrder(); |
|
|
|
// selectSaleOrder(); |
|
|
|
getSelections(); |
|
|
|
var options = { |
|
|
|
id:'bootstrap-sub-table-empRequisitionChild', |
|
|
@ -72,41 +74,62 @@ |
|
|
|
}, |
|
|
|
{title: '物料索引id',field: 'materialId',align: 'center',visible: false}, |
|
|
|
{title: '料号',field: 'materialCode',align: 'center'}, |
|
|
|
{title: '物料名称',field: 'materialName',align: 'center'}, |
|
|
|
{title: '图片',field: 'photoUrl', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.imageView(value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '物料名称',field: 'materialName',align: 'center'}, |
|
|
|
{title: '物料类型',field: 'materialType',align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectCategoryLabel(materialTypeDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '型号',field: 'materialModel',align: 'center'}, |
|
|
|
{title: '规格',field: 'specification',align: 'center'}, |
|
|
|
{ title: '描述',field: 'describe',align: 'center'}, |
|
|
|
{title: '型号',field: 'materialModel',align: 'center',visible: false}, |
|
|
|
{title: '规格',field: 'specification',align: 'center',visible: false}, |
|
|
|
{ title: '描述',field: 'describe',align: 'center',visible: false}, |
|
|
|
{title: '品牌',field: 'brand',align: 'center'}, |
|
|
|
{ title: '单位',field: 'unit',align: 'center', |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(sysUnitClassDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '半成品类型',field: 'processMethod',align: 'center', |
|
|
|
{title: '半成品类型',field: 'processMethod',align: 'center',visible: false, |
|
|
|
formatter: function(value, row, index) { |
|
|
|
return $.table.selectDictLabel(processMethodDatas, value); |
|
|
|
} |
|
|
|
}, |
|
|
|
{title: '物料的数量', field: 'materialNum',align: 'center',editable: true,}, |
|
|
|
{title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, |
|
|
|
{title: '物料的含税单价(RMB)',field: 'materialRmb',align: 'center',}, |
|
|
|
{title: '物料的含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',}, |
|
|
|
{title: '物料的不含税总价(RMB)',field: 'materialRmbSum',align: 'center',}, |
|
|
|
{title: '不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, |
|
|
|
{title: '含税单价(RMB)',field: 'materialRmb',align: 'center',}, |
|
|
|
{title: '物料的数量', field: 'materialNum',align: 'center', |
|
|
|
editable:{ |
|
|
|
type : 'text', |
|
|
|
mode: 'inline', |
|
|
|
title : '物料的数量', |
|
|
|
validate : function(value) { |
|
|
|
if (!value) { |
|
|
|
return '用量不能为空'; |
|
|
|
} |
|
|
|
if (isNaN(value)) { |
|
|
|
return '用量必须为数字'; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
{title: '不含税总价(RMB)',field: 'materialRmbSum',align: 'center',}, |
|
|
|
{title: '含税总价(RMB)',field: 'materialNoRmbSum',align: 'center',}, |
|
|
|
{title: '录入人',field: 'createBy',align: 'center',visible: false}, |
|
|
|
{title: '录入时间',field: 'createTime',align: 'center',visible: false }, |
|
|
|
{title: '更新人',field: 'updateBy',align: 'center',visible: false}, |
|
|
|
{title: '上次更新时间',field: 'updateTime',align: 'center',visible: false}, |
|
|
|
{title: '备注',field: 'remark',align: 'center',editable: true}, |
|
|
|
{title: '备注',field: 'remark',align: 'center', |
|
|
|
editable:{ |
|
|
|
type : 'text', |
|
|
|
mode: 'inline', |
|
|
|
title : '备注', |
|
|
|
}, |
|
|
|
}, |
|
|
|
{title: '操作', align: 'center', |
|
|
|
formatter: function (value, row, index) { |
|
|
|
var actions = []; |
|
|
@ -126,11 +149,11 @@ |
|
|
|
console.log(uniqueId); |
|
|
|
var iframeWin = window[layero.find('iframe')[0]['name']]; |
|
|
|
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; |
|
|
|
console.log("rowData: "+rowData); |
|
|
|
console.log("rowData: "+JSON.stringify(rowData)); |
|
|
|
$("#bootstrap-sub-table-empRequisitionChild").bootstrapTable('insertRow', { |
|
|
|
index:1, |
|
|
|
row: { |
|
|
|
materialId:rowData.materialId, |
|
|
|
materialId:rowData.id, |
|
|
|
materialCode: rowData.materialNo, |
|
|
|
materialName: rowData.materialName, |
|
|
|
materialType: rowData.materialType, |
|
|
@ -139,7 +162,9 @@ |
|
|
|
unit: rowData.unit, |
|
|
|
processMethod: rowData.processMethod, |
|
|
|
photoUrl: rowData.photoUrl, |
|
|
|
materialNum: 0, |
|
|
|
materialModel: rowData.materialModel, |
|
|
|
specification: rowData.specification, |
|
|
|
materialNum: "", |
|
|
|
materialRmb: 0, |
|
|
|
materialNoRmb: 0, |
|
|
|
materialNoRmbSum: 0, |
|
|
@ -193,8 +218,8 @@ |
|
|
|
baseEmpRequisiteOrderVO.materialAmount = rows.length; |
|
|
|
for (var i = 0; i < rows.length; i++) { |
|
|
|
var requisiteChild = { |
|
|
|
materialId: rows[i].id, |
|
|
|
materialCode: rows[i].materialNo, |
|
|
|
materialId: rows[i].materialId, |
|
|
|
materialCode: rows[i].materialCode, |
|
|
|
materialName: rows[i].materialName, |
|
|
|
materialType: rows[i].materialType, |
|
|
|
describe: rows[i].describe, |
|
|
@ -202,6 +227,8 @@ |
|
|
|
unit: rows[i].unit, |
|
|
|
processMethod: rows[i].processMethod, |
|
|
|
photoUrl: rows[i].photoUrl, |
|
|
|
materialModel: rows[i].materialModel, |
|
|
|
specification: rows[i].specification, |
|
|
|
materialNum: rows[i].materialNum, |
|
|
|
materialRmb: rows[i].materialRmb, |
|
|
|
materialNoRmb: rows[i].materialNoRmb, |
|
|
@ -209,10 +236,10 @@ |
|
|
|
materialRmbSum: rows[i].materialRmbSum, |
|
|
|
remark: rows[i].remark |
|
|
|
}; |
|
|
|
console.log(requisiteChild); |
|
|
|
baseEmpRequisiteOrderVO.baseEmpRequisiteOrderChildList.push(requisiteChild); |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(JSON.stringify(baseEmpRequisiteOrderVO)); |
|
|
|
$.operate.saveJson(prefix + "/add", JSON.stringify(baseEmpRequisiteOrderVO)); |
|
|
|
// $.operate.save(prefix + "/add", $('#form-empRequisiteOrder-add').serialize()); |
|
|
|
} |
|
|
|