From 7df042662e1929abdd667cfd7b037f4e10e8c2ad Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 14 三月 2024 11:27:56 +0800
Subject: [PATCH] 其他应付单 增加子表保存,目录放到采购管理,其他入库单编辑模块 并完善 其他出库单 列表功能;( 常规 功能, 新增,修改,删除,审核,作废,关闭,自定义过滤,源单类型列表(源单 手工录入), 合计行,保存控制,审核控制,删除控制,关联数回填 等等 ) (注: 基础资料选择, 均用 基础资料列表 的方式)

---
 WebTM/views/验收入库/产品入库/Kf_ProductInBill_FastList.html |  835 +++++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 522 insertions(+), 313 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html"
index 78177d6..9d4fcb5 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html"
@@ -1,7 +1,7 @@
 锘�<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <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">
@@ -38,26 +38,66 @@
                         <ul class="layui-tab-title" lay-filter="tab-all">
                             <li lay-id="1">缂撳瓨鍒楄〃</li>
                             <li lay-id="2">宸蹭笂浼犲垪琛�</li>
+                            <li lay-id="3">宸蹭笂浼犳煡璇�</li>
                         </ul>
                         <div class="layui-tab-content">
                             <div class="layui-tab-item  layui-show">
                                 <div class="layui-row">
                                     <div class="layui-col-xs12">
-                                        <table class="layui-hide" id="dj-table" lay-filter="dj-table"></table>
-                                    </div>
-                                </div>
+                                        <div class="layui-form layui-border-box layui-table-view" lay-filter=" dj-table" lay-id="dj-table" style=" height:500px;margin-bottom:20px;">
+                                            <table class="layui-hide" id="dj-table" lay-filter="dj-table"></table>
+                                        </div>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">缂栬緫</button>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">鍒犻櫎</button>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">鍒锋柊</button>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">閫�鍑�</button>
+                                     </div>
+                                 </div>
                             </div>
                             <div class="layui-tab-item">
                                 <div class="layui-row">
                                     <div class="layui-col-xs12">
-                                        <table class="layui-hide" id="yd-table" lay-filter="yd-table"></table>
+                                        <div class="layui-form layui-border-box layui-table-view" lay-filter=" yd-table" lay-id="yd-table" style=" height:500px;margin-bottom:20px;">
+                                            <table class="layui-hide" id="yd-table" lay-filter="yd-table"></table>
+                                        </div>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRescind">鎾ら攢</button>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">鍒锋柊</button>
+                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">閫�鍑�</button>
+                                        
+                                     </div>
+                                </div>
+                            </div>
+                            <div class="layui-tab-item">
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鍗曟嵁鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">婧愬崟鍙�</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HSourceBillNo" id="HSourceBillNo">
+                                    </div>
+                                </div>
+                                <!--<div class="layui-col-xs2">
+                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdQuery">鏌ヨ</button>
+                                </div>-->
+                                <div class="layui-row">
+                                    <div class="layui-col-xs12">
+                                        <div class="layui-form layui-border-box layui-table-view" lay-filter=" sy-table" lay-id="sy-table" style=" height:500px;margin-bottom:20px;">
+                                            <table class="layui-hide" id="sy-table" lay-filter="sy-table"></table>
+                                        </div>
+                                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRescind">鎾ら攢</button>
+                                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdQuery">鏌ヨ</button>
+                                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">閫�鍑�</button>
                                     </div>
                                 </div>
                             </div>
                         </div>
                         <div class="layui-form-item" style="margin-bottom: 20px;">
                             <div class="layui-row">
-                                <div class="layui-col-xs2">
+                                <!--<div class="layui-col-xs2">
                                     <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">缂栬緫</button>
                                 </div>
                                 <div class="layui-col-xs2">
@@ -71,10 +111,10 @@
                                 </div>
                                 <div class="layui-col-xs2">
                                     <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">閫�鍑�</button>
-                                </div>
-                                <div class="layui-col-xs2">
-                                    <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="cmdAdd">鏂板</button>-->
-                                </div>
+                                </div>-->
+                                <!--<div class="layui-col-xs2">
+                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdAdd">鏂板</button>
+                                </div>-->
                             </div>
                         </div>
                     </div>
@@ -87,342 +127,511 @@
     <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
     <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
     <script>
