From 59e206628fa72359d5ef017cf19867d47db2f7f2 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 01 九月 2022 15:08:19 +0800
Subject: [PATCH] 投产计划查询

---
 WebTM/views/车间管理/报表分析/ProductionPlanReportList.html |  348 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 WebTM/layuiadmin/Scripts/webConfig.js               |    4 
 WebTM/views/index.html                              |    1 
 WebTM/WebTM.csproj                                  |    1 
 4 files changed, 352 insertions(+), 2 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 1956819..185c2c6 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -993,6 +993,7 @@
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭杩涚珯鎺ユ敹鍗昞MES_StationInBill_PDA.html" />
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭杩涚珯鎺ユ敹鍗昞Sc_StationInBill_Mul_PDA.html" />
     <Content Include="views\杞﹂棿绠$悊\宸ュ簭杩涚珯鎺ユ敹鍗昞Sc_StationInBill_Mul.html" />
+    <Content Include="views\杞﹂棿绠$悊\鎶ヨ〃鍒嗘瀽\ProductionPlanReportList.html" />
     <Content Include="views\杞﹂棿绠$悊\鎶ヨ〃鍒嗘瀽\Sc_StationInBillList.html" />
     <Content Include="views\杞﹂棿绠$悊\杞﹂棿鏀舵枡\JIT_SendGoodsBillList.html" />
     <Content Include="views\閲囪喘绠$悊\鏀舵枡閫氱煡鍗昞Add_Edit_Cg_POInStockBillList.html" />
diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js
index ae34338..e7c8fe3 100644
--- a/WebTM/layuiadmin/Scripts/webConfig.js
+++ b/WebTM/layuiadmin/Scripts/webConfig.js
@@ -4,11 +4,11 @@
     //var WEBURL = "http://localhost:8081/SWEAPI/";       //ch鏈湴
     //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
     //var WEBURL = "http://localhost:8085/API/";   //zgq鏈湴
-    var WEBURL = "http://localhost:8080/API/";   //棰滄檽鍐涙湰鍦伴厤缃�
+    //var WEBURL = "http://localhost:8080/API/";   //棰滄檽鍐涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/lubao";   //棰滄檽鍐涙湰鍦伴厤缃�
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄩ湶鏈湴閰嶇疆
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //绔犵传鏌旀湰鍦伴厤缃�
-    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄤ箰鏈湴閰嶇疆
+    var WEBURL = "http://localhost:8082/LuBaoAPI/";    //鏉ㄤ箰鏈湴閰嶇疆
     //var WEBURL = "http://10.1.4.155/API/";   //姹熶赴瀹㈡埛NEW
     //var WEBURL = "http://47.96.97.237/API/";   //鏅轰簯鏈嶅姟鍣�
     //var WEBURL = "http://183.129.128.86:9090/API/";   //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣ㄥ缃�
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 82ef184..9d51a52 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -485,6 +485,7 @@
                                         <dd><a lay-href="">杞﹂棿鍦ㄥ埗鍝佸垎鏋恘</a></dd>
                                         <dd><a lay-href="">娴佽浆鍗″叏绋嬭窡韪猲</a></dd>
                                         <dd><a lay-href="杞﹂棿绠$悊/鎶ヨ〃鍒嗘瀽/Sc_StationInBillList.html">鏍囧噯宸ユ椂鎶ヨ〃</a></dd>
