From ff41a949c32757a249cccd206aa41d63a2bbdcd9 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 20 九月 2024 09:10:17 +0800
Subject: [PATCH] 导入功能
---
WebTM/views/基础资料/公用基础资料/Gy_Material_Excel.html | 255 ++++++
WebTM/views/基础资料/公用基础资料/Gy_MouldType_Excel.html | 230 +++++
WebTM/views/质量管理/基础建模/Gy_ErrMsgBackType.html | 15
WebTM/views/模治具管理/模治具管理/Gy_MouldFile_Excel.html | 259 ++++++
WebTM/views/基础资料/公用基础资料/Gy_Material.html | 15
WebTM/views/设备管理/设备档案/Gy_EquipFileMainList.html | 15
WebTM/views/质量管理/基础建模/Gy_ErrType_Excel.html | 229 +++++
WebTM/views/质量管理/基础建模/Gy_ErrType.html | 16
WebTM/views/质量管理/基础建模/Gy_ErrMsgBackType_Excel.html | 229 +++++
WebTM/views/基础资料/公用基础资料/Gy_MaterType_Excel.html | 233 +++++
WebTM/views/基础资料/公用基础资料/Gy_EquipType.html | 15
WebTM/views/基础资料/公用基础资料/Gy_MaterType.html | 15
WebTM/views/grf/流转卡TK.grf | 249 ++++--
WebTM/views/设备管理/设备档案/Gy_EquipFile_Excel.html | 257 ++++++
WebTM/views/基础资料/公用基础资料/Gy_MouldType.html | 15
WebTM/views/基础资料/公用基础资料/Gy_EquipType_Excel.html | 230 +++++
WebTM/views/模治具管理/模治具管理/Gy_MouldFileList.html | 15
WebTM/WebTM.csproj | 8
18 files changed, 2,202 insertions(+), 98 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index c6d253b..228c295 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -347,6 +347,10 @@
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_CheckNoteItem.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_TechnologyParameterType.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_MaintainLev.html" />
+ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_EquipType_Excel.html" />
+ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MaterType_Excel.html" />
+ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_Material_Excel.html" />
+ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_MouldType_Excel.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_TechnologyParameterType.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\SumAdd_Gy_RestDay.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_RestDay.html" />
@@ -419,6 +423,7 @@
<Content Include="views\妯℃不鍏风鐞哱妯℃不鍏风偣妫�淇濆吇\Sc_MouldDotCheckBill_PDA.html" />
<Content Include="views\妯℃不鍏风鐞哱妯℃不鍏风偣妫�淇濆吇\Sc_MouldDotCheckBill_PDA_OLD.html" />
<Content Include="views\妯℃不鍏风鐞哱妯℃不鍏风偣妫�淇濆吇\Sc_MouldMaintainBill_PDA.html" />
+ <Content Include="views\妯℃不鍏风鐞哱妯℃不鍏风鐞哱Gy_MouldFile_Excel.html" />
<Content Include="views\妯℃不鍏风鐞哱妯℃不鍏风鐞哱Sc_MouldMaintainRuleBillList_PDA.html" />
<Content Include="views\鐢熶骇绠$悊\寮傚父鍙嶉鍗昞OA_ErrMsgBackSignBill_BrushCard.html" />
<Content Include="views\鐢熶骇绠$悊\寮傚父鍙嶉鍗昞Sc_MESExecptFeedBackBillResumeList.html" />
@@ -462,6 +467,9 @@
<Content Include="views\璁惧绠$悊\璁惧鎶ヨ〃\Sb_EquipResumeCheckQuery.html" />
<Content Include="views\璁惧绠$悊\璁惧鎶ヨ〃\Sb_EquipRepairReport.html" />
<Content Include="views\璁惧绠$悊\璁惧鎶ヨ〃\缂栬緫椤甸潰\Edit_Sb_EquipMentCollectionTechParam.html" />
+ <Content Include="views\璁惧绠$悊\璁惧妗f\Gy_EquipFile_Excel.html" />
+ <Content Include="views\璐ㄩ噺绠$悊\鍩虹寤烘ā\Gy_ErrMsgBackType_Excel.html" />
+ <Content Include="views\璐ㄩ噺绠$悊\鍩虹寤烘ā\Gy_ErrType_Excel.html" />
<Content Include="views\璐ㄩ噺绠$悊\寮傚父鍙嶉\OA_ErrMsgBackSelfQuery_BGT.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_FiveMenOneRingList.html" />
<Content Include="views\璐ㄩ噺绠$悊\璐ㄩ噺鎶ヨ〃\QC_EquipMentCollectionTechParam.html" />
diff --git "a/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf" "b/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf"
index f57963a..ce06b30 100644
--- "a/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf"
+++ "b/WebTM/views/grf/\346\265\201\350\275\254\345\215\241TK.grf"
@@ -7,6 +7,9 @@
Charset=134
End
Object Printer
+ Size=11
+ Width=14.8
+ Height=21
LeftMargin=1.5
TopMargin=1.5
RightMargin=1.5
@@ -82,39 +85,39 @@
Items Column
Item
Name='Column14'
- Width=1.69333
+ Width=1.16417
End
Item
Name='Column1'
- Width=1.87854
+ Width=1.21708
End
Item
Name='Column2'
- Width=2.01083
+ Width=1.32292
End
Item
Name='Column16'
- Width=2.01083
+ Width=1.21708
End
Item
Name='Column3'
- Width=1.61396
+ Width=1.00542
End
Item
Name='Column8'
- Width=2.16958
+ Width=1.64042
End
Item
Name='Column9'
- Width=1.79917
+ Width=1.19063
End
Item
Name='Column12'
- Width=2.98979
+ Width=1.79917
End
Item
Name='Column15'
- Width=1.79917
+ Width=1.19063
End
End
Object ColumnContent
@@ -139,6 +142,12 @@
Type=FieldBox
Name='FieldBox14'
Dock=Fill
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Weight=400
+ Charset=134
+ End
DataField='宸ュ簭鍙�'
End
End
@@ -147,7 +156,7 @@
Column='Column1'
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Weight=400
Charset=134
End
@@ -157,7 +166,7 @@
Column='Column2'
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Weight=400
Charset=134
End
@@ -170,7 +179,7 @@
Column='Column16'
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Weight=400
Charset=134
End
@@ -180,7 +189,7 @@
Column='Column3'
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Weight=400
Charset=134
End
@@ -190,7 +199,7 @@
Column='Column8'
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Weight=400
Charset=134
End
@@ -201,7 +210,7 @@
Column='Column9'
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Weight=400
Charset=134
End
@@ -213,7 +222,7 @@
Column='Column12'
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Weight=400
Charset=134
End
@@ -221,6 +230,12 @@
End
Item
Column='Column15'
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Weight=400
+ Charset=134
+ End
DataField='鐝彿'
End
End
@@ -234,8 +249,8 @@
Column='Column14'
Object Font
Name='瀹嬩綋'
- Size=90000,0
- Weight=400
+ Size=75000,0
+ Bold=T
Charset=134
End
TextAlign=MiddleCenter
@@ -246,8 +261,8 @@
Column='Column1'
Object Font
Name='瀹嬩綋'
- Size=90000,0
- Weight=400
+ Size=75000,0
+ Bold=T
Charset=134
End
TextAlign=MiddleCenter
@@ -258,8 +273,8 @@
Column='Column2'
Object Font
Name='瀹嬩綋'
- Size=90000,0
- Weight=400
+ Size=75000,0
+ Bold=T
Charset=134
End
TextAlign=MiddleCenter
@@ -268,6 +283,12 @@
Item
GroupTitle=F
Column='Column16'
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Bold=T
+ Charset=134
+ End
TextAlign=MiddleCenter
Text='宸ユ鍚嶇О'
End
@@ -276,8 +297,8 @@
Column='Column3'
Object Font
Name='瀹嬩綋'
- Size=90000,0
- Weight=400
+ Size=75000,0
+ Bold=T
Charset=134
End
TextAlign=MiddleCenter
@@ -288,8 +309,8 @@
Column='Column8'
Object Font
Name='瀹嬩綋'
- Size=90000,0
- Weight=400
+ Size=75000,0
+ Bold=T
Charset=134
End
TextAlign=MiddleCenter
@@ -300,8 +321,8 @@
Column='Column9'
Object Font
Name='瀹嬩綋'
- Size=90000,0
- Weight=400
+ Size=75000,0
+ Bold=T
Charset=134
End
TextAlign=MiddleCenter
@@ -312,8 +333,8 @@
Column='Column12'
Object Font
Name='瀹嬩綋'
- Size=90000,0
- Weight=400
+ Size=75000,0
+ Bold=T
Charset=134
End
TextAlign=MiddleCenter
@@ -322,6 +343,12 @@
Item
GroupTitle=F
Column='Column15'
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Bold=T
+ Charset=134
+ End
TextAlign=MiddleCenter
Text='鐝彿'
End
@@ -349,9 +376,9 @@
Item
Type=MemoBox
Name='MemoBox1'
- Left=5.00063
- Width=4.78896
- Height=0.79375
+ Left=4.20688
+ Width=2.06375
+ Height=0.687917
Object Font
Name='瀹嬩綋'
Size=180000,0
@@ -364,13 +391,13 @@
Item
Type=MemoBox
Name='MemoBox3'
- Left=11.5888
+ Left=7.88458
Top=2.19604
Width=2.61938
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -379,23 +406,29 @@
Item
Type=MemoBox
Name='MemoBox4'
- Left=4.20688
+ Left=2.59292
Top=1.00542
Width=2.98979
Height=0.608542
+ Object Font
+ Name='瀹嬩綋'
+ Size=90000,0
+ Bold=T
+ Charset=134
+ End
TextAlign=MiddleCenter
Text='QC妫�鏌ユ柟寮忥細'
End
Item
Type=MemoBox
Name='MemoBox8'
- Left=5.60917
+ Left=4.15396
Top=2.19604
Width=1.40229
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -404,13 +437,13 @@
Item
Type=FieldBox
Name='FieldBox1'
- Left=13.2027
+ Left=9.2075
Top=2.19604
Width=3.99521
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -419,13 +452,13 @@
Item
Type=FieldBox
Name='FieldBox6'
- Left=6.61458
+ Left=5.15938
Top=2.19604
Width=3.78354
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -434,13 +467,13 @@
Item
Type=SystemVarBox
Name='SystemVarBox1'
- Left=16.5894
- Top=1.19063
- Width=2.80458
+ Left=10.7421
+ Top=1.13771
+ Width=1.79917
Height=0.423333
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -450,13 +483,13 @@
Item
Type=SystemVarBox
Name='SystemVarBox2'
- Left=15.3988
- Top=1.19063
- Width=2.40771
+ Left=9.94833
+ Top=1.13771
+ Width=1.21708
Height=0.423333
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -465,13 +498,13 @@
Item
Type=MemoBox
Name='MemoBox18'
- Left=0.79375
+ Left=0.211667
Top=2.98979
Width=2.61938
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -480,13 +513,13 @@
Item
Type=MemoBox
Name='MemoBox19'
- Left=0.79375
+ Left=0.211667
Top=2.19604
Width=2.80458
Height=0.582083
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -495,13 +528,13 @@
Item
Type=FieldBox
Name='FieldBox9'
- Left=2.40771
+ Left=1.40229
Top=2.19604
Width=2.38125
Height=0.582083
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -510,13 +543,13 @@
Item
Type=FieldBox
Name='FieldBox10'
- Left=2.59292
+ Left=1.79917
Top=2.98979
Width=1.79917
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -525,13 +558,13 @@
Item
Type=MemoBox
Name='MemoBox21'
- Left=11.5888
+ Left=8.20208
Top=3.81
Width=2.80458
Height=0.582083
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -540,7 +573,7 @@
Item
Type=Barcode
Name='Barcode1'
- Left=12.1973
+ Left=7.99042
Top=0.79375
Width=1.98438
Height=1.21708
@@ -553,16 +586,22 @@
Item
Type=FieldBox
Name='FieldBox11'
- Left=12.5942
+ Left=9.60438
Top=3.81
Width=4.60375
Height=0.582083
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Bold=T
+ Charset=134
+ End
DataField='鎵规'
End
Item
Type=Barcode
Name='Barcode2'
- Left=1.5875
+ Left=0.211667
Top=0.608542
Width=2.59292
Height=1.40229
@@ -573,19 +612,31 @@
Item
Type=StaticBox
Name='StaticBox1'
- Left=10.795
+ Left=7.99042
Top=0.211667
Width=1.79917
Height=0.582083
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Bold=T
+ Charset=134
+ End
Text='娴佽浆鍗″彿'
End
Item
Type=FieldBox
Name='FieldBox13'
- Left=12.5942
+ Left=9.60438
Top=0.211667
Width=4.20688
Height=0.582083
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Bold=T
+ Charset=134
+ End
DataField='鍗曟嵁鍙�'
End
Item
@@ -594,21 +645,33 @@
Left=0.211667
Width=5.79438
Height=0.582083
+ Object Font
+ Name='瀹嬩綋'
+ Size=75000,0
+ Bold=T
+ Charset=134
+ End
Text='浠诲姟鍗曞彿锛歔#浠诲姟鍗曞彿#]'
End
Item
Type=MemoBox
Name='MemoBox25'
- Left=7.19667
+ Left=5.00063
Top=1.00542
Width=1.19063
Height=0.608542
+ Object Font
+ Name='瀹嬩綋'
+ Size=90000,0
+ Bold=T
+ Charset=134
+ End
Text='鎶芥'
End
Item
Type=ShapeBox
Name='ShapeBox1'
- Left=8.59896
+ Left=5.79438
Top=1.00542
Width=0.608542
Height=0.582083
@@ -616,30 +679,36 @@
Item
Type=MemoBox
Name='MemoBox26'
- Left=9.60438
+ Left=6.40292
Top=1.00542
- Width=1.19063
+ Width=1.40229
Height=0.608542
+ Object Font
+ Name='瀹嬩綋'
+ Size=90000,0
+ Bold=T
+ Charset=134
+ End
Text='鎶芥'
End
Item
Type=ShapeBox
Name='ShapeBox2'
- Left=11.0067
+ Left=7.19667
Top=1.00542
- Width=0.608542
+ Width=0.582083
Height=0.582083
End
Item
Type=MemoBox
Name='MemoBox27'
- Left=5.60917
+ Left=3.81
Top=2.98979
Width=4.60375
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -648,13 +717,13 @@
Item
Type=MemoBox
Name='MemoBox28'
- Left=11.5888
+ Left=8.255
Top=2.98979
Width=6.21771
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -663,13 +732,13 @@
Item
Type=MemoBox
Name='MemoBox29'
- Left=0.79375
+ Left=0.211667
Top=3.81
Width=4.60375
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -678,13 +747,13 @@
Item
Type=MemoBox
Name='MemoBox30'
- Left=5.60917
+ Left=3.99521
Top=3.81
- Width=4.60375
+ Width=3.99521
Height=0.608542
Object Font
Name='瀹嬩綋'
- Size=90000,0
+ Size=75000,0
Bold=T
Charset=134
End
@@ -706,32 +775,26 @@
Object Border
Styles=[DrawLeft|DrawRight|DrawBottom]
End
- ColumnCount=8
+ ColumnCount=7
RowCount=2
Items FreeGridColumn
Item[1]
- Width=1.6933
+ Width=2.3813
End
Item[2]
- Width=1.8785
+ Width=1.3229
End
Item[3]
- Width=2.0108
+ Width=1.2171
End
Item[4]
- Width=2.0108
+ Width=1.0054
End
Item[5]
- Width=1.614
+ Width=1.6404
End
Item[6]
- Width=2.1696
- End
- Item[7]
- Width=1.7992
- End
- Item[8]
- Width=4.789
+ Width=1.1906
End
End
Items FreeGridRow
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_EquipType.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_EquipType.html"
index 08f4c58..dae930e 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_EquipType.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_EquipType.html"
@@ -52,6 +52,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
<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="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>鍙嶅鏍�</button>
@@ -126,6 +127,9 @@
break;
//鍒锋柊
case 'get_Refresh': get_Refresh();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
//娴忚
case 'btn-view':
@@ -388,7 +392,16 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
}
}
-
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ュ簭璧勬枡瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: './Gy_EquipType_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
//瀹℃牳/鍙嶅鏍�
function set_CheckBill(num) {
var checkStatus = table.checkStatus('mainTable')
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_EquipType_Excel.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_EquipType_Excel.html"
new file mode 100644
index 0000000..282eb06
--- /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/Gy_EquipType_Excel.html"
@@ -0,0 +1,230 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>璁惧鍒嗙被瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_EquipType/Gy_EquipType_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '璁惧鍒嗙被', title: '璁惧鍒嗙被', width: 120 }
+ , { field: '璁惧鍒嗙被浠g爜', title: '璁惧鍒嗙被浠g爜', width: 120 }
+ , { field: '鍔╄鐮�', title: '鍔╄鐮�', width: 120 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_EquipType/Gy_EquipType_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ 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_MaterType.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_MaterType.html"
index 21c9983..44d8b2f 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_MaterType.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_MaterType.html"
@@ -142,6 +142,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="btn-Add"><i class="layui-iconlayuiiconfileb"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layuiiconlayuiiconform"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layuiiconlayuiicon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
<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="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
@@ -223,6 +224,9 @@
break;
//鍒锋柊
case 'get_Refresh': get_Refresh();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
//淇濆瓨鏂规
case 'set_SaveScheme': set_SaveScheme();
@@ -560,6 +564,17 @@
}
//#endregion
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鐗╂枡鍒嗙被瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: './Gy_MaterType_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
+
//#region 瀵煎嚭Execel
function get_Export() {
var ModRightNameCheck = "Gy_MaterType_ExportExcel";
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_MaterType_Excel.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_MaterType_Excel.html"
new file mode 100644
index 0000000..211f083
--- /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/Gy_MaterType_Excel.html"
@@ -0,0 +1,233 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>鐗╂枡鍒嗙被瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_MaterType/Gy_MaterType_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '鐗╂枡鍒嗙被', title: '鐗╂枡鍒嗙被', width: 120 }
+ , { field: '鐗╂枡鍒嗙被浠g爜', title: '鐗╂枡鍒嗙被浠g爜', width: 120 }
+ , { field: 'HParentID', title: 'HParentID', width: 120, hide: true }
+ , { field: '鐖剁被浠g爜', title: '鐖剁被浠g爜', width: 120 }
+ , { field: '鐖剁被鍚嶇О', title: '鐖剁被鍚嶇О', width: 120 }
+ , { field: '鍔╄鐮�', title: '鍔╄鐮�', width: 120 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_MaterType/Gy_MaterType_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ 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_Material.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_Material.html"
index d7073a4..ab0e607 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_Material.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_Material.html"
@@ -142,6 +142,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-NumAdd" id="btn-NumAdd"><i class="layu i-iconlayuiiconfileb"></i>娴佹按鍙锋柊澧�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layuiiconlayuiiconform"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-copy" id="btn-copy"><i class="layuiiconlayuiiconform"></i>澶嶅埗</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layuiiconlayuiicon-delete"></i>鍒犻櫎</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
@@ -259,6 +260,9 @@
break;
//鏂板娴佹按鍙锋寜閽�
case 'btn-NumAdd': set_NumAddNew();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
case 'btn-NumAdd':
set_NumAddNew();
@@ -749,7 +753,16 @@
});
}
//#endregion
-
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ュ簭璧勬枡瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: './Gy_Material_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
//#region 鍒犻櫎
function set_DeleteBill() {
var checkStatus = table.checkStatus('mainTable')
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_Material_Excel.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_Material_Excel.html"
new file mode 100644
index 0000000..45712c7
--- /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/Gy_Material_Excel.html"
@@ -0,0 +1,255 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>鐗╂枡瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_Material/Gy_Material_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 120 }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 120 }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 120 }
+ , { field: '鍔╄鐮�', title: '鍔╄鐮�', width: 120 }
+ , { field: '鐗堟湰鍙�', title: '鐗堟湰鍙�', width: 120 }
+ , { field: 'HMaterClsID', title: 'HMaterClsID', width: 120, hide: true }
+ , { field: '鐗╂枡灞炴��', title: '鐗╂枡灞炴��', width: 120 }
+ , { field: 'HUnitGroupID', title: 'HUnitGroupID', width: 120, hide: true }
+ , { field: '璁¢噺鍗曚綅缁�', title: '璁¢噺鍗曚綅缁�', width: 120 }
+ , { field: 'HUnitID', title: 'HUnitID', width: 120, hide: true }
+ , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 120 }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 120 }
+ , { field: 'HSecUnitID', title: 'HSecUnitID', width: 120, hide: true }
+ , { field: '杈呭姪璁¢噺鍗曚綅', title: '杈呭姪璁¢噺鍗曚綅', width: 120 }
+ , { field: '鎹㈢畻鐜�', title: '鎹㈢畻鐜�', width: 120 }
+ , { field: 'HWhID', title: 'HWhID', width: 120, hide: true }
+ , { field: '榛樿浠撳簱', title: '榛樿浠撳簱', width: 120 }
+ , { field: '鏈�楂樺簱瀛�', title: '鏈�楂樺簱瀛�', width: 120 }
+ , { field: '鏈�浣庡簱瀛�', title: '鏈�浣庡簱瀛�', width: 120 }
+ , { field: '瀹夊叏搴撳瓨', title: '瀹夊叏搴撳瓨', width: 120 }
+ , { field: '閲囪喘鍗曚环', title: '閲囪喘鍗曚环', width: 120 }
+ , { field: '閿�鍞崟浠�', title: '閿�鍞崟浠�', width: 120 }
+ , { field: '璁″垝鍗曚环', title: '璁″垝鍗曚环', width: 120 }
+ , { field: '鏍囧噯鎴愭湰', title: '鏍囧噯鎴愭湰', width: 120 }
+ , { field: '淇濊川鏈�', title: '淇濊川鏈�', width: 120 }
+ , { field: '鏈�灏忚璐ч噺', title: '鏈�灏忚璐ч噺', width: 120 }
+ , { field: '鏈�澶ц璐ч噺', title: '鏈�澶ц璐ч噺', width: 120 }
+ , { field: '鑻辨枃鍚嶇О', title: '鑻辨枃鍚嶇О', width: 120 }
+ , { field: '鑻辨枃瑙勬牸', title: '鑻辨枃瑙勬牸', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_Material/Gy_Material_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ 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_MouldType.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_MouldType.html"
index e92ad68..0342a79 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_MouldType.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_MouldType.html"
@@ -154,6 +154,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<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="btn-view"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>瀹℃牳</button>
@@ -234,6 +235,9 @@
break;
//鍒锋柊
case 'get_Refresh': get_Refresh();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
//娴忚
case 'btn-view':
@@ -692,7 +696,16 @@
});
}
-
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鍣ㄥ叿鍒嗙被瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: './Gy_MouldType_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
//鍒犻櫎
function set_DeleteBill() {
var ModRightNameDelete = 'Gy_MouldType_Delete';
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_MouldType_Excel.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_MouldType_Excel.html"
new file mode 100644
index 0000000..e3545b2
--- /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/Gy_MouldType_Excel.html"
@@ -0,0 +1,230 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>鍣ㄥ叿鍒嗙被瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_MouldType/Gy_MouldType_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '鍣ㄥ叿鍒嗙被', title: '鍣ㄥ叿鍒嗙被', width: 120 }
+ , { field: '鍣ㄥ叿鍒嗙被浠g爜', title: '鍣ㄥ叿鍒嗙被浠g爜', width: 120 }
+ , { field: '鍔╄鐮�', title: '鍔╄鐮�', width: 120 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_MouldType/Gy_MouldType_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html"
index 43198f5..07c8d87 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFileList.html"
@@ -74,6 +74,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btnModify"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></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="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btndelete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
@@ -138,6 +139,9 @@
break;
//鎵撳嵃
case 'btn-print': get_PrintReport();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
//缂栬緫鎸夐挳
case 'btnModify': set_ShowBill();
@@ -404,7 +408,16 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
}
}
-
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ュ簭璧勬枡瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: './Gy_MouldFile_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
//鍒犻櫎
function set_DeleteBill() {
var checkStatus = table.checkStatus('mainTable')
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile_Excel.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile_Excel.html"
new file mode 100644
index 0000000..cd6c91e
--- /dev/null
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile_Excel.html"
@@ -0,0 +1,259 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>鍣ㄥ叿涓绘。瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_MouldFile/Gy_MouldFile_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '鍣ㄥ叿鍚嶇О', title: '鍣ㄥ叿鍚嶇О', width: 120 }
+ , { field: '鍣ㄥ叿缂栧彿', title: '鍣ㄥ叿缂栧彿', width: 120 }
+ , { field: 'HMouldTypeID', title: 'HMouldTypeID', width: 120, hide: true }
+ , { field: '鍣ㄥ叿鍒嗙被', title: '鍣ㄥ叿鍒嗙被', width: 120 }
+ , { field: '鍣ㄥ叿瑙勬牸', title: '鍣ㄥ叿瑙勬牸', width: 120 }
+ , { field: '鍣ㄥ叿鍨嬪彿', title: '鍣ㄥ叿鍨嬪彿', width: 120 }
+ , { field: '绌存暟', title: '绌存暟', width: 120 }
+ , { field: '杈呭姪灞炴��1', title: '杈呭姪灞炴��1', width: 120 }
+ , { field: '杈呭姪灞炴��2', title: '杈呭姪灞炴��2', width: 120 }
+ , { field: '鍥惧彿', title: '鍥惧彿', width: 120 }
+ , { field: 'HMaterID', title: 'HMaterID', width: 120, hide: true }
+ , { field: '瀵瑰簲ERP鐗╂枡浠g爜', title: '瀵瑰簲ERP鐗╂枡浠g爜', width: 120 }
+ , { field: '瀵瑰簲ERP鐗╂枡', title: '瀵瑰簲ERP鐗╂枡', width: 120 }
+ , { field: 'HUnitID', title: 'HUnitID', width: 120, hide: true }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 120 }
+ , { field: '鍣ㄥ叿鍑哄巶缂栧彿', title: '鍣ㄥ叿鍑哄巶缂栧彿', width: 120 }
+ , { field: 'HDeptID', title: 'HDeptID', width: 120, hide: true }
+ , { field: '浣跨敤閮ㄩ棬', title: '浣跨敤閮ㄩ棬', width: 120 }
+ , { field: '鐘舵��', title: '鐘舵��', width: 120 }
+ , { field: 'HWHID', title: 'HWHID', width: 120, hide: true }
+ , { field: '榛樿浠撳簱', title: '榛樿浠撳簱', width: 120 }
+ , { field: 'HSPID', title: 'HSPID', width: 120, hide: true }
+ , { field: '榛樿浠撲綅', title: '榛樿浠撲綅', width: 120 }
+ , { field: '鐗堟湰鍙�', title: '鐗堟湰鍙�', width: 120 }
+ , { field: '璁捐瀵垮懡', title: '璁捐瀵垮懡', width: 120 }
+ , { field: '浣跨敤瀵垮懡', title: '浣跨敤瀵垮懡', width: 120 }
+ , { field: '鏉″舰鐮�', title: '鏉″舰鐮�', width: 120 }
+ , { field: 'HSupID', title: 'HSupID', width: 120, hide: true }
+ , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 120}
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 120 }
+ , { field: 'HMadeSupID', title: 'HMadeSupID', width: 120, hide: true }
+ , { field: '鍒堕�犲晢', title: '鍒堕�犲晢', width: 120 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_MouldFile/Gy_MouldFile_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileMainList.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileMainList.html"
index 40936c3..2078b5f 100644
--- "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileMainList.html"
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFileMainList.html"
@@ -72,6 +72,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btnAdd"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btnModify"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btndelete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></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="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>瀹℃牳</button>
@@ -137,6 +138,9 @@
break;
//棰勮
case 'btn-view': get_ViewReport();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
//鎵撳嵃
case 'btn-print': get_PrintReport();
@@ -440,7 +444,16 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
}
}
-
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '璁惧妗f瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: './Gy_EquipFile_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
//瀹℃牳/鍙嶅鏍�
function set_CheckBill(num) {
var checkStatus = table.checkStatus('mainTable')
diff --git "a/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFile_Excel.html" "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFile_Excel.html"
new file mode 100644
index 0000000..e004a29
--- /dev/null
+++ "b/WebTM/views/\350\256\276\345\244\207\347\256\241\347\220\206/\350\256\276\345\244\207\346\241\243\346\241\210/Gy_EquipFile_Excel.html"
@@ -0,0 +1,257 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>璁惧妗f瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_EquipFileMain/Gy_EquipFileMain_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '璁惧鍚嶇О', title: '璁惧鍚嶇О', width: 120 }
+ , { field: '璁惧缂栧彿', title: '璁惧缂栧彿', width: 120 }
+ , { field: 'HEquipTypeID', title: 'HEquipTypeID', width: 120, hide: true }
+ , { field: '璁惧鍒嗙被', title: '璁惧鍒嗙被', width: 120 }
+ , { field: '璁惧瑙勬牸', title: '璁惧瑙勬牸', width: 120 }
+ , { field: '璁惧鍨嬪彿', title: '璁惧鍨嬪彿', width: 120 }
+ , { field: 'HMaterID', title: 'HMaterID', width: 120, hide: true }
+ , { field: '瀵瑰簲ERP鐗╂枡浠g爜', title: '瀵瑰簲ERP鐗╂枡浠g爜', width: 120 }
+ , { field: '瀵瑰簲ERP鐗╂枡', title: '瀵瑰簲ERP鐗╂枡', width: 120 }
+ , { field: 'HUnitID', title: 'HUnitID', width: 120, hide: true }
+ , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 120 }
+ , { field: '璁惧鍑哄巶鏃ユ湡', title: '璁惧鍑哄巶鏃ユ湡', width: 120 }
+ , { field: '璁惧鍑哄巶缂栧彿', title: '璁惧鍑哄巶缂栧彿', width: 120 }
+ , { field: 'HDeptID', title: 'HDeptID', width: 120, hide: true }
+ , { field: '浣跨敤閮ㄩ棬', title: '浣跨敤閮ㄩ棬', width: 120 }
+ , { field: 'HUseEmpID', title: 'HUseEmpID', width: 120, hide: true }
+ , { field: '浣跨敤璐熻矗浜�', title: '浣跨敤璐熻矗浜�', width: 120 }
+ , { field: 'HRepairEmpID', title: 'HRepairEmpID', width: 120, hide: true }
+ , { field: '缁存姢璐熻矗浜�', title: '缁存姢璐熻矗浜�', width: 120 }
+ , { field: '瀹夎鍦扮偣', title: '瀹夎鍦扮偣', width: 120 }
+ , { field: '瀹夎鏃ユ湡', title: '瀹夎鏃ユ湡', width: 120 }
+ , { field: '杩愯寮�濮嬫棩鏈�', title: '杩愯寮�濮嬫棩鏈�', width: 120 }
+ , { field: '宸ョ▼缂栫爜', title: '宸ョ▼缂栫爜', width: 120 }
+ , { field: '鏉″舰鐮�', title: '鏉″舰鐮�', width: 120 }
+ , { field: '浜у湴', title: '浜у湴', width: 120 }
+ , { field: '鍝佺墝', title: '鍝佺墝', width: 120 }
+ , { field: 'HSupID', title: 'HSupID', width: 120, hide: true }
+ , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 120 }
+ , { field: 'HMadeSupID', title: 'HMadeSupID', width: 120, hide: true }
+ , { field: '鍒堕�犲晢', title: '鍒堕�犲晢', width: 120 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_EquipFileMain/Gy_EquipFileMain_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrMsgBackType.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrMsgBackType.html"
index 1821aba..810f62c 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrMsgBackType.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrMsgBackType.html"
@@ -135,6 +135,7 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add" id="AddButton"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="EditButton"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="DeleteButton"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="RefreshButton"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="AuditButton"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="DeAuditButton"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
@@ -197,6 +198,9 @@
break;
//鍒犻櫎
case 'btn-Delete': set_DeleteBill();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
//鍒锋柊
case 'get_Refresh': get_Refresh();
@@ -519,6 +523,17 @@
function get_Refresh() {
$("#btnSearch").trigger('click');
}
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '宸ュ簭璧勬枡瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: './Gy_ErrMsgBackType_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
+
//鏂板
function set_AddNew() {
layer.open({
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrMsgBackType_Excel.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrMsgBackType_Excel.html"
new file mode 100644
index 0000000..2215b08
--- /dev/null
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrMsgBackType_Excel.html"
@@ -0,0 +1,229 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>寮傚父鍙嶉绫诲瀷瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_ErrMsgBackType/Gy_ErrMsgBackType_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '寮傚父鍙嶉绫诲瀷', title: '寮傚父鍙嶉绫诲瀷', width: 120 }
+ , { field: '寮傚父鍙嶉绫诲瀷浠g爜', title: '寮傚父鍙嶉绫诲瀷浠g爜', width: 120 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_ErrMsgBackType/Gy_ErrMsgBackType_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ No newline at end of file
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrType.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrType.html"
index 2b4a162..bdc8c41 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrType.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrType.html"
@@ -132,6 +132,7 @@
<button type="button" class="layui-btn layui-btn-sm" style="display: none;" lay-event="btn-Add" id="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" style="display: none;" lay-event="btn-Edit" id="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
<button type="button" class="layui-btn layui-btn-sm" style="display: none;" 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="set_SouceExcel"><i class="layui-icon layui-icon-delete"></i>瀵煎叆</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></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" style="display: none;" lay-event="btn-Stop" id="btn-Stop"><i class="layui-icon layui-icon-radio"></i>绂佺敤</button>
@@ -197,6 +198,9 @@
break;
//鍒犻櫎
case 'btn-Delete': set_DeleteBill();
+ break;
+ //瀵煎叆
+ case 'set_SouceExcel': set_SouceExcel();
break;
//瀹℃牳鎸夐挳
case 'btn-Audit':
@@ -489,6 +493,18 @@
}
});
}
+
+ //瀵煎叆
+ function set_SouceExcel() {
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '寮傚父绫诲瀷瀵煎叆'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../鍩虹寤烘ā/Gy_ErrType_Excel.html?OperationType=dao&HSouceBillType='
+ })
+ }
+
//缂栬緫
function set_ShowBill() {
var checkStatus = table.checkStatus('mainTable')
diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrType_Excel.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrType_Excel.html"
new file mode 100644
index 0000000..9b9873a
--- /dev/null
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/\345\237\272\347\241\200\345\273\272\346\250\241/Gy_ErrType_Excel.html"
@@ -0,0 +1,229 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8" />
+ <title>寮傚父绫诲瀷瀵煎叆</title>
+ <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+ <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <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>
+</head>
+<body>
+ <div class="layui-fluid" style="padding: 0;">
+ <div class="layui-card" style="padding: 2px;background-color: #efefef;">
+ <div class="layui-card-body" style="padding: 1px;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;" >
+ <div style="padding: 10px; ">
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">瀵煎叆鏁版嵁</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="Cancel" id="Cancel">閫�鍑�</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="UpLoad" id="UpLoad">鏂囦欢涓婁紶</button>
+ </div>
+ <div class="layui-tab" lay-filter="tab-POStockInBill">
+ <div class="layui-tab-content">
+ <!--鍩烘湰淇℃伅-->
+ <div class="layui-tab-item layui-show">
+ <div class="layui-form-item" style="padding-top: 10px;">
+
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <script type="text/html" id="toolbarDemo">
+ <div class="layui-btn-container">
+ </div>
+ </script>
+ </form>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
+<script type="text/html" id="barDemo">
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+</script>
+<script>
+
+ layui.config({
+ base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'upload'], function () {
+ //#region 鍏敤鍙橀噺
+ var $ = layui.$
+ , admin = layui.admin
+ , layer = layui.layer
+ , table = layui.table
+ , form = layui.form
+ , element = layui.element
+ , laypage = layui.laypage
+ , laydate = layui.laydate
+ , util = layui.util
+ , tree = layui.tree
+ , util = layui.util
+ , upload = layui.upload
+
+
+ var option = [];
+ //#endregion
+
+ //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+ //鍒濆鍖栫晫闈�
+ set_ClearBill();
+
+
+ //#endregion
+
+ //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+
+ //鏂囦欢涓婁紶
+ upload.render({
+ elem: '#UpLoad',
+ url: GetWEBURL() + '/Gy_ErrType/Gy_ErrType_Excel',
+ contentType: 'application/json',
+ exts: 'xls|xlsx', //鍏佽涓婁紶鐨勭被鍨�
+ done: function (data1) {
+ if (data1.count == 1) {
+ option.data = data1.data;
+ table.render(option);
+ } else {
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ },
+ error: function (err) {
+ debugger
+ layer.alert('瀵煎叆鍑虹幇寮傚父', { icon: 2 });
+ }
+ });
+
+ //琛屽唴浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ set_GridDelete(obj); //琛屽唴鍒犻櫎
+ });
+
+ //瀵煎叆 淇濆瓨鏁版嵁
+ form.on('submit(btnSave)', function (data) {
+ if (table.cache["mainTable"] != null) {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg("鏃犳暟鎹�,璇峰厛瀵煎叆鏁版嵁!");
+ }
+ })
+
+ //閫�鍑�
+ form.on('submit(Cancel)', function () {
+ Pub_Close(1);
+ })
+
+
+ //#endregion
+
+ //#region 姝ら〉闈㈡墍鏈夌殑鏂规硶
+
+ //#region 鍒濆鍖栫晫闈�
+ function set_ClearBill() {
+ //鍒濆鍖栬〃鏍�
+ set_InitGrid();
+ }
+ //#endregion
+
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , height: 'full-120'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , loading: false
+ , cols: [[
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'HOrgID', title: 'HOrgID', width: 120, hide: true }
+ , { field: '缁勭粐浠g爜', title: '缁勭粐浠g爜', width: 120 }
+ , { field: '缁勭粐鍚嶇О', title: '缁勭粐鍚嶇О', width: 120 }
+ , { field: '寮傚父绫诲瀷', title: '寮傚父绫诲瀷', width: 120 }
+ , { field: '寮傚父绫诲瀷浠g爜', title: '寮傚父绫诲瀷浠g爜', width: 120 }
+ , { field: '澶囨敞', title: '澶囨敞', width: 120 }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
+ ]]
+ };
+
+ //娓叉煋椤甸潰
+ table.render(option);
+ //DisPlay_HideColumn();
+ }
+
+ //琛屽唴鍒犻櫎
+ function set_GridDelete(obj) {
+ var data = obj.data;
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屽悧锛�', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = option.data;
+ oldData.splice(obj.tr.data('index'), 1)
+ option.data = oldData;//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option);
+ layer.close(index);
+ }
+ });
+ }
+ }
+
+ //瀵煎叆(淇濆瓨)
+ function set_AddNew(data) {
+ var num = [];
+ for (var i = 0; i < option.data.length; i++) {
+ if (option.data[i] != "") {
+ num.push(option.data[i])
+ }
+ }
+
+ var sSubStr = JSON.stringify(num);
+ var sMainSub = sSubStr + '&鍜�' + sessionStorage["HUserName"];
+ var index = layer.load();
+
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Gy_ErrType/Gy_ErrType_btnSave",
+ async: true,
+ data: { "sMainSub": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) {
+ layer.close(index);
+ layer.msg(data.Message);
+ option.data = null;
+ table.cache["mainTable"] = null;
+ table.render(option);
+ }
+ else {
+ layer.close(index);
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ },
+ error: function (err) {
+ layer.close(index);
+ layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ }
+
+ //#endregion
+
+ });
+
+</script>
\ No newline at end of file
--
Gitblit v1.9.1