From efcb0edd08f8f28397ee609db005dff3d6d875e4 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期六, 07 三月 2026 16:11:55 +0800
Subject: [PATCH] 工位添加子表和打印功能
---
WebTM/WebTM.csproj.user | 2
WebTM/views/基础资料/公用基础资料/xmlLBM_Gy_WorkStationList.aspx.designer.cs | 26 ++
WebTM/views/基础资料/公用基础资料/Gy_WorkStationList.html | 29 ++
WebTM/views/基础资料/公用基础资料/xmlLBM_Gy_WorkStationList.aspx.cs | 17 +
WebTM/views/grf/工位标签.grf | 151 +++++++++++++++
WebTM/views/基础资料/公用基础资料/xmlLBM_Gy_WorkStationList.aspx | 26 ++
WebTM/Vlog/webapi20260307.txt | 87 ++++++++
WebTM/views/基础资料/公用基础资料/Add_Edit_Gy_WorkStationList.html | 249 +++++++++++++++++++++++-
WebTM/views/基础资料/公用基础资料/HBarPlanPrint.html | 3
WebTM/WebTM.csproj | 8
10 files changed, 584 insertions(+), 14 deletions(-)
diff --git a/WebTM/Vlog/webapi20260307.txt b/WebTM/Vlog/webapi20260307.txt
new file mode 100644
index 0000000..d8f2a36
--- /dev/null
+++ b/WebTM/Vlog/webapi20260307.txt
@@ -0,0 +1,87 @@
+2026/3/7 15:46:10 鎵撳嵃sql:select * from h_v_Gy_WorkStationList where HItemID in()
+
+2026/3/7 15:51:12 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(102130)
+
+2026/3/7 15:51:12 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 15:51:12 ReportDataSet:1
+
+2026/3/7 15:57:00 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(102119,102122)
+
+2026/3/7 15:57:00 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 15:57:00 ReportDataSet:2
+
+2026/3/7 15:57:06 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(102119,102122)
+
+2026/3/7 15:57:06 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 15:57:06 ReportDataSet:2
+
+2026/3/7 15:57:10 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(102119,102122)
+
+2026/3/7 15:57:10 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 15:57:10 ReportDataSet:2
+
+2026/3/7 15:58:38 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(102119,102122)
+
+2026/3/7 15:58:38 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 15:58:38 ReportDataSet:2
+
+2026/3/7 16:05:27 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in()
+
+2026/3/7 16:06:15 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(178563)
+
+2026/3/7 16:06:21 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:06:21 ReportDataSet:1
+
+2026/3/7 16:07:58 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(17)
+
+2026/3/7 16:07:58 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:07:58 ReportDataSet:0
+
+2026/3/7 16:08:22 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(17)
+
+2026/3/7 16:08:22 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:08:22 ReportDataSet:0
+
+2026/3/7 16:08:24 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(17)
+
+2026/3/7 16:08:24 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:08:24 ReportDataSet:0
+
+2026/3/7 16:08:26 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(17)
+
+2026/3/7 16:08:26 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:08:26 ReportDataSet:0
+
+2026/3/7 16:09:08 鎵撳嵃sql:select * from h_v_Gy_WorkStationList where HItemID in(17)
+
+2026/3/7 16:09:08 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:09:08 ReportDataSet:1
+
+2026/3/7 16:09:47 鎵撳嵃sql:select * from h_v_IF_EmployeeList where HItemID in(10)
+
+2026/3/7 16:09:47 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:09:47 ReportDataSet:0
+
+2026/3/7 16:09:59 鎵撳嵃sql:select * from h_v_Gy_WorkStationList where HItemID in(10)
+
+2026/3/7 16:09:59 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:09:59 ReportDataSet:1
+
+2026/3/7 16:11:42 鎵撳嵃sql:select * from h_v_Gy_WorkStationList where HItemID in(9)
+
+2026/3/7 16:11:42 SqlConnStr:Data Source=47.96.97.237,15127;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;
+
+2026/3/7 16:11:42 ReportDataSet:1
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 572d5bd..8b54922 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -494,6 +494,7 @@
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_CostItemFixRate.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_CostItemAverageType.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_CostItemAverageType.html" />
+ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Gy_WorkStationList.aspx" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_XBarcode.aspx" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_ZB.aspx" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_MiddleBox.aspx" />
@@ -2748,6 +2749,13 @@
<Compile Include="App_Data\MssqlReportData.cs" />
<Compile Include="App_Data\ReportData.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Gy_WorkStationList.aspx.cs">
+ <DependentUpon>xmlLBM_Gy_WorkStationList.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Gy_WorkStationList.aspx.designer.cs">
+ <DependentUpon>xmlLBM_Gy_WorkStationList.aspx</DependentUpon>
+ </Compile>
<Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill_MiddleBox.aspx.cs">
<DependentUpon>xmlLBM_HGy_BarCodeBill_MiddleBox.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user
index 1d2e0a2..8cd2c06 100644
--- a/WebTM/WebTM.csproj.user
+++ b/WebTM/WebTM.csproj.user
@@ -7,7 +7,7 @@
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<NameOfLastUsedPublishProfile>D:\鏅轰簯LMes\MESWMS-LayUI\WebTM\Properties\PublishProfiles\SWETM.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>D:\宸ヤ綔浠g爜\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\LAYUI.pubxml</NameOfLastUsedPublishProfile>
- <ProjectView>ShowAllFiles</ProjectView>
+ <ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
diff --git "a/WebTM/views/grf/\345\267\245\344\275\215\346\240\207\347\255\276.grf" "b/WebTM/views/grf/\345\267\245\344\275\215\346\240\207\347\255\276.grf"
new file mode 100644
index 0000000..3566cfd
--- /dev/null
+++ "b/WebTM/views/grf/\345\267\245\344\275\215\346\240\207\347\255\276.grf"
@@ -0,0 +1,151 @@
+锘縊bject Report
+ Version='6.8.9.5'
+ Title='浣犵殑鎶ヨ〃鏍囬'
+ PrintAsDesignPaper=F
+ Object Font
+ Name='瀹嬩綋'
+ Size=105000,0
+ Weight=400
+ Charset=134
+ End
+ Object Printer
+ Size=256
+ Width=9.7
+ Height=6
+ LeftMargin=0.1
+ TopMargin=0
+ RightMargin=0.1
+ BottomMargin=0
+ End
+ Object DetailGrid
+ CenterView=T
+ Object Border
+ Object Pen
+ Width=1.5
+ End
+ End
+ Object Recordset
+ Items Field
+ Item
+ Name='宸ヤ綅鍚嶇О'
+ End
+ Item
+ Name='宸ヤ綅浠g爜'
+ End
+ End
+ End
+ Items Column
+ Item
+ Name='鏍囩瀹藉害'
+ Width=9.7
+ FixedWidth=T
+ End
+ End
+Object ColumnContent
+ Height=5.3975
+ Items ColumnContentCell
+ Item
+ Column='鏍囩瀹藉害'
+ FreeCell=T
+ Items Control
+ Item
+ Type=FreeGrid
+ Name='FreeGrid1'
+ Left=0.396875
+ Top=0.211667
+ Object Border
+ Styles=[DrawLeft|DrawTop|DrawRight|DrawBottom]
+ End
+ ColumnCount=2
+ RowCount=2
+ Items FreeGridColumn
+ Item[1]
+ Width=3.99521
+ FixedWidth=T
+ End
+ Item[2]
+ Width=4.6
+ FixedWidth=T
+ End
+ End
+ Items FreeGridRow
+ Item[1]
+ Height=2.5
+ End
+ Item[2]
+ Height=2.5
+ End
+ End
+ Items FreeGridCell
+ Item[1,1]
+ Object Font
+ Name='瀹嬩綋'
+ Size=142500,0
+ Bold=T
+ Charset=134
+ End
+ TextAlign=MiddleCenter
+ Text='[#宸ヤ綅浠g爜#]'
+ End
+ Item[1,2]
+ FreeCell=T
+ Items Control
+ Item
+ Type=Barcode
+ Name='Barcode1'
+ Left=0.211667
+ Top=0.211667
+ Width=4.18042
+ Height=4.78896
+ BarcodeType=QRCode
+ CaptionPosition=None
+ Text='[#鏉$爜缂栧彿#]'
+ End
+ End
+ RowSpan=2
+ End
+ Item[2,1]
+ Object Font
+ Name='瀹嬩綋'
+ Size=142500,0
+ Bold=T
+ Charset=134
+ End
+ TextAlign=MiddleCenter
+ Text='[#宸ヤ綅鍚嶇О#]'
+ End
+ End
+End
+End
+End
+End
+End
+Object ColumnTitle
+ Height=0
+ Items ColumnTitleCell
+ Item
+ GroupTitle=F
+ Column='鏍囩瀹藉害'
+ TextAlign=MiddleCenter
+ PaddingLeft=0
+ PaddingRight=0
+ PaddingTop=0
+ PaddingBottom=0
+ End
+ End
+End
+End
+Items ReportHeader
+ Item
+ Name='ReportHeader1'
+ Height=0.211667
+ RepeatOnPage=T
+ End
+End
+Items ReportFooter
+ Item
+ Name='ReportFooter1'
+ Height=0
+ End
+End
+End
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_WorkStationList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_WorkStationList.html"
index ced410a..cf9a3ce 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_WorkStationList.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Add_Edit_Gy_WorkStationList.html"
@@ -14,6 +14,7 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
+ <script src="../../../layuiadmin/SetColumn.js"></script>
<style>
.layui-form-item .layui-inline {
margin-top: 5px;
@@ -140,16 +141,37 @@
</div>
</div>
</div>
-
-
- </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <ul class="layui-tab-title" lay-filter="tab-all">
+ <li lay-id="1" style="padding:1px;" class="layui-this">椤圭洰</li>
+ </ul>
+ <div class="layui-tab-content">
+ <!--瀛愯〃-->
+ <div class="layui-tab-item layui-show">
+ <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-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></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>
+ </div>
+ </div>
+ </div>
+
+ </div>
</form>
</div>
</div>
</div>
-
+ <script type="text/html" id="barDemo">
+ <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+ </script>
<script>
+ var OptionData = [];
//#region 鎶樺彔娉ㄩ噴
//#endregion
layui.config({
@@ -165,12 +187,9 @@
, table = layui.table
, form = layui.form
, element = layui.element;
- var sWhere = "";
- var date = new Date();
- var day = date.getDate();
- var month = date.getMonth() + 1;
- var year = date.getFullYear();
- var shijian = year + "-" + month + "-" + day;
+ var option = "";
+ var HModName = "Gy_WOrkStationEdit"
+
//#endregion
@@ -178,7 +197,9 @@
//鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
get_LoginIs();
-
+ //鍒濆鍖栬〃鏍�
+ get_InitGrid();
+ DisPlay_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table, /^HMaterNumber$/)
//鑾峰彇椤甸潰璺宠浆鍙傛暟
var params = get_UrlVars();
if (typeof (params[params[0]]) == "undefined") {
@@ -193,6 +214,7 @@
$("#HItemID").val(0);
$("#HMakeEmp").val(sessionStorage["HMaker"]); //鏍规嵁鐧诲綍鐢ㄦ埛甯﹀嚭鍒涘缓浜�
$("#HMakeTime").val(Format(new Date(), "yyyy-MM-dd"));
+
} else if (OperationType == 2) {//澶嶅埗
//缂栬緫鐘舵�佹椂锛屾牴鎹唴鐮侊紝鑾峰彇淇℃伅骞跺啓鍏ョ晫闈�
RoadBillMain(linterid);
@@ -216,6 +238,7 @@
else {
layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
}
+
$("#HUSEORGID").val(sessionStorage["OrganizationID"]);
$("#HCREATEORGID").val(sessionStorage["OrganizationID"])
@@ -223,6 +246,16 @@
//#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //#region 瀛愯〃锛氳鍐呬簨浠�
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
+
+ });
+
+ //#endregion
+
//閫�鍑烘寜閽�
form.on('submit(Cancel)', function () {
@@ -248,8 +281,169 @@
});
//#endregion
+ //#region 瀛愯〃锛氬ご宸ュ叿鏍忎簨浠�
+ table.on('toolbar(mainTable)', function (obj) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+
+ //鏂板琛岃〃鏍兼暟鎹�
+ var NewRow =
+ {
+ "HMaterID": "0"
+ , "HMaterNumber": ""
+ , "HMaterName": ""
+ }
+ switch (obj.event) {
+ case 'btn-AddLine':
+ table.cache["mainTable"].push(NewRow);
+ option.data = table.cache["mainTable"];
+ table.render(option);
+
+ form.render('select');
+
+ break;
+ case 'btn-CopyLine':
+ var copydata = JSON.stringify(data);
+ if (data.length <= 0) {
+ layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+ }
+ else if (data.length > 1) {
+ layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+ }
+ else {
+ var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+ var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+ table.cache["mainTable"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+ option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
+
+ form.render('select');
+ }
+ break;
+ //鍒楄缃�
+ case 'set_HideColumn':
+ get_HideColumnEdit(HModName, sessionStorage["HUserName"], option, table, /^HMaterNumber$/)
+ break;
+ }
+ });
+ //#endregion
//#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
+
+
+ //#region 琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ //if (rowIndex === '0') {
+ // layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ //} else {
+ var oldData = table.cache["mainTable"];
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ //for (var i = 0; i < oldData.length; i++) {
+ // //鍙戠エ绫诲瀷
+ // $('#HTransType' + (i + 1)).find("option[value='" + oldData[i].HTransType + "']").attr("selected", true);
+ //}
+ //form.render('select');
+ layer.close(index);
+ /*}*/
+ });
+ }
+ }
+ //#endregion
+ //#region 瀛愯〃锛氬揩鎹烽敭(F7)鎵撳紑寮圭獥
+ function set_GridCellCheck(obj) {
+ window.tableEditObj = obj;
+ $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+ if (event.key == "F7") {
+
+ if (obj.event == "HMaterList") {
+ var HOrgID = $("#HOrgID").val(); //鑾峰彇id="HOrgID"鐨勫厓绱犱腑鑾峰彇鍏跺�硷紝骞跺皢璇ュ�煎瓨鍌ㄥ湪鍙橀噺HOrgID涓�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim',
+ area: ['90%', '90%'],
+ title: '鐗╂枡鍒楄〃',
+ shift: 2,
+ content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes'],
+ // 浠ヤ笅鍘熸湁浠g爜鍏ㄩ儴淇濈暀锛屾棤闇�淇敼
+ 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('璇烽�夋嫨鏁版嵁');
+ }
+ //OptionData = checkStatus.data[0];
+ obj.update({
+ "HMaterID": checkStatus.data[0].HItemID
+ , "HMaterName": checkStatus.data[0].鐗╂枡浠g爜
+ , "HMaterNumber": checkStatus.data[0].鐗╂枡鍚嶇О
+ })
+ layer.close(index);//鍏抽棴寮圭獥
+ }
+ , end: function () {
+ if (typeof (OptionData) != "undefined" && OptionData != []) {
+ obj.update({
+ "HMaterID": OptionData.HItemID
+ , "HMaterName": OptionData.鐗╂枡浠g爜
+ , "HMaterNumber": OptionData.鐗╂枡鍚嶇О
+ })
+ OptionData = [];
+ }
+
+ }
+ })
+ }
+ // 娓呯┖浜嬩欢鏍囪瘑锛岄伩鍏嶉噸澶嶈Е鍙�
+ obj.event = "";
+ // 闃绘浜嬩欢鍐掓场鍜岄粯璁よ涓�
+ e.preventDefault();
+ e.stopPropagation();
+ return false;
+ }
+ });
+ }
+ //#endregion
+
+
+ //#region 瀛愯〃鍒濆鍖�
+ function get_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , totalRow: true
+ , cellMinWidth: 120
+ , height: 400
+ , limit: 100
+ , cols: [[
+ { type: 'checkbox', totalRowText: '鍚堣琛�' }
+ , { type: 'numbers', field: '搴忓彿', title: '搴忓彿', style: 'background-color: #f9f9f9;' }
+ , { field: 'HMaterID', title: 'HMaterID', hide: true, style: 'background-color: #f9f9f9;' }
+ , { field: 'HMaterNumber', title: '鐗╂枡浠g爜',style: 'background-color: #f9f9f9;' }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', edit: 'text', event: "HMaterList", style: 'background-color: #f9f9f9;' }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+
+ ]]
+ }
+
+ var rowdata = [
+ {
+ "HMaterID": "0"
+ , "HMaterNumber": ""
+ , "HMaterName": ""
+
+ }
+ ];
+ option.data = rowdata;
+ table.render(option);
+ // DisPlay_HideColumn();
+ }
+ //#endregion
//瀹℃牳
function set_CheckBill() {
@@ -296,7 +490,7 @@
$.ajax({
url: GetWEBURL() + "Gy_WorkStationBill/cx",
type: "GET",
- async:false,
+ async: false,
data: {
"HInterID": linterid
},
@@ -322,6 +516,24 @@
, "HCheckEmp": data.瀹℃牳浜�
, "HCheckTime": data.瀹℃牳鏃ユ湡 == null ? "" : Format(new Date(data.瀹℃牳鏃ユ湡), "yyyy-MM-dd")
});
+ // 2. 鍔犺浇瀛愯〃鏁版嵁
+ var rowdata = [];
+ if (data && result.data.length > 0) {
+ for (var i = 0; i < result.data.length; i++) {
+ var row = result.data[i];
+ rowdata.push({
+ "HMaterID": row["HMaterID"] || 0,
+ "HMaterNumber": row["鐗╂枡浠g爜"] || "",
+ "HMaterName": row["鐗╂枡鍚嶇О"] || "",
+
+ });
+ }
+ } else {
+ console.log("娌℃湁瀛愯〃鏁版嵁");
+ }
+ // 3. 閲嶆柊娓叉煋琛ㄦ牸
+ option.data = rowdata;
+ table.render(option);
layer.close(ajaxLoad);
} else {
layer.close(ajaxLoad);
@@ -346,11 +558,19 @@
layer.msg("璇疯緭鍏ュ伐浣嶅悕绉帮紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return;
}
+ var num = [];
+ for (var i = 0; i < table.cache["mainTable"].length; i++) {
+ if (table.cache["mainTable"][i] != "") {
+ table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
+ num.push(table.cache["mainTable"][i])
+ }
+ }
+ var sSubStr = JSON.stringify(num);
$.ajax({
type: "POST",
url: GetWEBURL() + "Gy_WorkStationBill/ModifyByID", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
async: true,
- data: { "oMain": sMainStr + ';' + sessionStorage["HUserName"] },
+ data: { "oMain": sMainStr + ';' + sSubStr+';' + sessionStorage["HUserName"] },
dataType: "json",
success: function (data) {
if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
@@ -385,6 +605,9 @@
//浠ヤ笂鏄痩ayui妯″潡
});
+ function GetGyMaterial(data) {
+ OptionData = data
+ }
</script>
</body>
</html>
\ No newline at end of file
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkStationList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkStationList.html"
index 96b323f..f737548 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkStationList.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/Gy_WorkStationList.html"
@@ -140,6 +140,7 @@
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
<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_Print" id="set_Print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_Copy" id="set_Copy"><i class="layui-icon layui-icon-form"></i>澶嶅埗</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
@@ -154,6 +155,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
+
</div>
</script>
@@ -292,6 +294,9 @@
//鍒楄缃�
case 'set_HideColumn': get_HideColumnNoPage(HModName, sessionStorage["HUserName"], option, get_FastQuery);
break;
+ //鎵撳嵃
+ case 'set_Print': set_Print();
+ break;
};
});
//#endregion
@@ -358,7 +363,31 @@
}
//#endregion
+ //鎵撳嵃
+ function set_Print() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length >= 1) {
+ var rows = [];
+ for (var i = 0; i < data.length; i++) {
+ rows.push(data[i].HItemID.toString());
+ }
+ layer.open({
+ type: 2
+ , area: ['50%', '50%']
+ , title: '鎵撳嵃妯$増閫夋嫨'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + rows.toString() + '&MyMsg=' + rows.toString() + '&Type=HWorkStation', 'yes']
+ , resize: false
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+ }
+ }
//#region 鏌ヨ
function get_Display(sWhere) {
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html"
index f075056..7801f74 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html"
@@ -268,6 +268,9 @@
case "HEmployee"://鑱屽憳鍒楄〃
CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Gy_EmployeeList.aspx?linterid=" + value, true, "");
break;
+ case "HWorkStation"://宸ヤ綅鍒楄〃
+ CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Gy_WorkStationList.aspx?linterid=" + value, true, "");
+ break;
case "HWarehouse"://浠撳簱鍒楄〃
CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Gy_WarehouseList.aspx?linterid=" + value, true, "");
break;
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx"
new file mode 100644
index 0000000..22c1280
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx"
@@ -0,0 +1,26 @@
+锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="xmlLBM_Gy_WorkStationList.aspx.cs" Inherits="WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡.xmlLBM_Gy_WorkStationList" %>
+
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title></title>
+ <script runat="server">
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ //鈽呯壒鍒彁绀衡槄锛�
+ //涓嶅悓鐨勬暟鎹簱搴旇閫夌敤涓嶅悓鐨勬姤琛╔ML鏁版嵁鐢熸垚绫伙紝SQL Server鏁版嵁搴撶敤SqlXMLReportData锛孫racle鏁版嵁搴撶敤OracleXMLReportData
+ //OledbXMLReportData閫傚悎浜嶢ccess绛夋湰鍦版暟鎹簱锛屼负浜嗘紨绀烘柟渚匡紝杩欓噷浠嶨rid++Report鐨凙ccess渚嬪瓙鏁版嵁搴撲腑鑾峰彇鎶ヨ〃鏁版嵁
+
+ SqlXMLReportData.GenOneRecordset(this, "select * from h_v_Gy_WorkStationList where HItemID in(" + Request.Params["linterid"] + ")");
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server">
+ <div>
+ </div>
+ </form>
+</body>
+</html>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx.cs" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx.cs"
new file mode 100644
index 0000000..cd2ded4
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
+{
+ public partial class xmlLBM_Gy_WorkStationList : System.Web.UI.Page
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx.designer.cs" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx.designer.cs"
new file mode 100644
index 0000000..86a14dc
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_Gy_WorkStationList.aspx.designer.cs"
@@ -0,0 +1,26 @@
+锘�//------------------------------------------------------------------------------
+// <鑷姩鐢熸垚>
+// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
+//
+// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉
+// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆�
+// </鑷姩鐢熸垚>
+//------------------------------------------------------------------------------
+
+namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
+{
+
+
+ public partial class xmlLBM_Gy_WorkStationList
+ {
+
+ /// <summary>
+ /// form1 鎺т欢銆�
+ /// </summary>
+ /// <remarks>
+ /// 鑷姩鐢熸垚鐨勫瓧娈点��
+ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲��
+ /// </remarks>
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+ }
+}
--
Gitblit v1.9.1