|
|
@ -86,6 +86,12 @@ |
|
|
|
<input id="enterpriseName" name="enterpriseName" 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 id="enterpriseMaterialNo" name="enterpriseMaterialNo" class="form-control" type="text"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label">事业部:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
@ -95,7 +101,7 @@ |
|
|
|
<div class="form-group"> |
|
|
|
<label class="col-sm-3 control-label">客户联系人:</label> |
|
|
|
<div class="col-sm-8"> |
|
|
|
<select id="customerContact_add" name="customerContact" class="form-control m-b"> |
|
|
|
<select id="customerContact_add" name="customerContact" class="form-control m-b" required> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -500,10 +506,10 @@ |
|
|
|
var requiredField = (currencyVal === '1') ? 'materialNoRmb' : 'materialNoUsd'; |
|
|
|
|
|
|
|
// 检查是否尝试编辑除requiredField外的字段,且requiredField未填写 |
|
|
|
if (field !== requiredField && (!row[requiredField] || row[requiredField].trim() === '')) { |
|
|
|
$.modal.alertWarning((currencyVal === '1' ? "请首先填写物料的不含税单价(RMB)" : "请首先填写物料的不含税单价(美元)")); |
|
|
|
// 可以选择取消这次编辑操作,但Bootstrap Table默认不会提供直接的API来取消编辑后的保存,您可能需要手动恢复数据或采取其他策略。 |
|
|
|
} |
|
|
|
// if (field !== requiredField && (!row[requiredField] || row[requiredField].trim() === '')) { |
|
|
|
// $.modal.alertWarning((currencyVal === '1' ? "请首先填写物料的不含税单价(RMB)" : "请首先填写物料的不含税单价(美元)")); |
|
|
|
// // 可以选择取消这次编辑操作,但Bootstrap Table默认不会提供直接的API来取消编辑后的保存,您可能需要手动恢复数据或采取其他策略。 |
|
|
|
// } |
|
|
|
}); |
|
|
|
|
|
|
|
// 初始化时也需要根据当前的货币类型设置一次 |
|
|
@ -839,19 +845,29 @@ |
|
|
|
minView: "month", |
|
|
|
autoclose: true |
|
|
|
}); |
|
|
|
$("input[name='orderReceivingTime']").datetimepicker({ |
|
|
|
format: "yyyy-mm-dd", |
|
|
|
minView: "month", |
|
|
|
autoclose: true |
|
|
|
}); |
|
|
|
// $("input[name='orderReceivingTime']").datetimepicker({ |
|
|
|
// format: "yyyy-mm-dd", |
|
|
|
// minView: "month", |
|
|
|
// autoclose: true |
|
|
|
// }); |
|
|
|
$("input[name='modificationTime']").datetimepicker({ |
|
|
|
format: "yyyy-mm-dd", |
|
|
|
minView: "month", |
|
|
|
autoclose: true |
|
|
|
}); |
|
|
|
$(document).ready(function () { |
|
|
|
var currentDate = new Date(); |
|
|
|
var year = currentDate.getFullYear(); |
|
|
|
var month = ('0' + (currentDate.getMonth() + 1)).slice(-2); // 月份是从0开始的,所以需要加1 |
|
|
|
var day = ('0' + currentDate.getDate()).slice(-2); |
|
|
|
var formattedDate = year + '-' + month + '-' + day; |
|
|
|
// console.log(formattedDate); |
|
|
|
$("input[name='orderReceivingTime']").val(formattedDate); |
|
|
|
}); |
|
|
|
function submitHandler() { |
|
|
|
if ($.validate.form()) { |
|
|
|
var formData = $("#form-salesOrder-add").serializeArray(); |
|
|
|
console.log(formData); |
|
|
|
var tableData = $("#bootstrap-sub-table-order").bootstrapTable('getData'); |
|
|
|
console.log("tableData",JSON.stringify(tableData)); |
|
|
|
var rows = tableData.length; |
|
|
|