@ -12,114 +12,44 @@
< input name = "developOderCode" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 料号:< / label >
< div class = "col-sm-8" >
< input name = "materialNo" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 采购入库状态:< / label >
< div class = "col-sm-8" >
< select name = "purchaseStorageStatus" class = "form-control m-b" th:with = "type=${@dict.getType('eceiptStatus')}" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 品质状态:< / label >
< div class = "col-sm-8" >
< select name = "qualityStatus" class = "form-control m-b" th:with = "type=${@dict.getType('qualityStatus')}" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< / select >
< div class = "container" >
< div class = "form-row" >
< div class = "btn-group-sm" role = "group" >
< header > 修改开发修改单:< / header >
< / div >
< / div >
< div class = "row" >
< div class = "form-group is-required" >
< label class = "col-sm-3 control-label" > 生产单号:< / label >
< div class = "col-sm-8" >
< select id = "add_developOderCode" name = "developOderCode" class = "form-control" type = "text" required >
< option value = "" > 请选择< / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 修改完成时间:< / label >
< div class = "input-group date" >
< input name = "updateInfoTime" class = "form-control" placeholder = "yyyy-MM-dd" type = "text" >
< span class = "input-group-addon" > < i class = "fa fa-calendar" > < / i > < / span >
< / div >
< / div >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 审核状态:< / label >
< div class = "col-sm-8" >
< select name = "auditStatus" class = "form-control m-b" th:with = "type=${@dict.getType('auditStatus')}" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 确认状态:< / label >
< div class = "col-sm-8" >
< select name = "completeStatus" class = "form-control m-b" th:with = "type=${@dict.getType('completeStatus')}" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 完成状态:< / label >
< div class = "col-sm-8" >
< select name = "finshStatus" class = "form-control m-b" th:with = "type=${@dict.getType('finshStatus')}" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 使用状态:< / label >
< div class = "col-sm-8" >
< select name = "useStatus" class = "form-control m-b" th:with = "type=${@dict.getType('useStatus')}" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< / select >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 物料名称:< / label >
< div class = "col-sm-8" >
< input name = "materialName" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 物料类型:< / label >
< div class = "col-sm-8" >
< input name = "materialType" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 图片:< / label >
< div class = "col-sm-8" >
< input name = "materialPhotoUrl" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 单位:< / label >
< div class = "col-sm-8" >
< input name = "materialUnit" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 品牌:< / label >
< div class = "col-sm-8" >
< input name = "materialBrand" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 描述:< / label >
< div class = "col-sm-8" >
< input name = "materialDescribe" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 半成品类型:< / label >
< div class = "col-sm-8" >
< input name = "materialProcessMode" class = "form-control" type = "text" >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 工程员:< / label >
< div class = "col-sm-8" >
< select id = "userId_add" name = "userId" class = "form-control m-b" >
< option value = "" > 所有< / option >
< / select >
< div class = "container" >
< div class = "form-row" >
< div class = "btn-group-sm" id = "toolbar" role = "group" >
< span > 选择开发修改单物料< / span >
< a class = "btn btn-success" onclick = "insertRow()" >
< i class = "fa fa-plus" > < / i > 添加修改物料
< / a >
< / div >
< / div >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 备注信息:< / label >
< div class = "col-sm-8" >
< input name = "remark" class = "form-control" type = "text" >
< div class = "row" >
< div class = "col-sm-12 select-table table-striped" >
< table id = "bootstrap-sub-table-developModify" > < / table >
< / div >
< / div >
< / div >
< / form >
@ -127,12 +57,8 @@
< th:block th:include = "include :: footer" / >
< script th:inline = "javascript" >
var prefix = ctx + "erp/developModifyOrder"
$("#form-developModifyOrder-add").validate({
focusCleanup: true
});
var userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-developModifyOrder-add").validate({ focusCleanup: true});
$(function () {
$.ajax({
url: ctx + 'erp/developModifyOrder/getEngineerList',
@ -146,14 +72,93 @@
"< option value = '" + userData[i].userId + "' > " + userData[i].userName + "< / option > " // 显示用户姓名
);
}
$("userId_add").val(userData[i].userId).trigger("change");
$("# userId_add").val(userData[i].userId).trigger("change");
} else {
$.modal.msgError(res.msg);
}
}
});
var options = {
id: "bootstrap-sub-table-developModify",
url: prefix + "/getDevelopModifyOrderList",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("< input type = 'hidden' name = 'index' value = '%s' > ", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
},
{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) {
if(value == null || value == ""){
value = "";
return "< img src = '' herf = '' / > ";
}
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{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',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{ title: '对外售价',field: 'materialSole',},
{title: '国内税率',field: 'countTax',align: 'center',},
{ title: '美元汇率',field: 'usdTax', align: 'center',},
{field: 'materialNum',align: 'center',title: '物料的数量',},
{ title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',},
{title: '修改详情',align: 'center',
formatter:function formatterForm(value, row, index) {
// 这里的代码会为每行生成一个表单
var form = $('< form > < / form > ').append(
$('< input / > ', { type: 'text', value: row.name, name: 'name', placeholder: 'Name' }),
$('< input / > ', { type: 'email', value: row.email, name: 'email', placeholder: 'Email' }),
$('< button / > ', { type: 'submit' }).text('Submit')
);
form.on('submit', function(e) {
e.preventDefault(); // 阻止表单默认提交行为
var formData = form.serializeArray(); // 序列化表单数据为数组
console.log(formData); // 在控制台输出表单数据
// 这里可以添加代码处理表单提交,例如发送到服务器等
});
return form; // 返回生成的表单HTML
}},
]
}
$("bootstrap-sub-table-developModify").init(options);
})
function insertRow() {
var table = $("#bootstrap-sub-table-quoteChild").bootstrapTable('getData');
var row = table.length + 1;
$("#bootstrap-sub-table-developModify").bootstrapTable('insertRow', {
index: row,
row: {
id: row,
developOderCode: $("#add_developOderCode").val(),
}
});
}
function submitHandler() {