From 7715251bfcd0b0676431a6ac704cfa5f5abea7ab Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期一, 25 十月 2021 15:33:04 +0800
Subject: [PATCH] 采购订单 订单反馈状态 送货单 物流单号

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/PublicPage/OrderBackInfomation.html |  251 +++++++++++++++++++++++++
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html          |   59 +++++
 WebSRM/WebSRM.csproj                                                       |    1 
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html      |    1 
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html        |  260 +++++++++++++++++--------
 WebSRM/Scripts/webConfig.js                                                |    3 
 6 files changed, 488 insertions(+), 87 deletions(-)

diff --git a/WebSRM/Scripts/webConfig.js b/WebSRM/Scripts/webConfig.js
index d83f30e..f02e47a 100644
--- a/WebSRM/Scripts/webConfig.js
+++ b/WebSRM/Scripts/webConfig.js
@@ -1,9 +1,10 @@
 锘縡unction GetWEBURL()
 {
-    var WEBURL = "http://localhost:8083/WEB-API/";
+    //var WEBURL = "http://localhost:8083/WEB-API/";
     //var WEBURL = "http://111.3.111.183:8083/WEB-API/";
     //var WEBURL = "http://10.0.2.11:8083/WEB-API/";
     //var WEBURL = "http://192.168.31.47:8083/WEB-API/";
+    var WEBURL = "http://localhost:8082/srmAPI/";    //绔犵传鏌旀湰鍦伴厤缃�
     
     return WEBURL
 }
\ No newline at end of file
diff --git a/WebSRM/WebSRM.csproj b/WebSRM/WebSRM.csproj
index ae9b50d..21bf258 100644
--- a/WebSRM/WebSRM.csproj
+++ b/WebSRM/WebSRM.csproj
@@ -837,6 +837,7 @@
     <Content Include="layuiAdmin.std-v1.2.1\src\views\iframe\layer\iframe.html" />
     <Content Include="layuiAdmin.std-v1.2.1\src\views\index.html" />
     <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\layui\JavaScript1.js" />
