From d86534d4f9b0c8da4f1c00d277a8ad5904892004 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期三, 21 八月 2024 16:18:43 +0800
Subject: [PATCH] 报工台跳转异常反馈单 增加生产资源回线,增加 生产日模具需求报表,报工台获取单据状态方法优化

---
 WebTM/views/IpadIndex.html |   54 ++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 36 insertions(+), 18 deletions(-)

diff --git a/WebTM/views/IpadIndex.html b/WebTM/views/IpadIndex.html
index f4f5488..7fdb583 100644
--- a/WebTM/views/IpadIndex.html
+++ b/WebTM/views/IpadIndex.html
@@ -995,6 +995,10 @@
                 layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
                 return false;
             }
+            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "涓嶈壇閲囬泦")) {
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻涓嶈壇閲囬泦鏉′欢!", { icon: 5 });
+                return false;
+            }
             layer.open({
                 type: 2
                 , area: ['100%', '100%']
@@ -1065,6 +1069,10 @@
         function CodingReport(event, obj) {
             if (wktag == 0) {
                 layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
+                return false;
+            }
+            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "姹囨姤")) {
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻姹囨姤鏉′欢!", { icon: 5 });
                 return false;
             }
             layer.open({
@@ -1244,6 +1252,10 @@
                 layer.alert("璇烽�夋嫨宸ュ崟鍒楄〃", { icon: 5 });
                 return false;
             }
+            if (WorkStaus(HSourceID1, workcode, HSourceInterID, "宸ヨ壓鍙傛暟鐐规")) {
+                layer.alert("鍗曟嵁鐘舵�佷笉婊¤冻宸ヨ壓鍙傛暟鐐规鏉′欢!", { icon: 5 });
+                return false;
+            }
             layer.open({
                 type: 2,
                 skin: 'layui-layer-rim', //鍔犱笂杈规
@@ -1284,29 +1296,35 @@
         function WorkStaus(HSourceID1, workcode, HSourceInterID, btn) {
             var flag = false;
             var sWhere = "";
-            switch (btn) {
-                case "寮�宸�":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //鏄惁鏈変笉涓哄紑宸ュ紑宸ョ姸鎬併�佸仠宸ョ姸鎬�
-                    break;
-                case "瀹屽伐":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸畬宸ョ姸鎬�
-                    break;
-                case "鍋滃伐":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')";   //鏄惁鏈変笉涓哄仠宸ユ寕璧风姸鎬�
-                    break;
-                case "姹囨姤":
-                    sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸仠宸ユ寕璧风姸鎬�
-                    break;
-                case "鎶ユ鐢宠":
-
-                    break;
-                default:
+            sWhere = {
+                HSourceID: HSourceID1
+                , HICMOBillNo: workcode
+                , HInterID: HSourceInterID
+                , type: btn
             }
+            //switch (btn) {
+            //    case "寮�宸�":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('0','2')";   //鏄惁鏈変笉涓哄紑宸ュ紑宸ョ姸鎬併�佸仠宸ョ姸鎬�
+            //        break;
+            //    case "瀹屽伐":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸畬宸ョ姸鎬�
+            //        break;
+            //    case "鍋滃伐":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1')";   //鏄惁鏈変笉涓哄仠宸ユ寕璧风姸鎬�
+            //        break;
+            //    case "姹囨姤":
+            //        sWhere = " where HSourceID='" + HSourceID1 + "' and HICMOBillNo='" + workcode + "' and HInterID='" + HSourceInterID + "' and hicmostatus not in('1','2')";   //鏄惁鏈変笉涓哄紑宸ャ�佸仠宸ユ寕璧风姸鎬�
+            //        break;
+            //    case "鎶ユ鐢宠":
+
+            //        break;
+            //    default:
+            //}
 
             $.ajax({
                 url: GetWEBURL() + "/Sc_MESBeginWorkBill/GetMESBeginWorkBillStaus",
                 type: "GET",
-                data: { "sWhere": sWhere },
+                data: { "sWhere": JSON.stringify(sWhere) },
                 dataType: "json",//鏁版嵁绫诲瀷鍙互涓� text xml json  script  jsonp
                 async: false,
                 success: function (data) {

--
Gitblit v1.9.1