From e8232071737c1c0fcafcb474d063c341caf9fced Mon Sep 17 00:00:00 2001
From: zgq <519541279@qq.com>
Date: 星期五, 23 七月 2021 17:13:51 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
---
WebTM/views/生产管理/产量汇报单/Sc_ProductReportBillList.html | 13 +++-
WebTM/views/生产管理/生产开工单/Sc_MESBeginWorkBillList.html | 4
WebTM/views/PublicPage/PartInformation.html | 1
WebTM/layuiadmin/Scripts/webConfig.js | 4
WebTM/views/index.html | 3
WebTM/views/生产管理/生产开工单/Sc_Add_MESBeginWorkBillList.html | 149 +++++++++++++++++++++++++++++++++++++++++++++----
6 files changed, 153 insertions(+), 21 deletions(-)
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index 7980c71..34475e5 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,7 +1,7 @@
锘縡unction GetWEBURL() {
//var WEBURL = "http://192.168.16.80:8011/"; //鍔炲叕瀹ゆ湇鍔″櫒
//var WEBURL = "http://localhost:8081/SWEAPI/"; //ch鏈湴
- var WEBURL = "http://localhost:8085/API/"; //zgq鏈湴
+ //var WEBURL = "http://localhost:8085/API/"; //zgq鏈湴
//var WEBURL = "http://192.168.2.21:8081/lubaoWebAPI/";//鐜嬫案娉㈡湰鍦伴厤缃紝璇峰嬁鏇存敼
//var WEBURL = "http://101.37.171.70/API/"; //鍏徃鏈嶅姟鍣�
//var WEBURL = "http://localhost:8080/API/"; //棰滄檽鍐涙湰鍦伴厤缃�
@@ -9,7 +9,7 @@
//var WEBURL = "http://localhost:8082/LuBaoAPI/"; //鏉ㄩ湶鏈湴閰嶇疆
//var WEBURL = "http://10.1.4.154/API/"; //姹熶赴瀹㈡埛
//var WEBURL = "http://10.1.4.155/API/"; //姹熶赴瀹㈡埛NEW
- //var WEBURL = "http://47.96.97.237/API/"; //鏅轰簯鏈嶅姟鍣�
+ var WEBURL = "http://47.96.97.237/API/"; //鏅轰簯鏈嶅姟鍣�
//var WEBURL = "http://183.129.128.86:9090/API/"; //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣�
return WEBURL
}
diff --git a/WebTM/views/PublicPage/PartInformation.html b/WebTM/views/PublicPage/PartInformation.html
index 9e9528f..b3ddf5e 100644
--- a/WebTM/views/PublicPage/PartInformation.html
+++ b/WebTM/views/PublicPage/PartInformation.html
@@ -148,6 +148,7 @@
, { field: 'ParentID', title: 'ParentID', sort: true, hide: true }
, { field: 'HNumber', title: '鐗╂枡浠g爜' }
, { field: 'HName', title: '鐗╂枡鍚嶇О' }
+ , { field: 'HModel', title: '鐗╂枡瑙勬牸', hide: true}
]]
};
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 412b5d8..99e2737 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -311,7 +311,8 @@
<a>寮�缁撶彮绠$悊</a>
<dl class="layui-nav-child">
<dd><a lay-href="鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList">寮�鐝崟</a></dd>
- <dd><a lay-href="鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_MESBeginWorkBillList">寮�鐝崟缁存姢</a></dd>
+
+ <dd><a lay-href="鐢熶骇绠$悊/鐢熶骇寮�宸ュ崟/Sc_MESBeginWorkBillList.html">寮�鐝崟缁存姢</a></dd>
<dd><a lay-href="鐢熶骇绠$悊/鍋滃伐鎸傝捣鍗�/Sc_Add_MESStopWorkBillList.html">鍋滃伐鎸傝捣鍗�</a></dd>
<dd><a lay-href="鐢熶骇绠$悊/鍋滃伐鎸傝捣鍗�/Sc_MESStopUpWorkBillList.html">鍋滃伐鎸傝捣鍗曠淮鎶�</a></dd>
<dd><a lay-href="鐢熶骇绠$悊/鐢熶骇瀹屽伐鍗�/Sc_Add_MESEndWorkBillList.html">缁撶彮鍗�</a></dd>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
index 2f44518..c2c1fb1 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\344\272\247\351\207\217\346\261\207\346\212\245\345\215\225/Sc_ProductReportBillList.html"
@@ -25,7 +25,7 @@
<form class="layui-form" action="" lay-filter="component-form-group">
<div class="layui-card-header">
<button type="button" class="layui-btn" lay-submit="" lay-filter="Delete"><i class="layui-icon layui-icon-add"></i>鍒犻櫎</button>
- <button type="button" class="layui-btn" lay-submit="" lay-filter="AskReport"><i class="layui-icon layui-icon-add"></i>鐢宠妫�楠�</button>
+ <button type="button" class="layui-btn" lay-submit="" lay-filter="AskReport" id="AskReport"><i class="layui-icon layui-icon-add"></i>鐢宠妫�楠�</button>
<button type="button" class="layui-btn" lay-submit="" lay-filter="Exit"><i class="layui-icon layui-icon-add"></i>閫�鍑�</button>
<span style="margin:0 30%;font-size:24px;font-weight:bold;">浜ч噺姹囨姤</span>
</div>
@@ -198,7 +198,7 @@
, { field: 'HReportType', title: '姹囨姤绫诲瀷', width: 200 }
]]
};
- var index = layer.load(0, { shade: false });
+
//鏈夋簮鍗曟柊澧�
if (Type == 2)
@@ -271,16 +271,21 @@
//鐢宠妫�楠�
form.on('submit(AskReport)', function (data)
{
+ $('#AskReport').addClass("layui-btn-disabled").attr("disabled", true);
var TabData = table.cache['mainTable'];
- if (TabData.length <= 0)
+ if (TabData == undefined)
{
+ return layer.alert("鏃犱骇閲忔眹鎶ユ暟鎹紒", { icon: 5 })
+
+ }
+ if (TabData.length <= 0) {
return layer.alert("鏃犱骇閲忔眹鎶ユ暟鎹紒", { icon: 5 })
}
$.ajax(
{
type: "GET",
url: GetWEBURL() + "/Sc_MESBeginWorkBill/SaveGetMESProductReportBillList", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- async: true,
+ async: false,
data: { "ScMaxWork": ScMaxWork(),"HSourceBillType": HSourceBillType, "workcode": workcode, "HSourceID": HSourceID, "HICMOInterID": (HICMOInterID == "null" ? 0 : HICMOInterID), "HICMOEntryID": (HICMOEntryID == "null" ? 0 : HICMOEntryID), "HMaker": HMaker },
dataType: "json",
success: function (data) {
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 c0f1858..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)
+ {
//鍔犳簮鍗曠被鍨嬪尯鍒�(鍙互鍐欎笉鍚岀殑鏂规硶)
@@ -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>
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_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_MESBeginWorkBillList.html"
index 15d0c3c..5293144 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_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_MESBeginWorkBillList.html"
@@ -168,7 +168,7 @@
shift: 2,
area: ['100%', '100%'],
maxmin: true,
- content: '../鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html',
+ content: '../鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html?hID=&Type=1',
end: function () {
//鍒锋柊椤甸潰,
location.reload();
@@ -192,7 +192,7 @@
, shade: 0.6 //閬僵閫忔槑搴�
, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
, anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
- , content: '../鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html?hID=' + hID
+ , content: '../鐢熶骇寮�宸ュ崟/Sc_Add_MESBeginWorkBillList.html?hID=' + hID +'&Type=3'
, resize: false,
end: function () {
//鍒锋柊椤甸潰,
--
Gitblit v1.9.1