From 5e9c87d9524a3a31b7691e61d8da9a757377e9bd Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 20 八月 2025 10:51:09 +0800
Subject: [PATCH] 条码生成转换特殊字符;标准包装添加控制;

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList_XB.html |  115 +++++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 95 insertions(+), 20 deletions(-)

diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList_XB.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList_XB.html
index 1f2fdb2..89fc086 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList_XB.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList_XB.html
@@ -78,6 +78,26 @@
                                     </div>
                                 </div>
                                 <div class="layui-inline">
+                                    <label class="layui-form-label">涓氬姟鐘舵��</label>
+                                    <div class="layui-input-block" style="width:120px">
+                                        <select id="HIsClose" name="HIsClose" lay-filter="">
+                                            <option value="">鍏ㄩ儴</option>
+                                            <option value="姝e父" selected>姝e父</option>
+                                            <option value="涓氬姟鍏抽棴">涓氬姟鍏抽棴</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">鍐荤粨鐘舵��</label>
+                                    <div class="layui-input-block" style="width:120px">
+                                        <select id="HIsFreeze" name="HIsFreeze" lay-filter="">
+                                            <option value="">鍏ㄩ儴</option>
+                                            <option value="姝e父" selected>姝e父</option>
+                                            <option value="涓氬姟鍐荤粨">涓氬姟鍐荤粨</option>
+                                        </select>
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
                                     <label class="layui-form-label">鏄惁宸蹭笅鎺ㄩ�佽揣鍗�</label>
                                     <div class="layui-input-block">
                                         <select id="HISGenerate" name="HISGenerate" lay-filter="">
@@ -87,20 +107,20 @@
                                         </select>
                                     </div>
                                 </div>
-                                <div class="layui-inline">
+                                <div class="layui-inline" style="display:none;">
                                     <label class="layui-form-label">鏃ユ湡闂撮殧</label>
                                     <div class="layui-input-block">
                                         <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
                                         </select>
                                     </div>
                                 </div>
-                                <div class="layui-inline">
+                                <div class="layui-inline" style="display:none;">
                                     <label class="layui-form-label">寮�濮嬫棩鏈�</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HBeginDate" id="HBeginDate">
                                     </div>
                                 </div>
-                                <div class="layui-inline">
+                                <div class="layui-inline" style="display:none;">
                                     <label class="layui-form-label">缁撴潫鏃ユ湡</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HEndDate" id="HEndDate">
@@ -165,6 +185,7 @@
                                 <i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�
                             </button>
                             <button type="button" class="layui-btn layui-btn-sm" id="btn_HideColumn" lay-event="btn-HideColumn"><i class="layui-icon layui-icon-return"></i>闅愯棌鍒楄缃�</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></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>
@@ -336,8 +357,8 @@
                 optionPage = {
                     elem: 'page', //娉ㄦ剰锛岃繖閲岀殑 page 鏄� ID锛屼笉鐢ㄥ姞 # 鍙�
                     count: 10000, //鏁版嵁鎬绘暟锛屼粠鏈嶅姟绔緱鍒�
-                    limit: 2,
-                    limits: [2,50, 500, 5000, 50000],
+                    limit: 50,
+                    limits: [50, 500, 5000, 50000],
                     layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                     jump: function (obj, first) {
                         //console.log(obj)
@@ -687,6 +708,10 @@
                     case 'btn-HideColumn':
                         get_HideColumn();
                         break;
+                    //瀵煎嚭excel
+                    case 'get_export':
+                        get_Export();
+                        break;
                 };
             });
 
@@ -759,13 +784,13 @@
                                     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')}}</div>", width: 200 });
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>",width: 200 });
                                             break;
                                         default:
                                             if (data[i].name == '璁㈠崟鏁伴噺' || data[i].name == '宸插彂璐ф暟閲�' || data[i].name == '鏈彂璐ф暟閲�' || data[i].name == '鍓╀綑鏀舵枡鏁伴噺' || data[i].name == '鏈埌璐ф暟閲�' || data[i].name == '绱鏀舵枡鏁伴噺' || data[i].name == '鍓╀綑鍏ュ簱鏁伴噺' || data[i].name == '鍏ュ簱鏁伴噺' || data[i].name == '鍙彂璐ф暟閲�') {
-                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, totalRow: true });
+                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', width: 200, totalRow: true });
                                             }else {
-                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                                col.push({ field: data[i].id, title: data[i].name, align: 'center', width: 200 });
                                             }
                                     }
                                 }
