From 21bfbd76f317f2904b674a0456811e3554b488b0 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期一, 21 十一月 2022 02:45:16 +0800
Subject: [PATCH] 作业指导书
---
WebTM/views/基础资料/生产基础资料/Gy_SOPBill.html | 219 +++++++++++++++++++++++++++++++++---------------------
WebTM/WebTM.csproj | 10 --
2 files changed, 135 insertions(+), 94 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 54b8e53..1c11569 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -63,13 +63,6 @@
<Reference Include="System.EnterpriseServices" />
</ItemGroup>
<ItemGroup>
- <Content Include="Files\20189141702680356.jpg" />
- <Content Include="Files\20200922022838-5f6961562471f.jpg" />
- <Content Include="Files\OIP-C %283%29.jpg" />
- <Content Include="Files\OIP-C.jpg" />
- <Content Include="Files\R-C.jpg" />
- <Content Include="Files\v2-91ca7874809d6ff91a49e5ad6a89f7f3_r.jpg" />
- <Content Include="Files\娴嬭瘯.jpeg" />
<Content Include="HtmlPage1.html" />
<Content Include="layuiadmin\echarts.min.js" />
<Content Include="layuiadmin\layui\css\global.css" />
@@ -82,8 +75,6 @@
<Content Include="layuiadmin\layui\font\iconfont.woff" />
<Content Include="layuiadmin\layui\font\iconfont.woff2" />
<Content Include="layuiadmin\json\Test.json" />
- <Content Include="Files\Test PDF.pdf" />
- <Content Include="Files\Test.pdf" />
<None Include="Properties\PublishProfiles\JFTM.pubxml" />
<Content Include="layuiadmin\layui\images\device.png" />
<Content Include="layuiadmin\layui\images\erro.png" />
@@ -726,7 +717,6 @@
<Content Include="views\鍩虹璧勬枡\鏁版嵁瀛楀吀\Xt_DataDictionary_ViewList.html" />
<Content Include="views\鍩虹璧勬枡\鏁版嵁瀛楀吀\Xt_DataDictionary_TableList.html" />
<Content Include="views\鍩虹璧勬枡\鐢熶骇鍩虹璧勬枡\Add_Edit_Gy_Process.html" />
- <Content Include="views\鍩虹璧勬枡\鐢熶骇鍩虹璧勬枡\浣滀笟鎸囧涔�.png" />
<Content Include="views\鍩虹璧勬枡\鐢熶骇鍩虹璧勬枡\Gy_SOPBill.html" />
<Content Include="views\鍩虹璧勬枡\鐢熶骇鍩虹璧勬枡\Gy_SOPBillEdit.html" />
<Content Include="views\鍩虹璧勬枡\鐢熶骇鍩虹璧勬枡\Gy_SOPBillList.html" />
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBill.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBill.html"
index a7e7adf..33b5e67 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBill.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\347\224\237\344\272\247\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SOPBill.html"
@@ -1,5 +1,5 @@
锘�<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>浣滀笟鎸囧涔�</title>
@@ -34,7 +34,7 @@
}
.layui-table-cell{
- height:20px;
+ height:23px;
}
</style>
@@ -51,7 +51,7 @@
<button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="Exit" style="background-color:#959393">閫�鍑�</button>
</div>
<div class="layui-inline">
- <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="IsAuto" style="background-color:#959393;margin-left:15px" id="auto">鑷姩鎾斁</button>
+ <button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="Autoplay" style="background-color:#959393;margin-left:15px" id="auto">鑷姩鎾斁</button>
</div>
<div class="layui-inline">
<h1 style="text-align: center;margin-left:300px"><b>宸ヤ綅浣滀笟鎸囧涔�</b></h1>
@@ -90,19 +90,13 @@
<!--<table class="" id="mainTable" lay-filter="mainTable"></table>-->
<div style="margin-top:10px; width:100%;height:100%">
<div style="width:77%;height:670px;float:left;line-height:500px">
- <!--<button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="" style="background-color:#959393;width:10px;height:80px;vertical-align:middle;float:left;margin:200px 0 0 1.5px;font-size:25px"><</button>-->
<div class="layui-carousel" id="test1">
- <div carousel-item>
- <div><img src="浣滀笟鎸囧涔�.png" style="width:100%;height:100%"></div>
- <div><img id="img" src="" style="width:100%;height:100%"></div>
- <div><img src="../../../Files/R-C.jpg" style="width:100%;height:100%"></div>
-
- <!--<div><embed src="Test PDF.pdf" type="application/pdf" style="width:100%;height:100%" internalinstanceid="81" /></div>-->
+ <div carousel-item id="file">
+
</div>
</div>
- <!--<button type="button" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="" style="background-color:#959393;width:10px;height:80px;vertical-align:middle;float:left;margin-top:200px;font-size:25px">></button>-->
</div>
<div style="width:22%;height:670px;float:left;margin-left:1%">
<div style="width:100%;height:49%;margin-bottom:2%">
@@ -124,7 +118,7 @@
</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-xs" lay-event="view">鏌ョ湅</a>-->
<!--<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>-->
</script>
<script type="text/javascript">
@@ -140,28 +134,6 @@
var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
var closeType = params[params[3]]; //鍏抽棴绫诲瀷
}
-
- // 鎶ュ伐骞冲彴;宸ュ簭娴佽浆鍗$淮鎶�;鐢熶骇璧勬簮鍒楄〃
-
- //1.杩涘叆妯″潡锛屼粠鏈湴閰嶇疆鏂囦欢鑾峰彇鎵�灞炵敓浜ц祫婧愬拰宸ヤ綅锛屽垵濮嬪寲妯″潡銆傜晫闈㈡竻绌猴紝鍙宠竟涓婄綉鏍兼樉绀鸿鐢熶骇璧勬簮鐢熶骇鐘舵�佽〃閲岀殑褰撴棩璁″垝宸ュ崟锛岄粯璁や负褰撳墠寮�宸ョ殑宸ュ崟锛屼笅缃戞牸鏄剧ず杩欎釜宸ュ崟鍙婅宸ヤ綅鐨勬枃浠舵竻鍗�(鑾峰彇浣滀笟鎸囧涔︾殑鏁版嵁)銆�
-
- //2.宸﹁竟鏄剧ず宸ヤ綅浣滀笟鎸囧涔︾殑绗竴寮犳枃浠�(鍥剧墖鎴朠DF) 銆�
-
- //3.鐐瑰嚮涓婁竴寮狅紝涓嬩竴寮狅紝鍙互鍦ㄤ綔涓氭寚瀵间功鐨勬湰宸ヤ綅鐨勬枃浠跺垪琛ㄩ噷鍒囨崲PDF鏂囦欢鎴栧浘鐗�;
-
- //4.宸ュ崟鍒楄〃閲岋紝鍙屽嚮鎴栬�呯偣鏌ョ湅鎸夐挳锛屽彲浠ュ垏鎹㈠伐鍗曪紝宸﹁竟 浣滀笟鎸囧涔︿篃鐩稿簲鏀瑰彉锛屼笅缃戞牸鐨勬枃浠跺垪琛ㄤ篃搴旀敼
- //鍙�;
-
- //5.鑷姩鎾斁鎸夐挳锛岀偣鍑昏嚜鍔ㄦ挱鏀炬寜閽紝杩涜鑷姩鎾斁妯″紡锛屾寜閽悕瀛楁敼涓衡�滄墜鍔ㄦ挱锛� 鐐瑰嚮 鎵嬪姩鎾斁 鎸夐挳锛屸�濊繘琛屾墜鍔ㄦ挱鏀炬ā寮�
-
- //6.鎵嬪姩鎾斁妯″紡涓嬶紝涓嶆墜鍔ㄥ垏鎹紝褰撳墠宸ュ崟锛屼綔涓氭寚瀵间功鍧囦笉鍋氬彉鏇淬��
-
- //7.鑷姩鎾斁妯″紡涓嬶紝姣�2鍒嗛挓鍋氫竴娆℃煡璇紝鑾峰彇褰撳墠寮�宸ョ殑宸ュ崟锛屽鏋滅洰鍓嶅紑宸ョ殑宸ュ崟鍜岀晫闈笂鏄剧ず鐨勫伐鍗曚笉绗﹀悎鏃讹紝鑷姩鍒囨崲鍒板紑宸ョ殑宸ュ崟锛屼綔涓氭寚瀵间功涔熺浉鍏虫洿鏂�
-
- //8.閫�鍑烘寜閽�傞��鍑烘湰妯″潡銆�
-
-
- //浜у搧鏍规嵁宸ュ崟鏉ワ紱鑷姩鎾斁锛氬綋鍓嶅伐搴忓畬鎴愬悗鑷姩鍒囨崲鎸囧涔︾瓑锛屾墜鍔ㄦ挱鏀撅細绾︾瓑浜庝粈涔堥兘涓嶅仛锛涘伐鍗曞垪琛ㄩ噷鏄剧ず褰撴棩闇�瑕佽繘琛屽緱浠诲姟锛涢〉闈㈣皟鏁翠负鍏ㄥ睆鏄剧ず锛�
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -184,9 +156,9 @@
var option = [];
var option2 = [];
var arr = [];
+ var HInterID;
//#endregion
//#region 杩涘叆椤甸潰鏃㈠姞杞�
- $("#img").attr("src", "http://localhost:8082/LuBaoUi/Files/OIP-C.jpg")
//鍒濆鍖栬〃鏍�
set_InitGrid();
set_InitGrid2();
@@ -196,9 +168,9 @@
, width: '100%' //璁剧疆瀹瑰櫒瀹藉害
, height: '100%' //璁剧疆瀹瑰櫒楂樺害
, arrow: 'always' //濮嬬粓鏄剧ず绠ご
- , indicator: 'none' //鎸囩ず鍣ㄤ笉鏄剧ず
+ , indicator: 'inside' //鎸囩ず鍣ㄤ笉鏄剧ず
, autoplay: false //鎵嬪姩鎾斁
- , interval: 2000 //鎾斁閫熷害
+ , interval: 3000 //鎾斁閫熷害
});
//#region 鑾峰彇鏃堕棿鏃ユ湡
$(document).ready(function () {
@@ -224,13 +196,27 @@
});
//#endregion
- //鍔犺浇鏁版嵁鍒扮綉鏍�
- get_Display(sWhere);
- get_Display(sWhere);
- get_Display2(sWhere);
- get_Display2(sWhere);
+ //#region 鍔犺浇鏁版嵁鍒扮綉鏍�
+ //get_Display(sWhere);
- //鍒ゆ柇鎿嶄綔绫诲瀷
+ //閲囩敤寤舵椂鐨勬柟寮忕瓑寰呮暟鎹�
+ get_Display(sWhere);
+ setTimeout(function () { get_Display2(sWhere); }, 1000);
+ setTimeout(function () { get_Display2(sWhere); }, 1000);
+ setTimeout(function () { get_Display3(sWhere); }, 1000);
+ setTimeout(function () { ins.reload({ autoplay: false }) }, 1500);
+ //#endregion
+
+ //#region 鑷姩鎾斁妯″紡涓嬭幏鍙栭〉闈俊鎭殑鏂规硶
+ function set_LoadAgain() {
+ get_Display(sWhere);
+ get_Display2(sWhere);
+ get_Display3(sWhere);
+ setTimeout(function () { ins.reload({ autoplay: false }) }, 500);
+ }
+ //#endregion
+
+ //#region 鍒ゆ柇鎿嶄綔绫诲瀷(杩欓噷娌$敤鍒�)
if (OperationType == 1 || OperationType == 2) {//鏃犳簮鏂板
//鍒濆鍩烘湰淇℃伅璧嬪��
}
@@ -240,10 +226,10 @@
else {
layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
}
-
//#endregion
- //閫�鍑�
+
+ //#region 閫�鍑�
form.on('submit(Exit)', function (data) {
if (linterid == undefined) {
//鍏抽棴椤电
@@ -254,63 +240,78 @@
Pub_Close(1);
}
});
-
- //鏄惁鑷姩鎾斁
- form.on('submit(IsAuto)', function (data) {
- var num = 0;
- if (ins.config.autoplay == false) {
- ins.reload({ autoplay: true }) //鎾斁鏂瑰紡鏀逛负鑷姩鎾斁
+ //#endregion
+ //#region 鏄惁鑷姩鎾斁
+ form.on('submit(Autoplay)', function (data) {
+ var num = 0;
+ if (document.getElementById("auto").innerHTML == "鑷姩鎾斁") {
+ //ins.reload({ autoplay: true }) //杞挱鍥炬挱鏀炬柟寮忔敼涓鸿嚜鍔ㄦ挱鏀�
document.getElementById("auto").innerHTML = "鎵嬪姩鎾斁";
+ var timer = setInterval(function () {
+ set_LoadAgain();
+ if (document.getElementById("auto").innerHTML === "鑷姩鎾斁") {
+ clearInterval(timer); //鏆傚仠鍛ㄦ湡鍑芥暟
+ }}, 120000) //姣忛殧涓ゅ垎閽熸墽琛屼竴娆�
num = 1;
- } else if (ins.config.autoplay == true && num == 0) {
- ins.reload({ autoplay: false }) //鎾斁鏂瑰紡鏀逛负鎵嬪姩鎾斁
+ } else if (document.getElementById("auto").innerHTML = "鎵嬪姩鎾斁" && num == 0) {
+ //ins.reload({ autoplay: false }) //杞挱鍥炬挱鏀炬柟寮忔敼涓烘墜鍔ㄦ挱鏀�
document.getElementById("auto").innerHTML = "鑷姩鎾斁";
}
});
+ //#endregion
- //#region 鐐瑰嚮浜嬩欢鍖呮嫭on form浜嬩欢绛�
+ //#region 鐐瑰嚮浜嬩欢鍖呮嫭on form浜嬩欢绛� 锛堣繖閲屾病鐢ㄥ埌锛�
//澶村伐鍏锋爮浜嬩欢
table.on('toolbar(mainTable)', function (obj) {
switch (obj.event) {
//鏂板涓�琛�
case 'btn-AddLine': btnAddLine(NewRow);
break;
- //澶嶅埗涓�琛�
- case 'btn-CopyLine': btnCopyLine(data);
- break;
- //鍒楄缃�
- case 'set_HideColumn': get_HideColumn();
- break;
}
});
- //琛屽唴浜嬩欢
- table.on('tool(mainTable)', function (obj) {
- set_GridDelete(obj); //琛屽唴鍒犻櫎
- //set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
- });
- //鐩戝惉鍗曞厓鏍肩紪杈� 鍗曞厓鏍肩紪杈戝悗 鍙樻洿
- //table.on('edit(mainTable)', function (obj) {
- // var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
- // , data = obj.data //寰楀埌鎵�鍦ㄨ鎵�鏈夐敭鍊�
- // , field = obj.field; //寰楀埌瀛楁
- // arr.push(data);
- //});
+ //#endregion
- //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
- table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
- console.log(obj);
+ //#region 鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
+ table.on('rowDouble(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
//var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
//HBillNo = datas["鍗曟嵁鍙�"].toString();
//var HMainID = datas.hmainid;
var wait = layer.load();
+ HInterID = obj.data.HInterID
+ if (HInterID == "" || HInterID == null) {
+ HInterID = 0;
+ }
+ $("#file").html("");
+ $(".layui-carousel-ind").html("");
$.ajax({
url: GetWEBURL() + '/Sc_ICMOBillStatus_Tmp/Filelist',
type: "GET",
- //data: { "sWhere": HMainID },
+ data: { "sWhere": HInterID },
success: function (data1) {
if (data1.count == 1) {
option2.data = data1.data;
table.render(option2);
+
+ for (let i = 0; i < data1.data.length; i++) {
+ var html = '';
+ if (data1.data[i].鏂囦欢绫诲瀷 == '.jpeg' || data1.data[i].鏂囦欢绫诲瀷 == '.jpg') {
+ var FileName = data1.data[i].鏂囦欢鍚嶇О;
+ //html += '<img src=`../../../Files/${FileName}` style="width:100%;height:100%">'
+ html += '<div><img src=../../../Files/' + FileName + ' alt="" style="width:100%;height:100%"></div>'
+ $("#file").append(html);
+ }
+ if (data1.data[i].鏂囦欢绫诲瀷 == '.pdf') {
+ var FileName2 = data1.data[i].鏂囦欢鍚嶇О;
+ //<embed src="Test PDF.pdf" type="application/pdf" style="width:100%;height:100%" internalinstanceid="81" />
+ html += '<div><embed src="../../../Files/' + FileName2 + '"' + ' type="application/pdf" style="width:100%;height:100%" internalinstanceid="81" /></div>'
+ $("#file").append(html);
+ }
+ }
+ if (data1.data.length == 0) {
+ var html2 = '<h1 style="text-align:center;color:red;font-weight:bolder;">鏆傛湭涓婁紶鏂囦欢</h1>';
+ $("#file").append(html2);
+ }
+ ins.reload({ autoplay: false })
layer.close(wait);
} else {
layer.alert(data1.code + data1.Message, { icon: 5 });
@@ -321,12 +322,10 @@
layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
}
});
- //DisPlay_HideColumn_Sec();
- //set_ClearBillHMainID(HMainID); //鍣ㄥ叿娓呭崟
});
//#endregion
- //鍒濆鍖栬〃鏍�
+ //#region 鍒濆鍖栬〃鏍�
function set_InitGrid() {
option = {
id: 'mainTable'
@@ -345,7 +344,7 @@
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 100 }
, { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100 }
, { field: '宸ュ簭', title: '宸ュ簭', width: 100 }
- //, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 60 }
+ //, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 66 }
]]
, limits: [50, 500, 5000, 20000]
, done: function (res, curr, count) {
@@ -375,8 +374,9 @@
}
};
}
-
- //鍔犺浇缃戞牸
+ //#endregion
+
+ //#region 鍔犺浇缃戞牸
function get_Display(sWhere) {
var wait = layer.load();//閬僵
$.ajax({
@@ -385,6 +385,9 @@
data: { "sWhere": sessionStorage["HSourceID"], "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
+ if (data1.data[0]) {
+ HInterID = data1.data[0].HInterID
+ }
option.data = data1.data;
table.render(option);
layer.close(wait);
@@ -401,11 +404,14 @@
//鍔犺浇鍙充笅鏂圭綉鏍�
function get_Display2(sWhere) {
+ if (HInterID == "" || HInterID == null) {
+ HInterID = 0;
+ }
var wait = layer.load();
$.ajax({
url: GetWEBURL() + '/Sc_ICMOBillStatus_Tmp/Filelist',
type: "GET",
- //data: { "sWhere": HMainID },
+ data: { "sWhere": HInterID },
success: function (data1) {
if (data1.count == 1) {
option2.data = data1.data;
@@ -421,7 +427,52 @@
}
});
}
-
+
+ //鍔犺浇宸︿晶鏂囦欢
+ function get_Display3(sWhere) {
+ if (HInterID == "" || HInterID == null) {
+ HInterID = 0;
+ }
+ $("#file").html("");
+ $(".layui-carousel-ind").html("");
+ $.ajax({
+ url: GetWEBURL() + '/Sc_ICMOBillStatus_Tmp/Filelist',
+ type: "GET",
+ data: { "sWhere": HInterID },
+ success: function (data1) {
+ if (data1.count == 1) {
+ for (let i = 0; i < data1.data.length; i++) {
+ var html = '';
+ if (data1.data[i].鏂囦欢绫诲瀷 == '.jpeg' || data1.data[i].鏂囦欢绫诲瀷 == '.jpg') {
+ var FileName = data1.data[i].鏂囦欢鍚嶇О;
+ //html += '<img src=`../../../Files/${FileName}` style="width:100%;height:100%">'
+ html += '<div><img src=../../../Files/' + FileName + ' alt="" style="width:100%;height:100%"></div>'
+ $("#file").append(html);
+ }
+ if (data1.data[i].鏂囦欢绫诲瀷 == '.pdf') {
+ var FileName2 = data1.data[i].鏂囦欢鍚嶇О;
+ //<embed src="Test PDF.pdf" type="application/pdf" style="width:100%;height:100%" internalinstanceid="81" />
+ html += '<div><embed src="../../../Files/' + FileName2 + '"' + ' type="application/pdf" style="width:100%;height:100%" internalinstanceid="81" /></div>'
+ $("#file").append(html);
+ }
+ }
+ if (data1.data.length == 0) {
+ var html2 = '<h1 style="text-align:center;color:red;font-weight:bolder;">鏆傛湭涓婁紶鏂囦欢</h1>';
+ $("#file").append(html2);
+ }
+ ins.reload({ autoplay: false })
+ //layer.close(wait);
+ } else {
+ //layer.close(wait);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ //layer.close(wait);
+ layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
//浠ヤ笂鏄痩ayui妯″潡
});
</script>
--
Gitblit v1.9.1