From db34c41cbb3df2c21b57d10bbe83ea206d9428d6 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期三, 29 十二月 2021 09:20:57 +0800
Subject: [PATCH] 安瑞 增加  物料编码显示

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBill.html |  336 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 168 insertions(+), 168 deletions(-)

diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBill.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBill.html
index 153a054..de8389f 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBill.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBill.html
@@ -90,7 +90,7 @@
                                             </div>
                                         </div>
 
-                                    </form>                                   
+                                    </form>
                                 </div>
                                 <div class="layui-tab-item">
                                     <form id="form2" class="layui-form layui-form-pane" action="">
@@ -173,28 +173,28 @@
                                             </div>
                                         </div>
 
-                                    </form>                                 
+                                    </form>
                                 </div>
 
                             </div>
                         </div>
                     </div>
-                                <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-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>
-                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="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"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
-                                        <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+                    <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-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>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="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"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
 
-                                    </div>
-                                </script>
-                                <blockquote class="layui-elem-quote">閲囪喘璁㈠崟</blockquote>
-
-                            </div>
                         </div>
+                    </script>
+                    <blockquote class="layui-elem-quote">閲囪喘璁㈠崟</blockquote>
+
+                </div>
+            </div>
         </div>
     </div>
     <!--<script src="../../layuiadmin/layui/lay/modules/mobile/jquery-3.3.1.min.js"></script>-->
@@ -210,9 +210,9 @@
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'table', 'form', 'element'], function () {
             var table = layui.table
-            , $ = layui.$
-            , form = layui.form
-            , element = layui.element; //Tab鐨勫垏鎹㈠姛鑳斤紝鍒囨崲浜嬩欢鐩戝惉绛夛紝闇�瑕佷緷璧杄lement妯″潡
+                , $ = layui.$
+                , form = layui.form
+                , element = layui.element; //Tab鐨勫垏鎹㈠姛鑳斤紝鍒囨崲浜嬩欢鐩戝惉绛夛紝闇�瑕佷緷璧杄lement妯″潡
 
             form.on('submit(Saver)', function (data) {//淇濆瓨
                 //debugger;
@@ -221,105 +221,104 @@
                 var sMainSub = sMainStr + ';' + sSubStr;
                 layer.load(3)
                 $.ajax(
-                {
-                    type: "POST",
-                    url: GetWEBURL()+"SaverPOOrder", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    async: true,
-                    data: { "msg": sMainSub },
-                    dataType: "json",
-                    success: function (data) {
-                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.msg(data.Message, { icon: 1 });
+                    {
+                        type: "POST",
+                        url: GetWEBURL() + "SaverPOOrder", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: true,
+                        data: { "msg": sMainSub },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.msg(data.Message, { icon: 1 });
+                            }
+                            else {
+                                layer.msg(data.Message, { icon: 5 });
+                            }
+                            layer.closeAll("loading");
+                        },
+                        error: function (err) {
+                            f_alert("閿欒:" + err);
                         }
-                        else {
-                            layer.msg(data.Message, { icon: 5 });
-                        }
-                        layer.closeAll("loading");
-                    },
-                    error: function (err) {
-                        f_alert("閿欒:" + err);
-                    }
-                });
+                    });
                 return false;
             });
 
