<!DOCTYPE html>
|
<html>
|
<head>
|
<meta charset="utf-8" />
|
<title>工序派工编辑</title>
|
<link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
|
<link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
|
<script src="../../../layuiadmin/layui/layui.js"></script>
|
<script src="../../../layuiadmin/Scripts/json2.js"></script>
|
<script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
|
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
|
<script src="../../../layuiadmin/PubCustom.js"></script>
|
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
|
<style>
|
.main-btn { /*头部主按钮*/
|
padding: 0 2px; /*调整按钮左右空隙大小*/
|
height: 30px;
|
line-height: 30px;
|
}
|
|
.btn-title {
|
font-size: 16px;
|
}
|
/* 防止下拉框的下拉列表被隐藏---必须设置--- */
|
.layui-table-cell {
|
overflow: visible !important;
|
}
|
/* 使得下拉框与单元格刚好合适 */
|
td .layui-form-select {
|
margin-top: -10px;
|
margin-left: -15px;
|
margin-right: -15px;
|
}
|
|
.layui-form-item .layui-inline {
|
margin-top: 5px;
|
margin-bottom: 5px;
|
margin-right: 0px;
|
}
|
|
.layui-form-label {
|
width: 25%;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="layui-fluid" style="padding: 0;">
|
<div class="layui-card" style="padding: 15px;">
|
<div class="layui-card-body" style="padding: 1px;">
|
<form class="layui-form" lay-filter="component-form-group" action="">
|
<div class="layui-card-header">
|
<div class="layui-btn-group">
|
<button type="button" id="btnSave" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btnSave">保存</button>
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">退出</button>
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn_print">打印</button>
|
<!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="HideColumn" id="HideColumn">隐藏列设置</button>-->
|
</div>
|
</div>
|
<div class="layui-tab" lay-filter="tab-POStockInBill">
|
<ul class="layui-tab-title" lay-filter="tab-all">
|
<li lay-id="1" style="padding:1px;" class="layui-this">基本信息</li>
|
<li lay-id="2" style="padding:1px;">其他信息</li>
|
</ul>
|
<div class="layui-tab-content">
|
<!--基本信息-->
|
<div class="layui-tab-item layui-show">
|
<div class="layui-form-item" style="padding-top: 10px;">
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">单据号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HInterID" id="HInterID" value="0">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">任务单号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HICMOBillNo" id="HICMOBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HICMOInterID" id="HICMOInterID" value="0">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">工序计划单号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HProcPlanBillNo" id="HProcPlanBillNo" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">销售订单号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HSeOrderBillNo" id="HSeOrderBillNo" style="background-color:#efefef4d;" readonly>
|
<input type="hidden" name="HSeOrderInterID" id="HSeOrderInterID" value="0">
|
<input type="hidden" name="HSeOrderEntryID" id="HSeOrderEntryID" value="0">
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline" >
|
<label class="layui-form-label">日期</label>
|
<div class="layui-input-inline">
|
<input type="date" class="layui-input" name="HDate" id="HDate">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">工序计划<br>开工日期</label>
|
<div class="layui-input-inline" >
|
<input type="date" class="layui-input" name="HPlanBeginDate" id="HPlanBeginDate">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">工序计划<br>完工日期</label>
|
<div class="layui-input-inline" >
|
<input type="date" class="layui-input" name="HPlanEndDate" id="HPlanEndDate">
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline" >
|
<label class="layui-form-label">批号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HBatchNo" id="HBatchNo" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">工序代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HProcNumber" id="HProcNumber" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HProcID" id="HProcID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchProc" id="btnSearchProc" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">工序名称</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HProcName" id="HProcName" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">部门代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HDeptNumber" id="HDeptNumber" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HDeptID" id="HDeptID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchDep" id="btnSearchDep" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">部门名称</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HDeptName" id="HDeptName" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">产品代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HMaterID" id="HMaterID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchMater" id="btnSearchMater" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">产品名称</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">规格型号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HMaterModel" id="HMaterModel" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">工序计划<br>生产数量</label>
|
<div class="layui-input-inline" >
|
<input type="text" class="layui-input" name="HPlanQty" id="HPlanQty" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">班组代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HGroupNumber" id="HGroupNumber" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HGroupID" id="HGroupID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchGroup" id="btnSearchGroup" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">班组名称</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HGroupName" id="HGroupName" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">单位代码</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HUnitNumber" id="HUnitNumber" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
|
<input type="hidden" name="HUnitID" id="HUnitID" value="0">
|
<button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearchUnit" id="btnSearchUnit" style="width: 40px;">
|
<i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
|
</button>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">单位名称</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HUnitName" id="HUnitName" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
|
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">内部单据号</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HInnerBillNo" id="HInnerBillNo" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-col-xs3 layui-inline">
|
<label class="layui-form-label">摘要</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HExplanation" id="HExplanation" style="background-color:#efefef4d;" readonly>
|
</div>
|
<!--工艺路线ID-->
|
<div class="layui-input-inline">
|
<input type="hidden" name="HRoutingInterID" id="HRoutingInterID" value="0">
|
</div>
|
</div>
|
<div class="layui-col-xs6 layui-inline">
|
<label class="layui-form-label" style="width:12.5%">备注</label>
|
<div class="layui-input-inline">
|
<input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="请输入内容" onmouseover="this.title=this.value" style="width:537px;">
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<!--其他信息-->
|
<div class="layui-tab-item">
|
<div class="layui-form-item">
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">制单人</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">审核人</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HChecker" id="HChecker" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">关闭人</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HCloseMan" id="HCloseMan" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">制单日期</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HMakeDate" id="HMakeDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">审核日期</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HCheckDate" id="HCheckDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">关闭日期</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HCloseDate" id="HCloseDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">修改人</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">作废人</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HDeleteMan" id="HDeleteMan" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
<div class="layui-row">
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">修改日期</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
<div class="layui-inline">
|
<label class="layui-form-label" style="width: 85px;">作废日期</label>
|
<div class="layui-input-block" style="margin-left: 120px;">
|
<input type="text" class="layui-input" name="HDeleteDate" id="HDeleteDate" style="background-color:#efefef4d;" readonly>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
|
<script type="text/html" id="toolbarDemo">
|
<div class="layui-btn-container">
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>增加一行</button>
|
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>复制一行</button>
|
</div>
|
</script>
|
</form>
|
</div>
|
</div>
|
</div>
|
</body>
|
</html>
|
<script type="text/html" id="barDemo">
|
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
|
</script>
|
<!--行下拉选择(是否委外)-->
|
<script type="text/html" id="HSupFlag">
|
<select name="HSupFlag" lay-filter="HSupFlag" id="HSupFlag{{d.LAY_TABLE_INDEX+1}}">
|
<option value="false">否</option>
|
<option value="true">是</option>
|
</select>
|
</script>
|
<script>
|
layui.config({
|
base: '../../../layuiadmin/' //静态资源所在路径
|
}).extend({
|
index: 'lib/index' //主入口模块
|
}).use(['index', 'form', 'laydate', 'table', 'element'], function () {
|
//#region 公共变量
|
|
var $ = layui.$
|
, admin = layui.admin
|
, layer = layui.layer
|
, table = layui.table
|
, form = layui.form
|
, laydate = layui.laydate
|
, element = layui.element;
|
var option;
|
|
//#endregion
|
|
//#region 进入页面即加载
|
|
//初始化界面
|
set_ClearBill();
|
|
var params = get_UrlVars();
|
if (typeof (params[params[0]]) == "undefined") {
|
var OperationType = -1;//操作类型
|
} else {
|
var OperationType = params[params[0]];//操作类型
|
var linterid = params[params[1]];//源单id
|
var HEntryID = params[params[2]];//源单子id
|
}
|
|
//工序派工新增
|
if (OperationType == 1) {
|
$.ajax({
|
url: GetWEBURL() + "/Web/GetMAXNum",
|
type: "GET",
|
data: { "HBillType": '3712' },
|
success: function (d) {
|
//$("#HInterID").val(d.data[0].HInterID);
|
$("#HBillNo").val(d.data[0].HBillNo);
|
$("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
|
$("#HMaker").val(sessionStorage["HUserName"]);
|
}
|
});
|
|
//查询工序流转卡
|
get_ProcessExchange();
|
} else if (OperationType == 3) {
|
RoadBillMain(linterid);
|
}
|
|
//#endregion
|
|
//#region 触发事件:包括form.on(){}格式的所有点击事件、选择事件等
|
|
//选择负责人
|
form.on('submit(btnHEmpID)', function () {
|
get_btnHEmpID();
|
});
|
|
//行选择处理(是否委外)
|
form.on('select(HSupFlag)', function (data) {
|
//获取下拉框选中的值
|
var elem = data.othis.parents('tr');
|
var dataindex = elem.attr("data-index");
|
$.each(option.data, function (index, value) {
|
if (value.LAY_TABLE_INDEX == dataindex) {
|
value.HSupFlag = data.value;//把选中下拉框id值赋值给表格缓存
|
}
|
});
|
});
|
|
//头工具栏事件
|
table.on('toolbar(mainTable)', function (obj) {
|
var checkStatus = table.checkStatus('mainTable')
|
, data = checkStatus.data;
|
//新增行表格数据
|
var NewRow = {
|
"HProcID": 0, "HProcNumber": "", "HProcName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "",
|
"HWorkerID": 0, "HWorkerNumber": "", "HWorkerName": "", "HQty": 0, "HPlanBeginDate": "", "HPlanEndDate": "",
|
"HPlanTimes": 0,"HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", "HICMOBillNo": "", "HICMOInterID": 0,
|
"HProcPlanInterID": 0, "HProcPlanEntryID": 0, "HProcPlanBillNo": "", "HRemark": "",
|
"HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HRelationQty": 0, "HRelationMoney": 0
|
};
|
|
switch (obj.event) {
|
case 'btn-AddLine':
|
table.cache["mainTable"].push(NewRow);
|
option.data = table.cache["mainTable"];
|
table.render(option);
|
for (var i = 1; i <= option.data.length; i++) {
|
$('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
|
}
|
form.render('select');
|
break;
|
case 'btn-CopyLine':
|
var copydata = JSON.stringify(data);
|
if (data.length <= 0) {
|
layer.msg("请选择需要复制的一行!");
|
}
|
else if (data.length > 1) {
|
layer.msg("只能选择复制一行!");
|
}
|
else {
|
var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
|
var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
|
table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
|
option.data = table.cache["mainTable"];//将数据绑定到data上
|
table.render(option);//将数据渲染到表格上
|
for (var i = 1; i <= option.data.length; i++) {
|
$('#HSupFlag' + i + '').find("option[value='" + option.data[i - 1].HSupFlag + "']").attr("selected", true);
|
}
|
form.render('select');
|
}
|
break;
|
}
|
});
|
|
//行内事件
|
table.on('tool(mainTable)', function (obj) {
|
var data = obj.data;
|
var rowIndex = $(obj.tr).attr("data-index");
|
if (obj.event === 'del') {
|
layer.confirm('真的删除行吗?', function (index) {
|
if (rowIndex === '0') {
|
layer.msg('首行无法删除!!!');
|
} else {
|
obj.del();
|
option.data = table.cache["mainTable"];//将数据绑定到data上
|
layer.close(index);
|
}
|
});
|
}
|
|
var data = obj.data;
|
if (obj.event == 'HPlanEndDate') {
|
var field = $(this).data('field');
|
laydate.render({
|
elem: this.firstChild
|
, show: true //直接显示
|
, closeStop: this
|
, done: function (nowDate) {
|
//时间选择完成,行数据更新
|
data[field] = nowDate;
|
obj.update(data);
|
//刷新复选框
|
//checkRefresh();
|
}
|
});
|
}
|
if (obj.event == 'HPlanBeginDate') {
|
var field = $(this).data('field');
|
laydate.render({
|
elem: this.firstChild
|
, show: true //直接显示
|
, closeStop: this
|
, done: function (nowDate) {
|
//时间选择完成,行数据更新
|
data[field] = nowDate;
|
obj.update(data);
|
//刷新复选框
|
//checkRefresh();
|
}
|
});
|
}
|
|
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
|
if (event.key == "F7") {
|
if (obj.event == 'HProcCheck') {
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '工序列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index];
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
obj.update({
|
HProcName: checkStatus.data[0].工序
|
, HProcID: checkStatus.data[0].HItemID
|
, HProcNumber: checkStatus.data[0].工序代码
|
});
|
|
layer.close(layer.index);
|
}
|
, btn2: function (index, layero) {
|
},
|
end: function () {
|
|
}
|
});
|
}
|
if (obj.event == 'HGroupCheck') {
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '班组列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../../../views/基础资料/工资基础资料/Gy_Group.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index];
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
obj.update({
|
HGroupName: checkStatus.data[0].班组名称
|
, HGroupID: checkStatus.data[0].HItemID
|
, HGroupNumber: checkStatus.data[0].班组代码
|
});
|
|
layer.close(layer.index);
|
}
|
, btn2: function (index, layero) {
|
},
|
end: function () {
|
|
}
|
});
|
}
|
if (obj.event == 'HWorkerCheck') {
|
layer.open({
|
type: 2,
|
skin: 'layui-layer-rim', //加上边框
|
title: '操作工列表',
|
closeBtn: 1,
|
shift: 2,
|
area: ['90%', '90%'],
|
maxmin: true,
|
content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html', 'yes'],
|
btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index];
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
obj.update({
|
HWorkerName: checkStatus.data[0].HName
|
, HWorkerID: checkStatus.data[0].HItemID
|
, HWorkerNumber: checkStatus.data[0].HNumber
|
});
|
|
layer.close(layer.index);
|
}
|
, btn2: function (index, layero) {
|
},
|
end: function () {
|
|
}
|
});
|
}
|
|
obj.event = "";
|
return false;
|
}
|
})
|
//单击改变不可编辑值
|
if (obj.event === 'isEditCheck') {
|
var flag = obj.data.isEdit;
|
var flagValue = obj.data.isEditValue;
|
if (flagValue === "false") {
|
flagValue = "true";
|
flag = "是";
|
}
|
else if (flagValue === "true") {
|
flagValue = "false";
|
flag = "否";
|
}
|
else {
|
flagValue = "false";
|
flag = "否";
|
}
|
obj.update({
|
isEdit: flag
|
, isEditValue: flagValue
|
});
|
}
|
});
|
|
//保存提交
|
form.on('submit(btnSave)', function (data) {//提交
|
//if (AllowLoadData(data)) {
|
set_AddNew(data);
|
//}
|
});
|
|
//退出
|
form.on('submit(Cancel)', function (data) {
|
if (OperationType != "") {
|
Pub_Close(1);
|
}
|
});
|
|
//选择工序弹窗
|
form.on('submit(btnSearchProc)', function () {//工序
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '工序'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../基础资料/生产基础资料/Gy_Process.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HProcNumber").val(checkStatus.data[0].工序代码);
|
$("#HProcName").val(checkStatus.data[0].工序名称);
|
$("#HProcID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
})
|
});
|
|
//选择部门弹窗
|
form.on('submit(btnSearchDep)', function () {//部门
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '部门'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HDeptNumber").val(checkStatus.data[0].部门代码);
|
$("#HDeptName").val(checkStatus.data[0].部门名称);
|
$("#HDeptID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
})
|
});
|
|
//选择班组弹窗
|
form.on('submit(btnSearchGroup)', function () {//班组
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '班组'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../基础资料/工资基础资料/Gy_Group.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HGroupNumber").val(checkStatus.data[0].班组代码);
|
$("#HGroupName").val(checkStatus.data[0].班组名称);
|
$("#HGroupID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
})
|
});
|
|
//选择产品弹窗
|
form.on('submit(btnSearchMater)', function () {//产品
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '产品'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../基础资料/公用基础资料/Gy_Material.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HMaterNumber").val(checkStatus.data[0].物料代码);
|
$("#HMaterName").val(checkStatus.data[0].物料名称);
|
$("#HMaterModel").val(checkStatus.data[0].规格型号);
|
$("#HMaterID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
})
|
});
|
|
//选择单位弹窗
|
form.on('submit(btnSearchUnit)', function () {//单位
|
layer.open({
|
type: 2
|
, area: ['80%', '80%']
|
, title: '单位'
|
, shade: 0.6 //遮罩透明度
|
//, maxmin: true //允许全屏最小化
|
, anim: 0 //0-6的动画形式,-1不开启
|
, content: ['../../Baseset/基础资料/Gy_UnitList.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {
|
|
//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
$("#HUnitNumber").val(checkStatus.data[0].HNumber);
|
$("#HUnitName").val(checkStatus.data[0].HName);
|
$("#HUnitID").val(checkStatus.data[0].HItemID);
|
layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
, btn2: function (index, layero) {
|
//按钮【按钮二】的回调
|
//return false 开启该代码可禁止点击该按钮关闭
|
},
|
end: function () {
|
|
},
|
success: function (layero, index) {
|
|
}
|
})
|
});
|
|
//#endregion
|
|
//#region 此页面所有的方法
|
// 初始化界面
|
function set_ClearBill() {
|
$("#HDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//开始日期
|
$("#HPlanBeginDate").val(Format(new Date(new Date()), "yyyy-MM-dd"));//工序计划开工日期
|
$("#HPlanEndDate").val(Format(new Date().setMonth(new Date().getMonth() + 1), "yyyy-MM-dd"));//工序计划完工日期
|
//初始化表格
|
set_InitGrid();
|
}
|
|
//初始化表格
|
function set_InitGrid() {
|
//表头
|
columns = [ //表头
|
{ type: 'checkbox', totalRowText: '合计行' }
|
, { type: 'numbers', title: '序号', totalRow: true }
|
, { field: 'HProcID', title: '工序ID', hide: true }
|
, { field: 'HProcNumber', title: '工序代码', edit: 'text', event: "HProcCheck" }
|
, { field: 'HProcName', title: '工序名称' }
|
, { field: 'HGroupID', title: '班组ID', hide: true }
|
, { field: 'HGroupNumber', title: '班组代码', edit: 'text', event: "HGroupCheck" }
|
, { field: 'HGroupName', title: '班组名称' }
|
, { field: 'HWorkerID', title: '操作工ID', hide: true }
|
, { field: 'HWorkerNumber', title: '操作工代码', edit: 'text', event: "HWorkerCheck" }
|
, { field: 'HWorkerName', title: '操作工名称' }
|
, { field: 'HQty', title: '派工数量', edit: 'text' }
|
, { field: 'HPlanBeginDate', title: '计划开工日期', width: 120, templet: "<div>{{d.HPlanBeginDate ==null ?'':layui.util.toDateString(d.HPlanBeginDate, 'yyyy-MM-dd')}}</div>", event: 'HPlanBeginDate' }
|
, { field: 'HPlanEndDate', title: '计划完工日期', width: 120, templet: "<div>{{d.HPlanEndDate ==null ?'':layui.util.toDateString(d.HPlanEndDate, 'yyyy-MM-dd')}}</div>", event: 'HPlanEndDate' }
|
, { field: 'HPlanTimes', title: '计划工时', edit: 'text' }
|
, { field: 'HSeOrderInterID', title: '销售订单主ID', hide: true }
|
, { field: 'HSeOrderEntryID', title: '销售子ID', hide: true }
|
, { field: 'HSeOrderBillNo', title: '销售订单号' }
|
, { field: 'HICMOBillNo', title: '任务单号' }
|
, { field: 'HICMOInterID', title: '任务单ID', hide: true }
|
, { field: 'HProcPlanInterID', title: '工序计划单ID', hide: true }
|
, { field: 'HProcPlanEntryID', title: '工序计划单子ID', hide: true }
|
, { field: 'HProcPlanBillNo', title: '工序计划单号' }
|
, { field: 'HRemark', title: '备注', edit: 'text'}
|
, { field: 'HSourceInterID', title: '源单ID', hide: true }
|
, { field: 'HSourceEntryID', title: '源单子ID', hide: true }
|
, { field: 'HSourceBillNo', title: '源单单号', width: 130 }
|
, { field: 'HRelationQty', title: '关联数量', edit: 'text' }
|
, { field: 'HRelationMoney', title: '关联金额', edit: 'text' }
|
, { fixed: 'right', title: '操作', toolbar: '#barDemo' }
|
];
|
option = {
|
id: 'mainTable'
|
, elem: '#mainTable'
|
, toolbar: '#toolbarDemo'
|
, page: false
|
, cellMinWidth: 120
|
, height: 400
|
, cols: [columns]
|
, limit: Number.MAX_VALUE//默认显示全部
|
, done: function (res, curr, count) {
|
option.data = res.data;
|
//去掉下拉框失焦事件否则在下拉框里输入值
|
$('.layui-form-select').find('input').unbind("blur");
|
//表格重载回显下拉框里的数据
|
$('tr').each(function (e) {
|
var $cr = $(this);
|
var dataIndex = $cr.attr("data-index");
|
$.each(option.data, function (index, value) {
|
if (value.LAY_TNDEX == dataIndex) {
|
$cr.find('input').val(value.HSupFlag);
|
}
|
});
|
});
|
}
|
, done: function (res, curr, count) {
|
|
}
|
};
|
option.data = [{
|
"HProcID": 0, "HProcNumber": "", "HProcName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "",
|
"HWorkerID": 0, "HWorkerNumber": "", "HWorkerName": "", "HQty": 0, "HPlanBeginDate": new Date(), "HPlanEndDate": new Date(),
|
"HPlanTimes": 0, "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", "HICMOBillNo": "", "HICMOInterID": 0,
|
"HProcPlanInterID": 0, "HProcPlanEntryID": 0, "HProcPlanBillNo": "", "HRemark": "",
|
"HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HRelationQty": 0, "HRelationMoney": 0
|
}];
|
table.render(option);
|
|
}
|
|
//负责人
|
function get_btnHEmpID() {
|
layer.open({
|
type: 2//弹窗类型
|
, skin: 'layui-layer-rim' //加上边框
|
, area: ['90%', '90%']//大小
|
, title: '职员表'//标题
|
, shift: 2//弹出动画
|
, content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes']
|
, btn: ['确定', '取消']
|
, btn1: function (index, layero) {//按钮【按钮一】的回调
|
var iframeWindow = window['layui-layer-iframe' + index] //获取弹框页面
|
var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
|
if (checkStatus.data.length === 0) {
|
return layer.msg('请选择数据');
|
}
|
//获取数据
|
$("#HEmpID").val(checkStatus.data[0].HItemID);//负责人id
|
$("#HEmpName").val(checkStatus.data[0].职员名称);//负责人名称
|
|
layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
|
}
|
})
|
}
|
|
//查询工序流转卡
|
function get_ProcessExchange() {
|
var sWhere = " where hmainid=" + linterid + " and (HEntryID=" + HEntryID + " or HEntryID>" + HEntryID + ") ";
|
//编辑加载数据
|
$.ajax({
|
url: GetWEBURL() + 'Sc_ProcExchWorkBackBill/GetProcessExchangeBillSub',
|
type: "GET",
|
data: { "sWhere": sWhere },
|
success: function (result) {
|
if (result.count == 1) {
|
$("#HProcNumber").val(result.data[0]["工序代码"]);
|
$("#HProcID").val(result.data[0]["HProcID"]);
|
$("#HProcName").val(result.data[0]["工序名称"]);
|
$("#HMaterNumber").val(result.data[0]["产品代码"]);
|
$("#HMaterID").val(result.data[0]["HMaterID"]);
|
$("#HMaterName").val(result.data[0]["产品名称"]);
|
$("#HMaterModel").val(result.data[0]["规格型号"]);
|
//$("#HGroupID").val(result.data[0]["HGroupID"]);
|
//$("#HGroupNumber").val(result.data[0]["班组代码"]);
|
//$("#HGroupName").val(result.data[0]["班组"]);
|
$("#HUnitID").val(result.data[0]["HUnitID"]);
|
$("#HUnitNumber").val(result.data[0]["单位代码"]);
|
$("#HUnitName").val(result.data[0]["单位"]);
|
$("#HPlanQty").val(result.data[0]["生产数量"]);
|
$("#HICMOBillNo").val(result.data[0]["任务单号"]);
|
$("#HICMOInterID").val(result.data[0]["hicmointerid"]);
|
|
//子表 赋值
|
var rowdata = [];
|
for (var i = 0; i < 1; i++) {
|
rowdata.push(
|
{
|
"HProcID": 0, "HProcNumber": "", "HProcName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "",
|
"HWorkerID": 0, "HWorkerNumber": "", "HWorkerName": "", "HQty": 0, "HPlanBeginDate": "", "HPlanEndDate": "",
|
"HPlanTimes": 0, "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", "HICMOBillNo": result.data[0]["任务单号"], "HICMOInterID": 0,
|
"HProcPlanInterID": 0, "HProcPlanEntryID": 0, "HProcPlanBillNo": "", "HRemark": "",
|
"HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": result.data[0]["单据号"], "HRelationQty": 0, "HRelationMoney": 0
|
}
|
)
|
}
|
option.data = rowdata;
|
table.render(option);
|
form.render('select');
|
} else {
|
layer.msg(result.code + result.Message, { icon: 5 });
|
}
|
}, error: function () {
|
layer.close(index0);
|
layer.alert("接口请求失败!", { icon: 5 });
|
}
|
});
|
|
}
|
|
//非空验证
|
function AllowLoadData(data) {
|
|
}
|
|
//保存HMaker
|
function set_AddNew(data) {
|
|
var num_1 = [];
|
for (var i = 0; i < table.cache["mainTable"].length; i++) {
|
if (table.cache["mainTable"][i] != "") {
|
table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
|
num_1.push(table.cache["mainTable"][i])
|
}
|
}
|
|
var sMainStr = JSON.stringify(data.field);
|
var sSubStr = JSON.stringify(num_1);
|
var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"];
|
|
var index = layer.load();
|
$.ajax({
|
type: "POST",
|
url: GetWEBURL() + "/Sc_ProcessSendWork/SaveProcessSendWork",
|
async: true,
|
data: { "msg": sMainSub },
|
dataType: "json",
|
success: function (data) {
|
if (data.count == 1) {
|
$('#btnSave').addClass("layui-btn-disabled").attr("disabled", true);
|
layer.close(index);
|
layer.msg("提交成功");
|
}
|
else {
|
layer.close(index);
|
layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
},
|
error: function (err) {
|
layer.close(index);
|
layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
|
}
|
});
|
}
|
|
//编辑 页面赋值
|
function RoadBillMain(linterid)//加载表头
|
{
|
var sWhere = " and hmainid=" + linterid;
|
$.ajax({
|
url: GetWEBURL() + "/Sc_ProcessSendWork/Sc_ProcessSendWorkList",
|
type: "GET",
|
async: false,
|
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
|
success: function (d) {
|
if (d.count == 1) {
|
//主表
|
$("#HBillNo").val(d.data[0]["单据号"]);
|
$("#HInterID").val(d.data[0]["hmainid"]);
|
$("#HDate").val(Format(d.data[0]["日期"], "yyyy-MM-dd"));
|
$("#HICMOBillNo").val(d.data[0]["生产任务单号"]);
|
$("#HICMOInterID").val(d.data[0]["HICMOInterID"]);
|
$("#HSeOrderBillNo").val(d.data[0]["销售订单号"]);
|
$("#HSeOrderInterID").val(d.data[0]["HSeOrderInterID"]);
|
|
//$("#HMaterNumber").val(d.data[0]["产品代码"]);
|
//$("#HMaterID").val(d.data[0]["HMaterID"]);
|
//$("#HMaterName").val(d.data[0]["产品名称"]);
|
//$("#HModel").val(d.data[0]["规格型号"]);
|
//$("#HUnitID").val(d.data[0]["HUnitID"]);
|
//$("#HUnitName").val(d.data[0]["单位"]);
|
//$("#HPlanQty").val(d.data[0]["订单数量"]);
|
//$("#HQty").val(d.data[0]["返工数量"]);
|
//$("#HProcBegName").val(d.data[0]["返工开始工序"]);
|
//$("#HProcBegID").val(d.data[0]["HProcBegID"]);
|
//$("#HProcEndName").val(d.data[1]["返工结束工序"]);
|
//$("#HProcEndID").val(d.data[1]["HProcEndID"]);
|
//$("#HProcExchBegNO").val(d.data[0]["返工开始流水号"]);
|
//$("#HProcExchEndNO").val(d.data[1]["返工结束流水号"]);
|
//$("#HPRDORGID").val(d.data[0]["HPRDORGID"]);
|
//$("#HPRDORGName").val(d.data[0]["组织"]);
|
//$("#HICMOBillNo").val(d.data[0]["生产订单号"]);
|
//$("#HICMOInterID").val(d.data[0]["HICMOInterID"]);
|
//$("#HICMOEntryID").val(d.data[0]["HICMOEntryID"]);
|
//$("#HOrderProcNO").val(d.data[0]["订单跟踪号"]);
|
//$("#HInnerBillNo").val(d.data[0]["内部单据号"]);
|
//$("#HRemark").val(d.data[0]["表头备注"]);
|
//$("#HMakeDate").val(d.data[0]["制单人"] == "" ? "" : Format(d.data[0]["制单日期"], "yyyy-MM-dd"));
|
//$("#HMaker").val(d.data[0]["制单人"]);
|
//$("#HCheckDate").val(d.data[0]["审核人"] == "" ? "" : Format(d.data[0]["审核日期"], "yyyy-MM-dd"));
|
//$("#HChecker").val(d.data[0]["审核人"]);
|
//$("#HCloseDate").val(d.data[0]["关闭人"] == "" ? "" : Format(d.data[0]["关闭日期"], "yyyy-MM-dd"));
|
//$("#HCloseMan").val(d.data[0]["关闭人"]);
|
//$("#HUpDateDate").val(d.data[0]["修改人"] == "" ? "" : Format(d.data[0]["修改日期"], "yyyy-MM-dd"));
|
//$("#HUpDater").val(d.data[0]["修改人"]);
|
//$("#HDeleteDate").val(d.data[0]["作废人"] == "" ? "" : Format(d.data[0]["作废日期"], "yyyy-MM-dd"));
|
//$("#HDeleteMan").val(d.data[0]["作废人"]);
|
|
var rowdata = [];
|
for (var i = 0; i < d.data.length; i++) {
|
//子表 赋值
|
rowdata.push({
|
"HProcID": 0, "HProcNumber": "", "HProcName": "", "HGroupID": 0, "HGroupNumber": "", "HGroupName": "",
|
"HWorkerID": 0, "HWorkerNumber": "", "HWorkerName": "", "HQty": 0, "HPlanBeginDate": new Date(), "HPlanEndDate": new Date(),
|
"HPlanTimes": 0, "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "", "HICMOBillNo": "", "HICMOInterID": 0,
|
"HProcPlanInterID": 0, "HProcPlanEntryID": 0, "HProcPlanBillNo": "", "HRemark": "",
|
"HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": "", "HRelationQty": 0, "HRelationMoney": 0
|
});
|
}
|
option.data = rowdata;
|
table.render(option);
|
|
for (var i = 0; i < d.data.length; i++) {
|
//委外标记
|
$('#HSupFlag' + (i + 1)).find("option[value='" + d.data[i].委外标记 + "']").attr("selected", true);
|
}
|
form.render('select');
|
} else {
|
layer.msg(result.code + result.Message, { icon: 5 });
|
}
|
}
|
})
|
}
|
|
function get_UrlVars() {
|
var vars = [], hash;
|
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
|
for (var i = 0; i < hashes.length; i++) {
|
hash = hashes[i].split('=');
|
vars.push(hash[0]);
|
vars[hash[0]] = hash[1];
|
}
|
return vars;
|
}
|
|
//#endregion
|
})
|
</script>
|