-    layui.config({
-        base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
-    }).extend({
-        index: 'lib/index' //涓诲叆鍙fā鍧�
-    }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
-        var $ = layui.$
-            , admin = layui.admin
-            , layer = layui.layer
-            , table = layui.table
-            , form = layui.form
-            , element = layui.element;
-        //娓呯┖鐣岄潰  new
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
+            var option = {}
 
-        //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
+            //娓呯┖鐣岄潰  new
 
-        //鍔犺浇婧愬崟绫诲瀷
-
-        //璇诲彇鍗曟嵁鍒楄〃
-        //
-
-        form.on('submit(Cancel)', function () {
-            parent.location.href = "../../../views/index.html"
-            //window.close();//鍏抽棴褰撳墠椤�
-        })
-
-        //form.on('submit(cmdModify)', function () {//缂栬緫
-        //    var sSubStr = table.cache['dj-table'];
-        //    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
-        //  //  var checkStatus = table.checkStatus('dj-table')
-        //  //, data = checkStatus.data;
-
-        //    layer.open({
-        //        type: 2
-        //        , area: ['100%', '100%']
-        //        , title: '浜у搧鍏ュ簱'
-        //        , shade: 0.6 //閬僵閫忔槑搴�
-        //        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-        //        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-        //        , content: ['../../../views/楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html?table=' + JSON.stringify(sSubStr), 'yes']
-        //        , resize: false
-        //        , cancel: function () {
-        //            //$(".layui-btn").removeClass("layui-btn-disabled");
-        //        }
-        //    })
-        //    // }
-        //});
-
-
-
-        form.on('submit(cmdModify)', function () {
-            //var checkStatus = table.checkStatus('dj-table')
-            //    , data = checkStatus.data;
-            //var sInterID = data[0].HInterID
-            //var sBillNo = data[0].HBillNo
-            //var sBillType = '1202'
-
-            //$.ajax({
-            //    url: GetWEBURL() + "/ProductIn/ProductInTempList_Modify",
-            //    type: "GET",
-            //    data: { "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType },
-            //    success: function (result) {
-            //        if (result.count == 1) {
-            //            layer.open({
-            //                type: 2
-            //                , area: ['100%', '100%']
-            //                , title: '浜у搧鍏ュ簱鍗�'
-            //                , shade: 0.6 //閬僵閫忔槑搴�
-            //                , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
-            //                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-            //                , content: ['../../楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
-            //                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
-            //                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes']
-            //                , resize: false
-            //                , cancel: function () {
-            //                    $(".layui-btn").removeClass("layui-btn-disabled");
-            //                }
-            //            })
-            //        }
-            //        else {
-            //            layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-            //        }
-            //    }
-            //        })
-            //      }
-              
-            ////ajaxLabelData = data;
-            ////layer.alert(rows);
-            var checkStatus = table.checkStatus('dj-table')
-                , data = checkStatus.data;
-            //ajaxLabelData = data;
-            //layer.alert(rows);
-            layer.open({
-                type: 2
-                , area: ['100%', '100%']
-                , title: '浜у搧鍏ュ簱鍗�'
-                , shade: 0.6 //閬僵閫忔槑搴�
-                , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
-                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                , content: ['../../楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
-                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
-                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes']
-                , resize: false
-                , cancel: function () {
-                    $(".layui-btn").removeClass("layui-btn-disabled");
-                }
-            })
-        });
-        var option = {
-            elem: '#dj-table'
-            //, url: GetWEBURL() + '/ProductIn/DisBillEntryList_Json'
-            , toolbar: '#toolbarDemo'
-            , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
-            , cols: [[
-                { type: 'radio' }
-                , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
-                , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
-                , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
-                , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
-                , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 100 }
-                , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
-            ]]
-            , height: 500
-            , done: function () {
-                layer.closeAll("loading");
-            }
-        }
-        // url: GetWEBURL() + '/Web/chanpinruk',
-        form.on('submit(cmdRefresh)', function () {//鍒锋柊
-            table.render({
-                elem: '#dj-table'
-                ,url: GetWEBURL() + '/Web/chanpinruk'
-                , toolbar: '#toolbarDemo'
-                , defaultToolbar: []
-                , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
-                , cols: [[
-                    { type: 'radio' }
-                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
-                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
-                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
-                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
-                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                    , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 100 }
-                    , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
-                ]]
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
-            }),
-            table.render({
-                elem: '#yd-table'
-                , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
-                , toolbar: '#toolbarDemo'
-                , defaultToolbar: []
-                , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
-                , cols: [[
-                    { type: 'radio' }
-                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
-                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
-                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
-                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
-                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
-                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                    , { field: 'HOrgID', title: '缁勭粐', width: 100 }
-                ]]
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
-            })
-        });
-
-
-        //鎾ら攢鍔熻兘
-        form.on('submit(cmdRescind)', function () {
-            var checkStatus = table.checkStatus('yd-table')
-                , data = checkStatus.data;
-            var sInterID = data[0].HInterID
-            var sBillNo = data[0].HBillNo
             var sBillType = '1202'
-            $.ajax(
-                {
-                    type: "Get",
-                    url: GetWEBURL() + "/Web/Rescind_Json",
-                    async: true,
-                    data: { "sHInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType },
-                    dataType: "json",
-                    success: function (data) {
-                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
-                                // 寰楀埌frame绱㈠紩
-                                var index = layer.getFrameIndex(window.name);
-                                //鍏抽棴褰撳墠frame
-                                layer.close(index);
-                                //淇敼涓哄姛鍚庡埛鏂扮晫闈�
-                                window.location.reload();
-                            });
-                        }
-                       else {
-                            layer.msg(data.Message, { icon: 2 });
-                        }
-                    },
-                    error: function (err) {
-                        layer.msg('閿欒' + err, {
-                            icon: 5,
-                            time: 20000
-                        }, function () {
-                            //do something
-                        });
-                    }
+            //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
+
+            //鍔犺浇婧愬崟绫诲瀷
+
+            //璇诲彇鍗曟嵁鍒楄〃
+            //
+
+            form.on('submit(cmdCancel)', function () {
+                layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+                    parent.location.href = "../../../views/index_Mobile.html"
                 });
-        });
+                //window.close();//鍏抽棴褰撳墠椤�
+            })
 
 
+            form.on('submit(cmdModify)', function () {
+                //var checkStatus = table.checkStatus('dj-table')
+                //    , data = checkStatus.data;
+                //var sInterID = data[0].HInterID
+                //var sBillNo = data[0].HBillNo
+                //var sBillType = '1202'
+
+                //$.ajax({
+                //    url: GetWEBURL() + "/ProductIn/ProductInTempList_Modify",
+                //    type: "GET",
+                //    data: { "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType },
+                //    success: function (result) {
+                //        if (result.count == 1) {
+                //            layer.open({
+                //                type: 2
+                //                , area: ['100%', '100%']
+                //                , title: '浜у搧鍏ュ簱鍗�'
+                //                , shade: 0.6 //閬僵閫忔槑搴�
+                //                , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                //                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                //                , content: ['../../楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
+                //                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
+                //                // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes']
+                //                , resize: false
+                //                , cancel: function () {
+                //                    $(".layui-btn").removeClass("layui-btn-disabled");
+                //                }
+                //            })
+                //        }
+                //        else {
+                //            layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                //        }
+                //    }
+                //        })
+                //      }
+
+                ////ajaxLabelData = data;
+                ////layer.alert(rows);
+                var checkStatus = table.checkStatus('dj-table')
+                    , data = checkStatus.data;
+                //ajaxLabelData = data;
+                //layer.alert(rows);
+                layer.open({
+                    type: 2
+                    , area: ['100%', '100%']
+                    , title: '浜у搧鍏ュ簱鍗�'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../楠屾敹鍏ュ簱/浜у搧鍏ュ簱/Kf_ProductInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
+                    // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + JSON.stringify(data), 'yes']
+                    // , content: ['../../views/WarM/KF_POInStockBill.html?linterid=' + rows, 'yes']
+                    , resize: false
+                    , cancel: function () {
+                        $(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                })
+            });
 
 
-        form.on('submit(cmdDelete)', function () {//鍒犻櫎
-            var checkStatus = table.checkStatus('dj-table')
-                , data = checkStatus.data;
-            if (checkStatus.data.length === 1) {
-                var sInterID = data[0].HInterID
-                //閫昏緫鍒犻櫎鏂规硶
-                layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
-                    $.ajax(
-                        {
-                            type: "Get",
-                            url: GetWEBURL() + "/ProductInBillList/Delete_Json",
-                            async: true,
-                            data: { "sHInterID": sInterID },
-                            dataType: "json",
-                            success: function (data) {
-                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�,
-                                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
-                                        // 寰楀埌frame绱㈠紩
-                                        var index = layer.getFrameIndex(window.name);
-                                        //鍏抽棴褰撳墠frame
-                                        layer.close(index);
-                                        //淇敼涓哄姛鍚庡埛鏂扮晫闈�
-                                        window.location.reload();
-                                    });
-                                }
-                                else {
-                                    layer.msg(data.Message, { icon: 2 });
-                                }
-                            },
-                            error: function (err) {
-                                layer.msg('閿欒' + err, {
-                                    icon: 5,
-                                    time: 20000
-                                }, function () {
-                                    //do something
+            table.render({
+                elem: '#sy-table'
+                , toolbar: '#toolbarDemo'
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    , { field: 'HOrgID', title: '缁勭粐', width: 120 }
+                ]]
+                , height: 500
+            })
+
+           
+            // url: GetWEBURL() + '/Web/chanpinruk',
+            form.on('submit(cmdRefresh)', function () {//鍒锋柊
+                ////鍒锋柊缂撳瓨鍒楄〃鐨勬覆鏌�
+                //table.render({
+                //    elem: '#dj-table'
+                //    , url: GetWEBURL() + '/Web/chanpinruk'
+                //    , toolbar: '#toolbarDemo'
+                //    , defaultToolbar: []
+                //    , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+                //    , cols: [[
+                //        { type: 'radio' }
+                //        , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                //        , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                //        , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                //        , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                //        , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                //        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                //        , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
+                //        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
+                //    ]]
+                //    , height: 500
+                //    , done: function () {
+                //        layer.closeAll("loading");
+                //    }
+                //}),
+
+                //鍔ㄦ�佸垪琛�-鍒锋柊缂撳瓨鍒楄〃
+                table.render(option);
+
+                //鍒锋柊宸蹭笂浼犲垪琛�
+                    table.render({
+                        elem: '#yd-table'
+                        , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
+                        , toolbar: '#toolbarDemo'
+                        , defaultToolbar: []
+                        , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+                        , page: true  // 寮�鍚垎椤�
+                        , limits: [20, 40, 80,100]
+                        , limit: 20
+                        , cols: [[
+                            { type: 'radio' }
+                            , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                            , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                            , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                            , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                            , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                            , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                            , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                            , { field: 'HOrgID', title: '缁勭粐', width: 120 }
+                        ]]
+                        , height: 500
+                        , done: function () {
+                            layer.closeAll("loading");
+                        }
+                    })
+            });
+
+
+            //鎾ら攢鍔熻兘
+            form.on('submit(cmdRescind)', function () {
+                var checkStatus = table.checkStatus('yd-table');
+                var checkStatus2 = table.checkStatus('sy-table');
+                var checkStatus3 = table.checkStatus('dj-table'); 
+                var data = "";
+                if (checkStatus.data.length != 0) {
+                    data = checkStatus.data;
+                } else if (checkStatus2.data.length != 0) {
+                    data = checkStatus2.data;
+                } else if (checkStatus3.data.length != 0) {
+                    data = checkStatus3.data;
+                } else {
+                    return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
+                }
+                var sInterID = data[0].HInterID == 'undefined' ? data[0].鍗曟嵁鍐呯爜 : data[0].HInterID;
+                var sBillNo = data[0].HBillNo == 'undefined' ? data[0].鍗曟嵁鍙� : data[0].HBillNo;
+                var sBillType = '1202'
+                $.ajax(
+                    {
+                        type: "Get",
+                        url: GetWEBURL() + "/Web/Rescind_Json",
+                        async: true,
+                        data: { "sHInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                    // 寰楀埌frame绱㈠紩
+                                    var index = layer.getFrameIndex(window.name);
+                                    //鍏抽棴褰撳墠frame
+                                    layer.close(index);
+                                    //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                    window.location.reload();
                                 });
                             }
-                        });
-                })
-            }
-            else {
-                layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
-            }
-            
-        });
-        
-       
-        
-        var sBillType = '1202'
+                            else {
+                                layer.msg(data.Message, { icon: 2 });
+                            }
+                        },
+                        error: function (err) {
+                            layer.msg('閿欒' + err, {
+                                icon: 5,
+                                time: 20000
+                            }, function () {
+                                //do something
+                            });
+                        }
+                    });
+            });
+
+
+
+
+            form.on('submit(cmdDelete)', function () {//鍒犻櫎
+                var checkStatus = table.checkStatus('dj-table')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var sInterID = data[0].HInterID == 'undefined' ? data[0].鍗曟嵁鍐呯爜 : data[0].HInterID;
+                    //閫昏緫鍒犻櫎鏂规硶
+                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                        $.ajax(
+                            {
+                                type: "Get",
+                                url: GetWEBURL() + "/ProductInBillList/Delete_Json",
+                                async: true,
+                                data: { "sHInterID": sInterID },
+                                dataType: "json",
+                                success: function (data) {
+                                    if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�,
+                                        layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                            // 寰楀埌frame绱㈠紩
+                                            var index = layer.getFrameIndex(window.name);
+                                            //鍏抽棴褰撳墠frame
+                                            layer.close(index);
+                                            //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                            window.location.reload();
+                                        });
+                                    }
+                                    else {
+                                        layer.msg(data.Message, { icon: 2 });
+                                    }
+                                },
+                                error: function (err) {
+                                    layer.msg('閿欒' + err, {
+                                        icon: 5,
+                                        time: 20000
+                                    }, function () {
+                                        //do something
+                                    });
+                                }
+                            });
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+
+            });
+            //鏌ヨ
+            form.on('submit(cmdQuery)', function () {
+                var HBillNo = $("#HBillNo").val();
+                var HSourceBillNo = $("#HSourceBillNo").val();;
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                //$.ajax({
+                //    url: GetWEBURL() + '/ProductInBillList/list1',
+                //    type: "GET",
+                //    data: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo },
+                //    success: function (data1) {
+                //        if (data1.count == 1) {
+                //            //option.data = data1.data;
+                //            //table.render(option);
+                //            table.render({
+                //                elem: '#sy-table'
+                //                , toolbar: '#toolbarDemo'
+                //                , cols: [[
+                //                    { type: 'radio' }
+                //                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
+                //                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
+                //                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
+                //                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
+                //                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                //                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
+                //                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                //                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                //                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
+                //                    , { field: 'HOrgID', title: '缁勭粐', width: 100 }
+                //                ]]
+                //                , height: 500
+                //            })
+                //            //layer.close(index);
+                //        } else {
+                //            layer.close(index);
+                //            layer.alert(data1.code + data1.Message, { icon: 5 });
+                //        }
+                //    }, error: function () {
+                //        layer.close(index);
+                //        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                //    }
+                //});
+
+
                 table.render({
-                    elem: '#dj-table'
-                    , url: GetWEBURL() + '/Web/chanpinruk'
+                    elem: '#sy-table'
+                    , url: GetWEBURL() + '/ProductInBillList/list1'
                     , toolbar: '#toolbarDemo'
                     , defaultToolbar: []
-                    , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"]}
+                    , where: { "BillType": sBillType, "HBillNo": HBillNo, "HSourceBillNo": HSourceBillNo }
                     , cols: [[
-                          { type: 'radio' }
-                        , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
-                        , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
-                        , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
-                        , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
+                        { type: 'radio' }
+                        , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                        , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                        , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                        , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
                         , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                        , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 100 }
-                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
-                        ]]
-                      , height: 500
-                      , done: function () {
-                          layer.closeAll("loading");
-                      }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                        , { field: 'HOrgID', title: '缁勭粐', width: 120 }
+                    ]]
+                    , height: 500
+                    , done: function () {
+                        layer.closeAll("loading");
+                    }
                 })