-        function getUrlVars() {
-            var vars = [], hash;
-            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
-            for (var i = 0; i < hashes.length; i++) {
-                hash = hashes[i].split('=');
-                vars.push(hash[0]);
-                vars[hash[0]] = hash[1];
+            function getUrlVars() {
+                var vars = [], hash;
+                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+                for (var i = 0; i < hashes.length; i++) {
+                    hash = hashes[i].split('=');
+                    vars.push(hash[0]);
+                    vars[hash[0]] = hash[1];
+                }
+                return vars;
             }
-            return vars;
-        }
-        var params = getUrlVars();
-        var linterid = params[params[0]];
-        var lentryid = params[params[1]];
-        RoadBillMain(linterid);
-        RoadBillSub(linterid);
+            var params = getUrlVars();
+            var linterid = params[params[0]];
+            var lentryid = params[params[1]];
+            RoadBillMain(linterid);
+            RoadBillSub(linterid);
             // debugger;
-        function RoadBillMain(linterid)
-        {
-        $.ajax({
-            url: GetWEBURL()+"GetPOOrderShowBillMain",
-            type: "GET",
-            data: { "sMsg": linterid },
-            success: function (d) {
-                console.log(d.data);
-                //$("#HDate").val(d.)
-                $("#HInterID").val(d.data[0].HInterID);
-                $("#HBillNo").val(d.data[0].HBillNo);
-                $("#HRemark").val(d.data[0].HRemark);
-                $("#HDate").val(d.data[0].HDateForWeb);
-                $("#HStatus").val(d.data[0].HStatus);               
-                $("#HSupID").val(d.data[0].HSupID);
-                $("#HSupName").val(d.data[0].HSupName);
-                $("#HEmpID").val(d.data[0].HEmpID);
-                $("#HEmpName").val(d.data[0].HEmpName);
-                $("#HManagerID").val(d.data[0].HManagerID);
-                $("#HManagerName").val(d.data[0].HManagerName);
-                $("#HMaker").val(d.data[0].HMaker);
-                $("#HMakeDate").val(d.data[0].HMakeDate)
-                $("#HChecker").val(d.data[0].HChecker);
-                $("#HCheckDate").val(d.data[0].HCheckDate);
-                $("#HUpDater").val(d.data[0].HUpDater);
-                $("#HUpDateDate").val(d.data[0].HUpDateDate);
-                $("#HConfirmMan").val(d.data[0].HConfirmMan);
-                $("#HConfirmDate").val(d.data[0].HConfirmDate);
-                $("#HBacker").val(d.data[0].HBacker);
-                $("#HBackDate").val(d.data[0].HBackDate);
-                $("#HBackRemark").val(d.data[0].HBackRemark);
+            function RoadBillMain(linterid) {
+                $.ajax({
+                    url: GetWEBURL() + "GetPOOrderShowBillMain",
+                    type: "GET",
+                    data: { "sMsg": linterid },
+                    success: function (d) {
+                        console.log(d.data);
+                        //$("#HDate").val(d.)
+                        $("#HInterID").val(d.data[0].HInterID);
+                        $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HRemark").val(d.data[0].HRemark);
+                        $("#HDate").val(d.data[0].HDateForWeb);
+                        $("#HStatus").val(d.data[0].HStatus);
+                        $("#HSupID").val(d.data[0].HSupID);
+                        $("#HSupName").val(d.data[0].HSupName);
+                        $("#HEmpID").val(d.data[0].HEmpID);
+                        $("#HEmpName").val(d.data[0].HEmpName);
+                        $("#HManagerID").val(d.data[0].HManagerID);
+                        $("#HManagerName").val(d.data[0].HManagerName);
+                        $("#HMaker").val(d.data[0].HMaker);
+                        $("#HMakeDate").val(d.data[0].HMakeDate)
+                        $("#HChecker").val(d.data[0].HChecker);
+                        $("#HCheckDate").val(d.data[0].HCheckDate);
+                        $("#HUpDater").val(d.data[0].HUpDater);
+                        $("#HUpDateDate").val(d.data[0].HUpDateDate);
+                        $("#HConfirmMan").val(d.data[0].HConfirmMan);
+                        $("#HConfirmDate").val(d.data[0].HConfirmDate);
+                        $("#HBacker").val(d.data[0].HBacker);
+                        $("#HBackDate").val(d.data[0].HBackDate);
+                        $("#HBackRemark").val(d.data[0].HBackRemark);
+                    }
+                });
             }
-        });
-        }
 
             ///鍔犺浇鏄剧ず鏁版嵁
-        function RoadBillSub(linterid) {
-            $.ajax({
-                type: "get",
-                url: GetWEBURL()+"GetPOOrderShowBillSub",
-                async: true,
-                data: { sMsg: linterid },
-                success: function (result) {
-                    ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
-                    table.reload('mainTable', {
-                        data: ajaxReturnData
-                        , height: 'full-10'
-                        , loading: false
-                        , done: function (index, res) {
+            function RoadBillSub(linterid) {
+                $.ajax({
+                    type: "get",
+                    url: GetWEBURL() + "GetPOOrderShowBillSub",
+                    async: true,
+                    data: { sMsg: linterid },
+                    success: function (result) {
+                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
+                        table.reload('mainTable', {
+                            data: ajaxReturnData
+                            , height: 'full-10'
+                            , loading: false
+                            , done: function (index, res) {
 
-                        }
-                    });
-                },
-                error: function (result) {
-                    console.log(result);
-                    //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
-                }
-            });
-        }
+                            }
+                        });
+                    },
+                    error: function (result) {
+                        console.log(result);
+                        //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
+                    }
+                });
+            }
 
- 
+
 
 
             //鐩戝惉鎻愪氦
@@ -335,44 +334,45 @@
             layer.load(3)
             table.render({
                 elem: '#mainTable'
-              , url:  GetWEBURL()+'GetPOOrderShowBillSub'
+                , url: GetWEBURL() + 'GetPOOrderShowBillSub'  //H_v_SRM_POOrderBillSub_ForWeb
                 , toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘
                 , defaultToolbar: ['filter', 'exports']
-              , where: { sMsg: linterid }
-              ,cols: [[
-                , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, sort: true, fixed: true , hide: true }
-                , { field: 'HMaterID', title: '鐗╂枡ID', width: 100,  hide: true }
-                , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 200 }
-                , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 200 }
-                , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 200 }
-                , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 }
-                , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100,  hide: true }
-                , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100,  hide: true }
-                , { field: 'HQty', title: '鏁伴噺', width: 100 }
-                , { field: 'HPrice', title: '鍗曚环', width: 100 }
-                , { field: 'HMoney', title: '閲戦', width: 100 }
-                , { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 }
-                //, { field: 'HDate2', title: '纭浜よ揣鏃ユ湡', width: 150 }
-                , { field: 'HREQUIREORGID', title: '闇�姹傜粍缁�', width: 150 }
-                , { field: 'HSTOCKORGID', title: '鏀舵枡缁勭粐', width: 150 }
-                , { field: 'HSETTLEORGID', title: '缁撶畻缁勭粐', width: 150 }
-                , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }
-                , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200, hide: true }
-                , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true }
-                , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true }
-                , { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 200, hide: true }
-                , { field: 'HSeOrderInterID', title: '閿�鍞鍗曚富鍐呯爜', width: 150, hide: true }
-                , { field: 'HSeOrderEntryID', title: '閿�鍞鍗曞瓙鍐呯爜', width: 150, hide: true }
+                , where: { sMsg: linterid }
+                , cols: [[
+                    , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, sort: true, fixed: true, hide: true }
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                    , { field: 'HMaterShortNumber', title: '鐗╂枡缂栫爜', width: 120 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 120 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 }
+                    , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 }
+                    , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true }
+                    , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true }
+                    , { field: 'HQty', title: '鏁伴噺', width: 100 }
+                    , { field: 'HPrice', title: '鍗曚环', width: 100 }
+                    , { field: 'HMoney', title: '閲戦', width: 100 }
+                    , { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 }
+                    //, { field: 'HDate2', title: '纭浜よ揣鏃ユ湡', width: 150 }
+                    , { field: 'HREQUIREORGID', title: '闇�姹傜粍缁�', width: 150 }
+                    , { field: 'HSTOCKORGID', title: '鏀舵枡缁勭粐', width: 150 }
+                    , { field: 'HSETTLEORGID', title: '缁撶畻缁勭粐', width: 150 }
+                    , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200, hide: true }
+                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true }
+                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true }
+                    , { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 200, hide: true }
+                    , { field: 'HSeOrderInterID', title: '閿�鍞鍗曚富鍐呯爜', width: 150, hide: true }
+                    , { field: 'HSeOrderEntryID', title: '閿�鍞鍗曞瓙鍐呯爜', width: 150, hide: true }
 
