From 3de6a9eb5d6c00a756831fbab13da264c198ece7 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 25 四月 2024 16:16:50 +0800
Subject: [PATCH] 用户编辑页面添加 IC卡号 自动;异常反馈单刷卡签到

---
 WebTM/views/仓存管理/仓库调拨/Cc_LookingForBill.html |  161 +++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 118 insertions(+), 43 deletions(-)

diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
index 9ebeeaf..089ec8f 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Cc_LookingForBill.html"
@@ -2,7 +2,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-    <title>鎵捐揣鍗�</title>
+<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">
@@ -16,18 +16,18 @@
             <div class="layui-card-body" style="padding: 5px; height:800px;">
                 <form class="layui-form" action="" lay-filter="component-form-group">
                     <div style="background-color:#0085E8;">
-                        <span style="color: white;"><i class="layui-icon layui-icon-form"></i>鎵捐揣鍗�</span>
+                        <span style="color: white;"><i class="layui-icon layui-icon-form"></i>涓嬫灦鎵捐揣鍗�</span>
                     </div>
                     <div class="layui-form-item" style="padding:15px;margin:0px">
                         <div class="layui-row">
                             <div class="layui-col-xs3">
-                                <label class="layui-form-label" style="width:90px;padding-left:0px;">婧愬崟鍙�</label>
+                                <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍙�</label>
                             </div>
                             <div class="layui-col-xs8">
                                 <input type="text" name="HSourceBillNo" id="HSourceBillNo" autocomplete="off" class="layui-input">
                             </div>
                             <div class="layui-col-xs3">
-                                <label class="layui-form-label" style="width:90px;padding-left:0px;">瀹炵墿鏉$爜</label>
+                                <label class="layui-form-label" style="width:60px;padding-left:0px;">瀹炵墿鏉$爜</label>
                             </div>
                             <div class="layui-col-xs8">
                                 <input type="text" name="HBarCode" id="HBarCode" autocomplete="off" class="layui-input">
@@ -45,6 +45,7 @@
                         <ul class="layui-tab-title" lay-filter="tab-all">
                             <li lay-id="1" style="padding:1px;display:none">琛ㄥご淇℃伅</li>
                             <li lay-id="2" style="padding:1px;" class="layui-this">鏄庣粏淇℃伅</li>
+                            <li lay-id="3" style="padding:1px;">宸叉壂淇℃伅</li>
                         </ul>
                         <div class="layui-tab-content">
                             <!--琛ㄥご淇℃伅-->
@@ -121,6 +122,10 @@
                             <div class="layui-tab-item layui-show">
                                 <table class="layui-hide" id="bzd-table" lay-filter="bzd-table"></table>
                             </div>
+                            <!--宸叉壂淇℃伅-->
+                            <div class="layui-tab-item">
+                                <table class="layui-hide" id="bzd-table2" lay-filter="bzd-table2"></table>
+                            </div>
                         </div>
                     </div>
                     <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
@@ -155,6 +160,13 @@
                 , form = layui.form
                 , element = layui.element;
 
+            //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            if (sessionStorage.login != "login") {
+                layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                }, function () { window.location.href = "../../user/login.html"; });
+            }
+
             //鍒濆鍩烘湰淇℃伅璧嬪��
             $("#HWHID").val(sessionStorage["HWHID"]);
             $("#HWHName").val(sessionStorage["HWHName"]);
@@ -167,13 +179,21 @@
             $("#HMakerID").val(sessionStorage["Czybm"]);
             $("#HMaker").val(sessionStorage["HUserName"]);
 