+    <Content Include="layuiAdmin.std-v1.2.1\src\views\PublicPage\OrderBackInfomation.html" />
     <Content Include="layuiAdmin.std-v1.2.1\src\views\senior\echarts\bar.html" />
     <Content Include="layuiAdmin.std-v1.2.1\src\views\senior\echarts\line.html" />
     <Content Include="layuiAdmin.std-v1.2.1\src\views\senior\echarts\map.html" />
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/PublicPage/OrderBackInfomation.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/PublicPage/OrderBackInfomation.html
new file mode 100644
index 0000000..ba0c356
--- /dev/null
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/PublicPage/OrderBackInfomation.html
@@ -0,0 +1,251 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<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/layui/lay/modules/util.js"></script>
+    <script src="../../../../Scripts/webConfig.js"></script>
+    <style media="screen">
+        .custom-tree-item-clicked {
+            color: #FC9003
+        }
+    </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-form-item" style="border-top: solid 1px #F6F6F6;">
+                                    <div class="layui-row" style="padding:10px 0">
+                                        <div class="layui-col-xs3 layui-inline" style="width: 23%;display:none;">
+                                            <div id="treeDepartment" lay-filter="treeDepartment" class="demo-tree demo-tree-box" style="height: 580px; overflow: scroll;"></div>
+                                        </div>
+                                        <div class="layui-col-xs12 layui-inline">
+                                            <div class="layui-row">
+                                                <div class="layui-inline">
+                                                    <label class="layui-form-label">浠g爜</label>
+                                                    <div class="layui-input-block">
+                                                        <input type="text" class="layui-input" name="HNumber" id="HNumber">
+                                                    </div>
+                                                </div>
+                                                <div class="layui-inline">
+                                                    <label class="layui-form-label">鍚嶇О</label>
+                                                    <div class="layui-input-block">
+                                                        <input type="text" class="layui-input" name="HName" id="HName">
+                                                    </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>
+                                            </div>
+                                            <div>
+                                                <table class="" id="mainTable" lay-filter="mainTable"></table>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script>
+        var treeCkData = { id: 0 };
+        var TagId = "";
+        var TagParentId = "";
+
+        layui.config({
+            base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+            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
+                , tree = layui.tree
+            var sWhere = " where HStopFlag=0 and HEndFlag<>'1' "; //鏍戝瀷100046  sessionStorage["OrganizationID"] 
+            var sWhere1 = " where HStopFlag=0 and HEndFlag=1 ";  //鍒楄〃
+
+            //tree.render({
+            //    elem: '#treeDepartment',
+            //    data: getData(sWhere),
+            //    showCheckbox: false,     //鏄惁鏄剧ず澶嶉�夋
+            //    id: 'demoId',
+            //    isJump: false, //鏄惁鍏佽鐐瑰嚮鑺傜偣鏃跺脊鍑烘柊绐楀彛璺宠浆
+            //    showLine: true,//鏄惁寮�鍚繛鎺ョ嚎
+            //    onlyIconControl: true,   //鐐瑰嚮鍚庝笉鏀剁缉
+            //    click: function (obj) {
+            //        //鐐瑰嚮楂樺厜
+            //        if (obj.data.id !== treeCkData.id) {
+            //            $('div[data-id="' + obj.data.id + '"] span').eq(1).last().addClass("custom-tree-item-clicked");
+            //            $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked');
+            //            treeCkData = obj.data;
+            //            TagId = obj.data.id;
+            //            TagParentId = obj.data.ParentID;
+            //        }
+            //        else {
+            //            $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked');
+            //            treeCkData = { id: 0 };
+            //            TagId = "";
+            //            TagParentId = "";
+            //        }
+
+
+            //        $.ajax({
+            //            url: GetWEBURL() + '/Gy_MaintenanceMode/OrderBackInfoCX',
+            //            type: "GET",
+            //            data: { "HInterID": obj.data.id },
+            //            success: function (data1) {
+            //                if (data1.count == 1) {
+            //                    option.data = data1.data;
+            //                    table.render(option);
+            //                    layer.close(index);
+            //                } else {
+            //                    layer.close(index);
+            //                    layer.alert(data1.code + data1.Message, { icon: 5 });
+            //                }
+            //            }, error: function () {
+            //                layer.close(index);
+            //                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+            //            }
+            //        });
+            //    }
+            //});
+
+
+            var option = {
+                elem: '#mainTable'
+                //, toolbar: '#toolbarDemo'
+                , height: 'full-120'
+                , page: true
+                , cellMinWidth: 90
+                , cols: [[
+                    { type: 'radio', fixed: 'left' }
+                    , { field: 'HItemID', title: 'HItemID', sort: true, hide: true }
+                    , { field: 'ParentID', title: 'ParentID', sort: true, hide: true }
+                    , { field: 'HNumber', title: '璁㈠崟鍙嶉鐘舵�佷唬鐮�' }
+                    , { field: 'HName', title: '璁㈠崟鍙嶉鐘舵��' }
+                ]]
+            };
+
+            var index = layer.load(0, { shade: false });
+            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+            $.ajax({
+                url: GetWEBURL() + '/PublicPageMethod/OrderBackInfoList',
+                type: "GET",
+                data: { "sWhere": SeachFilter(sWhere1) },
+                success: function (data1) {
+                    if (data1.count == 1) {
+                        option.data = data1.data;
+                        table.render(option);
+                        layer.close(index);
+                    } else {
+                        layer.close(index);
+                        layer.alert(data1.code + data1.Message, { icon: 5 });
+                    }
+                }, error: function () {
+                    layer.close(index);
+                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                }
+            });
+
+
+            //鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+               
+                $.ajax({
+                    url: GetWEBURL() + '/PublicPageMethod/OrderBackInfoList',
+                    type: "GET",
+                    data: { "sWhere": SeachFilter(sWhere1) },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                        } else {
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+                sWhere1 = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            });
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+
+        //鏌ヨ鏍戠姸鏁版嵁
+        function getData(sWhere) {
+            var treeData;
+
+            $.ajax({
+                url: GetWEBURL() + '/Gy_MaintenanceMode/OrderBackInfoLoadTree',
+                type: "GET",
+                data: { "sWhere": sWhere },
+                async: false,
+                success: function (result) {
+                    var data = result.data;
+                    //鐢熸垚鏁版嵁瀵硅薄闆嗗悎
+                    treeData = LoadTree(data);
+
+                }
+            });
+            return treeData;
+        }
+        /**澶勭悊鏍戝舰灞曠ず鏁版嵁锛岃姹傛湁ID鍜孭arentID銆乼itle瀛楁**/
+        function LoadTree(data) {
+            let map = {};
+            let treeData = [];
+            data.forEach(it => {
+                map[it.id] = it;    //ID涓烘瘡涓妭鐐圭殑id
+            })
+            //鐢熸垚缁撴灉闆�
+            data.forEach(it => {
+                const parent = map[it.ParentID];   //ParentID涓虹埗鑺傜偣鐨刬d
+                if (parent) {
+                    if (!Array.isArray(parent.children)) parent.children = [];
+                    parent.children.push(it);
+                } else {
+                    treeData.push(it)
+                }
+            })
+            return treeData;
+        }
+
+        function SeachFilter(sWhere1) {
+            var HNumber = $("#HNumber").val();
+            var HName = $("#HName").val();
+            if (HNumber) {
+                sWhere1 += " and HNumber like '%" + HNumber + "%'";
+            }
+            if (HName) {
+                sWhere1 += " and HName like '%" + HName + "%'";
+            }
+            return sWhere1;
+        }
+    </script>
+
+</body>
+</html>
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html
index b5f262e..f3af630 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html
@@ -90,7 +90,12 @@
                                                         <input id="HDeptID" name="HDeptID" type="hidden" />
                                                     </div>
                                                 </div>
-
+                                                <div class="layui-col-xs3">
+                                                    <label class="layui-form-label"> 鐗╂祦鍗曞彿锛�</label>
+                                                    <div class="layui-input-inline">
+                                                        <input class="layui-input" name="HDeliveryNo" id="HDeliveryNo"   autocomplete="off">
+                                                    </div>
+                                                </div>
 
                                             </div>
                                         </div>
@@ -169,6 +174,7 @@
                     <table class="layui-hide" 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-Save"><i class="layui-icon layui-icon-tips"></i>淇濆瓨</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
@@ -240,6 +246,7 @@
                     $("#HEmpName").val(d.data[0].HEmpName);
                     $("#HManagerID").val(d.data[0].HManagerID);
                     $("#HManagerName").val(d.data[0].HManagerName);
+                    $("#HDeliveryNo").val(d.data[0].HDeliveryNo);
                 }
             });
         }
