万材erp项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

554 lines
24 KiB

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<html xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('新增入库通知-检验')"/>
<th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-notice-add">
<h4 class="form-header h4">入库通知-检验信息</h4>
<div class="form-group">
<label class="col-sm-3 control-label">采购订单号:</label>
<div class="col-sm-8">
<input name="purchaseorderNo" class="form-control" type="text" onfocus="getPurchaseOrder()"
th:value="${buyorderHead?.poNo}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">制工单号:</label>
<div class="col-sm-8">
<input name="workorderNo" class="form-control" type="text" onfocus="getManufactureOrder() "
th:value="${workorderhead?.workNo}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">委外加工单号:</label>
<div class="col-sm-8">
<input name="outworkorderNo" class="form-control" type="text" onfocus="getOutWorkOrder() "
th:value="${outworkorderhead?.outsourceOrderNo}">
<!--
模板
前面是对象名,问号用户判断为空就忽略,后面为属性名。
${outworkorderhead?.outsourceOrderNo}
上面为主表对象名,下面是子表对象名,替换就行了。
outworkorderlist
下面有如果有一个input框但已经有渲染内容的就加上 ?: 再写
-->
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库通知单号:</label>
<div class="col-sm-8">
<input name="warehousingnoticeNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户号:</label>
<div class="col-sm-8">
<input readonly name="customerId" class="form-control" type="text" required
th:value="${workorderhead?.pCode}?:${buyorderHead?.pCode}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">客户名称:</label>
<div class="col-sm-8">
<input readonly name="customerName" class="form-control" type="text" required
th:value="${workorderhead?.pName}?:${buyorderHead?.pName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">入库类型:</label>
<div class="col-sm-8">
<select name="warehousingType" class="form-control m-b"
th:with="type=${@dict.getType('dock_warehousing_purchase_type')}" required>
<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 is-required">入库日期:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="warehousingnoticeDate" class="form-control" placeholder="yyyy-MM-dd" type="text"
required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">内外销:</label>
<div class="col-sm-8">
<select name="domesticOrExport" class="form-control m-b"
th:with="type=${@dict.getType('sys_NWX_class')}" required>
<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 is-required">仓库号:</label>
<div class="col-sm-8">
<input readonly name="warehouseNo" class="form-control warehouseNo" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">仓库名称:</label>
<div class="col-sm-8">
<select name="warehouseName" class="form-control m-b" required onchange="setWarehouseNo()">
<option value="">所有</option>
<option th:each="item:${warehouselist}"
th:value="${item.Stockname}"
th:text="${item.Stockname}"
th:name="${item.StockNO}"
value="1">
</option>
</select>
<span class="help-block m-b-none"></span>
</div>
</div>
<!-- todo 这里开始要添加另一个session-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">入库数量:</label>
<div class="col-sm-8">
<input readonly name="warehousingAmt" class="form-control" type="text" required
th:value="${buyorderList?.Qty}?:${workorderhead?.cpInQty}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">物料代码:</label>
<div class="col-sm-8">
<input readonly name="itemNo" class="form-control" type="text" required
th:value="${buyorderList?.wlCode}?:${workorderhead?.cpCode}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">物料名称:</label>
<div class="col-sm-8">
<input readonly name="itemName" class="form-control" type="text" required
th:value="${buyorderList?.Itemname}?:${workorderhead?.cpName}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">项次:</label>
<div class="col-sm-8">
<input readonly name="itemTimes" 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 readonly name="specificationModel" class="form-control" type="text"
th:value="${buyorderList?.Itemstandard}?:${workorderhead?.cpType}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-labe">机种:</label>
<div class="col-sm-8">
<input readonly name="machineType" class="form-control" type="text"
th:value="${buyorderList?.Itemstandard}?:${workorderhead?.cpMachineno}">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
<input readonly name="unit" class="form-control" type="text"
th:value="${buyorderList?.stockDw}?:${workorderhead?.cpDw}">
</div>
</div>
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="spell1" class="form-control" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="spell2" class="form-control" type="text">
</div>
</div>
<div class="form-group" style="display: none">
<label class="col-sm-3 control-label"></label>
<div class="col-sm-8">
<input name="spell3" class="form-control" type="text">
</div>
</div>
<h4 class="form-header h4">入库检验单信息</h4>
<div class="row">
<div class="col-sm-12">
<!-- <button type="button" class="btn btn-white btn-sm" onclick="addColumn()"><i class="fa fa-plus"> 增加</i>-->
<!-- </button>-->
<!-- <button type="button" class="btn btn-white btn-sm" onclick="sub.delColumn()"><i class="fa fa-minus">-->
<!-- 删除</i></button>-->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"
stype="overflow : hidden; text-overflow : ellipsis ; white-space:nowrap ; "></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
var prefix = ctx + "stock/notice"
$("#form-notice-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-notice-add').serialize());
}
}
$("input[name='warehousingnoticeDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$(function () {
var options = {
pagination: false,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
sidePagination: "client",
columns: [{
checkbox: true
},
{
field: 'index',
align: 'center',
title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input required type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
},
{
field: 'materialCode',
align: 'center',
title: '物料代码',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
var html = $.common.sprintf("<input required class='form-control' type='text' name='warehousingCheckList[%s].materialCode' value="+[[${buyorderList?.wlCode}?:${workorderhead?.cpCode}]]+">", index, value);
return html;
}
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
var html = $.common.sprintf("<input required class='form-control' type='text' name='warehousingCheckList[%s].materialName' value=" + [[${buyorderList?.Itemname}?:${workorderhead?.cpName}]] + ">", index, value);
return html;
}
},
{
field: 'specificationModel',
align: 'center',
title: '规格型号',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
var html = $.common.sprintf("<input required class='form-control' type='text' name='warehousingCheckList[%s].specificationModel' value=" + [[${buyorderList?.Itemstandard}?:${workorderhead?.cpType}]] + ">", index, value);
return html;
}
},
{
field: 'machineType',
align: 'center',
title: '机种',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
var html = $.common.sprintf("<input required class='form-control' type='text' name='warehousingCheckList[%s].machineType' value=" + [[${buyorderList?.Itemstandard}?:${workorderhead?.cpMachineno}]] + ">", index, value);
return html;
}
},
{
field: 'unit',
align: 'center',
title: '单位',
cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
var html = $.common.sprintf("<input required class='form-control' type='text' name='warehousingCheckList[%s].unit' value=" + [[${buyorderList?.stockDw}?:${workorderhead?.cpDw}]] + ">", index, value);
return html;
}
},
{
field: 'orderAmt',
align: 'center',
title: '订单总量', cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
var html = $.common.sprintf("<input required class='form-control' type='number' name='warehousingCheckList[%s].orderAmt' value=" + [[${buyorderList?.Qty}?:${workorderhead?.cpInQty}]] + ">", index, value);
return html;
}
},
{
field: 'qualifiedAmt',
align: 'center',
title: '合格数量',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input readonly class='form-control' type='number' name='warehousingCheckList[%s].qualifiedAmt' value='%s'>", index, value);
return html;
}
},
{
field: 'unqualifiedAmt',
align: 'center',
title: '不合格数量',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input readonly class='form-control' type='number' name='warehousingCheckList[%s].unqualifiedAmt' value='%s'>", index, value);
return html;
}
},
{
field: 'qualifiedRate',
align: 'center',
title: '合格率',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='warehousingCheckList[%s].qualifiedRate' value='%s'>", index, value);
return html;
}
},
{
field: 'note',
align: 'center',
title: '说明', cellStyle: function (value, row, index) {
return {
css: {
"min-width": "80px",
"text-overflow": "ellipsis",
"overflow": "hidden",
"max-width": "100px",
"white-space": "nowrap"
}
}
},
formatter: function (value, row, index) {
var html = $.common.sprintf("<input class='form-control' type='text' name='warehousingCheckList[%s].note' value='%s'>", index, value);
return html;
}
},
{
field: 'batchNumber',
align: 'center',
title: '生产批号/批号',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input class='form-control' type='text' name='warehousingCheckList[%s].batchNumber' value='%s'>", index, value);
return html;
}
},
{
field: 'notcieTime',
align: 'center',
title: '该条数据生成时间',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='warehousingCheckList[%s].notcieTime' value='%s'>", index, value);
return html;
}
},
{
field: 'checkTime',
align: 'center',
title: '检验时间',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='warehousingCheckList[%s].checkTime' value='%s'>", index, value);
return html;
}
},
{
field: 'isQualified',
align: 'center',
title: '是否通过标记',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='warehousingCheckList[%s].isQualified' value='%s'>", index, value);
return html;
}
},
{
field: 'inspector',
align: 'center',
title: '检验人',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input readonly class='form-control' type='text' name='warehousingCheckList[%s].inspector' value='%s'>", index, value);
return html;
}
},
{
field: 'spell1',
align: 'center',
title: '',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input class='form-control' type='text' name='warehousingCheckList[%s].spell1' value='%s'>", index, value);
return html;
}
},
{
field: 'spell2',
align: 'center',
title: '',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input class='form-control' type='text' name='warehousingCheckList[%s].spell2' value='%s'>", index, value);
return html;
}
},
{
field: 'spell3',
align: 'center',
title: '',
formatter: function (value, row, index) {
var html = $.common.sprintf("<input class='form-control' type='text' name='warehousingCheckList[%s].spell3' value='%s'>", index, value);
return html;
}
}]
};
$.table.init(options);
});
function addColumn() {
var count = $("#" + table.options.id).bootstrapTable('getData').length;
sub.editColumn();
$("#" + table.options.id).bootstrapTable('insertRow', {
index: count,
row: {
index: $.table.serialNumber(count),
materialCode: "",
materialName: "",
specificationModel: "",
machineType: "",
unit: "",
orderAmt: "",
qualifiedAmt: "",
unqualifiedAmt: "",
qualifiedRate: "",
note: "",
batchNumber: "",
notcieTime: "",
checkTime: "",
isQualified: "",
inspector: "",
spell1: "",
spell2: "",
spell3: ""
}
});
}
//获取订购单号
function getPurchaseOrder() {
$.form.reset();
window.location.href = prefix + "/getPurchaseOrder";
}
// 获取制工单号
function getManufactureOrder() {
$.form.reset();
window.location.href = prefix + "/getManufactureOrder";
}
// 获取委外加工单号
function getOutWorkOrder() {
$.form.reset();
window.location.href = prefix + "/getOutWorkOrder";
}
// function modifyInfo() {
// let row = $("#bootstrap-table").bootstrapTable("getSelections");
// window.location.href=ctx + "stock/notice"+"/choosePurchaseOrder/"+row[0].poNo;
// }
function setWarehouseNo() {
var item = $("select[name=warehouseName]").find("option:selected").attr("name");
// alert(item);
$(".warehouseNo").val(item)
}
window.onload = function () {
addColumn()
}
</script>
</body>
</html>