+
+            //鍒ゆ柇鐢ㄦ埛鏄惁缁戝畾鐝粍鍜岀敓浜ц祫婧�
+            if ($("#HGroupID").val() == 0 || $("#HSourceID").val() == 0) {
+                layer.confirm("璇ョ敤鎴锋湭缁戝畾鐝粍鎴栫敓浜ц祫婧愶紒涓嶅厑璁告壘璐э紒", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['纭閫�鍑�']
+                }, function () { window.location.href = "../../index.html"; });
+            }
+
             //鑾峰彇鏈�澶у崟鎹彿 new
             $("#HInterID").val("");
             $("#HBillNo").val("");
             $.ajax({
                 url: GetWEBURL() + "/Web/GetMAXNum",
                 type: "GET",
-                data: { "HBillType": '1252' },
+                data: { "HBillType": '1253' },
                 success: function (d) {
                     //console.log(d.data);
                     $("#HInterID").val(d.data[0].HInterID);
@@ -188,17 +208,18 @@
                 , page: true
                 //, height: 256
                 , cellMinWidth: 90
+                , limit: 500
                 , cols: [[
                     { type: 'numbers', title: '搴忓彿' }
                     , { field: 'HIsStatus', title: '鏄惁鎵爜' }
+                    , { field: 'HMTONo', title: '鎵瑰彿', width: 180 }
+                    , { field: 'HSPID', title: '浠撲綅ID', hide: true }
+                    , { field: 'HSPName', title: '浠撲綅', hide: true }
+                    , { field: 'HStatus', title: '鍦ㄥ簱鐘舵��', width: 165 }
+                    , { field: 'HWhID', title: '浠撳簱ID', hide: true }
+                    , { field: 'HWhName', title: '浠撳簱', width: 130, hide: true }
                     , { field: 'HSourceInterID', title: '婧愬崟ID', hide: true }
                     , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 110 }
-                    , { field: 'HMTONo', title: '鎵瑰彿', width: 180 }
-                    , { field: 'HStatus', title: '鍦ㄥ簱鐘舵��' }
-                    , { field: 'HWhID', title: '浠撳簱ID', hide: true }
-                    , { field: 'HWhName', title: '浠撳簱' }
-                    , { field: 'HSPID', title: '浠撲綅ID', hide: true }
-                    , { field: 'HSPName', title: '浠撲綅' }
                     , { field: 'HGroupID', title: '鐝粍ID', hide: true }
                     , { field: 'HGroup', title: '鐝粍' }
                     , { field: 'HSourceID', title: '鐢熶骇璧勬簮ID', hide: true }
@@ -210,20 +231,64 @@
                     , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿' }
                     , { field: '鍗虫椂搴撳瓨', title: '鍗虫椂搴撳瓨' }
                     , { field: 'HBarCode', title: '鏉$爜缂栧彿', hide: true }
-                    , { field: 'HInterID', title: '鍗曟嵁ID' }
+                    , { field: 'HInterID', title: '鍗曟嵁ID', hide: true }
                     , { field: 'HBillNo', title: '鍗曟嵁鍙�' }
-                    , { field: 'HMakerID', title: '鍒跺崟浜篒D' }
+                    , { field: 'HMakerID', title: '鍒跺崟浜篒D', hide: true }
                     , { field: 'HMaker', title: '鍒跺崟浜�' }
-                    , { field: 'HBillType', title: 'HBillType' }
+                    , { field: 'HBillType', title: 'HBillType', hide: true }
                 ]]
                 , text: {
                     none: '鏆傛棤鐩稿叧鏁版嵁锛岃鍏堟壂鎻忔簮鍗曞彿锛�' //榛樿锛氭棤鏁版嵁銆傛敞锛氳灞炴�т负 layui 2.2.5 寮�濮嬫柊澧�
                 }
             };
 
+            //涓昏〃鍒楄〃-宸叉壂淇℃伅
+            var option2 = {
+                elem: '#bzd-table2'
+                //, toolbar: '#toolbarDemo'
+                , page: true
+                //, height: 256
+                , cellMinWidth: 90
+                , limit: 500
+                , cols: [[
+                    { type: 'numbers', title: '搴忓彿' }
+                    , { field: 'HIsStatus', title: '鏄惁鎵爜' }
+                    , { field: 'HMTONo', title: '鎵瑰彿', width: 180 }
+                    , { field: 'HSPID', title: '浠撲綅ID', hide: true }
+                    , { field: 'HSPName', title: '浠撲綅', hide: true }
+                    , { field: 'HStatus', title: '鍦ㄥ簱鐘舵��', width: 165 }
+                    , { field: 'HWhID', title: '浠撳簱ID', hide: true }
+                    , { field: 'HWhName', title: '浠撳簱', width: 130, hide: true }
+                    , { field: 'HSourceInterID', title: '婧愬崟ID', hide: true }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 110 }
+                    , { field: 'HGroupID', title: '鐝粍ID', hide: true }
+                    , { field: 'HGroup', title: '鐝粍' }
+                    , { field: 'HSourceID', title: '鐢熶骇璧勬簮ID', hide: true }
+                    , { field: 'HSource', title: '鐢熶骇璧勬簮', width: 115, templet: '#sexTpl' }
+                    , { field: 'HQty', title: '鏁伴噺' }
+                    , { field: 'HMaterID', title: '鐗╂枡ID', hide: true }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜' }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿' }
+                    , { field: '鍗虫椂搴撳瓨', title: '鍗虫椂搴撳瓨' }
+                    , { field: 'HBarCode', title: '鏉$爜缂栧彿', hide: true }
+                    , { field: 'HInterID', title: '鍗曟嵁ID', hide: true }
+                    , { field: 'HBillNo', title: '鍗曟嵁鍙�' }
+                    , { field: 'HMakerID', title: '鍒跺崟浜篒D', hide: true }
+                    , { field: 'HMaker', title: '鍒跺崟浜�' }
+                    , { field: 'HBillType', title: 'HBillType', hide: true }
+                ]]
+                , text: {
+                    none: '鏆傛棤鐩稿叧鏁版嵁锛岃鍏堟壂鎻忓疄鐗╂潯鐮侊紒' //榛樿锛氭棤鏁版嵁銆傛敞锛氳灞炴�т负 layui 2.2.5 寮�濮嬫柊澧�
+                }
+            };
+
             //鍒濆鍔犺浇琛ㄦ牸
             option.data = [];
             table.render(option);