@@ -342,6 +349,30 @@
                         parent.layer.close(index); //鍐嶆墽琛屽叧闂�
                         //layer.close(layer.index);
                         break;
+
+                    case 'btn-Save':
+                        var HDeliveryNo = $("#HDeliveryNo").val();
+                        $.ajax(
+                            {
+                                type: "GET",
+                                url: GetWEBURL() + "SavePOInStock", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                                async: true,
+                                data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
+                                dataType: "json",
+                                success: function (data) {
+                                    if (data.Message.indexOf("鎴愬姛") > 0) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                        layer.msg(data.Message, { icon: 1 });
+                                    }
+                                    else {
+                                        layer.msg(data.Message, { icon: 5 });
+                                    }
+                                    layer.closeAll("loading");
+                                },
+                                error: function (err) {
+                                    f_alert("閿欒:" + err);
+                                }
+                            });
+                        break;
                 };
         });
             form.on('submit(Saver)', function (data) {//淇濆瓨
@@ -373,7 +404,31 @@
                 });
                 return false;
             });
-
+            form.on('submit(Save)', function (data) {//鏇存柊鐗╂祦鍗曞彿
+                //debugger;
+                var HDeliveryNo = $("#HDeliveryNo").val();
+                $.ajax(
+                    {
+                        type: "POST",
+                        url: GetWEBURL() + "SavePOInStock", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: true,
+                        data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.Message.indexOf("鎴愬姛") > 0) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.msg(data.Message, { icon: 1 });
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 5 });
+                            }
+                            layer.closeAll("loading");
+                        },
+                        error: function (err) {
+                            f_alert("閿欒:" + err);
+                        }
+                    });
+                return false;
+            });
 
 
 
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
index 819054c..85df07a 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
@@ -249,6 +249,7 @@
                 , { field: '鐘舵��', title: '鐘舵��', width: 100, sort: true, fixed: true }
                 , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 180, sort: true, fixed: true }
                 , { field: '閫佽揣鍗曞彿', title: '閫佽揣鍗曞彿', width: 180, sort: true, fixed: true }