+            });
+
+            ////缂撳瓨鍒楄〃
+            //table.render({
+            //    elem: '#dj-table'
+            //    , url: GetWEBURL() + '/Web/chanpinruk'
+            //    , toolbar: '#toolbarDemo'
+            //    , defaultToolbar: []
+            //    , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+            //    , cols: [[
+            //        { type: 'radio' }
+            //        , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+            //        , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+            //        , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+            //        , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+            //        , { field: 'HQty', title: '鏁伴噺', width: 100 }
+            //        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+            //        , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
+            //        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
+            //    ]]
+            //    , height: 500
+            //    , done: function () {
+            //        layer.closeAll("loading");
+            //    }
+            //})
 
 
-        //宸蹭笂浼犲垪琛�
+            //鍔ㄦ�佸垪-缂撳瓨鍒楄〃
+            $.ajax({
+                url: GetWEBURL() + "/Web/chanpinruk1",
+                type: "GET",
+                async: false,
+                data: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] },
+                //async: false,
+                success: function (data1) {
+
+                    if (data1.count == 1) {
+
+                        var data = [];
+                        var col = [];
+                        //缁欑┖鐨勬暟缁勮祴鍊�
+                        for (var key in data1.list) {
+                            data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                        }
+                        //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                        col.push({ type: 'radio', fixed: 'left' });
+                        for (var i = 0; i < data.length; i++) {
+                            if ($.inArray(data[i].name, "") > -1) {
+                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                            }
+                            else {
+                                switch (data[i].Type) {
+                                    //int
+                                    case 'DateTime':
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+                                        break;
+                                    default:
+                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                }
+                            }
+                        }
+
+                        option = {
+                            elem: '#dj-table'
+                            , toolbar: '#toolbarDemo'
+                            , height: 500
+                            , page: true //寮�鍚垎椤�
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , cols: [col]
+                            , data: data1.data
+                        };
+                        table.render(option);
+                    } else {
+                        option = {
+                            elem: '#dj-table'
+                            , toolbar: '#toolbarDemo'
+                            , height: 500
+                            , page: true //寮�鍚垎椤�
+                            , limit: 50
+                            , limits: [50, 500, 5000, 20000]
+                            , cols: [[
+                                { type: 'radio' }
+                                , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                                , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                            ]]
+                            , data: []
+                        };
+                        table.render(option);
+                    }
+                },
+                error: function (err) {
+                    layer.msg('閿欒' + err, {
+                        icon: 5,
+                        time: 20000
+                    }, function () {
+                        //do something
+                    });
+                }
+            })
+
+            //宸蹭笂浼犲垪琛�
             table.render({
                 elem: '#yd-table'
                 , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
                 , toolbar: '#toolbarDemo'
                 , defaultToolbar: []
                 , where: { HBillType: sBillType, HMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+                , page: true  // 寮�鍚垎椤�
+                , limits: [20, 40, 80, 100]
+                , limit: 20
                 , cols: [[
-                      { type: 'radio' }
-                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 80 }
-                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 80 }
-                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 100 }
-                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 100 }
-                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 100 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 100 }
+                    { type: 'radio' }
+                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
                     , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 100 }