+
+            option2.data = [];
+            table.render(option2);
 
             //杩涘叆椤甸潰榛樿鍏夋爣鍦ㄦ簮鍗曞彿涓�
             $("#HSourceBillNo").focus();
@@ -278,9 +343,9 @@
                                         rowFlage += i + 1 + ",";
                                     }
                                 }
-                                if (rowFlage) {
-                                    layer.msg("绗�" + rowFlage + "琛屾暟鎹棤鏉$爜锛岃鍏堢敓鎴愭潯鐮侊紒", { icon: 5, btn: ['鎴戝凡鐭ユ檽'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                                }
+                                //if (rowFlage) {
+                                //    layer.msg("绗�" + rowFlage + "琛屾暟鎹棤鏉$爜锛岃鍏堢敓鎴愭潯鐮侊紒", { icon: 5, btn: ['鎴戝凡鐭ユ檽'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                                //}
                                 $("#HSourceBillNo").attr("readonly", "readonly");//婧愬崟鍙峰彧璇�
                                 $("#HSourceBillNo").css("background-color", "#efefef4d");
                                 element.tabChange('tab-LookingForBill', '2');  //璺宠浆椤电
@@ -298,6 +363,7 @@
                 }
             });
 
+            var data = new Object();
             //鎵疄鐗╂潯鐮�
             $('#HBarCode').on('keydown', function (event) {
                 var HBarCode = $('#HBarCode').val()
@@ -312,10 +378,14 @@
                                 layer.close(index);
                                 $('#HBarCode').val("");
                                 layer.msg("璇ュ疄鐗╁凡鎵爜锛岃鍕块噸澶嶆壂鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            } else if (sSubStr[i].HStatus != null && sSubStr[i].HStatus != "" && sSubStr[i].HStatus != "鍦ㄥ簱") {
-                                layer.close(index);
-                                layer.msg("璇ュ疄鐗╁湪瑁佸垏涓紝涓嶅厑璁告壂鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                            } else {
+                            }
+                            //else if (sSubStr[i].HStatus != null && sSubStr[i].HStatus != "" && sSubStr[i].HStatus != "鍦ㄥ簱")
+                            //{
+                            //    layer.close(index);
+                            //    layer.msg("璇ュ疄鐗╁湪" + sSubStr[i].HSource+"瑁佸垏涓紝涓嶅厑璁告壂鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            //}
+                            else
+                            {
                                 sSubStr[i].HIsStatus = "鏄�";
                                 sSubStr[i].HSourceID = $("#HSourceID").val();
                                 sSubStr[i].HSource = $("#HSource").val();
@@ -327,15 +397,20 @@
                                 sSubStr[i].HMaker = $("#HMaker").val();
                                 option.data = table.cache["bzd-table"];
                                 table.render(option);
-                                layer.close(index);
                                 $('#HBarCode').val("");
+                                //鍔ㄦ�佽幏鍙栧凡鎵爜璁板綍骞舵坊鍔犲埌宸叉壂淇℃伅涓�
+                                table.cache["bzd-table2"].push(sSubStr[i]);
+                                option2.data = table.cache["bzd-table2"];
+                                table.render(option2);
+                                element.tabChange('tab-LookingForBill', '3');//璺宠浆椤电
+                                layer.close(index);
                                 layer.msg("鎵爜鎴愬姛锛�", { icon: 1, time: 1000 });
                             }
                         }
                     }
                     if (rowCount == 0) {
                         layer.close(index);
-                        layer.msg("鏃犳晥鏉$爜锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        layer.msg("鎮ㄦ壂鐨勬潯鐮佷笉鍦ㄦ壘璐ф竻鍗曚腑锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     }
 
 
@@ -418,18 +493,18 @@
             form.on('submit(Saver)', function (data) {//鎻愪氦
                 //debugger;
                 //var sMainStr = JSON.stringify(data.field);
-                var tableData = table.cache['bzd-table'];
-                for (var i = 0; i < tableData.length; i++) {
-                    if (tableData[i].HIsStatus == "鏄�" ) {
+                var tableData = table.cache['bzd-table2'];
+                //for (var i = 0; i < tableData.length; i++) {
+                //    if (tableData[i].HIsStatus == "鏄�" ) {
 
-                    } else {
-                        //绉婚櫎褰撳墠琛�
-                        tableData.splice(i, 1);
-                        i--;
-                        option.data = tableData;
-                        table.render(option);
-                    }
-                }
+                //    } else {
+                //        //绉婚櫎褰撳墠琛�
+                //        tableData.splice(i, 1);
+                //        i--;
+                //        option.data = tableData;
+                //        table.render(option);
+                //    }
+                //}
                 var sSubStr = JSON.stringify(tableData);
                 sSubStr = "{\"oSub\": " + sSubStr + "}";
                 //sSubStr = JSON.stringify(sSubStr);
@@ -445,15 +520,15 @@
                         async: true,
                         data: { "oMain": sSubStr },
                         dataType: "json",
-                        success: function (data) {
-                            if (data.count == 1) {
-                                layer.confirm(data.Message, {
-                                    icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
-                                    btn2: function () {
-                                        //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
-                                        //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
-                                        parent.location.href = "../../../views/index.html"
-                                    }//鍏抽棴
+                        success: function (result) {
+                            if (result.count == 1) {
+                                layer.confirm(result.Message, {
+                                icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
+                                btn2: function () {
+                                    //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
+                                    //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
+                                    parent.location.href = "../../../views/index.html"
+                                }//鍏抽棴
                                 }, function () { window.location.reload(); });//鏂板
                             }
                             else {

--
Gitblit v1.9.1