From e9bd4d79d7987adb8f38d86ba15011ad80e22db7 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期五, 23 七月 2021 13:20:26 +0800
Subject: [PATCH] nothing
---
WebTM/views/生产管理/生产开工单/Sc_Add_MESBeginWorkBillList.html | 151 ++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 138 insertions(+), 13 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 c730087..44e5a94 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"
@@ -108,7 +108,7 @@
<div class="layui-input-inline">
<input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" disabled autocomplete="off">
<input id="HInterID" name="HInterID" type="hidden" />
- <input id="HMaker" name="HMaker" type="hidden" /><!--鍒跺崟浜�-->
+
</div>
</div>
<div class="layui-inline">
@@ -182,8 +182,8 @@
<label class="layui-form-label">婧愬崟绫诲瀷</label>
<div class="layui-input-inline">
<select name="SourceType" lay-filter="SourceType" id="SourceType">
- <option value="2" selected="selected">鐢熶骇浠诲姟鍗�</option>
- <option value="1">鎵嬪伐褰曞叆</option>
+ <option value="2">鐢熶骇浠诲姟鍗�</option>
+ <option value="1" selected="selected">鎵嬪伐褰曞叆</option>
</select>
</div>
</div>
@@ -422,9 +422,59 @@
/* RoadBillSub(linterid);*/
}
+ //鑾峰彇涓嬫媺閫変腑鍊�
+ form.on('select(SourceType)', function (data) {
+ Sctag = data.value;
+ form.render('select');
+ if (Sctag != "2") //鏃犳簮鍗�
+ {
+ $("#HMainSourceInterID").val("");
+ $("#HMainSourceEntryID").val("");
+ $("#HMainSourceBillNo").val("");
+ $("#HMainSourceBillType").val("");
+ $('#HMainSourceBillNo').attr("disabled", false);
+ $('#XDHList').addClass("layui-btn-disabled").attr("disabled", true);
+ }
+ else {
+ $('#HMainSourceBillNo').attr("disabled", true);
+ $('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false);
+ }
+ });
+
+ //鏃犳簮鍗曟柊澧�
+ if (Type == 1)
+ {
+
+ //鍔犳簮鍗曠被鍨嬪尯鍒�(鍙互鍐欎笉鍚岀殑鏂规硶)
+ $('#HMaterCode').attr("disabled", true);
+ $('#HMaterList').removeClass("layui-btn-disabled").attr("disabled", false);
+ $('#HMaterName').attr("disabled", true);
+ $('#HMaterSpec').attr("disabled", true);
+ $('#HBeginDate').attr("disabled", true);
+ $('#HEmpName').attr("disabled", true);
+ $('#HEmpList').removeClass("layui-btn-disabled").attr("disabled", false);
+ $('#HSourceName').attr("disabled", true);
+ $('#HSourceList').removeClass("layui-btn-disabled").attr("disabled", false);
+ $('#HMainSourceBillNo').attr("disabled", true);
+ $('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false);
+ $('#HGroupName').attr("disabled", true);
+ $('#HGroupList').removeClass("layui-btn-disabled").attr("disabled", false);
+ $('#HDeptName').attr("disabled", true);
+ $('#HDeptList').removeClass("layui-btn-disabled").attr("disabled", false);
+ form.render('select');
+ $('#HICMOBillNo').attr("disabled", false);
+ //$('#HICMOBillNo').val("0");
+ $("#HProcID").val("0"); //宸ュ簭ID
+ $("#HMainSourceInterID").val("0"); //婧愬崟涓籌D
+ $("#HMainSourceEntryID").val("0"); //婧愬崟瀛愬唴鐮�
+ $("#HICMOInterID").val("0"); //鐢熶骇璁㈠崟ID
+ $("#HICMOEntryID").val("0"); //鐢熶骇璁㈠崟瀛怚D
+
+ }
//鏈夋簮鍗曟柊澧�
- if (Type == 2) {
+ if (Type == 2)
+ {
//鍔犳簮鍗曠被鍨嬪尯鍒�(鍙互鍐欎笉鍚岀殑鏂规硶)
@@ -452,7 +502,7 @@
"HSourceInterID": HSourceInterID,
"HSourceEntryID": HSourceEntryID,
"HSourceBillNo": HSourceBillNo,
- "HSourceBillType": HSourceBillType
+ "HSourceBillType": HBillType
},
dataType: "json",
success: function (data) {
@@ -488,11 +538,19 @@
});
}
+ //缂栬緫
+ if (Type == 3)
+ {
+
+ }
+
+
//淇濆瓨鎻愪氦
form.on('submit(Saver)', function (data) {
var sMainStr = JSON.stringify(data.field);
+ console.log(sMainStr);
if (!AllowLoadData())//鏁版嵁楠岃瘉
{
return false;
@@ -551,6 +609,7 @@
$("#HMaterName").val(checkStatus.data[0].HName);
$("#HMaterCode").val(checkStatus.data[0].HNumber);
$("#HMaterID").val(checkStatus.data[0].HItemID);
+ $("#HMaterSpec").val(checkStatus.data[0].HModel);
layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
}
, btn2: function (index, layero) {
@@ -693,7 +752,7 @@
shift: 2,
area: ['80%', '80%'],
maxmin: true,
- content: ['../../PublicPage/GroupInformation.html', 'yes'],
+ content: ['../../PublicPage/DeptInformation.html', 'yes'],
btn: ['纭畾', '鍙栨秷']
, btn1: function (index, layero) {
@@ -750,10 +809,6 @@
layer.msg("鎿嶄綔鍛樹笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
}
- if ($("#HMainSourceInterID").val() == '' || $("#HMainSourceInterID").val() == null) {
- layer.msg("婧愬崟鍗曞彿涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return Result = false;
- }
if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null) {
layer.msg("鐝粍涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
@@ -762,12 +817,82 @@
layer.msg("杞﹂棿涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
}
- if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null) {
- layer.msg("鐢熶骇璁㈠崟涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return Result = false;
+ if (Type == "2") {
+ if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null) {
+ layer.msg("鐢熶骇璁㈠崟涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
}
return Result;
}
+
+ function RoadBillMain(hID)//鍔犺浇琛ㄥご
+ {
+ //alert(hID);
+ //鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
+ $.ajax({
+ url: GetWEBURL() + "Sc_MESBeginWorkBill/Sc_MESBeginWorkBillListCheckDetai",
+ type: "GET",
+ data: {
+ "HID": hID
+ },
+ success: function (result) {
+
+ if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data.h_v_Sc_MESBeginWorkBillList_NEW[0];
+ form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HInterID": data.hmainid
+ ,"HBillNo": data.鍗曟嵁鍙�
+ , "HDate": formatDate(data.鏃ユ湡)
+ , "HProcID": data.HProcID
+ , "HProcName": data.宸ュ簭鍚嶇О
+ , "HMaterID": data.HMaterID
+ , "HMaterCode": data.浜у搧浠g爜
+ , "HMaterName": data.浜у搧鍚嶇О
+ , "HMaterSpec": data.瑙勬牸鍨嬪彿
+ , "HBeginDate": data.寮�宸ユ椂闂�
+ , "HSourceID": data.HSourceID //璧勬簮ID
+ , "HSourceName": data.璧勬簮鍚嶇О //璧勬簮鍚嶇О
+ , "HEmpID": data.HEmpID //鎿嶄綔鍛業D
+ , "HEmpName": data.鐢宠寮�宸ヤ汉鍛� //鎿嶄綔鍛�
+ , "HMainSourceInterID": data.HMainSourceInterID //婧愬崟ID
+ , "HMainSourceEntryID": data.HMainSourceEntryID //婧愬崟瀛怚D
+ , "HMainSourceBillNo": data.HMainSourceBillNo //婧愬崟鍗曞彿
+ , "HMainSourceBillType": data.HMainSourceBillType //婧愬崟绫诲瀷
+ , "HGroupID": data.HGroupID //鐝粍ID
+ , "HGroupName": data.鐝粍鍚嶇О //鐝粍鍚嶇О
+ , "HDeptID": data.HDeptID //閮ㄩ棬ID
+ , "HDeptName": data.閮ㄩ棬鍚嶇О //閮ㄩ棬鍚嶇О
+ , "HICMOInterID": data.HICMOInterID //鐢熶骇璁㈠崟涓籌D
+ , "HICMOEntryID": data.HICMOEntryID //鐢熶骇璁㈠崟瀛怚D
+ , "HICMOBillNo": data.HICMOBillNo //鐢熶骇璁㈠崟
+ , "HRemark": data.澶囨敞 //澶囨敞
+ , "HMaker": data.鍒跺崟浜� //鍒跺崟浜�
+ , "HMakeDate": data.鍒跺崟鏃ユ湡 //鍒跺崟鏃ユ湡
+ , "HUpDater": data.淇敼浜� //淇敼浜�
+ , "HUpDateDate": data.淇敼鏃ユ湡 //淇敼鏃ユ湡
+ });
+
+ } else {
+ layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ }
+ }, error: function () {
+ layer.alert("鍙戠敓閿欒!", { icon: 5 });
+ }
+ });
+ }
+
+ function formatDate(date) {
+ var d = new Date(date),
+ month = '' + (d.getMonth() + 1),
+ day = '' + d.getDate(),
+ year = d.getFullYear();
+
+ if (month.length < 2) month = '0' + month;
+ if (day.length < 2) day = '0' + day;
+
+ return [year, month, day].join('-');
+ }
</script>
</body>
</html>
--
Gitblit v1.9.1