From a8803f033b4e000ff890e652a536ef4baaa09292 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期五, 27 十二月 2024 16:05:45 +0800
Subject: [PATCH] 器具采购入库单页面优化
---
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdInBillList.html | 189 ++++++++++++-------------------------
WebTM/WebTM.csproj.user | 2
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdInBillEdit.html | 74 +++++++++++---
3 files changed, 124 insertions(+), 141 deletions(-)
diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user
index 8233a56..1daf955 100644
--- a/WebTM/WebTM.csproj.user
+++ b/WebTM/WebTM.csproj.user
@@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
- <NameOfLastUsedPublishProfile>D:\鏅轰簯杩堟�漒MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
+ <NameOfLastUsedPublishProfile>D:\缃戠珯鍙戝竷\鍚庣浠g爜\MES-WEB-TM\MESWMS-LayUI\WebTM\Properties\PublishProfiles\JFTM.pubxml</NameOfLastUsedPublishProfile>
<ProjectView>ProjectFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillEdit.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillEdit.html"
index ad234d8..0aa97a3 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillEdit.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillEdit.html"
@@ -14,40 +14,40 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/PageTitle.js"></script>
- <script src="../../../layuiadmin/tableSelect.js"></script>
+
<style type="text/css">
/*begin 姝ゆ牱寮忕敤浜庢秷闄よ鍏冪礌涓竷灞�瀹藉害涓嶅鐨勯棶棰�*/
- .layui-form-item .layui-inline {
+ /*.layui-form-item .layui-inline {
margin-top: 5px;
margin-bottom: 5px;
margin-right: 0px;
- }
+ }*/
/*end*/
/*椤甸潰杈撳叆妗嗛棿璺濅紭鍖�*/
- .layui-card .layui-tab-brief .layui-tab-content {
+ /*.layui-card .layui-tab-brief .layui-tab-content {
padding: 10px;
- }
+ }*/
/*琛ㄥ崟鍏冪礌灞呬笅澶氬皯鍍忕礌*/
- .layui-form-item {
+ /*.layui-form-item {
margin-bottom: 0px;
- }
+ }*/
/* 琛ㄥ崟妗嗛珮搴�*/
- .layui-input, .layui-select, .layui-textarea {
+ /*.layui-input, .layui-select, .layui-textarea {
height: 32px;
- }
+ }*/
/*琛ㄥ崟鎸夐挳楂樺害銆佽楂�*/
- .layui-btn {
+ /*.layui-btn {
height: 31px;
line-height: 31px;
- }
+ }*/
/*琛ㄥ崟鏍囩鍚嶅唴闂磋窛(涓婁笅闂磋窛銆佸乏鍙抽棿璺�)*/
- .layui-form-label {
+ /*.layui-form-label {
padding: 6px 15px;
- }
+ }*/
/*鏁翠釜椤甸潰鎵�鏈夎緭鍏ユ銆侀潰鏉跨瓑杈规棰滆壊*/
- .layui-badge-rim, .layui-border, .layui-colla-content, .layui-colla-item, .layui-collapse, .layui-elem-field, .layui-form-pane .layui-form-item[pane], .layui-form-pane .layui-form-label, .layui-input, .layui-layedit, .layui-layedit-tool, .layui-panel, .layui-quote-nm, .layui-select, .layui-tab-bar, .layui-tab-card, .layui-tab-title, .layui-tab-title .layui-this:after, .layui-textarea {
+ /*.layui-badge-rim, .layui-border, .layui-colla-content, .layui-colla-item, .layui-collapse, .layui-elem-field, .layui-form-pane .layui-form-item[pane], .layui-form-pane .layui-form-label, .layui-input, .layui-layedit, .layui-layedit-tool, .layui-panel, .layui-quote-nm, .layui-select, .layui-tab-bar, .layui-tab-card, .layui-tab-title, .layui-tab-title .layui-this:after, .layui-textarea {
border-color: #dbd8d8;
- }
+ }*/
</style>
</head>
<body>
@@ -595,6 +595,40 @@
Pub_Close(1);
}
});
+ //澶嶅埗
+ form.on('submit(Copy)', function (data) {
+ set_Copy();
+ });
+ //鏂板
+ form.on('submit(Add)', function (data) {
+ //鍒跺崟浜�
+ //$("#HMaker").val(sessionStorage["HUserName"]);
+ //$("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd"));
+ //鑾峰彇鏈�澶у崟鎹彿
+ get_MAXNum();
+ linterid = "";
+ option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }];
+ table.render(option);
+ form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HInnerBillNo": ""
+ , "HWHID": 0 //浠撳簱ID
+ , "HWHName": "" //浠撳簱鍚嶇О
+ , "HSecManagerID": 0 //楠屾敹鍛業D
+ , "HSecManagerName": "" //楠屾敹鍛樺悕绉�
+ , "HKeeperID": 0 //淇濈鍛業D
+ , "HKeeperName": "" //淇濈鍛樺悕绉�
+ , "HDeptID": 0 //閮ㄩ棬ID
+ , "HDeptName": "" //閮ㄩ棬鍚嶇О
+ , "HSourceBillType": "" //婧愬崟绫诲瀷
+ , "XDH": "" //閫夊崟鍙�
+ , "HExplanation": "" //鎽樿
+ , "HRemark": "" //澶囨敞
+ , "HSupTypeID": "" //閫夊崟鍙�
+ , "HSupName": "" //鎽樿
+ , "HSupID": 0 //澶囨敞
+ });
+
+ });
//棰勮
form.on("submit(planview)", function (data) {
if (linterid != "" || linterid != null) {
@@ -891,6 +925,16 @@
}
});
}
+ //#region 澶嶅埗
+ function set_Copy() {
+ //鍒跺崟浜�
+ //$("#HMaker").val(sessionStorage["HUserName"]);
+ //$("#HMakerDate").val(Format(new Date(), "yyyy-MM-dd"));
+ //鑾峰彇鏈�澶у崟鎹彿
+ get_MAXNum();
+ linterid = "";
+ }
+ //#endregion
//鏃ユ湡鏍煎紡鍖�
function formatDate(date) {
var d = new Date(date),
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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillList.html"
index 5736e56..e4c14ae 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillList.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdInBillList.html"
@@ -209,6 +209,8 @@
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="print"><i class="layui-icon layui-icon-print"></i>鎵撳嵃</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit" id="audit"><i class="layui-icon layui-icon-repeat"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit" id="Faudit"><i class="layui-icon layui-icon-refresh"></i>鍙嶅鏍�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="DeClose"><i class="layui-icon layui-icon-radio"></i>鍙嶅叧闂�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
@@ -311,6 +313,14 @@
//鍙嶅鏍�
case 'btn-Faudit': get_FAudit();
break;
+ //鍏抽棴鎸夐挳 锛�0:鍏抽棴銆�1:鍙嶅叧闂級
+ case 'btn-Close':
+ set_CloseBill(0);
+ break;
+ //鍙嶅叧闂寜閽�
+ case 'btn-DeClose':
+ set_CloseBill(1);
+ break;
//鍒锋柊
case 'get_Refresh': set_Refresh();
break;
@@ -347,6 +357,12 @@
optionPage.curr = 1;
get_FastQuery(table, option);
+ });
+ //杈撳叆妗嗗洖杞︽柟娉�
+ $('input').on('keydown', function (event) {
+ if (event.keyCode == 13) {
+ get_FastQuery();
+ }
});
//#endregion
@@ -433,17 +449,6 @@
soulTable.render(this);
}
};
- //璁剧疆鍒楀
- var colWidth = getColumnsWidth();
- if (colWidth == "" || colWidth == []) {
-
- }
- else {
- $.each(columns, function (x, m) {
- m["width"] = colWidth[x];
- });
- }
-
optionPage = {
@@ -630,7 +635,7 @@
//鍏抽棴褰撳墠frame
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
- window.location.reload();
+ $("#btnSearch").click();
});
} else {
@@ -708,7 +713,7 @@
//鍏抽棴褰撳墠frame
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
- window.location.reload();
+ $("#btnSearch").click();
});
} else {
@@ -741,7 +746,7 @@
//鍏抽棴褰撳墠frame
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
- window.location.reload();
+ $("#btnSearch").click();
});
} else {
@@ -756,128 +761,45 @@
layer.msg('璇烽�夋嫨涓�琛屾暟鎹紒');
}
}
-
- //鑾峰彇鍒楀
- function getColumnsWidth() {
- var result = [];
- var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
- //鑾峰彇鍒楀
- $.ajax({
- url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList',
- async: false,
- type: "Get",
- dataType: "json",
- data: { "colNum": colNum, "Name": Name },
- success: function (data1) {
- if (data1.code == 1) {
- result = data1.data;
- }
- else if (data1.code == -1) {
- }
- else {
- layer.alert(data1.Message, { icon: 5 });
- }
- }, error: function (e) {
- layer.alert(e.Message, { icon: 5 });
- }
- });
+ //#region 鍙嶅叧闂�/鍏抽棴鏁版嵁
+ function set_CloseBill(num) {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Sc_MouldProdInBill/CloseSc_MouldProdInBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
- return result;
- }
- //淇濆瓨鍒楀
- function set_SaveGridColWidth() {
- var arr = [];
- // 鍒楁暟
- var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
- for (var i = 0; i <= colNum; i++) {
- var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
- var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
- if (colName != "" && colName != null) {
- arr.push(colWidth == -1 ? 200 : colWidth);
- }
- }
- arr.unshift(40); //棣栦綅杩藉姞
- $.ajax({
- url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
- async: false,
- type: "POST",
- dataType: "json",
- data: { "myMap": JSON.stringify(arr), "Name": Name },
- success: function (data1) {
- if (data1.count == 1) {
- layer.alert(data1.Message, { icon: 1 });
- } else {
- layer.alert(data1.Message, { icon: 5 });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
- }, error: function (e) {
- layer.alert(e.Message, { icon: 5 });
- }
- });
- //璁剧疆璧嬪�煎垪瀹�
- var colWidth = getColumnsWidth();
- if (colWidth == "" || colWidth == []) {
-
- }
- else {
- $.each(columns, function (x, m) {
- m["width"] = colWidth[x];
});
}
- get_FastQuery(table, option);
- }
- //榛樿鍒楀
- function set_DefaultGridColWidth() {
- var arr = [];
- // 鍒楁暟
- var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
- for (var i = 0; i <= colNum; i++) {
- var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
- if (colName != "" && colName != null) {
- arr.push(200); //榛樿瀹藉害200
- }
- }
- arr.unshift(40); //棣栦綅杩藉姞
- $.ajax({
- url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
- async: false,
- type: "POST",
- dataType: "json",
- data: { "myMap": JSON.stringify(arr), "Name": Name },
- success: function (data1) {
- if (data1.count == 1) {
- layer.alert(data1.Message, { icon: 1 });
-
- } else {
- layer.alert(data1.Message, { icon: 5 });
- }
- }, error: function (e) {
- layer.alert(e.Message, { icon: 5 });
- }
- });
- //璁剧疆璧嬪�煎垪瀹�
- var colWidth = getColumnsWidth();
- if (colWidth == "" || colWidth == []) {
-
- }
else {
- $.each(columns, function (x, m) {
- m["width"] = colWidth[x];
- });
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹叧闂紒');
}
- get_FastQuery(table, option);
}
+ //#endregion
//澶嶅埗鍗曟嵁
function set_CopyBill() {
-
- }
- //鍏抽棴鍗曟嵁
- function set_CloseBill() {
-
- }
- //鍙嶅叧闂崟鎹�
- function set_CancelCloseBill() {
}
//浣滃簾鍗曟嵁
@@ -911,6 +833,23 @@
})
//#endregion
+ //#region 鎺掑簭鍚庨�夋嫨
+ table.on('sort(mainTable)', function (obj) { //娉細sort 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+ table.reload('mainTable', {
+ initSort: obj //璁板綍鍒濆鎺掑簭锛屽鏋滀笉璁剧殑璇濓紝灏嗘棤娉曟爣璁拌〃澶寸殑鎺掑簭鐘舵�併�� layui 2.1.1 鏂板鍙傛暟
+ , where: { //璇锋眰鍙傛暟锛堟敞鎰忥細杩欓噷闈㈢殑鍙傛暟鍙换鎰忓畾涔夛紝骞堕潪涓嬮潰鍥哄畾鐨勬牸寮忥級
+ field: obj.field //鎺掑簭瀛楁 鍦ㄦ帴鍙d綔涓哄弬鏁板瓧娈� field order
+ , order: obj.type //鎺掑簭鏂瑰紡 鍦ㄦ帴鍙d綔涓哄弬鏁板瓧娈� field order
+ }
+ });
+ option.data = layui.table.cache["mainTable"];
+ table.render(option);
+ //鍒锋柊鎸夐挳鏄剧ず
+ Display_HideButton(set_HideButton_ID, HBillType, HModName, sessionStorage["HUserName"]);
+ });
+ //#endregion
+
+
//蹇�熻繃婊�
function get_FastQuery(table, option) {
var HStatus = $("select[name='HStatus']").val();//鐘舵��
--
Gitblit v1.9.1