From 66144089fc037ee502ad4f9f7a251b13d7ea9122 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期二, 25 五月 2021 09:03:46 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
---
WebTM/views/模治具管理/模治具管理/Sc_MouldRepairCheckBillList.html | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 107 insertions(+), 11 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\347\256\241\347\220\206/Sc_MouldRepairCheckBillList.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_MouldRepairCheckBillList.html"
index 4ed6c3a..bcf4585 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_MouldRepairCheckBillList.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_MouldRepairCheckBillList.html"
@@ -79,6 +79,9 @@
<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-reload"><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"><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"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
@@ -117,13 +120,14 @@
var option = {
elem: '#mainTable'
- //, toolbar: '#toolbarDemo'
+ , toolbar: '#toolbarDemo'
, height: 'full-50'
, page: true
, cellMinWidth: 90
, cols: [[
- { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
- , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160 }
+ { type: 'checkbox', fixed: 'left' }
+ , { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
+ , { field: '鏃ユ湡', title: '鏃ユ湡', width: 160, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
, { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
, { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
@@ -137,7 +141,7 @@
, { field: 'HMouldID', title: 'HMouldID', width: 160, hide: true }
, { field: '浜у搧妯″叿浠g爜', title: '浜у搧妯″叿浠g爜', width: 160 }
, { field: '浜у搧妯″叿', title: '浜у搧妯″叿', width: 200, hide: true }
- , { field: '缁翠慨鏃ユ湡', title: '缁翠慨鏃ユ湡', width: 200 }
+ , { field: '缁翠慨鏃ユ湡', title: '缁翠慨鏃ユ湡', width: 200, templet: "<div>{{d.缁翠慨鏃ユ湡 ==null ?'':layui.util.toDateString(d.缁翠慨鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
, { field: '楠屾敹缁撹', title: '楠屾敹缁撹', width: 200 }
, { field: '鎽樿', title: '鎽樿', width: 200 }
, { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200 }
@@ -148,15 +152,15 @@
, { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
, { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true }
, { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 115, hide: true }
- , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200 }
+ , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
, { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
- , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, hide: true }
+ , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, hide: true, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ?'':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
, { field: '淇敼浜�', title: '淇敼浜�', width: 200, hide: true }
- , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, hide: true }
+ , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 115, hide: true, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
, { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
- , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200 }
+ , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
, { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200, hide: true }
- , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true }
+ , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 115, hide: true, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd')}}</div>"}
, { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
, { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
, { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
@@ -173,10 +177,102 @@
};
var index = layer.load(0);
+
+ //澶村伐鍏锋爮浜嬩欢
+ table.on('toolbar(mainTable)', function (obj) {
+ var checkStatus = table.checkStatus(obj.config.id);
+ switch (obj.event) {
+ case 'btn-Add':
+ //椤甸潰灞�-鑷畾涔�
+ layer.open({
+ type: 2,
+ skin: 'layui-layer-rim', //鍔犱笂杈规
+ title: '鏂板妯″叿缁翠慨鍗�',
+ closeBtn: false,
+ shift: 2,
+ area: ['100%', '100%'],
+ maxmin: true,
+ content: '../妯℃不鍏风鐞�/Sc_Add_MouldRepairCheckBillList.html',
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ },
+ success: function (layero, index) {
+
+ }
+ });
+ break;
+ case 'btn-Edit':
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var hID = data[0].hmainid.toString();
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '缂栬緫妯″叿缁翠慨鍗�'
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../妯℃不鍏风鐞�/Sc_Add_MouldRepairCheckBillList.html?hID=' + hID
+ , resize: false,
+ end: function () {
+ //鍒锋柊椤甸潰,
+ location.reload();
+ }
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+
+ break;
+ case 'btn-Delete':
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var InterID = data[0].hmainid.toString();
+ //閫昏緫鍒犻櫎鏂规硶
+ layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Sc_MouldRepairCheckBill/DeltetMouldRepairCheckBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID },
+ 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);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ window.location.reload();
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ })
+ }
+ else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+ }
+ break;
+ };
+ });
+
//杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
$.ajax({
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL() + '/Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList',
+ url: GetWEBURL() + '/Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList',
type: "GET",
data: { "sWhere": sWhere},
success: function (data1) {
@@ -227,7 +323,7 @@
var index = layer.load(0);
$.ajax({
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
- url: GetWEBURL1() + '/Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList',
+ url: GetWEBURL() + '/Sc_MouldRepairCheckBill/GetMouldRepairCheckBillList',
type: "GET",
data: { "sWhere": sWhere},
success: function (data1) {
--
Gitblit v1.9.1