From 00a88abf340904065aa7882c7555fc7b65164f5e Mon Sep 17 00:00:00 2001
From: zhangrg <z18737863051@163.com>
Date: 星期二, 02 一月 2024 17:28:51 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/生产管理/异常反馈单/Sc_MESExecptFeedBackBillList.html | 164 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 118 insertions(+), 46 deletions(-)
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_MESExecptFeedBackBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_MESExecptFeedBackBillList.html"
index adcd9d4..2861141 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_MESExecptFeedBackBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/Sc_MESExecptFeedBackBillList.html"
@@ -15,6 +15,7 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+ <script src="../../../layuiadmin/soulTable.slim.js"></script>
<style type="text/css">
input.layui-input.layui-unselect {
padding-right: 0;
@@ -41,7 +42,7 @@
<div class="layui-inline">
<label class="layui-form-label">闃呰鐘舵��</label>
<div class="layui-input-block">
- <select name="HReadFlag" lay-filter="HReadFlag" style="width:190px;">
+ <select id="HReadFlag" name="HReadFlag" lay-filter="HReadFlag" style="width:190px;">
<option value="-1" selected="selected">鍏ㄩ儴</option>
<option value="0">鏈槄</option>
<option value="1">宸查槄</option>
@@ -80,10 +81,10 @@
<div class="layui-inline">
<label class="layui-form-label">绱ф�ョ▼搴�</label>
<div class="layui-input-block">
- <select name="HLevel" lay-filter="HLevel" style="width:190px;">
- <option value="-1" selected="selected">鍏ㄩ儴</option>
- <option value="0">鏅��</option>
- <option value="1">绱ф��</option>
+ <select id="HLevel" name="HLevel" lay-filter="HLevel" style="width:190px;">
+ <option value="鍏ㄩ儴" selected="selected">鍏ㄩ儴</option>
+ <option value="鏅��">鏅��</option>
+ <option value="绱ф��">绱ф��</option>
</select>
</div>
</div>
@@ -95,6 +96,7 @@
<div class="layui-btn-container">
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Reply"><i class="layui-icon layui-icon-survey"></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" id="btn-Audit"><i class="layui-icon layui-icon-radio"></i>瀹℃牳</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>
@@ -115,7 +117,7 @@
base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
}).extend({
index: 'lib/index', //涓诲叆鍙fā鍧�
- }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+ }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate','soulTable'], function () {
//#region 鍏叡鍙橀噺
var $ = layui.$
@@ -127,9 +129,11 @@
, laypage = layui.laypage
, laydate = layui.laydate
, util = layui.util
+ , soulTable = layui.soulTable
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
+ var titleData = ["HInterID", "HEntryID", "HDeptID","HBillStatus"];
//#endregion
var HModName = "Sc_MESExecptFeedBackBillList";
@@ -150,14 +154,17 @@
//缂栬緫鎸夐挳
case 'btn-Edit':set_ShowBill();
break;
+ //鍥炲鎸夐挳
+ case 'btn_Reply': set_ReplyBill();
+ break;
//鍒犻櫎鎸夐挳
case 'btn-Delete':set_DeleteBill();
break;
//瀹℃牳鎸夐挳
- case 'btn-Audit': set_CheckBill();
+ case 'btn-Audit': set_AuditBill();
break;
//鍙嶅鏍告寜閽�
- case 'btn-DeAudit': set_AbandonCheck();
+ case 'btn-DeAudit': set_DeAuditBill();
break;
//鍒锋柊
case 'get_Refresh': set_Refresh();
@@ -184,8 +191,8 @@
//#region 姝ら〉闈㈡墍鏈夋柟娉�
- //鍒濆鍖栬〃鏍�
- function set_InitGrid() {
+ //鍒濆鍖栬〃鏍�
+ function set_InitGrid() {
$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
var columns = [
@@ -226,13 +233,13 @@
, limit: 50
, limits: [50, 500, 5000, 20000]
, done: function (res, curr, count) {
-
+ soulTable.render(this);
}
};
}
//鍔犺浇缃戞牸
function get_Display(sWhere) {
- var wait = layer.load();//閬僵
+ var ajaxLoad = layer.load();//閬僵
$.ajax({
url: GetWEBURL() + '/Sc_MESTransFerWorkBill/Get_TransFerBillList',
@@ -240,16 +247,43 @@
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
success: function (data1) {
if (data1.count == 1) {
- DataList = data1.data;
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'checkbox', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+ if ($.inArray(data[i].name, titleData) > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 120 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
+ }
+ }
+ }
+
+ option.cols = [col];
option.data = data1.data;
table.render(option);
- layer.close(wait);
+
+ layer.close(ajaxLoad);
+ //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
} else {
- layer.close(wait);
- layer.alert(data1.Message, { icon: 5 });
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
}
}, error: function () {
- layer.close(wait);
+ layer.close(ajaxLoad);
layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
@@ -257,14 +291,22 @@
}
- //闅愯棌鍒楄缃�
+ //#region 闅愯棌鍒楄缃�
function get_HideColumn() {
var colName = "";
- for (var i = 1; i < option.cols[0].length - 1; i++) {
+ var contentUrl = "";
+ for (var i = 1; i < option.cols[0].length; i++) {
colName += option.cols[0][i]["title"] + ",";
}
-
+ var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
+ var urlLen = urlStr.split('/');
+ for (var i = 0; i < urlLen.length - 4; i++) {
+ contentUrl += "../";
+ }
colName = encodeURI(colName.substring(0, colName.length - 1));//瀵� URI 杩涜缂栫爜
+
+ contentUrl += '鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
+
layer.open({
type: 2
, skin: "layui-layer-rim" //鍔犱笂杈规
@@ -273,7 +315,7 @@
, shift: 2 //寮瑰嚭鍔ㄧ敾
, area: ["50%", "90%"] //绐椾綋澶у皬
, maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀�
- , content: ['../../鍩虹璧勬枡/闅愯棌鍒楄缃�/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
+ , content: [contentUrl, "yes"]
, btn: ["纭畾", "鍙栨秷"]
, btn1: function (index, laero) {
//鍒锋柊琛ㄦ牸鏁版嵁
@@ -283,8 +325,8 @@
}
})
}
-
- //鏄剧ず鍒楁暟鎹�
+ //#endregion
+ //#region 鏄剧ず鍒楁暟鎹�
function DisPlay_HideColumn() {
$.ajax({
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
@@ -293,13 +335,12 @@
success: function (data1) {
if (data1.data.length != 0) {
-
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
- var titleData = ["HMaterID", "HUnitID", "HICMOEmpID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+ //var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
dataCol = data1.data[0].HGridString.split(',');
- for (var i = 0; i < option.cols[0].length - 2; i++) {
+ for (var i = 0; i < option.cols[0].length - 1; i++) {
var dataCols = dataCol[i].split('|');
//闅愯棌鍒�
if (dataCols[1] == 1) {
@@ -366,6 +407,7 @@
}
})
}
+ //#endregion
@@ -420,14 +462,44 @@
}
}
+ //鍥炲鍗曟嵁
+ function set_ReplyBill() {
+ var checkStatus = table.checkStatus('mainTable')
+ , data = checkStatus.data;
+ if (checkStatus.data.length === 1) {
+ var HInterID = data[0].HInterID.toString();
+ var HEntryID = data[0].HEntryID.toString();
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '鍥炲寮傚父鍙嶉鍗�'
+ , closeBtn: 1
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: 'Sc_Reply_MESExecptFeedBackBill.html?OperationType=3&linterid=' + HInterID + '&HEntryID=' + HEntryID + '&HSouceBillType='
+ , resize: false,
+ end: function () {
+ get_FastQuery(table, option);
+ }
+ , cancel: function () {
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ } else {
+ layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+ }
+ }
+
//鍒犻櫎
function set_DeleteBill() {
var checkStatus = table.checkStatus('mainTable')
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
- var InterID = data[0].hmainid.toString();
+ var InterID = data[0].HInterID.toString();
var HEntryID = data[0].HEntryID.toString();
- var HReadFlag = data[0].HReadFlag.toString();
+ var HReadFlag = data[0].闃呰鐘舵��.toString();
if (HReadFlag == "鏈槄") {
//閫昏緫鍒犻櫎鏂规硶
layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
@@ -473,44 +545,44 @@
}
function get_FastQuery() {
- var HStatus = $("select[name='HReadFlag']").val();//鐘舵��
+ var HStatus = $("#HReadFlag").val();//闃呰鐘舵��
var HBeginDate = $("#HBeginDate").val();//寮�濮嬫棩鏈�
var HEndDate = $("#HEndDate").val();//缁撴潫鏃ユ湡
var HSendMan = $("#HSendMan").val();//鍙戦�佷汉
- var HLevel = $("select[name='HLevel']").val();//绱ф�ョ▼搴�
+ var HLevel = $("#HLevel").val();//绱ф�ョ▼搴�
if (HStatus) {
switch (HStatus) {
case '-1': //鍏ㄩ儴
sWhere += "";
break;
case '0': //鏈槄
- sWhere += " and B.HReadFlag='0'";
+ sWhere += " and 闃呰鐘舵�� = '鏈槄'";
break;
case '1': //宸查槄
- sWhere += " and B.HReadFlag='1'";
+ sWhere += " and 闃呰鐘舵�� = '宸查槄'";
break;
default:
}
}
if (HBeginDate) {
- sWhere += " and CONVERT(varchar(100),A.HDate, 23) >= '" + HBeginDate + "'";
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HBeginDate + "'";
}
if (HEndDate) {
- sWhere += " and CONVERT(varchar(100),A.HDate, 23) <= '" + HEndDate + "'";
+ sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HEndDate + "'";
}
if (HSendMan) {
- sWhere += " and A.HSendMan like '%" + HSendMan + "%'";
+ sWhere += " and 鍙戦�佷汉 like '%" + HSendMan + "%'";
}
if (HLevel) {
switch (HLevel) {
- case '-1': //鍏ㄩ儴
+ case '鍏ㄩ儴': //鍏ㄩ儴
sWhere += "";
break;
- case '0': //鏅��
- sWhere += " and A.HLevel='0'";
+ case '鏅��': //鏅��
+ sWhere += " and 绱ф�ョ▼搴� ='鏅��'";
break;
- case '1': //绱ф��
- sWhere += " and A.HLevel='1'";
+ case '绱ф��': //绱ф��
+ sWhere += " and 绱ф�ョ▼搴� ='绱ф��'";
break;
default:
}
@@ -522,11 +594,11 @@
//閲嶇疆杩囨护鏉′欢
function set_ClearQuery() {
- $('#HReadFlag').find("option[value='-1']").attr("selected", true);
+ $('#HReadFlag').val("-1");
$("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
$("#HSendMan").val("");
- $('#HLevel').find("option[value='-1']").attr("selected", true);
+ $('#HLevel').val("鏅��");
sWhere = "";
get_Display(sWhere);
}
@@ -538,8 +610,8 @@
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
var HBillStatus = data[0].HBillStatus.toString(); //鍗曟嵁鐘舵��
- var InterID = data[0].hmainid.toString();
- if (HBillStatus > 0) {
+ var InterID = data[0].HInterID.toString();
+ if (HBillStatus > 1) {
layer.msg('鍗曟嵁涓嶄负鏈鏍哥姸鎬�,涓嶈兘鍐嶆瀹℃牳锛�');
return false;
}
@@ -579,8 +651,8 @@
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
var HBillStatus = data[0].HBillStatus.toString(); //鍗曟嵁鐘舵��
- var InterID = data[0].hmainid.toString();
- if (HBillStatus=0) {
+ var InterID = data[0].HInterID.toString();
+ if (HBillStatus==1) {
layer.msg('鍗曟嵁鏈鏍哥姸鎬�,鏃犻渶鍙嶅鏍革紒');
return false;
}
--
Gitblit v1.9.1