From 7ec8353b216c1c6738696687e0b1119d715ef9f9 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期二, 20 十二月 2022 16:27:19 +0800
Subject: [PATCH] 器具维修记录单 源单类型 (手工录入 维修派工单 故障登记单 ) 根据类型去选择相对应的单据 带出数据 器具维修记录单 子表两个 页签 (维修信息 配件信息)--参考设备维修记录单
---
WebTM/views/模治具管理/模治具管理/Sc_Add_MouldMaintainPlanBillList.html | 4
WebTM/views/模治具管理/模治具管理/Sb_Add_MouldRepairWorkBillList.html | 496 +++++++++++++++++++++++++++++---------
WebTM/views/模治具管理/器具维修派工单/Sc_MouldRepairSendWorkBillList.html | 52 ++--
WebTM/views/模治具管理/模治具管理/Sc_MouldMaintainPlanBillList.html | 3
WebTM/views/模治具管理/模治具管理/Sb_MouldRepairWorkBillList.html | 195 ++++++++++----
5 files changed, 546 insertions(+), 204 deletions(-)
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillList.html"
index a432182..64cfc04 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\345\231\250\345\205\267\347\273\264\344\277\256\346\264\276\345\267\245\345\215\225/Sc_MouldRepairSendWorkBillList.html"
@@ -274,8 +274,8 @@
get_Display(sWhere);
//鍒濆鍖栨棩鏈�
//褰卞搷鍒板揩閫熻繃婊ょ殑鏌ヨ锛屾墍浠ュ厛娉ㄩ噴
- //$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
- //$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
}
//鍒濆鍖栬〃鏍�
@@ -443,35 +443,35 @@
if (Hmaker) {
sWhere += " and 鍒跺崟浜� like '%" + Hmaker + "%'";
}
- var index = layer.load(0);
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sc_MouldRepairSendWorkBill/GetMouldRepairSendWorkBillList',
- type: "GET",
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(index);
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
- } else {
- layer.close(index);
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(index);
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
- }
- });
- //get_Display(sWhere);
+ //var index = layer.load(0);
+ //$.ajax({
+ // //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
+ // url: GetWEBURL() + '/Sc_MouldRepairSendWorkBill/GetMouldRepairSendWorkBillList',
+ // type: "GET",
+ // data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ // success: function (data1) {
+ // if (data1.count == 1) {
+ // option.data = data1.data;
+ // table.render(option);
+ // layer.close(index);
+ // layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+ // } else {
+ // layer.close(index);
+ // layer.alert(data1.code + data1.Message, { icon: 5 });
+ // }
+ // }, error: function () {
+ // layer.close(index);
+ // layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ // }
+ //});
+ get_Display(sWhere);
sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
}
// 閲嶇疆杩囨护鏉′欢
function set_ClearQuery() {
- $("#HBeginDate").val();//Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd")
- $("#HEndDate").val();//Format(new Date(), "yyyy-MM-dd")
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
$("#HBillNo").val("");//鍗曟嵁鍙�
$("#HDeptID").val("");//閮ㄩ棬
$("#MaterialCode").val("");//鐗╂枡浠g爜
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/Sb_Add_MouldRepairWorkBillList.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/Sb_Add_MouldRepairWorkBillList.html"
index 9d0c87e..c0c2ec9 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/Sb_Add_MouldRepairWorkBillList.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/Sb_Add_MouldRepairWorkBillList.html"
@@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8" />
- <title>鏂板/缂栬緫鍣ㄥ叿缁翠慨鍗�</title>
+ <title>鏂板/缂栬緫鍣ㄥ叿缁翠慨璁板綍鍗�</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
@@ -37,7 +37,7 @@
<li class="layui-this">鍩烘湰淇℃伅</li>-->
<!--<li>鍏朵粬淇℃伅</li>-->
<!--</ul>-->
- <h1 style="text-align:center;"><b>鍣ㄥ叿缁翠慨鍗�</b></h1>
+ <h1 style="text-align:center;"><b>鍣ㄥ叿缁翠慨璁板綍鍗�</b></h1>
<div class="layui-tab-content">
<div class="layui-tab-item layui-show">
<div class="layui-form-item">
@@ -214,6 +214,7 @@
<select name="HMainSourceBillType" lay-filter="HMainSourceBillType" id="HMainSourceBillType">
<option value="2" selected="selected">鏁呴殰鐧昏鍗�</option>
<option value="1">鎵嬪伐褰曞叆</option>
+ <option value="3">缁翠慨娲惧伐鍗�</option>
</select>
</div>
</div>
@@ -254,16 +255,37 @@
</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>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
-
+ </div>
+ </script>
+ <script type="text/html" id="toolbarDemo1">
+ <div class="layui-btn-container">
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine1"><i class="layui-icon layui-icon-form"></i>澧炲姞涓�琛�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine1"><i class="layui-icon layui-icon-form"></i>澶嶅埗涓�琛�</button>
</div>
</script>
<script type="text/html" id="xuhao">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+ <script type="text/html" id="xuhao1">
{{d.LAY_TABLE_INDEX+1}}
</script>
</form>
@@ -274,6 +296,10 @@
<script type="text/html" id="barDemo">
<!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+ </script>
+ <script type="text/html" id="barDemo1">
+ <!--<a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>-->
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del1">鍒犻櫎</a>
</script>
<script src="../../../layuiadmin/layui/layui.js"></script>
<script src="../../../layuiadmin/Scripts/json2.js"></script>
@@ -305,7 +331,8 @@
, form = layui.form
, laydate = layui.laydate
, element = layui.element;
- var option;
+ var option = [];//淇濆吇
+ var option1 = [];//閰嶄欢
var sBillType = "3807";
//var TabRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " " };
//#endregion
@@ -317,6 +344,7 @@
//鍒濆鍖栬〃鏍�
set_InitGrid();
+ set_InitGrid1();
//鍒ゆ柇鎿嶄綔绫诲瀷
if (OperationType == 1) {//鏃犳簮鍗�
set_AddFNew();
@@ -341,8 +369,13 @@
$('#HMainSourceBillNo').attr("disabled", false);
$('#XDHList').addClass("layui-btn-disabled").attr("disabled", true);
break;
- //鏈夋簮鍗曟柊澧灺� 聽
+ //鏈夋簮鍗曟柊澧灺� 聽 鏁呴殰鐧昏鍗�
case '2':
+ $('#HMainSourceBillNo').attr("disabled", true);
+ $('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false);
+ break;
+ //鏈夋簮鍗曟柊澧灺� 聽 缁翠慨娲惧伐鍗�
+ case '3':
$('#HMainSourceBillNo').attr("disabled", true);
$('#XDHList').removeClass("layui-btn-disabled").attr("disabled", false);
break;
@@ -354,7 +387,7 @@
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;;
var AddRow = table.cache['mainTable'];
- var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " "};
+ var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " " };
switch (obj.event) {
//澧炲姞涓�琛�
case 'btn-AddLine': set_AddLine(NewRow);
@@ -364,12 +397,37 @@
break;
}
});
+
+ // 澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable1)', function (obj) {
+ var rowid = 0;
+ var checkStatus = table.checkStatus('mainTable1')
+ , data = checkStatus.data;;
+ var AddRow = table.cache['mainTable1'];
+ var NewRow = { "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HQtyMust": "0", "HRemark": " " };
+ switch (obj.event) {
+ //鏂板涓�琛�
+ case 'btn-AddLine1': btnAddLine1(NewRow);
+ break;
+ //澶嶅埗涓�琛�
+ case 'btn-CopyLine1': btnCopyLine1(data);
+ break;
+ }
+ });
+
//琛屽唴浜嬩欢
table.on('tool(mainTable)', function (obj) {
set_GridDelete(obj); //琛屽唴鍒犻櫎
set_GridCellCheck(obj); //琛屽唴蹇嵎閿瓫閫�
});
+
+ // 琛屽唴浜嬩欢
+ table.on('tool(mainTable1)', function (obj) {
+ set_GridDelete1(obj); //琛屽唴鍒犻櫎
+ set_GridCellCheck1(obj); //琛屽唴蹇嵎閿瓫閫�
+ });
+
//鎴愬搧妯″叿寮圭獥
form.on('submit(ProductModulList)', function () {
//椤甸潰灞�-鑷畾涔�
@@ -640,114 +698,140 @@
//#region 琛ㄥご淇℃伅閫夋嫨鍗曟嵁寮圭獥
form.on('submit(XDHList)', function () {
- //椤甸潰灞�-鑷畾涔�
- layer.open({
- type: 2,
- skin: 'layui-layer-rim', //鍔犱笂杈规
- title: '鍣ㄥ叿鏁呴殰鐧昏鍗曞垪琛�',
- shift: 2,
- area: ['90%', '90%'],
- content: ['../妯℃不鍏风鐞�/Sc_MouldConkBookBillList.html', 'yes'],
- btn: ['纭畾', '鍙栨秷']
- , btn1: function (index, layero) {
-
- //option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " ", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " }];
- //table.render(option);
- //var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " ", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " };
- //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
- 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('璇烽�夋嫨鍗曟嵁鏁版嵁');
+ var HMainSourceBillType = $("#HMainSourceBillType").val();
+ if (HMainSourceBillType == "2") {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鍣ㄥ叿鏁呴殰鐧昏鍗曞垪琛�',
+ shift: 2,
+ area: ['90%', '90%'],
+ content: ['../妯℃不鍏风鐞�/Sc_MouldConkBookBillList.html', 'yes'],
+ btn: ['纭畾', '鍙栨秷']
+ , btn1: function (index, layero) {
+
+ //option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " ", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " }];
+ //table.render(option);
+ //var NewRow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " ", "HSourceInterID": 0, "HSourceEntryID": 0, "HSourceBillNo": " ", "HSourceBillType": " " };
+ //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+ 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('璇烽�夋嫨鍗曟嵁鏁版嵁');
+ }
+ else if (checkStatus.data.length > 1) {
+ return layer.msg('璇烽�夋嫨涓�琛屽崟鎹暟鎹�');
+ }
+ //鍒锋柊褰撳墠椤佃〃鏍兼暟鎹噸杞�
+ //var oldData = table.cache["mainTable"];
+ //var rowIndex = $("#mainTable").find("tbody tr").attr('data-index');//褰撳墠琛岀殑绱㈠紩
+ //$(".layui-table-view .layui-table tbody tr[data-index=" + 1+ "]").remove();
+
+ $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HMainSourceInterID").val(checkStatus.data[0].hmainid);
+ $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ //var list = [];
+ //for (var i = 0; i < checkStatus.data.length; i++) {
+ // list.push(checkStatus.data[i].鍗曟嵁鍙�)
+ //}
+ //if (isAllEqual(list)) //鐩稿悓鍗曞彿
+ //{
+ // var rowdate = layui.table.cache["mainTable"];
+ // if (rowdate.length == 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
+ // {
+ // buttonArr = [];//娓呯┖鏁扮粍
+ // for (var i = 0; i < checkStatus.data.length; i++) {
+ // var checkrow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " ", "HSourceInterID": checkStatus.data[i].hmainid, "HSourceEntryID": checkStatus.data[i].hsubid, "HSourceBillNo": checkStatus.data[i].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[i].鍗曟嵁绫诲瀷 };
+ // buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ // }
+ // //buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
+ // table.reload("mainTable", {
+ // data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ // })
+ // }
+ // if (rowdate.length > 0 && rowdate.length <= checkStatus.data.length) //琛ㄤ綋鏁版嵁涓嶄负绌�,涓旇〃浣撴暟鎹鏁板皬浜庣瓑浜庨�変腑甯﹀洖鏁版嵁琛屾暟
+ // {
+ // buttonArr = [];//娓呯┖鏁扮粍
+ // for (var i = 0; i < rowdate.length; i++) {
+ // var checkrow = {
+ // "HRepairID": rowdate[i].HRepairID, "HRepairCode": rowdate[i].HRepairCode, "HRepairName": rowdate[i].HRepairName,
+ // "HRepairExplanation": rowdate[i].HRepairExplanation, "HManagerID": rowdate[i].HManagerID, "HManagerCode": rowdate[i].HManagerCode,
+ // "HManagerName": rowdate[i].HManagerName, "HMoney": rowdate[i].HMoney, "HRemark": rowdate[i].HRemark,
+ // "HSourceInterID": checkStatus.data[i].hmainid, "HSourceEntryID": checkStatus.data[i].hsubid,
+ // "HSourceBillNo": checkStatus.data[i].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[i].鍗曟嵁绫诲瀷
+ // };
+ // buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ // }
+ // //buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
+ // table.reload("mainTable", {
+ // data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ // })
+ // }
+ // if (rowdate.length > 0 && rowdate.length > checkStatus.data.length) //琛ㄤ綋鏁版嵁涓嶄负绌�,涓旇〃浣撴暟鎹鏁板ぇ浜庨�変腑甯﹀洖鏁版嵁琛屾暟
+ // {
+ // console.log(checkStatus.data.length);
+ // buttonArr = [];//娓呯┖鏁扮粍
+ // for (var i = 0; i < rowdate.length; i++) {
+ // var checkrow = {
+ // "HRepairID": rowdate[i].HRepairID, "HRepairCode": rowdate[i].HRepairCode, "HRepairName": rowdate[i].HRepairName,
+ // "HRepairExplanation": rowdate[i].HRepairExplanation, "HManagerID": rowdate[i].HManagerID, "HManagerCode": rowdate[i].HManagerCode,
+ // "HManagerName": rowdate[i].HManagerName, "HMoney": rowdate[i].HMoney, "HRemark": rowdate[i].HRemark,
+ // "HSourceInterID": checkStatus.data[0].hmainid, "HSourceEntryID": checkStatus.data[0].hsubid,
+ // "HSourceBillNo": checkStatus.data[0].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[0].鍗曟嵁绫诲瀷
+ // };
+ // buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ // }
+ // //buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
+ // table.reload("mainTable", {
+ // data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ // })
+ // }
+
+ // //console.log(rowdate.length);
+ // layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ //}
+ //else {
+ // layer.msg("璇烽�夋嫨鐩稿悓鍗曞彿!", { time: 1 * 2000, icon: 5 });
+ //}
+
}
- else if (checkStatus.data.length >1) {
- return layer.msg('璇烽�夋嫨涓�琛屽崟鎹暟鎹�');
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+
+ },
+ success: function (layero, index) {
+ //layer.full(index);
}
- //鍒锋柊褰撳墠椤佃〃鏍兼暟鎹噸杞�
- //var oldData = table.cache["mainTable"];
- //var rowIndex = $("#mainTable").find("tbody tr").attr('data-index');//褰撳墠琛岀殑绱㈠紩
- //$(".layui-table-view .layui-table tbody tr[data-index=" + 1+ "]").remove();
+ });
+ } else if (HMainSourceBillType == "3") {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鍣ㄥ叿缁翠慨娲惧伐鍗曞垪琛�',
+ shift: 2,
+ area: ['90%', '90%'],
+ content: ['../鍣ㄥ叿缁翠慨娲惧伐鍗�/Sc_MouldRepairSendWorkBillList.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 != 1) {
+ return layer.msg('璇烽�夋嫨涓�琛屽崟鎹暟鎹�');
+ }
- $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);
- $("#HMainSourceInterID").val(checkStatus.data[0].hmainid);
- $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid);
- layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- //var list = [];
- //for (var i = 0; i < checkStatus.data.length; i++) {
- // list.push(checkStatus.data[i].鍗曟嵁鍙�)
- //}
- //if (isAllEqual(list)) //鐩稿悓鍗曞彿
- //{
- // var rowdate = layui.table.cache["mainTable"];
- // if (rowdate.length == 0) //琛ㄤ綋鏁版嵁涓虹┖鏃�
- // {
- // buttonArr = [];//娓呯┖鏁扮粍
- // for (var i = 0; i < checkStatus.data.length; i++) {
- // var checkrow = { "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " ", "HSourceInterID": checkStatus.data[i].hmainid, "HSourceEntryID": checkStatus.data[i].hsubid, "HSourceBillNo": checkStatus.data[i].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[i].鍗曟嵁绫诲瀷 };
- // buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
- // }
- // //buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
- // table.reload("mainTable", {
- // data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
- // })
- // }
- // if (rowdate.length > 0 && rowdate.length <= checkStatus.data.length) //琛ㄤ綋鏁版嵁涓嶄负绌�,涓旇〃浣撴暟鎹鏁板皬浜庣瓑浜庨�変腑甯﹀洖鏁版嵁琛屾暟
- // {
- // buttonArr = [];//娓呯┖鏁扮粍
- // for (var i = 0; i < rowdate.length; i++) {
- // var checkrow = {
- // "HRepairID": rowdate[i].HRepairID, "HRepairCode": rowdate[i].HRepairCode, "HRepairName": rowdate[i].HRepairName,
- // "HRepairExplanation": rowdate[i].HRepairExplanation, "HManagerID": rowdate[i].HManagerID, "HManagerCode": rowdate[i].HManagerCode,
- // "HManagerName": rowdate[i].HManagerName, "HMoney": rowdate[i].HMoney, "HRemark": rowdate[i].HRemark,
- // "HSourceInterID": checkStatus.data[i].hmainid, "HSourceEntryID": checkStatus.data[i].hsubid,
- // "HSourceBillNo": checkStatus.data[i].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[i].鍗曟嵁绫诲瀷
- // };
- // buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
- // }
- // //buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
- // table.reload("mainTable", {
- // data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
- // })
- // }
- // if (rowdate.length > 0 && rowdate.length > checkStatus.data.length) //琛ㄤ綋鏁版嵁涓嶄负绌�,涓旇〃浣撴暟鎹鏁板ぇ浜庨�変腑甯﹀洖鏁版嵁琛屾暟
- // {
- // console.log(checkStatus.data.length);
- // buttonArr = [];//娓呯┖鏁扮粍
- // for (var i = 0; i < rowdate.length; i++) {
- // var checkrow = {
- // "HRepairID": rowdate[i].HRepairID, "HRepairCode": rowdate[i].HRepairCode, "HRepairName": rowdate[i].HRepairName,
- // "HRepairExplanation": rowdate[i].HRepairExplanation, "HManagerID": rowdate[i].HManagerID, "HManagerCode": rowdate[i].HManagerCode,
- // "HManagerName": rowdate[i].HManagerName, "HMoney": rowdate[i].HMoney, "HRemark": rowdate[i].HRemark,
- // "HSourceInterID": checkStatus.data[0].hmainid, "HSourceEntryID": checkStatus.data[0].hsubid,
- // "HSourceBillNo": checkStatus.data[0].鍗曟嵁鍙�, "HSourceBillType": checkStatus.data[0].鍗曟嵁绫诲瀷
- // };
- // buttonArr.push(checkrow); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
- // }
- // //buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
- // table.reload("mainTable", {
- // data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
- // })
- // }
-
- // //console.log(rowdate.length);
- // layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
- //}
- //else {
- // layer.msg("璇烽�夋嫨鐩稿悓鍗曞彿!", { time: 1 * 2000, icon: 5 });
- //}
-
- }
- , btn2: function (index, layero) {
- //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
- //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
- },
- end: function () {
-
- },
- success: function (layero, index) {
- //layer.full(index);
- }
- });
+ $("#HMainSourceBillNo").val(checkStatus.data[0].鍗曟嵁鍙�);
+ $("#HMainSourceInterID").val(checkStatus.data[0].hmainid);
+ $("#HMainSourceEntryID").val(checkStatus.data[0].hsubid);
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ });
+ }
});
//#endregion
@@ -773,7 +857,8 @@
//debugger;
var sMainStr = JSON.stringify(data.field);
var sSubStr = JSON.stringify(table.cache['mainTable']);
- var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"];
+ var sSubStr1 = JSON.stringify(table.cache['mainTable1']);
+ var sMainSub = sMainStr + ';' + sSubStr + ";" + sessionStorage["HUserName"] + ";" + sSubStr1;
//瀵规暟鎹繘琛岄獙璇�
if (AllowLoadData(sSubStr)) {
$.ajax(
@@ -831,11 +916,11 @@
, { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
, { field: 'HRepairID', title: '缁翠慨椤圭洰ID', edit: 'text', hide: true }
, { field: 'HRepairCode', title: '缁翠慨椤圭洰浠g爜', edit: 'text', event: "HRepairCode" }
- , { field: 'HRepairName', title: '缁翠慨椤圭洰', edit: 'text' }
+ , { field: 'HRepairName', title: '缁翠慨椤圭洰' }
, { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', edit: 'text' }
, { field: 'HManagerID', title: 'HManagerID', edit: 'text', hide: true }
, { field: 'HManagerCode', title: '璐熻矗浜轰唬鐮�', edit: 'text', event: "HManagerCode" }
- , { field: 'HManagerName', title: '璐熻矗浜�', edit: 'text' }
+ , { field: 'HManagerName', title: '璐熻矗浜�' }
, { field: 'HMoney', title: '缁翠慨璐圭敤', event: "", edit: 'text' }
, { field: 'HRemark', title: '澶囨敞', event: "", edit: 'text' }
//, { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�' }
@@ -857,12 +942,45 @@
}
};
}
+
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid1() {
+ //琛ㄥご
+ columns = [
+ { type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe" }
+ , { field: 'HMaterID', title: '閰嶄欢ID', edit: 'text', hide: true }
+ , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', edit: 'text', event: "HMaterNumber", }
+ , { field: 'HUnitID', title: '鍗曚綅ID', edit: 'text', event: "", hide: true }
+ , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', edit: 'text', event: "HUnitNumber" }
+ , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', edit: 'text' }
+ , { field: 'HQtyMust', title: '鍗曚綅鐢ㄩ噺', edit: 'text' }
+ , { field: 'HRemark', title: '澶囨敞', edit: 'text' }
+ , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo1', width: 150 }
+ ];
+ option1 = {
+ id: 'mainTable1'
+ , elem: '#mainTable1'
+ , toolbar: '#toolbarDemo1'
+ , page: false
+ , cellMinWidth: 120
+ , height: 500
+ , cols: [columns]
+ , done: function (res, curr, count) {
+
+ }
+ };
+
+ }
+
//鏃犳簮鍗曟柊澧�
function set_AddFNew() {
//鑾峰彇鏈�澶у崟鎹彿
get_MAXNum();
option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " " }];
+ option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HQtyMust": "0", "HRemark": "" }];
table.render(option);
+ table.render(option1);
}
//鑾峰彇鏈�澶у崟鎹彿鍙婇粯璁ゅ�艰祴鍊�
function get_MAXNum() {
@@ -888,6 +1006,8 @@
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
option.data = [{ "HRepairID": 0, "HRepairCode": "", "HRepairName": " ", "HRepairExplanation": " ", "HManagerID": 0, "HManagerCode": "", "HManagerName": " ", "HMoney": 0, "HRemark": " " }];
table.render(option);
+ option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0", "HUnitNumber": "", "HUnitName": "", "HQty": "0", "HQtyMust": "0", "HRemark": "" }];
+ table.render(option1);
}
//缂栬緫鍔犺浇琛ㄥご
function set_EditForm(linterid) {
@@ -970,8 +1090,10 @@
success: function (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 });
@@ -1002,6 +1124,25 @@
});
}
}
+
+ //琛ㄦ牸琛屽唴浜嬩欢鍒犻櫎
+ function set_GridDelete1(obj) {
+ var rowIndex = $(obj.tr).attr("data-index");
+ if (obj.event === 'del1') {
+ layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
+ console.log("绱㈠紩涓�:" + rowIndex);
+ if (rowIndex === '0') {
+ layer.msg('棣栬鏃犳硶鍒犻櫎锛侊紒锛�');
+ } else {
+ var oldData = table.cache["mainTable1"];
+ oldData.splice(obj.tr.data('index'), 1);
+ table.reload('mainTable1', { data: oldData });
+ layer.close(index);
+ }
+ });
+ }
+ };
+
//琛屽唴浜嬩欢蹇嵎閿瓫閫�
function set_GridCellCheck(obj) {
$(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
@@ -1094,6 +1235,91 @@
}
})
}
+
+ //琛ㄦ牸琛屽唴浜嬩欢蹇嵎閿瓫閫�
+ function set_GridCellCheck1(obj) {
+ $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
+ if (event.key == "F7") {
+ if (obj.event === 'HMaterNumber') //閰嶄欢浠g爜
+ {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '閰嶄欢鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ maxmin: true,
+ content: ['../../PublicPage/PartInformation.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({
+ HMaterID: checkStatus.data[0].HItemID,
+ HMaterNumber: checkStatus.data[0].HNumber,
+ HMaterName: checkStatus.data[0].HName
+
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+ }
+ });
+ }
+ //鍗曚綅浠g爜
+ if (obj.event === 'HUnitNumber') {
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鍗曚綅鍒楄〃',
+ closeBtn: 1,
+ shift: 2,
+ area: ['90%', '90%'],
+ 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,
+ HUnitNumber: checkStatus.data[0].HNumber,
+ HUnitName: checkStatus.data[0].HName
+ });
+ layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+ }
+ , btn2: function (index, layero) {
+ //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+ //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+ },
+ end: function () {
+ }
+ });
+ }
+ obj.event = "";
+ return false;
+
+ }
+ })
+ }
+
//澧炲姞涓�琛�
function set_AddLine(NewRow) {
var tableBak = table.cache["mainTable"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
@@ -1106,6 +1332,20 @@
data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
})
}
+
+ //澧炲姞涓�琛�
+ function btnAddLine1(NewRow) {
+ var tableBak = table.cache["mainTable1"]; //鑾峰彇涔嬪墠缂栬緫杩囩殑琛ㄦ牸鏁版嵁
+ buttonArr = [];//娓呯┖鏁扮粍
+ for (var i = 0; i < tableBak.length; i++) {
+ buttonArr.push(tableBak[i]); //灏嗕箣鍓嶇殑鏁版嵁瀛樺偍
+ }
+ buttonArr.push(NewRow); //鍦ㄥ熬閮ㄥ姞涓�琛�
+ table.reload("mainTable1", {
+ data: buttonArr //灏嗘暟鎹噸鏂拌浇鍏ヨ〃鏍�
+ })
+ }
+
//澶嶅埗涓�琛�
function set_CopyLine(data) {
var copydata = JSON.stringify(data);
@@ -1122,6 +1362,24 @@
option.data = table.cache["mainTable"];//灏嗘暟鎹粦瀹氬埌data涓�
table.render(option);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
//layer.alert(copyrow);
+ }
+ }
+
+ //澶嶅埗涓�琛�
+ function btnCopyLine1(data) {
+ var copydata = JSON.stringify(data);
+ if (data.length <= 0) {
+ layer.msg("璇烽�夋嫨闇�瑕佸鍒剁殑涓�琛岋紒");
+ }
+ else if (data.length > 1) {
+ layer.msg("鍙兘閫夋嫨澶嶅埗涓�琛岋紒");
+ }
+ else {
+ var copydata2 = copydata.substring(1, copydata.length);//鍘婚櫎棣栬瀛楃'['
+ var copyrow = copydata2.substring(0, copydata2.length - 1);//鍘婚櫎鏈熬瀛楃']'
+ table.cache["mainTable1"].push(JSON.parse(copyrow));//灏嗗鍒剁殑琛屽己杞垚json杩藉姞鍒拌〃鏍间笂
+ option1.data = table.cache["mainTable1"];//灏嗘暟鎹粦瀹氬埌data涓�
+ table.render(option1);//灏嗘暟鎹覆鏌撳埌琛ㄦ牸涓�
}
}
@@ -1260,7 +1518,7 @@
layer.msg("璁惧娌℃湁閫夋嫨", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
- if ($("#HMainSourceBillType").val() == 2 && $("#HMainSourceInterID").val() == '') {
+ if ($("#HMainSourceBillType").val() != 1 && $("#HMainSourceInterID").val() == '') {
layer.msg("婧愬崟绫诲瀷闈炴墜宸ワ紝璇烽�夋嫨閫夊崟鍙�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
return false;
}
@@ -1311,7 +1569,7 @@
return true;
}
}
- //#endregion
+ //#endregion
</script>
</body>
</html>
\ 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/Sb_MouldRepairWorkBillList.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/Sb_MouldRepairWorkBillList.html"
index 8a2e632..495cef1 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/Sb_MouldRepairWorkBillList.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/Sb_MouldRepairWorkBillList.html"
@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>鍣ㄥ叿缁翠慨宸ュ崟琛ㄥ垪琛�</title>
+ <title>鍣ㄥ叿缁翠慨璁板綍宸ュ崟琛ㄥ垪琛�</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
@@ -117,26 +117,46 @@
</div>
</div>
</div>
- </div>
- <table class="" id="mainTable" lay-filter="mainTable"></table>
- <script type="text/html" id="toolbarDemo">
- <div class="layui-btn-container">
- <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><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>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload" style="display:none;"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm" style="display:none;"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back" style="display:none;"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details" style="display:none;"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate" style="display:none;"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit" style="display:none;"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
- <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
-
</div>
- </script>
+ <table class="" id="mainTable" lay-filter="mainTable"></table>
+ <div class="layui-tab layui-tab-card">
+ <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="mainTable1" lay-filter="mainTable1"></table>
+ </div>
+ <div class="layui-tab-item">
+ <table class="layui-hide" id="mainTable2" lay-filter="mainTable2"></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-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-add-1"></i>鏂板</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-edit"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><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>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload" style="display:none;"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm" style="display:none;"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back" style="display:none;"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details" style="display:none;"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate" style="display:none;"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit" style="display:none;"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+
+ </div>
+ </script>
+ <script type="text/html" id="xuhao">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
+ <script type="text/html" id="xuhao1">
+ {{d.LAY_TABLE_INDEX+1}}
+ </script>
</form>
</div>
</div>
@@ -146,6 +166,7 @@
<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/zgqCustom/zgqCustom.js"></script>
<script>
layui.config({
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -168,11 +189,34 @@
var HModName = "Sb_MouldRepairWorkBillList";
var titleData = ["hmainid","鍗曟嵁ID", "鍗曟嵁绫诲瀷", "HMouldID", "HEquipID", "HEmpID", "HManagerID", "HDeptID", "HSupID", "hsubid", "HRepairID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
//#endregion
-
+
//鍒濆鍖栭〉闈㈠姞杞�
set_ClearBill();
////鍒濆鍖栬〃鏍�
//DisPlay_HideColumn();
+
+ //鐐瑰嚮涓昏〃甯﹀嚭浠庤〃鏁版嵁
+ table.on('row(mainTable)', function (obj) { //娉細tool 鏄伐鍏锋潯浜嬩欢鍚嶏紝test 鏄� table 鍘熷瀹瑰櫒鐨勫睘鎬� lay-filter="瀵瑰簲鐨勫��"
+ var datas = obj.data; //鑾峰緱褰撳墠琛屾暟鎹�
+ var linterid = datas.hmainid;
+ $.ajax({
+ url: GetWEBURL() + 'Sb_MouldRepairWorkBill/Sb_MouldRepairWorkBillListProjectDetai',
+ type: "GET",
+ data: { "sqlWhere": "and hmainid=" + linterid },
+ success: function (data1) {
+ if (data1.count == 1) {
+ option1.data = data1.list[0];
+ table.render(option1);
+ option2.data = data1.list[1];
+ table.render(option2);
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+ }
+ });
+ });
//#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
//澶村伐鍏锋爮浜嬩欢
@@ -219,9 +263,15 @@
//#region 褰撳墠椤甸潰鍔犺浇鎵�鏈夋柟娉�
// 鍒濆鍖栫晫闈�
function set_ClearBill() {
-
+ //鍒濆鍖栨棩鏈�
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
//鍒濆鍖栬〃鏍�
set_InitGrid();
+ //鍒濆鍖栬〃鏍�(瀛愯〃1)
+ set_InitGrid1();
+ //鍒濆鍖栬〃鏍�(瀛愯〃2)
+ set_InitGrid2();
//鏌ヨ
get_Display(sWhere);
}
@@ -314,7 +364,7 @@
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
url: GetWEBURL() + '/Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList',
type: "GET",
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
var data = [];
@@ -347,7 +397,7 @@
, toolbar: '#toolbarDemo'
, cols: [col]
, data: data1.data
- , height: 550
+ , height:450
, page: true
, cellMinWidth: 90
, limit: 50
@@ -373,6 +423,68 @@
}
});
}
+
+ //鍒濆鍖栬〃鏍�(瀛愯〃1)
+ function set_InitGrid1() {
+ var ajaxLoad = layer.load();
+ option1 = {
+ elem: '#mainTable1'
+ //, toolbar: '#toolbarDemo'
+ , height: '250'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ //{ type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left' }
+ , { field: 'HRepairID', title: '缁翠慨椤圭洰ID', width: 200, hide: true }
+ , { field: 'HRepairCode', title: '缁翠慨椤圭洰浠g爜', width: 200 }
+ , { field: 'HRepairName', title: '缁翠慨椤圭洰', width: 200 }
+ , { field: 'HRepairExplanation', title: '缁翠慨瑕佹眰', width: 200 }
+ , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
+ , { field: 'HManagerCode', title: '璐熻矗浜轰唬鐮�', width: 200 }
+ , { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
+ , { field: 'HMoney', title: '缁翠慨璐圭敤', width: 200 }
+ , { field: 'HRemark', title: '澶囨敞', width: 200 }
+ ]]
+ };
+ option1.data = [];
+ table.render(option1);
+ layer.close(ajaxLoad);
+ }
+
+ //鍒濆鍖栬〃鏍�(瀛愯〃2)
+ function set_InitGrid2() {
+ var ajaxLoad = layer.load();
+ option2 = {
+ elem: '#mainTable2'
+ //, toolbar: '#toolbarDemo'
+ , height: '250'
+ , page: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ //{ type: 'checkbox', fixed: 'left' }
+ , { templet: '#xuhao1', title: '搴忓彿', sort: true, fixed: 'left' }
+ , { field: 'HMaterID', title: '閰嶄欢ID', width: 200, hide: true }
+ , { field: 'HMaterNumber', title: '閰嶄欢浠g爜', width: 200 }
+ , { field: 'HMaterName', title: '閰嶄欢鍚嶇О', width: 200 }
+ , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', width: 200, hide: true }
+ , { field: 'HUnitID', title: '鍗曚綅ID', width: 200, hide: true }
+ , { field: 'HUnitNumber', title: '鍗曚綅浠g爜', width: 200 }
+ , { field: 'HUnitName', title: '鍗曚綅鍚嶇О', width: 200 }
+ , { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200 }
+ , { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200 }
+ , { field: 'HRemark', title: '澶囨敞', width: 200 }
+ ]]
+ };
+ option2.data = [];
+ table.render(option2);
+ layer.close(ajaxLoad);
+ }
+
//鏂板
function set_AddNew() {
@@ -605,42 +717,17 @@
if (RepairItem) {
sWhere += " and 缁翠慨椤圭洰 like '%" + RepairItem + "%'";
}
- var index = layer.load(0);
- $.ajax({
- //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sb_MouldRepairWorkBill/GetMouldRepairWorkBillList',
- type: "GET",
- data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
- success: function (data1) {
- if (data1.count == 1) {
- option.data = data1.data;
- table.render(option);
- layer.close(index);
- layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
- } else {
- layer.close(index);
- layer.alert(data1.code + data1.Message, { icon: 5 });
- }
- }, error: function () {
- layer.close(index);
- layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
- }
- });
+
+ get_Display(sWhere);
//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
sWhere = "";
- //$("#HBillType").val("");//鍗曟嵁绫诲瀷
- //$("#HBillNo").val("");//鍗曟嵁鍙�
- //$("#HSourceBillNo").val("");//婧愬崟鍙�
- //$("#HCreateBy").val("");//鍒跺崟浜�
- //$("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
- //$("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
}
//閲嶇疆杩囨护鏉′欢鏂规硶
function set_ClearQuery() {
$('#Status').find("option[value='-1']").attr("selected", true);
- $("#HDate").val("");//寮�濮嬫棩鏈�
- $("#HDate1").val("");//缁撴潫鏃ユ湡
+ $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
+ $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
$("#HBillNo").val("");
$("#HMouldNumber").val("");
$("#HMouldName").val("");
@@ -694,7 +781,7 @@
/*var titleData = ["鍗曟嵁ID", "鍗曟嵁绫诲瀷", "HMouldID", "HEquipID", "HEmpID", "HManagerID", "HDeptID", "HSupID", "hsubid", "HRepairID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�", "HBillType"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
dataCol = data1.data[0].HGridString.split(',');
-
+
for (var i = 0; i < option.cols[0].length - 2; i++) {
//鍦ㄦ暟鎹笉涓虹┖鐨勬儏鍐典笅杩涜鍒嗗壊锛屽惁鍒欐姤閿�
if (dataCol[i]) {
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/Sc_Add_MouldMaintainPlanBillList.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/Sc_Add_MouldMaintainPlanBillList.html"
index c1dd957..17441ae 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/Sc_Add_MouldMaintainPlanBillList.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/Sc_Add_MouldMaintainPlanBillList.html"
@@ -471,8 +471,8 @@
set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋
option.data = [{ "HMaintainItemID": 0, "HMaintainItemNumber": " ", "HMaintainItem": " ", "HMaintainPart": " ", "HClaim": " ", "HManagerID": "0 ", "HManagerNumber": " ", "HManagerName": " ", "HRemark": " " }];
table.render(option);
- option.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0 ", "HUnitNumber": "", "HUnitName": "", "HQty": "0 ", "HQtyMust": "0", "HRemark": "" }];
- table.render(option);
+ option1.data = [{ "HMaterID": 0, "HMaterNumber": "", "HMaterName": "", "HUnitID": "0 ", "HUnitNumber": "", "HUnitName": "", "HQty": "0 ", "HQtyMust": "0", "HRemark": "" }];
+ table.render(option1);
}
//鑾峰彇鏈�澶у崟鎹彿鍙婇粯璁ゅ�艰祴鍊�
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/Sc_MouldMaintainPlanBillList.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/Sc_MouldMaintainPlanBillList.html"
index 3913c22..a87de9c 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/Sc_MouldMaintainPlanBillList.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/Sc_MouldMaintainPlanBillList.html"
@@ -357,9 +357,6 @@
, { field: 'HUnitID', title: '鍗曚綅ID', width: 200, hide: true }
, { field: 'HUnitNumber', title: '鍗曚綅浠g爜', width: 200 }
, { field: 'HUnitName', title: '鍗曚綅鍚嶇О', width: 200 }
- , { field: 'HManagerID', title: '璐熻矗浜篒D', width: 200, hide: true }
- , { field: 'HManagerNumber', title: '璐熻矗浜轰唬鐮�', width: 200 }
- , { field: 'HManagerName', title: '璐熻矗浜�', width: 200 }
, { field: 'HQty', title: '瀹為檯鐢ㄩ噺', width: 200 }
, { field: 'HQtyMust', title: '鏍囧噯鐢ㄩ噺', width: 200 }
, { field: 'HRemark', title: '澶囨敞', width: 200 }
--
Gitblit v1.9.1