+                , { field: '鐗╂祦鍗曞彿', title: '鐗╂祦鍗曞彿', width: 180, sort: true, fixed: true }
                 , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 180, sort: true  }
                 , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 180, sort: true  }
                 , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 180, sort: true  }
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html
index b6851ac..d63f7b5 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html
@@ -104,12 +104,12 @@
                                 <div class="layui-inline">
                                     <label class="layui-form-label">閲囪喘缁勭粐</label>
                                     <div class="layui-input-block">
-                                            <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter="">
-                                                <option value="">缁勭粐1</option>
-                                                <option value="">缁勭粐2</option>
-                                            </select>
-                                        </div>
+                                        <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter="">
+                                            <option value="">缁勭粐1</option>
+                                            <option value="">缁勭粐2</option>
+                                        </select>
                                     </div>
+                                </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鏄惁宸蹭笅鎺ㄩ�佽揣鍗�</label>
                                     <div class="layui-input-block">
@@ -125,7 +125,7 @@
                                         <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                     </button>
                                 </div>
-                                </div>
+                            </div>
 
                         </form>
                         <!--</div>-->
@@ -139,6 +139,7 @@
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-report" id="btn_report"><i class="layui-icon layui-icon-close-fill"></i>姹囨姤</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
@@ -204,12 +205,12 @@
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'code', 'table', 'element', 'layer'], function () {
             var $ = layui.$
-            , admin = layui.admin
-            , layer = layui.layer
-            , laydate = layui.laydate
-            , table = layui.table
-            , form = layui.form
-            , element = layui.element;
+                , admin = layui.admin
+                , layer = layui.layer
+                , laydate = layui.laydate
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
             //甯歌鐢ㄦ硶
             laydate.render({
                 elem: '#HDate1'
@@ -230,49 +231,50 @@
                 , toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘
                 , defaultToolbar: ['filter', 'exports', 'print']
                 // , where: { msg: "", NowPage: 1, OnePage: 10 }
-              , cellMinWidth: 100
-              , cols: [[
-                //{ checkbox: true, fixed: true }
-                 { type: 'checkbox', fixed: 'left' }
-                //{ type: 'radio', fixed: true }
-                , { field: 'sorderid', title: '搴忓彿', width: 80, fixed: true }
-                , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
-                , { field: 'hsubid', title: 'hsubid', sort: true, fixed: true, hide: true }
-                , { field: '鐘舵��', title: '鐘舵��', sort: true, fixed: true }
-                , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 180, sort: true, fixed: 'left' }
-                , { field: '鏃ユ湡', title: '鏃ユ湡', width: 180, sort: true, fixed: 'left' }
-                , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 180, sort: true, fixed: 'left' }
-                , { field: '璁″垝璺熻釜鍗曞彿', title: '璁″垝璺熻釜鍗曞彿', sort: true, hide: true }
-                , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 180, sort: true }
-                , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 180, sort: true }
-                , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 180, sort: true }
-                , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true }
-                , { field: '鏁伴噺', title: '璁㈣揣鏁伴噺', sort: true }
-                , { field: '浜よ揣鍦扮偣', title: '浜よ揣鍦扮偣', sort: true }
-                , { field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 180, sort: true }
-                , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', sort: true }
-                , { field: '鏈叧鑱旀暟閲�', title: '鏈叧鑱旀暟閲�', sort: true }
-                , { field: '鍓╀綑鍏ュ簱鏁伴噺', title: '鍓╀綑鍏ュ簱鏁伴噺', sort: true }
-                , { field: '鍓╀綑鏀舵枡鏁伴噺', title: '鍓╀綑鏀舵枡鏁伴噺', sort: true }
-                , { field: '鍏抽棴鐘舵��', title: '鍏抽棴鐘舵��', sort: true }
-                , { field: '鍙樻洿鐘舵��', title: '鍙樻洿鐘舵��', sort: true }
-                , { field: '閲囪喘缁勭粐', title: '閲囪喘缁勭粐', sort: true }
-                , { field: '纭浜�', title: '纭浜�', sort: true, hide: true }
-                , { field: '纭鏃ユ湡', title: '纭鏃ユ湡', sort: true, hide: true }
-                , { field: '椹冲洖浜�', title: '椹冲洖浜�', sort: true, hide: true }
-                , { field: '椹冲洖鏃ユ湡', title: '椹冲洖鏃ユ湡', sort: true, hide: true }
-                , { field: '椹冲洖鐞嗙敱', title: '椹冲洖鐞嗙敱', sort: true, hide: true }
-              ]]
+                , cellMinWidth: 100
+                , cols: [[
+                    //{ checkbox: true, fixed: true }
+                    { type: 'checkbox', fixed: 'left' }
+                    //{ type: 'radio', fixed: true }
+                    , { field: 'sorderid', title: '搴忓彿', width: 80, fixed: true }
+                    , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
+                    , { field: 'hsubid', title: 'hsubid', sort: true, fixed: true, hide: true }
+                    , { field: '鐘舵��', title: '鐘舵��', sort: true, fixed: true }
+                    , { field: '鍙嶉鐘舵��', title: '鍙嶉鐘舵��', width: 100, fixed: true }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 180, sort: true, fixed: 'left' }
+                    , { field: '鏃ユ湡', title: '鏃ユ湡', width: 180, sort: true, fixed: 'left' }
+                    , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 180, sort: true, fixed: 'left' }
+                    , { field: '璁″垝璺熻釜鍗曞彿', title: '璁″垝璺熻釜鍗曞彿', sort: true, hide: true }
+                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 180, sort: true }
+                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 180, sort: true }
+                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 180, sort: true }
+                    , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true }
+                    , { field: '鏁伴噺', title: '璁㈣揣鏁伴噺', sort: true }
+                    , { field: '浜よ揣鍦扮偣', title: '浜よ揣鍦扮偣', sort: true }
+                    , { field: '浜よ揣鏃ユ湡', title: '浜よ揣鏃ユ湡', width: 180, sort: true }
+                    , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', sort: true }
+                    , { field: '鏈叧鑱旀暟閲�', title: '鏈叧鑱旀暟閲�', sort: true }
+                    , { field: '鍓╀綑鍏ュ簱鏁伴噺', title: '鍓╀綑鍏ュ簱鏁伴噺', sort: true }
+                    , { field: '鍓╀綑鏀舵枡鏁伴噺', title: '鍓╀綑鏀舵枡鏁伴噺', sort: true }
+                    , { field: '鍏抽棴鐘舵��', title: '鍏抽棴鐘舵��', sort: true }
+                    , { field: '鍙樻洿鐘舵��', title: '鍙樻洿鐘舵��', sort: true }
+                    , { field: '閲囪喘缁勭粐', title: '閲囪喘缁勭粐', sort: true }
+                    , { field: '纭浜�', title: '纭浜�', sort: true, hide: true }
+                    , { field: '纭鏃ユ湡', title: '纭鏃ユ湡', sort: true, hide: true }
+                    , { field: '椹冲洖浜�', title: '椹冲洖浜�', sort: true, hide: true }
+                    , { field: '椹冲洖鏃ユ湡', title: '椹冲洖鏃ユ湡', sort: true, hide: true }
+                    , { field: '椹冲洖鐞嗙敱', title: '椹冲洖鐞嗙敱', sort: true, hide: true }
+                ]]
                 //, skin: 'row' //琛ㄦ牸椋庢牸
                 // , even: true