+                                        <dd><a lay-href="杞﹂棿绠$悊/鎶ヨ〃鍒嗘瀽/ProductionPlanReportList.html">鎶曚骇璁″垝鎶ヨ〃</a></dd>
                                     </dl>
                                 </dd>
                                 <dd>
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/ProductionPlanReportList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/ProductionPlanReportList.html"
new file mode 100644
index 0000000..64fcd28
--- /dev/null
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\346\212\245\350\241\250\345\210\206\346\236\220/ProductionPlanReportList.html"
@@ -0,0 +1,348 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>鎶曚骇璁″垝鎶ヨ〃</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <style type="text/css">
+        input.layui-input.layui-unselect {
+            padding-right: 0;
+        }
+    </style>
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-colla-title layui-inline">
+                                    <div class="layui-inline">
+                                        <span>鏇村</span>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鎵瑰彿</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" id="HICMOBillNo" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">涓嬭揪鏃ユ湡</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">-</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                </button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+                                    <div class="layui-row" style="margin-top:10px;">
+                                        <!--鍏朵粬鏉′欢-->
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鐗╂枡浠g爜</label>
+                                            <div  class="layui-input-inline">
+                                                <input type="hidden" class="layui-input" lay-verify="HMaterID" name="HMaterID" id="HMaterID" value="0">
+                                                <input type="text" class="layui-input" lay-verify="HMaterNumber" name="HMaterNumber" id="HMaterNumber" value="" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnHMaterID" id="btnHMaterID" style="width: 40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">鐗╂枡鍚嶇О</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">瑙勬牸鍨嬪彿</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HModel" id="HModel" style="background-color:#efefef4d;" readonly>
+                                            </div>
+                                        </div>
+                                    </div>
+                                    <div class="layui-row" style="margin: 10px 0 10px;">
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label">鐝粍</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HWorkShopName" id="HWorkShopName" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly>
+                                                <input type="hidden" name="HWorkShopID" id="HWorkShopID" value="0">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="HWorkShopList" id="HWorkShopList" style="width: 40px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                </button>
+                                            </div>
+                                        </div>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 85px;">閿�鍞崟鍙�</label>
+                                            <div class="layui-input-block" style="margin-left: 120px;">
+                                                <input type="text" class="layui-input" name="HSeOrderBillNo" id="HSeOrderBillNo">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+                            </div>
+                        </script>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+                , util = layui.util
+            //鏌ヨ鏉′欢
+            var sWhere = "";
+            var option = [];
+            //#endregion
+
+            //#region 杩涘叆椤甸潰鏃㈠姞杞�
+
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+
+            //#endregion
+
+            //#region 鐐瑰嚮浜嬩欢鍖呮嫭on form浜嬩欢绛�
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                switch (obj.event) {
+                    //閫�鍑�
+                    case 'btn-exit': Pub_Close(2);
+                        break;
+                };
+            });
+            //閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                set_ClearQuery();
+            });
+            //鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+            });
+
+            //杞﹂棿寮圭獥
+            form.on('submit(HWorkShopList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '杞﹂棿鍒楄〃',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HWorkShopName").val(checkStatus.data[0].閮ㄩ棬鍚嶇О);
+                        $("#HWorkShopID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+            //鐗╂枡
+            form.on('submit(btnHMaterID)', function (data) {//閫夋嫨浠撲綅
+                get_btnHMaterID();
+            });
+
+            //#endregion
+
+            //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+            //鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栨椂闂�
+                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));//寮�濮嬫棩鏈�
+                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));//缁撴潫鏃ユ湡
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鍔犺浇鏁版嵁鍒扮綉鏍�
+                get_FastQuery();
+            }
+
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , page: true
+                    , cellMinWidth: 120
+                    , limit: 50
+                    , height: 'full-50'
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                        , { field: '瑕佽揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 160, templet: "<div>{{d.瑕佽揣鏃ユ湡 ==null ?'':layui.util.toDateString(d.瑕佽揣鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '閿�鍞鍗曞彿', title: '閿�鍞崟鍙�', width: 160 }
+                        , { field: '鐢熶骇璁㈠崟鍙�', title: '鎵瑰彿', width: 160 }
+                        , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 160 }
+                        , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 160 }
+                        , { field: '寮�宸ユ棩鏈�', title: '涓嬭揪鏃ユ湡', width: 160, templet: "<div>{{d.寮�宸ユ棩鏈� ==null ?'':layui.util.toDateString(d.寮�宸ユ棩鏈�, 'yyyy-MM-dd')}}</div>" }
+                        , { field: '瑕佹眰瀹屽伐', title: '瑕佹眰瀹屽伐', width: 160, templet: "<div>{{d.瑕佹眰瀹屽伐 ==null ?'':layui.util.toDateString(d.瑕佹眰瀹屽伐, 'yyyy-MM-dd')}}</div>" }
+                        , { field: '绛夌骇', title: '绛夌骇', width: 160 }
+                        , { field: '鏁存壒', title: '鏁存壒', width: 160 }
+                        , { field: '鎶ュ簾鏁伴噺', title: '鎶ュ簾', width: 160 }
+                        , { field: '姹囨姤鍗曟暟閲�', title: '姹囨姤鍗曟暟閲�', width: 160 }
+                        , { field: '鍏ュ簱', title: '鍏ュ簱', width: 200 }
+                        , { field: '鍦ㄥ埗', title: '鍦ㄥ埗', width: 200 }
+                        , { field: '宸ュ簭', title: '宸ュ簭', width: 200 }
+                        , { field: '鐝粍', title: '鐝粍', width: 200 }
+                        , { field: '鐘舵��', title: '鐘舵��', width: 200 }
+                        , { field: '鎿嶄綔宸�', title: '鎿嶄綔宸�', width: 200 }
+                    ]]
+                    , limits: [50, 500, 5000, 20000]
+
+                };
+            }
+
+            //鍔犺浇缃戞牸
+            function get_Display(sWhere) {
+                var wait = layer.load();//閬僵
+                $.ajax({
+                    url: GetWEBURL() + '/ProductionPlanReport/ProductionPlanReportList',
+                    type: "GET",
+                    data: { "sWhere": sWhere },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            DataList = data1.data;
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(wait);
+                        } else {
+                            layer.close(wait);
+                            layer.alert(data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(wait);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+
+            //蹇�熻繃婊�
+            function get_FastQuery() {
+                var HBeginDate = $("#HBeginDate").val();//涓嬭揪鏃ユ湡 寮�濮嬫棩鏈�
+                var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
+                var HICMOBillNo = $("#HICMOBillNo").val(); //鎵瑰彿
+                var HWorkShopID = $("#HWorkShopID").val();//鐝粍
+                var HSeOrderBillNo = $("#HSeOrderBillNo").val();//閿�鍞崟鍙�
+                var HMaterNumber = $("#HMaterNumber").val();//鐗╂枡浠g爜
+                var HOrgID = sessionStorage["OrganizationID"];
+
+                sWhere = {
+                    HBeginDate: HBeginDate
+                    , HEndDate: HEndDate
+                    , HICMOBillNo: HICMOBillNo
+                    , HWorkShopID: HWorkShopID
+                    , HSeOrderBillNo: HSeOrderBillNo
+                    , HMaterNumber: HMaterNumber
+                    , HOrgID: HOrgID
+                }
+
+                get_Display(JSON.stringify(sWhere));
+                //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+                sWhere = "";
+            }
+            //閲嶇疆杩囨护鏉′欢
+            function set_ClearQuery() {
+                $("#HBeginDate").val("");
+                $("#HEndDate").val("");
+                $("#HICMOBillNo").val("");
+                $("#HProcExchBillNo").val("");
+                $("#HName").val("");
+                sWhere = " where 1 = 1 ";
+                get_Display(sWhere);
+            }
+
+            //鐗╂枡
+            function get_btnHMaterID() {
+                layer.open({
+                    type: 2
+                    , area: ['80%', '80%']
+                    , title: '鐗╂枡'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_MaterialList.html', 'yes']
+                    , btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HMaterID").val(checkStatus.data[0].HItemID);
+                        $("#HMaterName").val(checkStatus.data[0].HName);
+                        $("#HMaterNumber").val(checkStatus.data[0].HNumber);
+                        $("#HModel").val(checkStatus.data[0].HModel);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                })
+            }
+
+
+            //#endregion
+        });
+    </script>
+</body>
+</html>
\ No newline at end of file

--
Gitblit v1.9.1