-                    , { field: 'HOrgID', title: '缁勭粐', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    , { field: 'HOrgID', title: '缁勭粐', width: 120 }
                 ]]
                 , height: 500
                 , done: function () {
                     layer.closeAll("loading");
                 }
             })
-        //鍒锋柊鏄庣粏椤电
-        table.render({
-            elem: '#mx-table'
-            // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
-            //, toolbar: '#toolbarDemo'
-            // , where: { sMsg: linterid, sMsg2: lentryid }
-         , cols: [[
-           , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
-         ]]
-         , page: true
-         , height: 500
-         , done: function () {
-         }
+
+            //宸蹭笂浼犳煡璇�
+            table.render({
+                elem: '#sy-table'
+                , toolbar: '#toolbarDemo'
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+                    , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    , { field: 'HOrgID', title: '缁勭粐', width: 120 }
+                ]]
+                , height: 500
+            })
+
+            //鍒锋柊鏄庣粏椤电
+            table.render({
+                elem: '#mx-table'
+                // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
+                //, toolbar: '#toolbarDemo'
+                // , where: { sMsg: linterid, sMsg2: lentryid }
+                , cols: [[
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
+                ]]
+                , page: true
+                , height: 500
+                , done: function () {
+                }
+            });
         });
-    });
-    //娓呯┖琛ㄥご
+        //娓呯┖琛ㄥご
     </script>
 
 </body>

--
Gitblit v1.9.1