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/SRM/SRM_POOrderBillList.html |  260 +++++++++++++++++++++++++++++++++++----------------
 1 files changed, 176 insertions(+), 84 deletions(-)

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