From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1
---
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapOutBill.html | 134 ++++++++++++++++++++++++++++++++++++--------
1 files changed, 108 insertions(+), 26 deletions(-)
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_MouldScrapOutBill.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_MouldScrapOutBill.html"
index 56c5e1f..db3ed87 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_MouldScrapOutBill.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_MouldScrapOutBill.html"
@@ -66,7 +66,7 @@
</div>
<div class="layui-form-item">
<div class="layui-inline">
- <label class="layui-form-label">璐熻矗浜�</label>
+ <label class="layui-form-label">璐熻矗浜�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HManagerName" id="HManagerName" readonly class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HManagerID" id="HManagerID" class="layui-input" value="" style="float:left;width:150px;">
@@ -76,7 +76,7 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">浠撳簱</label>
+ <label class="layui-form-label">浠撳簱<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;">
@@ -86,7 +86,7 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">鍙戣揣鍛�</label>
+ <label class="layui-form-label">鍙戣揣鍛�<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HKeeperName" id="HKeeperName" readonly class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;">
@@ -96,7 +96,7 @@
</div>
</div>
<div class="layui-inline">
- <label class="layui-form-label">閮ㄩ棬</label>
+ <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
<div class="layui-input-inline">
<input type="text" name="HDeptName" id="HDeptName" readonly class="layui-input" value="" style="float:left;width:150px;">
<input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;">
@@ -110,7 +110,7 @@
<div class="layui-inline">
<label class="layui-form-label">寰�鏉ョ被鍨�</label>
<div class="layui-input-inline">
- <select name="HSupTypeID" id="HSupTypeID" class="layui-input" value="" style="float:left;width:150px">
+ <select name="HSupTypeID" id="HSupTypeID" class="layui-input" lay-filter="HSupTypeID" value="" style="float:left;width:150px">
<option value="1">渚涘簲鍟�</option>
<option value="2">瀹㈡埛</option>
<option value="3">杞﹂棿閮ㄩ棬</option>
@@ -130,13 +130,13 @@
<div class="layui-inline">
<label class="layui-form-label">婧愬崟绫诲瀷</label>
<div class="layui-input-inline">
- <input type="text" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="HSourceBillType" id="HSourceBillType" class="layui-input" value="" style="float:left;width:100%;">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">閫夊崟鍙�</label>
<div class="layui-input-inline">
- <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;">
+ <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:100%;">
</div>
</div>
</div>
@@ -160,7 +160,21 @@
</div>
</div>
- <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+ <div class="layui-tab layui-tab-card" lay-filter="TabTest">
+ <ul class="layui-tab-title">
+ <li class="layui-this">鏄庣粏淇℃伅</li>
+ <li>姹囨�讳俊鎭�</li>
+ </ul>
+ <div class="layui-tab-content">
+ <div class="layui-tab-item layui-show">
+ <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+ </div>
+ <div class="layui-tab-item">
+ <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+ </div>
+ </div>
+ </div>
+
<script type="text/html" id="toolbarDemo">
<div class="layui-btn-container">
@@ -218,7 +232,7 @@
, element = layui.element;
var option;
var sBillType = "3832";
- var TabRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" }
+ //var TabRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }
//#endregion
@@ -228,7 +242,7 @@
//鍒濆鍖栬〃鏍�
set_InitGrid();
-
+ set_CountGrid();
//鍒ゆ柇鎿嶄綔绫诲瀷
if (OperationType == 1) {//鏃犳簮鍗�
set_AddFNew();
@@ -259,6 +273,13 @@
break;
}
}
+
+ //涓嬫媺妗嗕簨浠堕�夋嫨瑙﹀彂
+ form.on('select(HSupTypeID)', function (data) {
+ $("#HSupID").val("");
+ $("#HSupName").val("");
+ });
+
//琛ㄥご淇℃伅寰�鏉ュ崟浣嶅脊绐�
form.on('submit(HSupList)', function () {
debugger;
@@ -461,7 +482,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = TabRow;
+ var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" };
switch (obj.event) {
//鏂板涓�琛�
case 'btn-AddLine': btnAddLine(NewRow);
@@ -564,7 +585,7 @@
layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
$('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
- parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
+ parent.layer.close(index); //鍐嶆墽琛屽叧闂�
});
}
else {
@@ -583,16 +604,39 @@
});
//鎵撳嵃Printing
form.on("submit(view)", function (data) {
- layer.alert("鎴戞槸鎵撳嵃鎸夐挳锛佸崟鎹富ID鏄細" + linterid);
- //window.open("../鐢熶骇宸ュ簭绠$悊/宸ュ簭姹囨姤鍗�/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
- window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldScrapOutBill&OpenTmp=鍣ㄥ叿鐢熶骇棰嗙敤鏉$爜");
-
+ if (linterid != "" || linterid != null) {
+ layer.open({
+ type: 2
+ , area: ['50%', '50%']
+ , title: '鎵撳嵃妯$増閫夋嫨'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + '&MyMsg=' + linterid.toString() + '&Type=HMouldScrapOutBill', 'yes']
+ , resize: false
+ })
+ }
+ else {
+ layer.msg('褰撳墠鍗曟嵁ID涓虹┖锛�');
+ }
});
//鎵撳嵃Printing
form.on("submit(print)", function (data) {
- layer.alert("鎴戞槸鎵撳嵃鎸夐挳锛佸崟鎹富ID鏄細" + linterid);
- //window.open("../鐢熶骇宸ュ簭绠$悊/宸ュ簭姹囨姤鍗�/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
- window.open("../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldScrapOutBill&OpenTmp=鍣ㄥ叿鐢熶骇棰嗙敤鏉$爜");
+ if (linterid != "" || linterid != null) {
+ layer.open({
+ type: 2
+ , area: ['50%', '50%']
+ , title: '鎵撳嵃妯$増閫夋嫨'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + linterid.toString() + '&MyMsg=' + linterid.toString() + '&Type=HMouldScrapOutBill', 'yes']
+ , resize: false
+ })
+ }
+ else {
+ layer.msg('褰撳墠鍗曟嵁ID涓虹┖锛�');
+ }
});
//閫�鍑�
@@ -662,6 +706,7 @@
, { field: 'HSPCode', title: '浠撲綅浠g爜', edit: 'text', event: 'HSPCode', width: 100 }
, { field: 'HSPName', title: '浠撲綅鍚嶇О', edit: 'text', width: 100 }
, { field: 'HRemark', title: '澶囨敞', edit: 'text', width: 100 }
+ , { field: 'HStockOrgID', title: 'HStockOrgID', width: 100, hide: true }
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
];
option = {
@@ -677,12 +722,41 @@
}
};
}
-
+ //鍒濆姹囨�讳俊鎭�
+ function set_CountGrid() {
+ //琛ㄥご
+ columns = [
+ { type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
+ , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', edit: 'text', event: 'HMaterCode', width: 100 }
+ , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', edit: 'text', width: 100 }
+ , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
+ , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', edit: 'text', width: 100 }
+ , { field: '鎵规', title: '鎵规', edit: 'text', width: 100 }
+ , { field: '瀹炲彂鏁伴噺', title: '瀹炲彂鏁伴噺', edit: 'text', width: 100 }
+ , { field: 'hwhid1', title: 'HWHID', edit: 'text', width: 100, hide: true }
+ , { field: '鍙戣揣浠撳簱浠g爜', title: '鍙戣揣浠撳簱浠g爜', edit: 'text', event: 'HWHCode', width: 120 }
+ , { field: '鍙戣揣浠撳簱鍚嶇О', title: '鍙戣揣浠撳簱鍚嶇О', edit: 'text', width: 120 }
+ , { field: '瀛愬娉�', title: '澶囨敞', edit: 'text', width: 100 }
+ ];
+ option1 = {
+ id: 'mainTable1'
+ , elem: '#mainTable1'
+ , height: 500
+ , page: true
+ , limit: 500
+ , cellMinWidth: 120
+ , height: 500
+ , cols: [columns]
+ , done: function (res, curr, count) {
+ }
+ };
+ }
//鏃犳簮鍗曟柊澧�
function set_AddFNew() {
//鑾峰彇鏈�澶у崟鎹彿
get_MAXNum();
- option.data = [TabRow];
+ option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }];
table.render(option);
}
@@ -690,7 +764,7 @@
function set_EditFromGrid() {
set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
- option.data = [TabRow];
+ option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }];
table.render(option);
}
@@ -781,8 +855,10 @@
data: { "sqlWhere": "and hmainid=" + linterid },
success: function (result) {
if (result.count == 1) {
- option.data = result.data;
+ option.data = result.list[0];
table.render(option);
+ option1.data = result.list[1];
+ table.render(option1);
} else {
layer.alert(result.code + result.Message, { icon: 5 });
@@ -798,9 +874,15 @@
//澧炲姞涓�琛�
function btnAddLine(NewRow) {
- table.cache["mainTable"].push(NewRow);
- option.data = table.cache["mainTable"];
- table.render(option);
+ var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < tableBak.length; i++) {
+ buttonArr.push(tableBak[i]); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
+ table.reload("mainTable", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
}
//澶嶅埗涓�琛�
--
Gitblit v1.9.1