-            , page: true //鏄惁鏄剧ず鍒嗛〉
-            , limits: [10, 20, 50, 100]
-            , limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+                , page: true //鏄惁鏄剧ず鍒嗛〉
+                , limits: [10, 20, 50, 100]
+                , limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
                 //, height: 500
-            , done: function (res, curr, count) {
-                _cur_page = curr;
-                layer.closeAll("loading");
-            }
+                , done: function (res, curr, count) {
+                    _cur_page = curr;
+                    layer.closeAll("loading");
+                }
             });
 
             //澶村伐鍏锋爮浜嬩欢
@@ -283,28 +285,28 @@
                         var data = checkStatus.data;
                         layer.alert(JSON.stringify(data));
                         break;
-                        //case 'getCheckLength':
-                        //    var data = checkStatus.data;
-                        //    layer.msg('閫変腑浜嗭細' + data.length + ' 涓�');
-                        //    break;
-                        //case 'isAll':
-                        //    layer.msg(checkStatus.isAll ? '鍏ㄩ��' : '鏈叏閫�');
-                        //    break;
+                    //case 'getCheckLength':
+                    //    var data = checkStatus.data;
+                    //    layer.msg('閫変腑浜嗭細' + data.length + ' 涓�');
+                    //    break;
+                    //case 'isAll':
+                    //    layer.msg(checkStatus.isAll ? '鍏ㄩ��' : '鏈叏閫�');
+                    //    break;
 
