From 9d97d87a33ff3eae9fbf0cd2128c10bec237c12e Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 31 七月 2024 13:37:55 +0800
Subject: [PATCH] 基础资料-物料:页签名修改
---
WebTM/views/生产管理/生产开工单/Sc_Add_MESBeginWorkBillList.html | 201 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 139 insertions(+), 62 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
index 250faf5..2a87db1 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\345\274\200\345\267\245\345\215\225/Sc_Add_MESBeginWorkBillList.html"
@@ -319,6 +319,7 @@
</div>
<script>
//鑾峰彇鍙傛暟
+ var OptionData = [];
var HBillType = ""; //鍗曟嵁绫诲瀷
var HSourceInterID = ""; //婧愬崟涓诲唴鐮�
var HSourceEntryID = ""; //婧愬崟瀛愬唴鐮�
@@ -626,56 +627,11 @@
//淇濆瓨鎻愪氦
form.on('submit(Saver)', function (data) {
-
- var sMainStr = JSON.stringify(data.field);
- var sMainSub = sMainStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
- if (!AllowLoadData())//鏁版嵁楠岃瘉
- {
- return false;
- }
- $.ajax({
- type: "POST",
- url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESBeginWorkFrom", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- async: false,
- data: { "msg": sMainSub },
- dataType: "json",
- success: function (data) {
- if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
- layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
- //layer.close(layer.index);
- //window.parent.location.reload();
- if (data.Verify == "Y") //鑷姩瀹℃牳
- {
- layer.close(index);
- SaveVerify(); //瀹℃牳
- }
- else {
- layer.close(index);
- }
- });
-
- //layer.confirm(data.Message, {
- // btn: ['纭']
- //}, function (index) {
- // if (data.Verify == "Y") //鑷姩瀹℃牳
- // {
- // layer.close(index);
- // SaveVerify(); //瀹℃牳
- // }
- // else {
- // layer.close(index);
- // }
- //});
- }
- else {
- layer.alert(data.Message, { icon: 5 })
- }
- },
- error: function (err) {
- layer.alert(err, { icon: 5 })
- }
- })
+ //绂佺敤淇濆瓨鎸夐挳
+ $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
+ //鍒ゆ柇绯荤粺鍙傛暟鏄惁鍕鹃��
+ Xt_AllowLoadData(data);
+
});
//瀹℃牳鎸夐挳鎻愪氦
@@ -733,7 +689,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/PartInformation.html', 'yes'],
+ content: ['../../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -743,10 +699,10 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- $("#HMaterName").val(checkStatus.data[0].HName);
- $("#HMaterCode").val(checkStatus.data[0].HNumber);
+ $("#HMaterName").val(checkStatus.data[0].鐗╂枡鍚嶇О);
+ $("#HMaterNumber").val(checkStatus.data[0].鐗╂枡浠g爜);
$("#HMaterID").val(checkStatus.data[0].HItemID);
- $("#HMaterSpec").val(checkStatus.data[0].HModel);
+ $("#HMaterSpec").val(checkStatus.data[0].瑙勬牸鍨嬪彿);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -773,7 +729,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/SourceInformation.html', 'yes'],
+ content: ['../../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -783,7 +739,7 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- $("#HSourceName").val(checkStatus.data[0].HName);
+ $("#HSourceName").val(checkStatus.data[0].鐢熶骇璧勬簮鍚嶇О);
$("#HSourceID").val(checkStatus.data[0].HItemID);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -811,7 +767,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/UserInformation.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_EmployeeList.html?type=HEmp', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -821,7 +777,7 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- $("#HEmpName").val(checkStatus.data[0].HName);
+ $("#HEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
$("#HEmpID").val(checkStatus.data[0].HItemID);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -851,7 +807,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/GroupInformation.html', 'yes'],
+ content: ['../../鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_Group.html?type=HGroup', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -861,7 +817,7 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- $("#HGroupName").val(checkStatus.data[0].HName);
+ $("#HGroupName").val(checkStatus.data[0].鐝粍鍚嶇О);
$("#HGroupID").val(checkStatus.data[0].HItemID);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -889,7 +845,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/DeptInformation.html', 'yes'],
+ content: ['../../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -899,7 +855,7 @@
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
- $("#HDeptName").val(checkStatus.data[0].HName);
+ $("#HDeptName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
$("#HDeptID").val(checkStatus.data[0].HItemID);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
@@ -963,6 +919,112 @@
return Result;
}
+ //鍒ゆ柇绯荤粺鍙傛暟鏄惁閫変腑
+ function Xt_AllowLoadData(data2) {
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/Xt_AllowLoadData", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: false,
+ data: { "HKey": "Sc_MESBeginWorkBill_SwipeCardStart" },
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ if (data.Verify == "Y") //鍒峰崱楠岃瘉
+ {
+ layer.msg("闇�瑕佽繘琛屽埛鍗¢獙璇�!", { time: 1 * 1000, icon: 1 }, function (index) {
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: 'IC鍒峰崱',
+ closeBtn: 1,
+ shift: 2,
+ area: ['50%', '80%'],
+ maxmin: true,
+ content: '../../鐢熶骇绠$悊/鎶ュ伐鍙板伐搴�/寮�宸�/Sc_SwipeCardStart.html?HSourceInterID=' + HSourceInterID,
+ end: function () {
+ if (OptionData.length > 0) {
+ if (OptionData[0]["data"] == "1") {
+ save(data2);
+ } else if (OptionData[0]["data"] == "0") {
+ layer.msg("鍥犱负鎶�鑳戒笉鍖归厤,鏃犳硶淇濆瓨!")
+ }
+ OptionData = [];
+ } else {
+ $('#Saver').removeClass("layui-btn-disabled").attr("disabled", false);
+ }
+ }
+ });
+ });
+ }
+ else {
+ save(data2);
+ }
+ }
+ else {
+ layer.alert(data.Message, { icon: 5 })
+ }
+ },
+ error: function (err) {
+ layer.alert(err, { icon: 5 })
+ }
+ })
+ }
+
+ function save(data) {
+ var index = layer.load();
+ var sMainStr = JSON.stringify(data.field);
+ var sMainSub = sMainStr + ';' + sessionStorage["HUserName"] + ';' + refSav;
+ if (!AllowLoadData())//鏁版嵁楠岃瘉
+ {
+ return false;
+ }
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESBeginWorkFrom", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: false,
+ data: { "msg": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
+ layer.msg(data.Message, { time: 1 * 2000, icon: 1 }, function (index) {
+ //layer.close(layer.index);
+ //window.parent.location.reload();
+ if (data.Verify == "Y") //鑷姩瀹℃牳
+ {
+ layer.close(index);
+ SaveVerify(); //瀹℃牳
+ }
+ else {
+ layer.close(index);
+ }
+ });
+ layer.close(index);
+
+ //layer.confirm(data.Message, {
+ // btn: ['纭']
+ //}, function (index) {
+ // if (data.Verify == "Y") //鑷姩瀹℃牳
+ // {
+ // layer.close(index);
+ // SaveVerify(); //瀹℃牳
+ // }
+ // else {
+ // layer.close(index);
+ // }
+ //});
+ }
+ else {
+ layer.alert(data.Message, { icon: 5 })
+ layer.close(index);
+ }
+ },
+ error: function (err) {
+ layer.alert(err, { icon: 5 })
+ layer.close(index);
+ }
+ })
+ }
+
function formatDate(date) {
var d = new Date(date),
month = '' + (d.getMonth() + 1),
@@ -974,6 +1036,21 @@
return [year, month, day].join('-');
}
+
+ //鎿嶄綔鍛�
+ function GetHEmpValue(obj) {
+ $("#HEmpName").val(obj[0].鑱屽憳鍚嶇О);
+ $("#HEmpID").val(obj[0].HItemID);
+ }
+ //鐢熶骇鐝粍
+ function GetHGroupValue(obj) {
+ $("#HGroupName").val(obj[0].鐝粍鍚嶇О);
+ $("#HGroupID").val(obj[0].HItemID);
+ }
+
+ function GetSwipeCardStart(obj) {
+ OptionData[0] = obj;
+ }
</script>
</body>
</html>
--
Gitblit v1.9.1