@@ -810,12 +835,12 @@
                     sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^";
                 //if ($("#HPURCHASEORGID").val() != "")
                 //    sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
-                if ($("#HBeginDate").val() != "") {
-                    sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HBeginDate").val() + "^^";
-                }
-                if ($("#HEndDate").val() != "") {
-                    sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HEndDate").val() + "^^";
-                }
+                //if ($("#HBeginDate").val() != "") {
+                    //sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HBeginDate").val() + "^^";
+                //}
+                //if ($("#HEndDate").val() != "") {
+                    //sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HEndDate").val() + "^^";
+                //}
                 if ($("#HISGenerate").val() != "") {
                     if ($("#HISGenerate").val() == "鏄�") {
                         sqlWhere += " and 鏈叧鑱旀暟閲� <= 0";
@@ -825,6 +850,22 @@
                     }
                 }
 
+                if ($("#HIsClose").val() != "") {
+                    if ($("#HIsClose").val() == "姝e父") {
+                        sqlWhere += " and 涓氬姟鍏抽棴 = ^^姝e父^^";
+                    }
+                    else if ($("#HIsClose").val() == "涓氬姟鍏抽棴") {
+                        sqlWhere += " and 涓氬姟鍏抽棴 = ^^涓氬姟鍏抽棴^^";
+                    }
+                }
+                if ($("#HIsFreeze").val() != "") {
+                    if ($("#HIsFreeze").val() == "姝e父") {
+                        sqlWhere += " and 涓氬姟鍐荤粨 = ^^姝e父^^";
+                    }
+                    else if ($("#HIsFreeze").val() == "涓氬姟鍐荤粨") {
+                        sqlWhere += " and 涓氬姟鍐荤粨 = ^^涓氬姟鍐荤粨^^";
+                    }
+                }
 
                 var Time = $("#Time").val();
                 if (Time > 0) {
@@ -882,18 +923,35 @@
                     sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^";
                 //if ($("#HPURCHASEORGID").val() != "")
                 //    sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
-                if ($("#HBeginDate").val() != "") {
-                    sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HBeginDate").val() + "^^";
-                }
-                if ($("#HEndDate").val() != "") {
-                    sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HEndDate").val() + "^^";
-                }
+                //if ($("#HBeginDate").val() != "") {
+                    //sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HBeginDate").val() + "^^";
+                //}
+                //if ($("#HEndDate").val() != "") {
+                    //sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HEndDate").val() + "^^";
+                //}
                 if ($("#HISGenerate").val() != "") {
                     if ($("#HISGenerate").val() == "鏄�") {
                         sqlWhere += " and 鏈叧鑱旀暟閲� <= 0";
                     }
                     else if ($("#HISGenerate").val() == "鍚�") {
                         sqlWhere += " and 鏈叧鑱旀暟閲� > 0";
+                    }
+                }
+
+                if ($("#HIsClose").val() != "") {
+                    if ($("#HIsClose").val() == "姝e父") {
+                        sqlWhere += " and 涓氬姟鍏抽棴 = ^^姝e父^^";
+                    }
+                    else if ($("#HIsClose").val() == "涓氬姟鍏抽棴") {
+                        sqlWhere += " and 涓氬姟鍏抽棴 = ^^涓氬姟鍏抽棴^^";
+                    }
+                }
+                if ($("#HIsFreeze").val() != "") {
+                    if ($("#HIsFreeze").val() == "姝e父") {
+                        sqlWhere += " and 涓氬姟鍐荤粨 = ^^姝e父^^";
+                    }
+                    else if ($("#HIsFreeze").val() == "涓氬姟鍐荤粨") {
+                        sqlWhere += " and 涓氬姟鍐荤粨 = ^^涓氬姟鍐荤粨^^";
                     }
                 }
 
@@ -1027,6 +1085,23 @@
             }
             //#endregion
 
+            //#region 瀵煎嚭Execel
+            function get_Export() {
+                option.data.forEach((item) => {
+                    for (let itemobj in item) {
+                        if (item[itemobj] == null) {
+                            item[itemobj] = "";
+                        }
+                        if (item[itemobj].length > 0) {  // 鍋囪瀛楁鍚嶄负field
+                            item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '').replaceAll(',', '锛�').replaceAll(';', '锛�').replaceAll('"', '鈥�').replaceAll('\'', '鈥�');  // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+                        }
+                    }
+                });
+
+                table.exportFile(ins.config.id, option.data, "xls");
+            }
+            //#endregion
+
             //闅愯棌鍒楄缃�
             function get_HideColumn() {
                 var colName = "";

--
Gitblit v1.9.1