-                        //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
+                    //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
                     case 'btn-reload':
                         _cur_page = $(".layui-laypage-em").next().html();
                         RoadHBillNo(sql);
                         break;
                     case 'btn-confirm':
                         var checkStatus = table.checkStatus('mainTable')
-                         , data = checkStatus.data;
+                            , data = checkStatus.data;
                         _cur_page = $(".layui-laypage-em").next().html();
                         if (data[0]["鐘舵��"] == "鏈‘璁�") {
                             layer.confirm('鏄惁纭鍗曟嵁?', { icon: 3, title: '鎻愮ず' }, function (index) {
                                 $.ajax({
                                     type: "get",
-                                    url: GetWEBURL()+"POOrderAccept",
+                                    url: GetWEBURL() + "POOrderAccept",
                                     data: { "HInterID": data[0]["hmainid"].toString(), "HBillNo": data[0]["鍗曟嵁鍙�"].toString(), "HUser": sessionStorage["HUserName"] },
                                     success: function (result) {
                                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -329,7 +331,7 @@
                         break;
                     case 'btn-back':
                         var checkStatus = table.checkStatus('mainTable')
-                       , data = checkStatus.data;
+                            , data = checkStatus.data;
                         _cur_page = $(".layui-laypage-em").next().html();
                         var HBackRemark;
                         if (data[0]["鐘舵��"] == "鏈‘璁�") {
@@ -343,7 +345,7 @@
                                 HBackRemark = value.toString();
                                 $.ajax({
                                     type: "get",
-                                    url: GetWEBURL()+"POOrderRefuse",
+                                    url: GetWEBURL() + "POOrderRefuse",
                                     data: { "HInterID": data[0]["hmainid"].toString(), "HBillNo": data[0]["鍗曟嵁鍙�"].toString(), "HUser": sessionStorage["HUserName"], "HBackRemark": HBackRemark },
                                     success: function (result) {
                                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -368,7 +370,7 @@
                         break;
                     case 'btn-details':
                         var checkStatus = table.checkStatus('mainTable')
-                       , data = checkStatus.data;
+                            , data = checkStatus.data;
 
                         var linterid = data[0].hmainid.toString();
                         //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
@@ -388,7 +390,7 @@
                         break;
                     case 'btn-generate':
                         var checkStatus = table.checkStatus('mainTable')
-                        , data = checkStatus.data;
+                            , data = checkStatus.data;
                         ajaxLabelData = data;
                         var rows = '';
                         var HEntry = '';
@@ -404,20 +406,20 @@
                             HEntry = HEntry.substring(0, HEntry.length - 1);
                             layer.msg("绗�" + HEntry + "琛屾湭纭锛�", { icon: 5 });
                         }
-                        else{
-                        layer.open({
-                            type: 2
-                            , area: ['100%', '100%']
-                            , title: '閫佽揣鍗�'
-                            , shade: 0.6 //閬僵閫忔槑搴�
-                            , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
-                            , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                            , content: ['../../views/SRM/SRM_POInStockBill_Edit.html?linterid=' + data[0].hmainid.toString() + '&lentryid=' + rows.toString() + '&lSourceBillType=1102', 'yes']
-                            , resize: false
-                            //, cancel: function () {
-                            //    $(".layui-btn").removeClass("layui-btn-disabled");
-                            //}
-                        })
+                        else {
+                            layer.open({
+                                type: 2
+                                , area: ['100%', '100%']
+                                , title: '閫佽揣鍗�'
+                                , shade: 0.6 //閬僵閫忔槑搴�
+                                , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                                , content: ['../../views/SRM/SRM_POInStockBill_Edit.html?linterid=' + data[0].hmainid.toString() + '&lentryid=' + rows.toString() + '&lSourceBillType=1102', 'yes']
+                                , resize: false
+                                //, cancel: function () {
+                                //    $(".layui-btn").removeClass("layui-btn-disabled");
+                                //}
+                            })
                         }
                         break;
                     case 'btn-exit':
@@ -425,6 +427,97 @@
                         //element.tabDelete('layadmin-layout-tabs', this);
                         parent.layui.admin.events.closeThisTabs();
                         //parent.layer.close(index);
+                        break;
+                    case 'btn-report':
+                        var checkStatus = table.checkStatus('mainTable')
+                            , data = checkStatus.data;
+                        _cur_page = $(".layui-laypage-em").next().html();
+                        var arr = new Array();
+                        var checkStatus = table.checkStatus('mainTable'),
+                            data = checkStatus.data;
+                        if (checkStatus.data.length == 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        for (var i = 0; i < data.length; i++) {
+                            arr.push(data[i].hmainid + '-' + data[i].hsubid);
+                        }
+                        var OrderBackId = "";
+                        layer.open({
+                            type: 2,
+                            skin: 'layui-layer-rim', //鍔犱笂杈规
+                            title: '璁㈠崟鍙嶉鐘舵��',
+                            closeBtn: 1,
+                            shift: 2,
+                            area: ['80%', '80%'],
+                            maxmin: true,
+                            content: ['../PublicPage/OrderBackInfomation.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('璇烽�夋嫨鏁版嵁');
+                                }
+                                OrderBackId = checkStatus.data[0].HItemID.toString();
+
+                                $.ajax({
+                                    url: GetWEBURL() + 'POOrderBack',
+                                    //url: 'http://localhost:8082/LuBaoAPI/' + 'POOrderBack',
+                                    async: false,
+                                    type: "GET",
+                                    dataType: "json",
+                                    data: { "HmainidList": arr.toString(), "OrderBackId": OrderBackId },
+                                    success: function (data1) {
+                                        if (data1.Message.indexOf("鎴愬姛") > 0) {
+                                            layer.msg("鎿嶄綔鎴愬姛", { time: 3 * 1000, icon: 1 }, function () {
+                                                var index = layer.getFrameIndex(window.name);
+                                                //鍏抽棴褰撳墠frame
+                                                layer.close(index);
+                                                //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                                window.location.reload();
+                                            });
+                                        } else {
+                                            layer.alert(data1.Message, { icon: 5 });
+                                        }
+                                    }, error: function (e) {
+                                        layer.alert(data1.Message, { icon: 5 });
+                                    }
+                                });
+                            }
+                            , btn2: function (index, layero) {
+                                //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                            },
+                            end: function () {
+                            },
+                            success: function (layero, index) {
+
+                            }
+                        });
+
+                        //layer.confirm('鏄惁纭鍗曟嵁?', { icon: 3, title: '鎻愮ず' }, function (index) {
+                        //    $.ajax({
+                        //        type: "get",
+                        //        url: GetWEBURL() + "POOrderAccept",
+                        //        data: { "HInterID": data[0]["hmainid"].toString(), "HBillNo": data[0]["鍗曟嵁鍙�"].toString(), "HUser": sessionStorage["HUserName"] },
+                        //        success: function (result) {
+                        //            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                        //                layer.msg(result.Message, { icon: 1 });
+                        //                RoadHBillNo(sql);
+                        //            }
+                        //            else {
+                        //                // $("#verifycode").click();
+                        //                layer.msg(result.Message, { icon: 5 });
+                        //            }
+                        //            layer.closeAll("loading");
+                        //        }
+                        //    })
+
+                        //    layer.close(index);
+                        //});
+
                         break;
                 };
             });
@@ -436,7 +529,7 @@
                 where = sqlWhere;
                 $.ajax({
                     type: "get",
-                    url: GetWEBURL()+"GetPOOrderBill",
+                    url: GetWEBURL() + "GetPOOrderBill",
                     async: true,
                     data: { "HSupNo": sessionStorage["HUserName"], "sqlWhere": sqlWhere },
                     success: function (result) {
@@ -482,15 +575,14 @@
                     sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HDate2").val() + "^^";
                 }
                 if ($("#HISGenerate").val() != "") {
-                    if ($("#HISGenerate").val() == "鏄�")
-                    {
+                    if ($("#HISGenerate").val() == "鏄�") {
                         sqlWhere += " and 鏈叧鑱旀暟閲� <= 0";
                     }
                     else if ($("#HISGenerate").val() == "鍚�") {
                         sqlWhere += " and 鏈叧鑱旀暟閲� > 0";
                     }
                 }
-                
+
 
                 var Time = $("#Time").val();
                 var dd = new Date();

--
Gitblit v1.9.1