From e111e71fbbb32bd9acdd34aa249590ff7c84f1f1 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 30 一月 2026 11:34:50 +0800
Subject: [PATCH] 小卫添加出货导出模块;香囊打印模块添加选择模板功能;小卫组托模块添加序号
---
WebTM/views/车间管理/单品过站_小卫/Cj_SachetBarCodePrint.html | 55 +++
WebTM/views/Baseset/基础资料/saomazutuo_xiaowei.html | 1
WebTM/WebTM.csproj | 1
WebTM/views/车间管理/单品过站_小卫/Cj_ProcessItemStationPlatform_ShippingExport.html | 810 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 863 insertions(+), 4 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 1089108..5b0c3d9 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -960,6 +960,7 @@
<Content Include="views\杞﹂棿绠$悊\鍏抽敭浠剁粦瀹歕Sc_KeyElementBindingList.html" />
<Content Include="views\杞﹂棿绠$悊\鍏抽敭浠剁粦瀹歕Sc_KeyElementBinding.html" />
<Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯\SingleItemTransitList.html" />
+ <Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_ProcessItemStationPlatform_ShippingExport.html" />
<Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_SaveSNByICMO.html" />
<Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_ProcessItemStationPlatform_generateSNCode.html" />
<Content Include="views\杞﹂棿绠$悊\鍗曞搧杩囩珯_灏忓崼\Cj_ProcessItemStationPlatform_checkSN.html" />
diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html"
index 0583d36..0a79d69 100644
--- "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html"
+++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/saomazutuo_xiaowei.html"
@@ -366,6 +366,7 @@
height: tableHeight,
cols: [[
{ type: 'checkbox', fixed: 'left' },
+ { type: 'numbers', field: '搴忓彿', title: '搴忓彿', totalRow: true },
{ field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 120 },
{ field: '鏁伴噺', title: '鏁伴噺', width: 100 },
{ field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 120 },
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_ShippingExport.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_ShippingExport.html"
new file mode 100644
index 0000000..a7a8acf
--- /dev/null
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_ProcessItemStationPlatform_ShippingExport.html"
@@ -0,0 +1,810 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1">
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/layui/layui.js"></script>
+ <script src="../../../layuiadmin/Scripts/json2.js"></script>
+ <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+ <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+ <script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/PageTitle.js"></script>
+ <script src="../../../layuiadmin/Scripts/xlsx.full.min.js"></script>
+</head>
+<body>
+ <div class="layui-fluid">
+ <div class="layui-col-md12">
+ <div class="layui-card" style="padding: 1px">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="component-form-group">
+ <div class="layui-collapse">
+ <div class="layui-colla-item">
+ <div class="layui-colla-title layui-inline">
+ <div class="layui-inline">
+ <span>鏇村</span>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">SN鐮�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HBarcode_SN" id="HBarcode_SN" onfocus="this.select();">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">鏍堟澘鐮�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HBarcode_ZB" id="HBarcode_ZB" onfocus="this.select();">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 85px;">涓鐮�</label>
+ <div class="layui-input-block" style="margin-left: 120px;">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HBarcode_ZX" id="HBarcode_ZX" onfocus="this.select();">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">寮�濮嬫棩鏈�</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:110px;">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">缁撴潫鏃ユ湡</label>
+ <div class="layui-input-block">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:110px;">
+ </div>
+ </div>
+
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+ </button>
+ <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+ <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
+ <div class="layui-row" style="margin-top:5px">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
+ </div>
+ </div>
+ <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+ </div>
+ </div>
+
+ <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" style="width:190px;">
+ <option value="0" selected="selected"></option>
+ <option value="=">=</option>
+ <option value=">=">>=</option>
+ <option value=">">></option>
+ <option value="<="><=</option>
+ <option value="<"><</option>
+ <option value="<>"><></option>
+ <option value="7">鍖呭惈</option>
+ <option value="8">宸﹀寘鍚�</option>
+ <option value="9">鍙冲寘鍚�</option>
+ <option value="10">涓嶅寘鍚�</option>
+ </select>
+ </div>
+ <div class="layui-inline">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
+ </div>
+ </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="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></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="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ <script>
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index', //涓诲叆鍙fā鍧�
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , soulTable = layui.soulTable
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ var option = [];
+ var sWhere = "";
+ var HModName = "Cj_ProcessItemStationPlatform_ShippingExport";
+
+
+ var ins; //鐢ㄤ簬瀵煎嚭excel
+ //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ var titleData = ["hmainid","hsubid","HProdOrgID"];
+
+ //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+ var HModuleType = "";
+ //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+ //#endregion
+
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //#endregion 鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
+
+ //#endregion
+
+ //#region 澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ switch (obj.event) {
+ //鏂板
+ case 'set_AddNew': set_AddNew();
+ break;
+ //缂栬緫
+ case 'set_ShowBill': set_ShowBill();
+ break;
+ //鍒锋柊
+ case 'get_Refresh': get_Refresh();
+ break;
+ //瀹℃牳鎸夐挳 锛�1:瀹℃牳銆�2:鍙嶅鏍革級
+ case 'btn-Audit':
+ set_CheckBill(0);
+ break;
+ //鍙嶅鏍告寜閽�
+ case 'btn-DeAudit':
+ set_CheckBill(1);
+ break;
+ //鍏抽棴鎸夐挳 锛�1:鍏抽棴銆�2:鍙嶅叧闂級
+ case 'btn-Close':
+ set_CloseBill(0);
+ break;
+ //鍙嶅叧闂寜閽�
+ case 'btn-DeClose':
+ set_CloseBill(1);
+ break;
+ //浣滃簾鎸夐挳 锛�1:浣滃簾銆�2:鍙嶄綔搴燂級
+ case 'btn-Drop':
+ set_DropBill(0);
+ break;
+ //鍙嶄綔搴熸寜閽�
+ case 'btn-DeDrop':
+ set_DropBill(1);
+ break;
+ //瀵煎嚭excel
+ case 'get_export':
+ get_Export();
+ break;
+ //閫�鍑烘寜閽�
+ case 'get_Exit': Pub_Close(2);
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn': get_HideColumn();
+ break;
+ };
+ });
+ //#endregion
+
+ //#region 鐐瑰嚮琛岄�変腑楂樹寒
+ table.on('row(mainTable)', function (obj) {
+ //閫変腑琛屾敼鍙橀鑹�
+ var flag = !obj.tr.find(':checkbox:first').prop('checked');
+ obj.tr.find(':checkbox').prop('checked', flag);
+ if (flag) {
+ obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ } else {
+ obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//鍙栨秷澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:" });//鍙栨秷褰撳墠tr棰滆壊
+ }
+ //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+ layui.each(table.cache.mainTable, function (i, l) {
+ if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+ l.LAY_CHECKED = flag;
+ }
+ });
+ })
+ //#endregion
+
+ //#region 鍙屽嚮杩涘叆缂栬緫
+ table.on('rowDouble(mainTable)', function (obj) {
+ //閫変腑楂樹寒 鍙屽嚮琛�
+ obj.tr.find(':checkbox').prop('checked', true);
+ obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked'); //璁剧疆澶嶉�夋閫変腑鏍峰紡
+ $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//鏀瑰彉褰撳墠tr鑳屾櫙棰滆壊鍜屽瓧浣撻鑹�
+ //mainTable 涓鸿〃鏍糏D 娉ㄦ剰姝ゅ濡傛灉ID涓嶆纭皢瀵艰嚧浣犲湪鐩戝惉澶嶉�夋鏃惰幏鍙栦笉鍒颁綘閫夋嫨鐨勬暟鎹紝鍓嶉潰鐨勫彧鏄坊鍔犳垨鍒犻櫎閫変腑鏈�変腑鏍峰紡浠ュ強璁剧疆鑳屾櫙鑹诧紝瀛椾綋棰滆壊
+ layui.each(table.cache.mainTable, function (i, l) {
+ if (obj.tr.index() == l.LAY_TABLE_INDEX) {
+ l.LAY_CHECKED = true;
+ }
+ });
+ });
+ //#endregion
+
+ //#region 閲嶇疆鎸夐挳
+ form.on('submit(btnReSearch)', function (data) {
+ set_ClearQuery();
+ });
+ //#endregion
+
+ //#region 鏌ヨ鎸夐挳
+ form.on('submit(btnSearch)', function (data) {
+ get_FastQuery(2);
+ });
+ //#endregion
+
+ //SN鐮佸洖杞︽柟娉�
+ $('#HBarcode_SN').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery(2);
+ }
+ });
+
+ //鏍堟澘鐮佸洖杞︽柟娉�
+ $('#HBarcode_ZB').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery(2);
+ }
+ });
+
+ //涓鐮佸洖杞︽柟娉�
+ $('#HBarcode_ZX').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery(2);
+ }
+ });
+
+ //#endregion
+
+ //#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ $("#HBeginDate").val(Format(new Date(new Date() - (1000 * 60 * 60 * 24 * 7)), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ //鏌ヨ
+ get_FastQuery(1);
+ }
+ //#endregion
+
+ //#region 鍒濆鍖栬〃鏍兼柟娉�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-50'
+ , page: true
+ , totalRow: true
+ //, cellMinWidth: 90
+ , limit: 500
+ , limits: [50, 500, 5000, 20000]
+ , done: function () {
+ soulTable.render(this)
+ }
+ };
+ }
+ //#endregion
+ //#endregion
+
+ //#region 鏌ヨ
+ function get_Display(sWhere) {
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + '/Cj_SingleStation/ShippingExportList',
+ async: false,
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "gnsy": ""},
+ success: function (data1) {
+ if (data1.count == 1) {
+ var totalArray = ["鏁伴噺"];
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else if ($.inArray(data[i].name, totalArray) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
+ }
+ else {
+ 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: 120, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120, filter: true });
+ }
+ }
+ }
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 200
+ , limits: [50, 200, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
+ option.cols = [col];
+ option.data = data1.data;
+ ins = table.render(option);
+
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+
+ layer.close(ajaxLoad);
+
+ if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+ ColFilter();
+ }
+
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+
+ }
+ //#endregion
+
+ //#region 蹇�熻繃婊�
+ function get_FastQuery(number) {
+ var HBarcode_SN = $("#HBarcode_SN").val(); //SN鍙�
+ var HBarcode_ZB = $("#HBarcode_ZB").val(); //鏍堟澘鐮�
+ var HBarcode_ZX = $("#HBarcode_ZX").val(); //涓鐮�
+ var HDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
+ var HDate1 = $("#HEndDate").val();//缁撴潫鏃ユ湡
+
+ //浠绘剰瀛楁杩囨护
+ var ColName = $("#ColName").val();//澶嶉�夋
+ var Comparator = $("#Comparator").val()
+ var ColContent = $("#ColContent").val();
+ var ColName1 = $("#ColName1").val();//澶嶉�夋
+ var Comparator1 = $("#Comparator1").val()
+ var ColContent1 = $("#ColContent1").val();
+ var ColName2 = $("#ColName2").val();//澶嶉�夋
+ var Comparator2 = $("#Comparator2").val()
+ var ColContent2 = $("#ColContent2").val();
+ if (ColName != 0 && Comparator != 0) {
+ var com = "";
+ switch (Comparator) {
+ case "7":
+ com = "like'%" + ColContent + "%'";
+ break;
+ case "8":
+ com = "like'%" + ColContent + "'";
+ break;
+ case "9":
+ com = "like'" + ColContent + "%'";
+ break;
+ case "10":
+ com = "not like'%" + ColContent + "%'";
+ break;
+ default:
+ com = "" + Comparator + "'" + ColContent + "'";
+ break;
+ }
+ sWhere += " and " + ColName + " " + com;
+ }
+ if (ColName1 != 0 && Comparator1 != 0) {
+ var com1 = "";
+ switch (Comparator1) {
+ case "7":
+ com1 = "like'%" + ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+ break;
+ }
+ sWhere += " and " + ColName1 + " " + com1;
+ }
+ if (ColName2 != 0 && Comparator2 != 0) {
+ var com2 = "";
+ switch (Comparator2) {
+ case "7":
+ com2 = "like'%" + ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + Comparator2 + "'" + ColContent2 + "'";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
+
+ if (HBarcode_SN) {
+ sWhere += " and DSN like '%" + HBarcode_SN + "%'";
+ }
+ if (HBarcode_ZB) {
+ sWhere += "and 鏍堟澘鐮� like '%" + HBarcode_ZB + "%'";
+ }
+ if (HBarcode_ZX) {
+ sWhere += "and 涓鐮� like '%" + HBarcode_ZX + "%'";
+ }
+ if (HDate) {
+ sWhere += " and CONVERT(varchar(100),鐢熶骇鏃ユ湡, 23) >= '" + HDate + "'";
+ }
+ if (HDate1) {
+ sWhere += " and CONVERT(varchar(100),鐢熶骇鏃ユ湡, 23) <= '" + HDate1 + "'";
+ }
+
+ get_Display(sWhere);
+ sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+ }
+ //#endregion
+
+ //#region 閲嶇疆杩囨护鏉′欢鏂规硶
+ function set_ClearQuery() {
+ $("#HBarcode_SN").val("");
+ $("#HBarcode_ZB").val("");
+ $("#HBarcode_ZX").val("");
+ $("#HBeginDate").val(Format(new Date(new Date() - (1000 * 60 * 60 * 24 * 7)), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#ColContent").val("");
+ $("#ColName").val("0");
+ $("#Comparator").val("0");
+ $("#ColContent1").val("");
+ $("#ColName1").val("0");
+ $("#Comparator1").val("0");
+ $("#ColContent2").val("");
+ $("#ColName2").val("0");
+ $("#Comparator2").val("0");
+ form.render('select');
+
+ get_FastQuery("")
+ sWhere = "";
+ }
+ //#endregion
+
+ //#region 瀵煎嚭Execel
+ function get_Export() {
+
+ var data = option.data
+ 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().replace(/[\r\n]+/g, '').replace(/[\r\n]+/g, '').replace(/[\r\n]+/g, ''); // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
+ }
+ }
+ });
+
+ // 鏍¢獙1锛氭暟鎹负绌哄垯鎻愮ず
+ if (!data || data.length === 0) {
+ layer.msg('鏆傛棤鏁版嵁鍙鍑�', { icon: 2 });
+ return;
+ }
+
+ // 鍒涘缓绌哄伐浣滆〃
+ var ws = {};
+
+ // 閰嶇疆琛ㄥご鏍囬锛堟枃鏈牸寮忥級
+ var headersTitle = [];
+ var headersField = [];
+ var excludeFields = [];
+ //寰幆娣诲姞鏍囬
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (option.cols[0][i].hide == false && excludeFields.indexOf(option.cols[0][i].title) == -1) {
+ headersTitle.push(option.cols[0][i].title);
+ headersField.push(option.cols[0][i].field);
+ }
+ }
+ //鎶婃爣棰樻坊鍔犲埌excel琛ㄦ牸
+ headersField.forEach((header, idx) => {
+ var cellRef = XLSX.utils.encode_cell({ r: 0, c: idx }); // 琛�0涓鸿〃澶�
+ ws[cellRef] = { v: header, t: 's', z: "@" }; // t:'s' 浠h〃鏂囨湰鏍煎紡, z: "@" 鎸囧畾鍗曞厓鏍间负鏂囨湰绫诲瀷
+ });
+
+ // 濉厖鏁版嵁骞舵寚瀹氭瘡涓崟鍏冩牸鐨勬牸寮�
+ data.forEach((row, rowIdx) => {
+ var rowNum = rowIdx + 1; // 鏁版嵁浠庣2琛岋紙琛�1锛夊紑濮�
+ if (!row) return;
+ var Hname = "";
+ //鍗曞厓鏍兼暟鎹祴鍊�
+ for (var i = 0; i < headersTitle.length; i++) {
+ Hname = headersTitle[i];
+ ws[XLSX.utils.encode_cell({ r: rowNum, c: i })] = { v: row[Hname] || '', t: 's', z: "@" };
+ }
+ });
+
+ // 鍙�夛細璁剧疆鍒楀锛屾彁鍗囧鍑烘枃浠剁殑鍙鎬�
+ var HColWidth = [];
+ for (var i = 0; i < headersTitle.length; i++) {
+ var HCelWidth = data[0][headersTitle[i]].length + 8;
+ HColWidth.push({ wch: HCelWidth == 8 ? 30 : HCelWidth});
+ }
+ ws['!cols'] = HColWidth;
+ // 鏍囪鏁版嵁鑼冨洿锛堝叧閿細璁〦xcel璇嗗埆鏈夋暟鎹殑鍖哄煙锛�
+ ws['!ref'] = XLSX.utils.encode_range({
+ s: { r: 0, c: 0 }, // 璧峰锛氳0鍒�0
+ e: { r: data.length, c: headersTitle.length - 1 } // 缁撴潫锛氭渶鍚庝竴琛屾渶鍚庝竴鍒�
+ });
+
+ // 鏋勫缓宸ヤ綔绨垮苟瀵煎嚭
+ var wb = XLSX.utils.book_new();
+ XLSX.utils.book_append_sheet(wb, ws, '鍑鸿揣淇℃伅');
+ XLSX.writeFile(wb, '鍑鸿揣瀵煎嚭.xlsx');
+ }
+ //#endregion
+
+
+ //#region 鍒锋柊
+ function get_Refresh() {
+ $("#btnSearch").trigger('click');
+ }
+ //#endregion
+
+ //#region 闅愯棌鍒楄缃�
+ function get_HideColumn() {
+ var colName = "";
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length; i++) {
+ colName += option.cols[0][i]["field"] + ",";
+ }
+ var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ var urlLen = urlStr.split('/');
+ for (var i = 0; i < urlLen.length - 4; i++) {
+ contentUrl += "../";
+ }
+ colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide_New.html?HModName=' + HModName + '&colName=' + colName;
+
+ layer.open({
+ type: 2
+ , skin: "layui-layer-rim" //鍔犱笂杈规
+ , title: "闅愯棌鍒楄缃�" //鏍囬
+ , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡
+ , shift: 2 //寮瑰嚭鍔ㄧ敾
+ , area: ["50%", "90%"] //绐椾綋澶у皬
+ , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
+ , content: [contentUrl, "yes"]
+ , btn: ["纭畾", "鍙栨秷"]
+ , btn1: function (index, laero) {
+ //鍒锋柊琛ㄦ牸鏁版嵁
+ DisPlay_HideColumn();
+ //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ })
+ }
+ //#endregion
+ //#region 鏄剧ず鍒楁暟鎹�
+ function DisPlay_HideColumn() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ type: "GET",
+ data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.data.length != 0) {
+ titleData = ["hmainid", "HMainEmpID", "HDeptID", "HGroupID", "HOrgID", "hsubid", "HMaterID", "HUnitID", "HEmpID", "HSourceID", "HBadReasonID", "HICMOInterID", "HICMOEntryID", "HICMOBillNo", "HProcExchInterID", "HProcExchEntryID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType", "HBarCode", "HReportType", "HAddr", "HMaker", "HMakeDate", "HMainSourceInterID", "HMainSourceEntryID", "HMainSourceBillNo", "HMainSourceBillType"];
+ var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
+ var newCols = [[]];//瀵瑰簲鏁版嵁搴撳垪椤哄簭col
+ newCols[0].push(option.cols[0][0]);//鏀惧叆绗竴涓猚heckbox
+ dataCol = data1.data[0].HGridString.split(',');
+ //鍒楄缃垪鏁颁笌椤甸潰鍒楁暟鏄惁涓�鑷�
+ if (dataCol.length == option.cols[0].length - 1) {
+ //閬嶅巻瀵绘壘鍒楄缃搴斿垪鎸夐『搴忔彃鍏�
+ for (var j = 0; j < option.cols[0].length - 1; j++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
+ var dataCols = dataCol[j].split('|');
+ //閫夋嫨涓巇atacols鐩稿簲鍒楄繘琛屼慨鏀�
+ if (option.cols[0][i + 1]["field"] == dataCols[5]) {
+ //闅愯棌鍒�
+ if (dataCols[1] == 1) {
+ option.cols[0][i + 1]["hide"] = true;
+ }
+ //璁剧疆鍒楀
+ if (dataCols[3] > 0) {
+ option.cols[0][i + 1]["width"] = dataCols[3];
+ }
+ //璁剧疆鍐呭瀛椾綋澶у皬
+ if (data1.data[0].HFontSize != 0) {
+ option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
+ } else {
+ option.cols[0][i + 1]["style"] = "font-size:100%";
+ }
+ //鏄剧ず鍒�
+ if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
+ option.cols[0][i + 1]["hide"] = false;
+ }
+ //缁熻鍒�
+ if (dataCols[6] == 1) {
+ option.cols[0][i + 1]["totalRow"] = true;
+ }
+ //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
+ switch (dataCols[2]) {
+ case "L":
+ option.cols[0][i + 1]["align"] = "left";
+ break;
+ case "M":
+ option.cols[0][i + 1]["align"] = "center";
+ break;
+ case "R":
+ option.cols[0][i + 1]["align"] = "right";
+ break;
+ }
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
+ newCols[0].push(option.cols[0][i + 1]);
+ }
+ }
+ }
+ //閬嶅巻寰幆鍚庡垽鏂搴斿垪鏁版槸鍚︿竴鑷�
+ if (dataCol.length == newCols[0].length - 1) {
+ option.cols = newCols;
+ //鍙栨秷鍐荤粨鍒�
+ for (var i = 1; i < option.cols[0].length - 1; i++) {
+ if (option.cols[0][i]["fixed"] != null) {
+ option.cols[0][i]["fixed"] = null;
+ }
+ else {
+ break;
+ }
+ }
+ //鍐荤粨鍒�
+ if (data1.data[0].HFixCols != 0) {
+ for (var i = 0; i < data1.data[0].HFixCols; i++) {
+ if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
+ data1.data[0].HFixCols += 1;
+ }
+ option.cols[0][i + 1]["fixed"] = "left";
+ }
+ }
+ }
+ }
+ table.render(option);
+ } else {
+ table.render(option);
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ })
+ }
+ //#endregion
+
+
+ //#region 浠绘剰瀛楁杩囨护锛氬垪鍚嶆樉绀轰笅鎷夋
+ function ColFilter() {
+ var Organization = '<option value="0" selected="selected" ></option>';
+ for (var i = 1; i < option.cols[0].length; i++) {
+ if (option.cols[0][i].hide != true) {
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
+ }
+ }
+ $("#ColName").empty();
+ $("#ColName").append(Organization);$("#ColName1").empty();
+ $("#ColName1").append(Organization);$("#ColName2").empty();
+ $("#ColName2").append(Organization);
+ form.render('select');
+ }
+ //#endregion
+ });
+
+ //#endregion
+
+ //浠ヤ笂鏄痩ayui妯″潡
+ </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html"
index b51e34a..fb4b921 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\215\225\345\223\201\350\277\207\347\253\231_\345\260\217\345\215\253/Cj_SachetBarCodePrint.html"
@@ -97,12 +97,21 @@
</div>
</div>
<div class="layui-inline">
+ <label class="layui-form-label">妯℃澘鍚嶇О</label>
+ <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
+ <select name="HPrintTemplate" id="HPrintTemplate" class="ForFilteringSchemes" lay-filter="HPrintTemplate"
+ lay-verify="HPrintTemplate">
+ <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
<label class="layui-form-label">鏉$爜缂栧彿</label>
<div class="layui-input-inline" style="width:600px;">
<input class="layui-input" name="HBarCode" id="HBarCode" autocomplete="off" style="float:left;width:410px;" onfocus="this.select();" placeholder="璇疯緭鍏ュ崟涓ˉ鎵撴潯鐮佺紪鍙凤紝涓嶆敮鎸佹壒閲忚ˉ鎵�">
<button type="button" class="layui-btn" id="PrintBarCode" lay-submit="" lay-filter="PrintBarCode" style="float:left;">琛ユ墦鏉$爜</button>
</div>
- </div>
+ </div>
</div>
</div>
</div>
@@ -175,7 +184,8 @@
}];
//#region 杩涘叆椤甸潰鏃㈠姞杞�
-
+ //鑾峰彇鎵撳嵃妯℃澘
+ getTem();
//鍒濆鍖栬〃鏍�
set_InitGrid();
@@ -328,6 +338,19 @@
PrintBarCode();
})
+ form.on('select(HPrintTemplate)', function (data) {
+ // 2. 鑾峰彇閫変腑鐨勫��
+ const selectedValue = data.value;
+
+ // 3. 淇濆瓨鍒� localStorage锛堥敭鍚嶄负 "BlueToothselectedTemplate"锛�
+ localStorage.setItem('SNselectedTemplate', selectedValue);
+
+ // 濡傛灉闇�瑕佷細璇濈骇瀛樺偍锛堟祻瑙堝櫒鍏抽棴鍚庢竻闄わ級锛屾敼鐢� sessionStorage锛�
+ // sessionStorage.setItem('selectedTemplate', selectedValue);
+
+ console.log('宸蹭繚瀛橀�夋嫨鐨勬ā鏉�:', selectedValue);
+ });
+
//鏉$爜缂栧彿鍥炶溅鏂规硶
$('#HBarCode').on('keydown', function (event) {
if (event.keyCode == 13) {
@@ -379,7 +402,30 @@
table.render(option);
}
-
+ //#region 鑾峰彇鎵撳嵃妯℃澘
+ function getTem() {
+ //鑾峰彇鐧诲綍椤电粍缁囧垪
+ $.ajax({
+ type: "get",
+ async: false,
+ url: GetWEBURL() + "/Open_PrintTem/GetOpenTmpList_Json",
+ data: { "HNumber": "HGy_BarCodeBill" },
+ success: function (result) {
+ var template = "";
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data;
+ for (var i = 0; i < data.length; i++) {
+ template += '<option style="color:blue;" value="' + data[i].HName + '">' + data[i].HName + '</option>';
+ }
+ $("#HPrintTemplate").append(template);
+ $("#HPrintTemplate").val(localStorage.getItem('SNselectedTemplate'))
+ form.render('select');
+ }
+ layer.closeAll("loading");
+ }
+ })
+ }
+ //#endregion
//鏉$爜鐢熸垚
function SaveBarCodeCreate() {
@@ -466,7 +512,8 @@
type: "print",//鎵撳嵃妯″紡
//type: "preview",//棰勮妯″紡
showOptionDlg: false, //濡傛灉涓嶆樉绀烘墦鍗板璇濇鑰岀洿鎺ユ墦鍗帮紝灏嗘琛屾敞閲婂幓鎺夊嵆鍙�
- report: urlAddRandomNo("../../grf/棣欏泭鏍囩JSON3.grf"),
+ //report: urlAddRandomNo("../../grf/棣欏泭鏍囩JSON3.grf"),
+ report: urlAddRandomNo("../../grf/" + $("#HPrintTemplate").val() + ".grf"),
data: Customer
};
--
Gitblit v1.9.1