From b389a4e9a787c141699745818c6dee033f429133 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 06 三月 2024 14:09:47 +0800
Subject: [PATCH] 生产订单没有在审核状态下,不能下推、保存生产变更单
---
WebTM/views/生产管理/生产订单变更单/Sc_ICMOChangeBill.html | 42 +++++++++++++++++++++
WebTM/Properties/PublishProfiles/JFTM.pubxml.user | 4 +-
WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html | 42 +++++++++++++++++++++
3 files changed, 86 insertions(+), 2 deletions(-)
diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 4c531b7..f47321b 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -4062,7 +4062,7 @@
<publishTime>04/11/2023 16:34:43</publishTime>
</File>
<File Include="views/鐢熶骇绠$悊/鐢熶骇浠诲姟鍗�/Sc_ICMOBillList.html">
- <publishTime>03/06/2024 09:28:44</publishTime>
+ <publishTime>03/06/2024 13:31:55</publishTime>
</File>
<File Include="views/鐢熶骇绠$悊/鐢熶骇浠诲姟鍗�/Sc_ICMOBillList_LookDown.html">
<publishTime>01/05/2024 13:27:32</publishTime>
@@ -4206,7 +4206,7 @@
<publishTime>03/06/2024 09:28:44</publishTime>
</File>
<File Include="views/鐢熶骇绠$悊/鐢熶骇璁㈠崟鍙樻洿鍗�/Sc_ICMOChangeBill.html">
- <publishTime>03/05/2024 12:29:40</publishTime>
+ <publishTime>03/06/2024 13:43:29</publishTime>
</File>
<File Include="views/鐢熶骇绠$悊/鐢熶骇璁㈠崟鍙樻洿鍗�/Sc_ICMOChangeBillList.html">
<publishTime>03/06/2024 09:28:44</publishTime>
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
index 599c504..d0cc69e 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\344\273\273\345\212\241\345\215\225/Sc_ICMOBillList.html"
@@ -580,6 +580,7 @@
, { field: 'HEntryID', title: 'HEntryID', sort: true, hide: true }
, { field: '鏃ユ湡', title: '鏃ユ湡', sort: true }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true }
+ , { field: '鍗曟嵁鐘舵��', title: '鍗曟嵁鐘舵��', sort: true }
, { field: '浜у搧浠g爜', title: '浜у搧浠g爜', sort: true }
, { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О', sort: true }
, { field: '瀹㈡埛', title: '瀹㈡埛', sort: true }
@@ -924,6 +925,25 @@
if (checkStatus.data.length === 1) {
var hID = data[0].hmainid.toString();
var HEntryID = data[0].hsubid.toString();
+
+ //#region 鍒ゆ柇婧愬崟鐘舵��
+ var HSourceBillData = "";
+ var HSourceBillData = getSourceBillStatus_ICMOBill(hID); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData.length == 0) {
+ layer.alert("淇濆瓨澶辫触!鏈煡璇㈠埌鐢熶骇璁㈠崟鍗曟嵁!", { icon: 5 });
+ return;
+ } else if (HSourceBillData[0]["鍗曟嵁鐘舵��"] != "宸插鏍�") {
+ var err = "淇濆瓨澶辫触!鍘熷洜锛氱敓浜ц鍗曞崟鎹姸鎬佷负鈥�" + HSourceBillData[0]["鍗曟嵁鐘舵��"] + "鈥濓紝涓嶅厑璁镐笅鎺ㄧ敓浜ц鍗曞彉鏇村崟锛�";
+ layer.alert(err, { icon: 5 });
+ return;
+ }
+ } else {
+ return;
+ }
+ //#endregion
+
+
layer.open({
type: 2
, area: ['100%', '100%']
@@ -1931,6 +1951,28 @@
//#endregion
+ //#region 鑾峰彇婧愬崟-鐢熶骇璁㈠崟鍗曟嵁鐘舵��
+ function getSourceBillStatus_ICMOBill(ParamsInterID) {
+ var HSourceBillData = "none";
+ var sWhere = " and hmainid = " + ParamsInterID;
+ $.ajax({
+ url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
+ async: false,
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ HSourceBillData = data1.data;
+ } else {
+ layer.alert(data1.code + "鍗曟嵁鐘舵�佸垽鏂け璐ワ紒", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return HSourceBillData;
+ }
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Sc_ICMOChangeBill.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Sc_ICMOChangeBill.html"
index d20f51a..5d5b932 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Sc_ICMOChangeBill.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Sc_ICMOChangeBill.html"
@@ -392,6 +392,25 @@
//#region 琛ㄥご鎸夐挳瑙﹀彂浜嬩欢
//#region 淇濆瓨鎸夐挳
form.on('submit(set_SaveBill)', function (data) {
+ if (OperationType == 4) {
+ //#region 鍒ゆ柇婧愬崟鐘舵��
+ var HSourceBillData = "";
+ var HSourceBillData = getSourceBillStatus_ICMOBill(); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData.length == 0) {
+ layer.alert("淇濆瓨澶辫触!鏈煡璇㈠埌婧愬崟鍗曟嵁!", { icon: 5 });
+ return;
+ } else if (HSourceBillData[0]["鍗曟嵁鐘舵��"] != "宸插鏍�") {
+ var err = "淇濆瓨澶辫触!鍘熷洜锛氭簮鍗曞崟鎹姸鎬佷负鈥�" + HSourceBillData[0]["鍗曟嵁鐘舵��"] + "鈥濓紝涓嶅厑璁镐繚瀛橈紒";
+ layer.alert(err, { icon: 5 });
+ return;
+ }
+ } else {
+ return;
+ }
+ //#endregion
+ }
+
//if (AllowLoadData(data)) {
set_SaveBill(data);
//}
@@ -1600,6 +1619,29 @@
});
}
//#endregion
+
+ //#region 鑾峰彇婧愬崟-鐢熶骇璁㈠崟鍗曟嵁鐘舵��
+ function getSourceBillStatus_ICMOBill() {
+ var HSourceBillData = "none";
+ var sWhere = " and hmainid = " + $("#HMainSourceInterID").val();
+ $.ajax({
+ url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillList_Json',
+ async: false,
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ HSourceBillData = data1.data;
+ } else {
+ layer.alert(data1.code + "婧愬崟鍗曟嵁鐘舵�佸垽鏂け璐ワ紒", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return HSourceBillData;
+ }
+ //#endregion
//#endregion
--
Gitblit v1.9.1