-              ]]
-              // , data: [linterid]
-                 //, page: true //鏄惁鏄剧ず鍒嗛〉
-                 //, limits: [10, 20, 50, 100]
-                 //, limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
-                 //, height: 500
-                 , done: function () {
-                     layer.closeAll("loading");
-                 }
+                ]]
+                // , data: [linterid]
+                //, page: true //鏄惁鏄剧ず鍒嗛〉
+                //, limits: [10, 20, 50, 100]
+                //, limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+                //, height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
             });
             //澶村伐鍏锋爮浜嬩欢
             table.on('toolbar(mainTable)', function (obj) {
@@ -385,7 +385,7 @@
                         window.open("../../views/SRM/HBarPlanPrint.html?linterid=" + linterid + "&Type=HPOOrderBill");
                         break;
 
-                        //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
+                    //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
                     case 'btn-reload':
                         RoadBillMain(linterid);
                         RoadBillSub(linterid);
@@ -394,9 +394,9 @@
                         var HBillNo = $("#HBillNo").val()
                         if ($("#HStatus").val() == "鏈‘璁�") {
                             layer.confirm('鏄惁纭鍗曟嵁?', { icon: 3, title: '鎻愮ず' }, function (index) {
-                               $.ajax({
+                                $.ajax({
                                     type: "get",
-                                    url: GetWEBURL()+"POOrderAccept",
+                                    url: GetWEBURL() + "POOrderAccept",
                                     data: { "HInterID": linterid, "HBillNo": HBillNo, "HUser": sessionStorage["HUserName"] },
                                     success: function (result) {
                                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -433,7 +433,7 @@
                                 HBackRemark = value.toString();
                                 $.ajax({
                                     type: "get",
-                                    url: GetWEBURL()+"POOrderRefuse",
+                                    url: GetWEBURL() + "POOrderRefuse",
                                     data: { "HInterID": linterid, "HBillNo": HBillNo, "HUser": sessionStorage["HUserName"], "HBackRemark": HBackRemark },
                                     success: function (result) {
                                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -457,7 +457,7 @@
                         }
                         break;
                     case 'btn-details':
-                      
+
                     case 'btn-exit':
                         var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
                         parent.layer.close(index); //鍐嶆墽琛屽叧闂�
@@ -470,26 +470,26 @@
                 //jiuajax浠庢湇鍔″櫒鑾峰彇
                 layer.load(3)
                 $.ajax(
-                {
-                    type: "POST",            
-                    url: GetWEBURL()+"SaverPOOrder", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    async:true,
-                    data: { msg: sMainSub },
-                    dataType: "json",
-                    success: function (data) {
-                        if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            layer.msg(data.Message, { icon: 1 });
+                    {
+                        type: "POST",
+                        url: GetWEBURL() + "SaverPOOrder", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        async: true,
+                        data: { msg: sMainSub },
+                        dataType: "json",
+                        success: function (data) {
+                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                layer.msg(data.Message, { icon: 1 });
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                layer.msg(data.Message, { icon: 5 });
+                            }
+                            layer.closeAll("loading");
+                        },
+                        error: function (err) {
+                            f_alert("閿欒:" + err);
                         }
-                        else {
-                            // $("#verifycode").click();
-                            layer.msg(data.Message, { icon: 5 });
-                        }
-                        layer.closeAll("loading");
-                    },
-                    error: function (err) {
-                        f_alert("閿欒:" + err);
-                    }
-                });
+                    });
             }
             function f_alert(sMsg) {
                 layer.alert(sMsg, { icon: 5 });
@@ -530,7 +530,7 @@
             //    return JSON.stringify(ajaxData).replace(/(")/g, "\\\"");
             //   // return false;
             //});
- 
+
             //function f_SaveBefore() {
             //    //淇濆瓨鍓嶅鐞�(瀛楁鏍煎紡锛歩nt绫诲瀷涓嶈兘涓虹┖锛屾棩鏈熺被鍨嬬鍚堟牸寮忥紝bool绫诲瀷)
             //    if ($("#HInterID").val() == '') {
@@ -544,7 +544,7 @@
             //    var type = $(this).data('type');
             //    active[type] ? active[type].call(this) : '';
             //});
-           });
+        });
     </script>
 </body>
 </html>
\ No newline at end of file

--
Gitblit v1.9.1