From 7bb3ffb383e41f66ea9e89b8b0f8182726e77d1b Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 27 一月 2026 15:14:07 +0800
Subject: [PATCH] 华舟 新增 器具保养规程 器具点检规程 设备点检规程 设备保养规程 的默认结果选择
---
WebTM/views/计划管理/工艺路线/Gy_MaterialTechParamBillMain.html | 192 +++++++++++++++++++++++++++++++----------------
1 files changed, 126 insertions(+), 66 deletions(-)
diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_MaterialTechParamBillMain.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_MaterialTechParamBillMain.html"
index 6b745b2..6ac7d53 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_MaterialTechParamBillMain.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_MaterialTechParamBillMain.html"
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
- <title>浜у搧鍣ㄥ叿娓呭崟</title>
+ <title>浜у搧宸ヨ壓鍙傛暟娓呭崟</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
@@ -25,14 +25,19 @@
font-size: 16px;
}
/* 闃叉涓嬫媺妗嗙殑涓嬫媺鍒楄〃琚殣钘�---蹇呴』璁剧疆--- */
- .layui-table-cell {
+/* .layui-table-cell {
overflow: visible !important;
+ }*/
+
+ td:has(select) .layui-table-cell {
+ overflow: visible !important;
+ padding: 0;
}
/* 浣垮緱涓嬫媺妗嗕笌鍗曞厓鏍煎垰濂藉悎閫� */
td .layui-form-select {
margin-top: -10px;
- margin-left: -15px;
- margin-right: -15px;
+ /* margin-left: -15px;
+ margin-right: -15px;*/
}
.layui-form-item .layui-inline {
@@ -60,13 +65,13 @@
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button>
- <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CloseBill" id="set_CloseBill">鍏抽棴</button>
- <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelCloseBill" id="set_CancelCloseBill">鍙嶅叧闂�</button>
+ <!--<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CloseBill" id="set_CloseBill">鍏抽棴</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CancelCloseBill" id="set_CancelCloseBill">鍙嶅叧闂�</button>-->
</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>
+ <li lay-id="2" style="padding:1px;">鍒跺崟淇℃伅</li>
</ul>
<div class="layui-tab-content">
<!--鍩烘湰淇℃伅-->
@@ -350,6 +355,12 @@
<option value="鏃�">鏃�</option>
</select>
</script>
+ <!--澶嶉�夋 鏄惁蹇呭綍鎺у埗-->
+ <script type="text/html" id="HIsRequired">
+ <div class="layui-input-block" style="margin-left: 20px;">
+ <input type="checkbox" name="HIsRequired" lay-filter="HIsRequired" id="HIsRequired{{d.LAY_TABLE_INDEX+1}}" lay-skin="primary">
+ </div>
+ </script>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
</script>
@@ -413,27 +424,27 @@
$("#HMaker").val(sessionStorage["HUserName"]);
$("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd"));
}
- //else if (OperationType == 2) {
-
- // RoadBillMain(linterid);
- // $.ajax({
- // url: GetWEBURL() + "/Web/GetMAXNum",
- // type: "GET",
- // async: false,
- // data: { "HBillType": '3301' },
- // success: function (d) {
- // $("#HInterID").val(d.data[0].HInterID);
- // $("#HBillNo").val(d.data[0].HBillNo);
- // $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
- // }
- // });
- //}
+ else if (OperationType == 2) {
+ //鍒濆鍖栬〃鏍�
+ get_InitGrid();
+ RoadBillMain(linterid);
+ $.ajax({
+ url: GetWEBURL() + "/Web/GetMAXNum",
+ type: "GET",
+ async: false,
+ data: { "HBillType": '3334' },
+ success: function (d) {
+ $("#HInterID").val(d.data[0].HInterID);
+ $("#HBillNo").val(d.data[0].HBillNo);
+ $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ }
+ });
+ }
else if (OperationType == 3) {
//绂佺敤鎸夐挳
var num = 1;
HfBtn(num);
- debugger;
//鍒濆鍖栬〃鏍�
get_InitGrid();
@@ -550,6 +561,17 @@
}
});
});
+ //鏄惁 蹇呭綍鎺у埗
+ form.on('checkbox(HIsRequired)', 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.HIsRequired = data.elem.checked;//鎶婇�変腑涓嬫媺妗唅d鍊艰祴鍊肩粰琛ㄦ牸缂撳瓨
+ }
+ });
+ });
//#endregion
//澶村伐鍏锋爮浜嬩欢
@@ -569,11 +591,12 @@
"HMin": "0",
"HDataForm": "璁惧閲囬泦",
"HDataUnit": "绉�",
+ "HIsRequired": false,
"HDataTimes": "0",
"HTechParamClassID": "0",
"HSNO": "0",
"HStdNextTimes": "0",
- "HTechParamIDStd":"0",
+ "HTechParamIDStd": "0",
"HSourceBillNo": "0",
"HSourceBillType": "0",
"HSourceEntryID": "0",
@@ -587,8 +610,12 @@
for (var i = 1; i <= option.data.length; i++) {
$('#HDataUnit' + i + '').find("option[value='" + option.data[i - 1].HDataUnit + "']").attr("selected", true);
$('#HDataForm' + i + '').find("option[value='" + option.data[i - 1].HDataForm + "']").attr("selected", true);
+ if (option.data[i - 1].HIsRequired) {
+ $('#HIsRequired' + i + '').attr("checked", true);
+ }
}
form.render('select');
+ form.render('checkbox');
break;
case 'btn-CopyLine':
var copydata = JSON.stringify(data);
@@ -607,9 +634,12 @@
for (var i = 1; i <= option.data.length; i++) {
$('#HDataUnit' + i + '').find("option[value='" + option.data[i - 1].HDataUnit + "']").attr("selected", true);
$('#HDataForm' + i + '').find("option[value='" + option.data[i - 1].HDataForm + "']").attr("selected", true);
+ if (option.data[i - 1].HIsRequired) {
+ $('#HIsRequired' + i + '').attr("checked", true);
+ }
}
form.render('select');
-
+ form.render('checkbox');
}
break;
@@ -663,6 +693,7 @@
, { field: 'HMax', title: '涓婇檺', edit: 'text', totalRow: true }
, { field: 'HMin', title: '涓嬮檺', edit: 'text', totalRow: true }
, { field: 'HDataForm', title: '閲囬泦鏉ユ簮', templet: '#HDataForm-select' }
+ , { field: 'HIsRequired', title: '鏄惁蹇呭綍', templet: "#HIsRequired", }
, { field: 'HDataUnit', title: '閲囬泦鏃堕棿鍗曚綅', templet: '#HDataUnit-select' }
, { field: 'HDataTimes', title: '閲囬泦鍛ㄦ湡棰戠巼', edit: 'text', totalRow: true }
, { field: 'HTechParamClassID', title: '宸ヨ壓鍙傛暟澶х被', hide: true }
@@ -674,7 +705,31 @@
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
]]
}
- option.data = [];
+ var rowdata = [
+ {
+ "HTechParamID": 0,
+ "HTechParamNumber": "",
+ "HTechParamName": "",
+ "HTechParamUnitID": 0,
+ "HTechParamUnitName": "",
+ "HStd": "0",
+ "HMax": "0",
+ "HMin": "0",
+ "HDataForm": "璁惧閲囬泦",
+ "HDataUnit": "绉�",
+ "HDataTimes": "0",
+ "HTechParamClassID": "0",
+ "HTechParamClassName": "",
+ "HSNO": "0",
+ "HStdNextTimes": "0",
+ "HTechParamIDStd": "0",
+ "HSourceBillNo": "0",
+ "HSourceBillType": "0",
+ "HSourceEntryID": "0",
+ "HSourceInterID": "0"
+ }
+ ];
+ option.data = rowdata;
table.render(option);
}
@@ -713,7 +768,7 @@
shift: 2,
area: ['90%', '90%'],
maxmin: true,
- content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
+ content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2&HOrgID=' + sessionStorage['Organization'], 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -837,7 +892,7 @@
, area: ['90%', '90%']//澶у皬
, title: '宸ュ簭琛�'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html', 'yes']
+ , content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Process.html?openType=2', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -866,7 +921,7 @@
, area: ['90%', '90%']//澶у皬
, title: '璁惧缂栫爜琛�'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html', 'yes']
+ , content: ['../../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html?openType=2', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -895,7 +950,7 @@
, area: ['90%', '90%']//澶у皬
, title: '宸ュ簭琛�'//鏍囬
, shift: 2//寮瑰嚭鍔ㄧ敾
- , content: ['../../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html', 'yes']
+ , content: ['../../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html?openType=2', 'yes']
, btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
@@ -939,21 +994,23 @@
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- table.cache["mainTable"].splice(0, 1);
+ table.cache["mainTable"] = table.cache["mainTable"].filter(row => row.HTechParamID !== 0 && row.HTechParamID !== undefined);
for (var rowData of checkStatus.data) {
var NewRow = {
"HTechParamID": rowData.HItemID,
"HTechParamNumber": rowData.宸ヨ壓鍙傛暟浠g爜,
"HTechParamName": rowData.宸ヨ壓鍙傛暟鍚嶇О,
- "HTechParamUnitID": 0,
- "HTechParamUnitName": "",
+ "HTechParamUnitID": rowData.HUnitID,
+ "HTechParamUnitName": rowData.宸ヨ壓鍙傛暟鍗曚綅,
"HStd": "0",
"HMax": "0",
"HMin": "0",
- "HDataForm": "鎵嬪伐褰曞叆",
+ "HDataForm": "璁惧閲囬泦",
+ "HIsRequired": false,
"HDataUnit": "绉�",
"HDataTimes": "0",
- "HTechParamClassID": "0",
+ "HTechParamClassID": rowData.HClassID,
+ "HTechParamClassName": rowData.宸ヨ壓鍙傛暟澶х被,
"HSNO": "0",
"HStdNextTimes": "0",
"HTechParamIDStd": "0",
@@ -965,34 +1022,20 @@
table.cache["mainTable"].push(NewRow);
}
option.data = table.cache["mainTable"];
- table.render(option);
-
- //for (var i = 0; i < checkStatus.data.length; i++) {
- // option.data.push({
- // "HTechParamID": checkStatus.data[i].HItemID,
- // "HTechParamNumber": checkStatus.data[i].宸ヨ壓鍙傛暟浠g爜,
- // "HTechParamName": checkStatus.data[i].宸ヨ壓鍙傛暟鍚嶇О,
- // })
- //}
-
-
- //obj.update({
- // "HTechParamID": checkStatus.data[0].HItemID,
- // "HTechParamNumber": checkStatus.data[0].宸ヨ壓鍙傛暟浠g爜,
- // "HTechParamName": checkStatus.data[0].宸ヨ壓鍙傛暟鍚嶇О,
-
- //});
- //table.render(option);
+ table.render(option);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, end: function () {
if (OptionData.length > 0) {
//鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
obj.update({
- "HTechParamID": OptionData[0].HItemID,
- "HTechParamNumber": OptionData[0].宸ヨ壓鍙傛暟浠g爜,
- "HTechParamName": OptionData[0].宸ヨ壓鍙傛暟鍚嶇О,
-
+ "HTechParamID": OptionData[0]['HItemID'],
+ "HTechParamNumber": OptionData[0]['宸ヨ壓鍙傛暟浠g爜'],
+ "HTechParamName": OptionData[0]['宸ヨ壓鍙傛暟鍚嶇О'],
+ "HTechParamUnitID": OptionData[0]['HUnitID'],
+ "HTechParamUnitName": OptionData[0]['宸ヨ壓鍙傛暟鍗曚綅'],
+ "HTechParamClassID": OptionData[0]['HClassID'],
+ "HTechParamClassName": OptionData[0]['宸ヨ壓鍙傛暟澶х被'],
});
OptionData = [];
}
@@ -1050,7 +1093,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechnologyParameterClass.html', 'yes'],
+ content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_TechnologyParameterType.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
@@ -1061,7 +1104,7 @@
}
obj.update({
"HTechParamClassID": checkStatus.data[0].HItemID,
- "HTechParamClassName": checkStatus.data[0].宸ヨ壓鍙傛暟澶х被鍚嶇О,
+ "HTechParamClassName": checkStatus.data[0].宸ヨ壓鍙傛暟鍒嗙被鍚嶇О,
});
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
@@ -1277,7 +1320,7 @@
{
$.ajax({
- url: GetWEBURL() + "Gy_MaterialTechParamBill/Gy_MaterialTechParamBillMainEditList",
+ url: GetWEBURL() + "/Gy_MaterialTechParamBill/Gy_MaterialTechParamBillMainEditList",
async: false,
type: "GET",
data: {
@@ -1289,8 +1332,8 @@
var tableSub = result.data[1];
//涓昏〃
form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
- "HInterID": tableMain[0]["HInterID"]
- , "HBillNo": tableMain[0]["鍗曟嵁鍙�"]
+ "HInterID": OperationType == 2 ? "" : tableMain[0]["HInterID"]
+ , "HBillNo": OperationType == 2 ? "" : tableMain[0]["鍗曟嵁鍙�"]
, "HDate": Format(new Date(tableMain[0]["鏃ユ湡"]), "yyyy-MM-dd")
, "HMaterID": tableMain[0]["HMaterID"]
, "HMaterNumber": tableMain[0]["鐗╂枡浠g爜"]
@@ -1315,7 +1358,7 @@
, "HRemark": tableMain[0]["琛ㄥご澶囨敞"]
, "HOrgID": tableMain[0].HOrgID
, "HMaker": tableMain[0]["鍒跺崟浜�"]
- , "HUpDater": tableMain[0]["淇敼浜�"]
+ , "HUpdater": tableMain[0]["淇敼浜�"]
, "HChecker": tableMain[0]["瀹℃牳浜�"]
, "HMakeDate": tableMain[0]["鍒跺崟鏃ユ湡"] == null ? "" : Format(new Date(tableMain[0]["鍒跺崟鏃ユ湡"]), "yyyy-MM-dd")
, "HUpDateDate": tableMain[0]["淇敼鏃堕棿"] == null ? "" : Format(new Date(tableMain[0]["淇敼鏃堕棿"]), "yyyy-MM-dd")
@@ -1323,13 +1366,18 @@
, "HCloseMan": tableMain[0]["鍏抽棴浜�"]
, "HCloseDate": tableMain[0]["鍏抽棴鏃堕棿"] == null ? "" : Format(new Date(tableMain[0]["鍏抽棴鏃堕棿"]), "yyyy-MM-dd")
});
+
+
//瀛愯〃 璧嬪��
option.data = tableSub;
- console.log(tableSub)
table.render(option);
for (var i = 1; i <= option.data.length; i++) {
- $('#HDataUnit' + i).find("option[value='" + option.data[i - 1].HDataUnit + "']").attr("selected", true).trigger("change");;
- $('#HDataForm' + i).find("option[value='" + option.data[i - 1].HDataForm + "']").attr("selected", true).trigger("change");;
+ if (option.data[i-1].HIsRequired) {
+ $('#HIsRequired' + i).attr("checked", true);
+ }
+ $('#HDataUnit' + i).find("option[value='" + option.data[i - 1].HDataUnit + "']").attr("selected", true).trigger("change");
+ $('#HDataForm' + i).find("option[value='" + option.data[i - 1].HDataForm + "']").attr("selected", true).trigger("change");
+
}
form.render('select');
form.render('checkbox');
@@ -1363,8 +1411,12 @@
for (var i = 0; i < table.cache["mainTable"].length; i++) {
if (table.cache["mainTable"][i] != "") {
table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+ table.cache["mainTable"][i].HTechParamIDStd == null ? 0 : table.cache["mainTable"][i].HTechParamIDStd
num.push(table.cache["mainTable"][i])
}
+
+
+
}
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(num);
@@ -1598,6 +1650,14 @@
}
}
+ // 鐗╂枡
+ function GetGyMaterial(obj) {
+ $("#HMaterID").val( obj.HItemID);
+ $("#HMaterNumber").val(obj.鐗╂枡浠g爜);
+ $("#HMaterName").val( obj.鐗╂枡鍚嶇О);
+ $("#HMaterModel").val( obj.瑙勬牸鍨嬪彿);
+ }
+
//宸ヨ壓鍙傛暟
function GetParameterValue(obj) {
OptionData = obj;
--
Gitblit v1.9.1