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_MouldMoveStockStepInBill.html | 98 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 90 insertions(+), 8 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_MouldMoveStockStepInBill.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_MouldMoveStockStepInBill.html"
index 55f8246..efeb4df 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_MouldMoveStockStepInBill.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_MouldMoveStockStepInBill.html"
@@ -143,7 +143,7 @@
<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 class="layui-inline">
@@ -163,7 +163,20 @@
</div>
</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">
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
@@ -241,6 +254,9 @@
, { field: 'HMaterName', title: '鍣ㄥ叿鍚嶇О', edit: 'text', width: 100 }
, { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
, { field: 'HBatchNo', title: '鎵规', edit: 'text', width: 100 }
+ , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true }
+ , { field: 'HUnitCode', title: '璁¢噺鍗曚綅浠g爜', edit: 'text', event: 'HUnitCode', width: 100 }
+ , { field: 'HUnitName', title: '璁¢噺鍗曚綅', edit: 'text', width: 100 }
, { field: 'HDesignLife', title: '璁捐瀵垮懡', edit: 'text', width: 100 }
, { field: 'HLeaveLife', title: '鍓╀綑瀵垮懡', edit: 'text', width: 100 }
, { field: 'HUseLife', title: '绱Н浣跨敤瀵垮懡', edit: 'text', width: 100 }
@@ -268,10 +284,31 @@
, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo' }
]]
};
+ var option1 = {
+ elem: '#mainTable1'
+ , height: 500
+ , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+ //,url: '/demo/table/user/' //鏁版嵁鎺ュ彛
+ , page: true //寮�鍚垎椤�
+ , cols: [[ //琛ㄥご
+ { 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: 'hwhid', 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 }
+ ]]
+ };
//鍒ゆ柇鏄惁鏂板
if (OperationType == 1) {
//鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": " ", "HSQProcName": " ","HProcID":0, "HZRProcName": " ", "HMRBChecker": " ", "HRemark": " ", "HPSProcName": " ", "HCloseMan": " " }
- option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }];
+ 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, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }];
table.render(option);
}
else {
@@ -285,8 +322,10 @@
//console.log(result);
//console.log('gouba' + 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 });
@@ -304,7 +343,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" };
+ var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" };
switch (obj.event) {
case 'btn-AddLine':
//table.cache["mainTable"].push(AddRow[rows]);
@@ -400,7 +439,46 @@
}
});
}
+ if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '璁¢噺鍗曚綅鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['80%', '80%'],
+ maxmin: true,
+ content: ['../../PublicPage/UnitInformation.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+ if (checkStatus.data.length === 0) {
+ return layer.msg('璇烽�夋嫨鏁版嵁');
+ }
+
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HUnitID: checkStatus.data[0].HItemID,
+ HUnitCode: checkStatus.data[0].HNumber,
+ HUnitName: checkStatus.data[0].HName,
+ });
+
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ }
+ });
+ }
if (obj.event === 'HOtherOrgCode') //缁勭粐
{
//椤甸潰灞�-鑷畾涔�
@@ -471,7 +549,7 @@
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
- var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
@@ -555,7 +633,7 @@
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
- var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
@@ -813,7 +891,7 @@
//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
var iframeWindow = window['layui-layer-iframe' + index] //鑾峰彇寮规椤甸潰
- var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+ var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
if (checkStatus.data.length === 0) {
return layer.msg('璇烽�夋嫨鏁版嵁');
}
@@ -1110,6 +1188,10 @@
layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璋冨嚭浠撳簱涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
}
+ if (sSubStr[i].HUnitID == "") {
+ layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璁¢噺鍗曚綅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return Result = false;
+ }
if (HStockStyle == "璺ㄧ粍缁囪皟鎷�" && sSubStr[i].HStockOrgID == sSubStr[i].HOtherOrgID) {
layer.msg("璋冩嫧绫诲瀷涓鸿法缁勭粐璋冩嫧锛屾槑缁嗚褰曠" + (i + 1) + "琛�,璋冨嚭缁勭粐鍜屽綋鍓嶇粍缁囦竴鑷� !", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return Result = false;
--
Gitblit v1.9.1