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_POInStockBillList_XB.html | 51 +++- WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_SupMaterPackBillEdit.html | 24 ++ WebSRM/WebSRM.csproj | 1 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList_XB.html | 115 ++++++++- WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html | 4 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBackBillList_XB.html | 436 +++++++++++++++++++++++++++++++++++++++ WebSRM/layuiAdmin.std-v1.2.1/src/views/index.html | 1 7 files changed, 597 insertions(+), 35 deletions(-) diff --git a/WebSRM/WebSRM.csproj b/WebSRM/WebSRM.csproj index dbdb931..198dcd9 100644 --- a/WebSRM/WebSRM.csproj +++ b/WebSRM/WebSRM.csproj @@ -870,6 +870,7 @@ <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\SRM_AskPriceBillList.html" /> <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\SRM_BarCodeBill_XB.html" /> <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\SRM_BarCodeBill_Bak.html" /> + <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\SRM_POInStockBackBillList_XB.html" /> <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\SRM_POInStockBackBillList.html" /> <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\SRM_SupMaterPackBillEdit.html" /> <Content Include="layuiAdmin.std-v1.2.1\src\views\SRM\SRM_SupMaterPackBillList.html" /> diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html index 1e65739..7ae3704 100644 --- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html +++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html @@ -567,10 +567,10 @@ for (var i = 0; i < table.cache["mainTable"].length; i++) { if (table.cache["mainTable"][i].HMaterName.indexOf("\"") != -1 || table.cache["mainTable"][i].HMaterName.indexOf(";") != -1) { - table.cache["mainTable"][i].HMaterName = table.cache["mainTable"][i].HMaterName.replace("\"", "鈥�").replace(";", "锛�") + table.cache["mainTable"][i].HMaterName = table.cache["mainTable"][i].HMaterName.replaceALL("\"", "鈥�").replaceALL(";", "锛�") } if (table.cache["mainTable"][i].HMaterModel.indexOf("\"") != -1 || table.cache["mainTable"][i].HMaterModel.indexOf(";") != -1) { - table.cache["mainTable"][i].HMaterModel = table.cache["mainTable"][i].HMaterModel.replace("\"", "鈥�").replace(";", "锛�") + table.cache["mainTable"][i].HMaterModel = table.cache["mainTable"][i].HMaterModel.replaceALL("\"", "鈥�").replaceALL(";", "锛�") } } diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBackBillList_XB.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBackBillList_XB.html new file mode 100644 index 0000000..41737c1 --- /dev/null +++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBackBillList_XB.html @@ -0,0 +1,436 @@ +锘� + +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <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.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"> + <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all"> +</head> +<body> + + <!--<div class="layui-card layadmin-header"> + <div class="layui-breadcrumb" lay-filter="breadcrumb"> + <a lay-href="">涓婚〉</a> + <a><cite>缁勪欢</cite></a> + <a><cite>鏁版嵁琛ㄦ牸</cite></a> + <a><cite>鏁版嵁琛ㄦ牸鐨勯噸杞�</cite></a> + </div> + </div>--> + + <div class="layui-fluid"> + <div class="layui-row layui-col-space15"> + <div class="layui-col-md12"> + <div class="layui-card"> + <div class="layui-card-header">閫�璐у崟鍒楄〃</div> + <div class="layui-card-body"> + <form class="layui-form" action=""> + <div class="layui-form-item"> + <div class="layui-inline"> + <label class="layui-form-label">璁㈠崟鐘舵��</label> + <div class="layui-input-block"> + <select name="HStatus" id="HStatus" lay-filter=""> + <option value="" selected="">鍏ㄩ儴</option> + <option value="鏈‘璁�">鏈‘璁�</option> + <option value="宸茬‘璁�">宸茬‘璁�</option> + <option value="宸查┏鍥�">宸查┏鍥�</option> + </select> + </div> + </div> + <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">鐗╂枡浠g爜</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HNumber" id="HNumber"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">浜у搧鍚嶇О</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HName" id="HName"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">瑙勬牸鍨嬪彿</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HModel" id="HModel"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">鍏抽棴鐘舵��</label> + <div class="layui-input-block"> + <select id="HClStatus" name="HClStatus" lay-filter=""> + <option value="" selected="">鍏ㄩ儴</option> + <option value="鏈叧闂�"> 鏈叧闂�</option> + <option value="宸插叧闂�">宸插叧闂�</option> + </select> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">寮�濮嬫棩鏈�</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HDate1" id="HDate1"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">缁撴潫鏃ユ湡</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HDate2" id="HDate2"> + </div> + </div> + + <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> + </div> + <div class="layui-inline"> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="f_Query"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> + </button> + </div> + </div> + </form> + <!--</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-getCheckData"><i class="layui-icon layui-icon-tips"></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-details"><i class="layui-icon layui-icon-form"></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-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> + <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> + </div> + </script> + + </div> + </div> + </div> + </div> + <!--<script src="../../layuiadmin/layui/lay/modules/mobile/jquery-3.3.1.min.js"></script>--> + <script src="../../layuiadmin/layui/layui.js"></script> + <script src="../../../../Scripts/webConfig.js"></script> + <script> + var _cur_page = 1; + var sql = ""; + var options = document.getElementById('HStatus').children; + 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; + } + function f_alert(sMsg) { + layer.alert(sMsg, { icon: 5 }); + //layer.open({ + // type: 1 + // , offset: 'auto' //鍏蜂綋閰嶇疆鍙傝�冿細http://www.layui.com/doc/modules/layer.html#offset + // , id: 'layerDemo' //闃叉閲嶅寮瑰嚭 + // , content: '<div style="padding: 20px 100px;">' + sMsg + '</div>' + // , shade: 0 //涓嶆樉绀洪伄缃� + // , yes: function () { + // layer.closeAll(); + // } + //}); + } + var params = getUrlVars(); + var type = params[params[0]]; + switch (type) { + case "UnConfirm": + options[1].selected = true; + sql += " and 鐘舵�� like ^^%鏈‘璁�%^^"; + break; + case "ReConfirm": + options[2].selected = true; + sql += " and 鐘舵�� like ^^%宸茬‘璁�%^^"; + break; + case "ReBack": + options[3].selected = true; + sql += " and 鐘舵�� like ^^%宸查┏鍥�%^^"; + break; + } + //CreateReport("Report"); //鎵撳嵃 + //Report.LoadFromURL("閫�璐у崟(A4绾�).grf");//鎵撳嵃 + layui.config({ + base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + 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; + //甯歌鐢ㄦ硶 + laydate.render({ + elem: '#HDate1' + }); + laydate.render({ + elem: '#HDate2' + }); + //layui.code(); + var ins; //鐢ㄤ簬瀵煎嚭excel + var option = []; + set_InitGrid(); + + get_FastQuery(sql); + layer.load(3) + //鏂规硶绾ф覆鏌� + function set_InitGrid() { + var columns = [ + { checkbox: true, fixed: true } + , { field: '鐘舵��', title: '鐘舵��', width: 100, sort: true, fixed: true } + , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 200, sort: true, fixed: true } + , { field: '閲囪喘璁㈠崟鍙�', title: '閲囪喘璁㈠崟鍙�', width: 150 } + , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 150 } + , { field: '璁″垝璺熻釜鍗曞彿', title: '璁″垝璺熻釜鍗曞彿', width: 100 } + , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200 } + , { field: '鐗╂枡', title: '鐗╂枡鍚嶇О', width: 200 } + , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 200 } + , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true } + , { field: '鏁伴噺', title: '鏁伴噺', width: 130 } + , { field: '鍚堟牸鏁伴噺', title: '鍚堟牸鏁伴噺', width: 130 } + , { field: '涓嶅悎鏍兼暟閲�', title: '涓嶅悎鏍兼暟閲�', width: 130 } + , { field: '鏃ユ湡', title: '鏃ユ湡', width: 150 } + ]; + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , page: true + //, cellMinWidth: 120 + , totalRow: true + , limit: 500 + , height: 'full-50' + , cols: [columns] + , limits: [10, 20, 50, 100, 500, 1000 ] + , done: function (res, curr, count) { + layer.closeAll("loading"); + } + }; + } + + //澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(mainTable)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + switch (obj.event) { + case 'btn-getCheckData': + var data = checkStatus.data; + layer.alert(JSON.stringify(data)); + break; + //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず + case 'btn-reload': + _cur_page = $(".layui-laypage-em").next().html(); + get_FastQuery(sql); + break; + + case 'btn-details': + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + + var linterid = data[0].hmainid.toString(); + //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉 + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '瑕佽揣閫氱煡鍗�' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: '../../../src/views/SRM/SRM_PODemandPlanBill.html?linterid=' + linterid + , resize: false + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + }) + break; + case 'btn-print': + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + window.open("../../views/SRM/HBarPlanPrint.html?linterid=" + data[0].hmainid + "&Type=HPOInStockBill"); + break; + case 'btn-generate': + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '閫�璐у崟' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: ['../../views/SRM/SRM_BarCodeBill.html?linterid=' + data[0].hmainid + '&lentryid=' + data[0].hmainid, 'yes'] + , resize: false + , cancel: function () { + $(".layui-btn").removeClass("layui-btn-disabled"); + } + }) + break; + case 'btn-exit': + parent.layui.admin.events.closeThisTabs(); + break; + //瀵煎嚭excel + case 'get_export': + get_Export(); + break; + }; + }); + + ///鍔犺浇鏄剧ず鏁版嵁 + function RoadHBillNo(sqlWhere) { + where = sqlWhere; + $.ajax({ + type: "post", + url: GetWEBURL() + "GetPOInStockBackBillList", + async: true, + data: { "HSupIDs": sessionStorage["HSupIDs"], "sqlWhere": sqlWhere }, + success: function (result) { + ajaxReturnData = JSON.parse(JSON.stringify(result)).data; + + if (ajaxReturnData == null) { + ajaxReturnData = []; + layer.msg("娌℃湁鏌ヨ鍒版暟鎹紝璇锋牳瀵硅繃婊ゆ潯浠舵槸鍚︽纭�"); + } + + option.data = ajaxReturnData; + //table.render(option); + ins = table.render(option); + + layer.closeAll("loading"); + }, + error: function (result) { + console.log(result); + //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 }); + } + }); + }; + + function get_FastQuery(table, option) { + var sqlWhere = " and 1=1 "; + if ($("#HStatus").val() != "") + sqlWhere += " and 鐘舵�� like ^^%" + $("#HStatus").val() + "%^^"; + if ($("#HBillNo").val() != "") + sqlWhere += " and 鍗曟嵁鍙� like ^^%" + $("#HBillNo").val() + "%^^"; + if ($("#HNumber").val() != "") + sqlWhere += " and 鐗╂枡浠g爜 like ^^%" + $("#HNumber").val() + "%^^"; + if ($("#HName").val() != "") + sqlWhere += " and 鐗╂枡鍚嶇О like ^^%" + $("#HName").val() + "%^^"; + if ($("#HModel").val() != "") + sqlWhere += " and 瑙勬牸鍨嬪彿 like ^^%" + $("#HModel").val() + "%^^"; + if ($("#HClStatus").val() != "") + sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^"; + if ($("#HPURCHASEORGID").val() != "") + sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^"; + if ($("#HDate1").val() != "") { + sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HDate1").val() + "^^"; + } + if ($("#HDate2").val() != "") { + sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HDate2").val() + "^^"; + } + + sql = sqlWhere; + //浠庣涓�椤靛紑濮� + _cur_page = 1; + RoadHBillNo(sqlWhere); + } + + form.on('submit(f_Query)', function (data) {//鏌ヨ + var sqlWhere = " and 1=1 "; + if ($("#HStatus").val() != "") + sqlWhere += " and 鐘舵�� like ^^%" + $("#HStatus").val() + "%^^"; + if ($("#HBillNo").val() != "") + sqlWhere += " and 鍗曟嵁鍙� like ^^%" + $("#HBillNo").val() + "%^^"; + if ($("#HNumber").val() != "") + sqlWhere += " and 鐗╂枡浠g爜 like ^^%" + $("#HNumber").val() + "%^^"; + if ($("#HName").val() != "") + sqlWhere += " and 鐗╂枡鍚嶇О like ^^%" + $("#HName").val() + "%^^"; + if ($("#HModel").val() != "") + sqlWhere += " and 瑙勬牸鍨嬪彿 like ^^%" + $("#HModel").val() + "%^^"; + if ($("#HClStatus").val() != "") + sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^"; + if ($("#HPURCHASEORGID").val() != "") + sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^"; + if ($("#HDate1").val() != "") { + sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HDate1").val() + "^^"; + } + if ($("#HDate2").val() != "") { + sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HDate2").val() + "^^"; + } + + sql = sqlWhere; + //浠庣涓�椤靛紑濮� + _cur_page = 1; + RoadHBillNo(sqlWhere); + }); + var $ = layui.$, active = { + reload: function () { + var demoReload = $('#HBillNo'); + //鎵ц閲嶈浇 + table.reload('mainTable', { + page: { + curr: 1 //閲嶆柊浠庣 1 椤靛紑濮� + } + , where: { + key: { + id: demoReload.val() + } + } + }); + }, + f_Query: function () { //鏌ヨ + //var sqlWhere = " and 1=1 "; + //if ($("#HBillNo").val() != "") + // sqlWhere += " and 鍗曟嵁鍙� like ''%" + $("#HBillNo").val() + "%''"; + //RoadHBillNo(sqlWhere); + }, + }; + $('.test-table-reload-btn .layui-btn').on('click', function () { + var type = $(this).data('type'); + active[type] ? active[type].call(this) : ''; + }); + + //#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 + }); + </script> +</body> +</html> \ No newline at end of file diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList_XB.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList_XB.html index b4577c2..49cdf0e 100644 --- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList_XB.html +++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList_XB.html @@ -142,14 +142,15 @@ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload" id="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="btn-Audit"><i class="layui-icon layui-icon-radio"></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-back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>--> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details" id="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-changebg" id="btn-changebg"><i class="layui-icon layui-icon-form"></i>鍙樻洿</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="btn-print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃閫佽揣鍗�</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate" id="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚鏉$爜</button> <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit" id="btn-exit"><i class="layui-icon layui-icon-return"></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" 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> </div> </script> </div> @@ -256,6 +257,7 @@ var option = []; var titleData = ["hmainid", "hsubid", "鍚◣鍗曚环", "閲戦", "鐢熶骇鏃ユ湡", "棰勮鍒拌揣鏃ユ湡", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "婧愬崟绫诲瀷", "閲囪喘璁㈠崟鍙�", "濮斿璁㈠崟鍙�", "鏀舵枡缁勭粐", "閲囪喘缁勭粐", "闇�姹傜粍缁�"]; var HModName = "SRM_POInStockBillList"; + var ins; //鐢ㄤ簬瀵煎嚭excel //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈� setSelect_HInitTimeCycle(); //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨 @@ -359,15 +361,13 @@ var checkStatus = table.checkStatus('mainTable') , data = checkStatus.data; var InterID = ""; - if (checkStatus.data.length > 0) { + if (checkStatus.data.length > 0 && checkStatus.data.length <= 15) { for (var i = 0; i < checkStatus.data.length; i++) { InterID += data[i].hmainid.toString() + ","; } InterID = InterID.substring(0, InterID.length - 1); - var HIsAudit = false; layer.confirm("纭瀹℃牳閫佽揣鍗曞悧锛�", { title: "瀹℃牳纭" }, function (index) { layer.close(index); - var ajaxLoad = layer.load(); //閫昏緫瀹℃牳鏂规硶 $.ajax({ @@ -388,7 +388,6 @@ }); layer.close(ajaxLoad); - //鏌ヨ琛ㄦ牸鏁版嵁 get_FastQuery(); } else { @@ -400,15 +399,19 @@ layer.close(ajaxLoad); } }); - }) + }) } else { - layer.msg('璇烽�夋嫨鏁版嵁锛�'); + if (checkStatus.data.length >= 1) { + layer.msg('鎵归噺瀹℃牳閫佽揣鍗曪紝涓�娆℃�т笉鍏佽瓒呰繃15鍗曪紒'); + } else { + layer.msg('璇烽�夋嫨鏁版嵁锛�'); + } } //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず case 'btn-reload': _cur_page = $(".layui-laypage-em").next().html(); - RoadHBillNo(sql); + get_FastQuery(sql); // }); break; @@ -569,6 +572,10 @@ case 'btn-HideColumn': get_HideColumn(); break; + //瀵煎嚭excel + case 'get_export': + get_Export(); + break; }; }); @@ -585,7 +592,8 @@ success: function (result) { ajaxReturnData = JSON.parse(JSON.stringify(result)).data; option.data = ajaxReturnData; - table.render(option); + //table.render(option); + ins = table.render(option); //鍒锋柊琛ㄦ牸鏁版嵁 DisPlay_HideColumn(); layer.closeAll("loading"); @@ -639,7 +647,7 @@ sqlWhere += " and 鏁伴噺 = ^^" + $("#HQty").val() + "^^"; } - sql = sqlWhere; + //sql = sqlWhere; //浠庣涓�椤靛紑濮� _cur_page = 1; RoadHBillNo(sqlWhere); @@ -648,7 +656,7 @@ //#endregion form.on('submit(f_Query)', function (data) {//鏌ヨ - var sqlWhere = ""; + var sqlWhere = sql; if ($("#HStatus").val() != "") if ($("#HStatus").val() == "鏈敓鎴愭潯鐮�") { sqlWhere += " and 鏈敓鎴愭潯鐮佹暟閲� > 0"; @@ -687,7 +695,7 @@ sqlWhere += " and 鏁伴噺 = ^^" + $("#HQty").val() + "^^"; } - sql = sqlWhere; + //sql = sqlWhere; //浠庣涓�椤靛紑濮� _cur_page = 1; RoadHBillNo(sqlWhere); @@ -811,6 +819,23 @@ return fmt; } + //#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 = ""; 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 = ""; diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_SupMaterPackBillEdit.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_SupMaterPackBillEdit.html index 4962a21..42fd40c 100644 --- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_SupMaterPackBillEdit.html +++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_SupMaterPackBillEdit.html @@ -453,6 +453,10 @@ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,澶栫鏍囧噯鍖呰鏁颁笉鍏佽涓�0!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); return Result = false; } + if (!isPositiveIntegerTimes(parseFloat(sSubStr[i].HInBoxPackQty), parseFloat(sSubStr[i].HOutBoxPackQty))) { + layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,澶栫鏍囧噯鍖呰鏁板繀椤绘槸鍐呯鏍囧噯鍖呰鏁扮殑鏁存暟鍊�!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return Result = false; + } } } else { @@ -565,6 +569,26 @@ return vars; } + function isPositiveIntegerTimes(x, y) { + if (x > y) { + var flag = x; + x = y; + y = flag; + } + var z = y % x; + if (x == 0) { + return true; + } + else { + if (z == 0) { + return true; + } + else { + return false; + } + } + } + ////闅愯棌鍒楄缃� //function get_HideColumn() { // var colName = ""; diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/index.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/index.html index 8e46a2d..b896404 100644 --- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/index.html +++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/index.html @@ -236,6 +236,7 @@ <dd data-name="SRM_POInStockBackBillList_UnConfirm"><a lay-href="SRM/SRM_POInStockBackBillList.html?type=UnConfirm">鏈‘璁ら��璐у崟</a> </dd> <dd data-name="SRM_POInStockBackBillList_ReConfirm"><a lay-href="SRM/SRM_POInStockBackBillList.html?type=ReConfirm">宸茬‘璁ら��璐у崟</a></dd> <dd data-name="SRM_POInStockBackBillList_ReBack"><a lay-href="SRM/SRM_POInStockBackBillList.html?type=ReBack">宸查┏鍥為��璐у崟</a></dd> + <dd data-name="SRM_POInStockBackBillList_XB"><a lay-href="SRM/SRM_POInStockBackBillList_XB.html">澶忓疂閫�璐у崟</a></dd> </dl> </dd> </dl> -- Gitblit v1.9.1