@ -12,114 +12,44 @@
< input name = "developOderCode" class = "form-control" type = "text" >
< input name = "developOderCode" class = "form-control" type = "text" >
< / div >
< / div >
< / div >
< / div >
< div class = "form-group " >
< div class = "container " >
< label class = "col-sm-3 control-label "> 料号:< / label >
< div class = "form-row ">
< div class = "col-sm-8 " >
< div class = "btn-group-sm" role = "group " >
< input name = "materialNo" class = "form-control" type = "text" >
< header > 修改开发修改单:< / header >
< / div >
< / div >
< / div >
< / div >
< div class = "form-group" >
< div class = "row" >
< label class = "col-sm-3 control-label" > 采购入库状态:< / label >
< div class = "form-group is-required" >
< label class = "col-sm-3 control-label" > 生产单号:< / label >
< div class = "col-sm-8" >
< div class = "col-sm-8" >
< select name = "purchaseStorageStatus" class = "form-control m-b" th:with = "type=${@dict.getType('eceiptStatus')}" >
< select id = "add_developOderCode" name = "developOderCode" class = "form-control" type = "text" required >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th: value= "${dict.dictValue} " > < / option >
< option value = "" > 请选择 < / option >
< / 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 = "input-group date" >
< select name = "qualityStatus" class = "form-control m-b" th:with = "type=${@dict.getType('qualityStatus')}" >
< input name = "updateInfoTime" class = "form-control" placeholder = "yyyy-MM-dd" type = "text" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< span class = "input-group-addon" > < i class = "fa fa-calendar" > < / i > < / span >
< / select >
< / 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 >
< / div >
< div class = "form-group" >
< label class = "col-sm-3 control-label" > 确认状态:< / label >
< div class = "container" >
< div class = "col-sm-8" >
< div class = "form-row" >
< select name = "completeStatus" class = "form-control m-b" th:with = "type=${@dict.getType('completeStatus')}" >
< div class = "btn-group-sm" id = "toolbar" role = "group" >
< option th:each = "dict : ${type}" th:text = "${dict.dictLabel}" th:value = "${dict.dictValue}" > < / option >
< span > 选择开发修改单物料< / span >
< / select >
< a class = "btn btn-success" onclick = "insertRow()" >
< / div >
< i class = "fa fa-plus" > < / i > 添加修改物料
< / div >
< / a >
< 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 >
< 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 = "row" >
< div class = "col-sm-12 select-table table-striped" >
< table id = "bootstrap-sub-table-developModify" > < / table >
< / 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 >
< / 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 >
< / div >
< / div >
< / div >
< / form >
< / form >
@ -127,12 +57,8 @@
< th:block th:include = "include :: footer" / >
< th:block th:include = "include :: footer" / >
< script th:inline = "javascript" >
< script th:inline = "javascript" >
var prefix = ctx + "erp/developModifyOrder"
var prefix = ctx + "erp/developModifyOrder"
$("#form-developModifyOrder-add").validate({
var userName = [[${@permission.getPrincipalProperty('userName')}]];
focusCleanup: true
$("#form-developModifyOrder-add").validate({ focusCleanup: true});
});
$(function () {
$(function () {
$.ajax({
$.ajax({
url: ctx + 'erp/developModifyOrder/getEngineerList',
url: ctx + 'erp/developModifyOrder/getEngineerList',
@ -146,14 +72,93 @@
"< option value = '" + userData[i].userId + "' > " + userData[i].userName + "< / option > " // 显示用户姓名
"< 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 {
} else {
$.modal.msgError(res.msg);
$.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() {
function submitHandler() {