From ffa30b800a0045a9e0ae4f2afdbae0def88d4d42 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 15 十二月 2022 09:53:11 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI --- WebTM/views/基础资料/基础资料/Gy_MatePriceSup.html | 551 +++++++++++++++++++ WebTM/views/基础资料/基础资料/Gy_SettleStyleEdit.html | 233 ++++++++ WebTM/views/基础资料/基础资料/Gy_SettleStyle.html | 551 +++++++++++++++++++ WebTM/views/index.html | 2 WebTM/views/基础资料/基础资料/Gy_MatePriceSupEdit.html | 385 +++++++++++++ WebTM/WebTM.csproj | 4 6 files changed, 1,726 insertions(+), 0 deletions(-) diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj index 2a791c7..02c47ef 100644 --- a/WebTM/WebTM.csproj +++ b/WebTM/WebTM.csproj @@ -193,11 +193,15 @@ <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_PackType.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_CustLocationEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_CustLocationList.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MatePriceSup.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MatePriceSupEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_PaymentConditionEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_COMMONCONTACTEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_COMMONCONTACTList.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RateTypeEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RateTypeList.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SettleStyle.html" /> + <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_SettleStyleEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_TaxRateEdit.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_TaxRateList.html" /> <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_RecConditionList.html" /> diff --git a/WebTM/views/index.html b/WebTM/views/index.html index aee866b..173e829 100644 --- a/WebTM/views/index.html +++ b/WebTM/views/index.html @@ -924,6 +924,8 @@ <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_TaxRateList.html">绋庣巼鍒楄〃</a></dd> <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_RateTypeList.html">姹囩巼鍒楄〃</a></dd> <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_CustLocationList.html">浜よ揣鍦扮偣鍒楄〃</a></dd> + <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_SettleStyle.html">缁撶畻鏂瑰紡鍒楄〃</a></dd> + <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_MatePriceSup.html">閲囪喘浠锋牸鍒楄〃</a></dd> </dl> </dd> <dd> diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceSup.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceSup.html" new file mode 100644 index 0000000..fb5188f --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceSup.html" @@ -0,0 +1,551 @@ +锘�<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <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"> + <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> + <script src="../../../layuiadmin/layui/layui.js"></script> +</head> +<body> + <div class="layui-fluid"> + <div class="layui-col-md12"> + <div class="layui-card" style="padding: 1px"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="component-form-group"> + <div class="layui-collapse"> + <div class="layui-colla-item"> + <div class="layui-colla-title layui-inline"> + <div class="layui-inline"> + <span>鏇村</span> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">缂栫爜</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HNumber" id="HNumber"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">鍚嶇О</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HName" id="HName"> + </div> + </div> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> + </button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button> + <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;"> + <div class="layui-row" style="margin-top:10px;"> + <div class="layui-row" style="margin-top:5px"> + <div class="layui-inline"> + <label class="layui-form-label">杩囨护</label> + <div class="layui-input-block"> + <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> + </select> + </div> + </div> + <div class="layui-inline"> + <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> + <option value="0" selected="selected"></option> + <option value="=">=</option> + <option value=">=">>=</option> + <option value=">">></option> + <option value="<="><=</option> + <option value="<"><</option> + <option value="<>"><></option> + <option value="7">鍖呭惈</option> + <option value="8">宸﹀寘鍚�</option> + <option value="9">鍙冲寘鍚�</option> + <option value="10">涓嶅寘鍚�</option> + </select> + </div> + <div class="layui-inline"> + <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> + </div> + </div> + </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-Add" id="btn-Add"><i class="layui-iconlayuiiconfileb"></i>鏂板</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layuiiconlayuiiconform"></i>缂栬緫</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layuiiconlayuiicon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-iconlayuiiconrefresh-3"></i>鍒锋柊</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layuiiconform"></i>鍒楄缃�</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button> + </div> + </script> + </form> + </div> + </div> + </div> + </div> + <script src="../../../layuiadmin/layui/layui.js"></script> + <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> + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index', //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + var sWhere = ""; + + var option = []; + var Organization = sessionStorage["Organization"]; + var HModName = "Gy_MatePriceSup"; + //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + var titleData = ["HItemID", "HUSEORGID", "HCREATEORGID", "鐖剁骇ID","HMaterID","HUnitID","HRelationID"]; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //#region 澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(mainTable)', function (obj) { + switch (obj.event) { + //鏂板鎸夐挳 + case 'btn-Add': + set_AddNew(); + break; + case 'btn-Edit': + set_ShowBill(); + break; + case 'btn-Delete': + set_DeleteBill(); + break; + //鍒锋柊 + case 'get_Refresh': get_Refresh(); + break; + //閫�鍑烘寜閽� + case 'btn-Close': + parent.layui.admin.events.closeThisTabs(); + break; + //鍒楄缃� + case 'set_HideColumn': + get_HideColumn(); + break; + }; + }); + //#endregion + + //#region 閲嶇疆鎸夐挳 + form.on('submit(btnReSearch)', function (data) { + set_ClearQuery(); + }); + //#endregion + + //#region 鏌ヨ鎸夐挳 + form.on('submit(btnSearch)', function (data) { + get_FastQuery(); + }); + //#endregion + + //#endregion + + //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉� + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + //鏌ヨ + get_Display(sWhere); + } + //#endregion + + //#region 鍒濆鍖栬〃鏍兼柟娉� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 500 + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + }; + } + //#endregion + + //#region 閲嶇疆杩囨护鏉′欢鏂规硶 + function set_ClearQuery() { + $("#HNumber").val(""); + $("#HName").val(""); + $("#ColContent").val(""); + $("#ColName").val("0"); + $("#Comparator").val("0"); + form.render('select'); + sWhere = ""; + } + //#endregion + + //#region 鏌ヨ + function get_Display(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Gy_MatePriceSup/MatePriceSupList', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": Organization}, + success: function (data1) { + if (data1.count == 1) { + 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 ($.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: 200 }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); + } + } + } + + //鍔ㄦ�佹樉绀哄垪鍚� + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , cols: [col] + , data: data1.data + , height: 'full-80' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + } + table.render(option); + + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { + ColFilter(); + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + + //#region 蹇�熻繃婊� + function get_FastQuery() { + var HNumber = $("#HNumber").val(); + var HName = $("#HName").val(); + var ColName = $("#ColName").val();//澶嶉�夋 + var Comparator = $("#Comparator").val() + var ColContent = $("#ColContent").val(); + if (ColName != 0 && Comparator != 0) { + var com = ""; + switch (Comparator) { + case "7": + com = "like'%" + ColContent + "%'"; + break; + case "8": + com = "like'%" + ColContent + "'"; + break; + case "9": + com = "like'" + ColContent + "%'"; + break; + case "10": + com = "not like'%" + ColContent + "%'"; + break; + default: + com = "" + Comparator + "'" + ColContent + "'"; + break; + } + sWhere += " and " + ColName + " " + com; + } + if (HNumber) { + sWhere += " and 浠g爜 like '%" + HNumber + "%'"; + } + if (HName) { + sWhere += " and 鍚嶇О like '%" + HName + "%'"; + } + get_Display(sWhere); + sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 + } + //#endregion + + //#region 鍒犻櫎 + function set_DeleteBill() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var ItemID = data[0].HItemID.toString(); + layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) { + var wait = layer.load(); + //#region 閫昏緫鍒犻櫎鏂规硶 + $.ajax({ + url: GetWEBURL() + 'Gy_MatePriceSup/Delete', + type: "GET", + data: { "HItemID": ItemID, "user": sessionStorage["HUserName"]}, + success: function (result) { + //淇敼涓哄姛鍚庡埛鏂扮晫闈� + get_FastQuery(); + if (result.count == 1) { + layer.msg(result.Message, { icon: 1 }, function () { + //鍏抽棴褰撳墠frame + layer.close(wait); + }); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒'); + } + } + //#endregion + //#endregion + + //#region 鏂板 + function set_AddNew() { + layer.open({ + type: 2, + skin: 'layui-layer-rim', //鍔犱笂杈规 + title: '鏂板閲囪喘浠锋牸', + closeBtn: 1, + shift: 2, + area: ['100%', '100%'], + maxmin: true, + content: '../鍩虹璧勬枡/Gy_MatePriceSupEdit.html', + end: function () { + //鍒锋柊椤甸潰, + get_FastQuery(table, option); + }, + success: function (layero, index) { + + } + }); + } + //#endregion + + //#region 缂栬緫鍗曟嵁 + function set_ShowBill() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var hID = data[0].HItemID.toString(); + //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉 + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缂栬緫閲囪喘浠锋牸' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: '../鍩虹璧勬枡/Gy_MatePriceSupEdit.html?hID=' + hID + , resize: false + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + , end: function () { + //鍒锋柊椤甸潰, + get_FastQuery(table, option); + } + }) + + } else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒'); + } + } + //#endregion + + //#region 鍒锋柊 + function get_Refresh() { + set_ClearQuery(); + get_Display(sWhere); + } + //#endregion + + //#region 闅愯棌鍒楄缃� + function get_HideColumn() { + var colName = ""; + var contentUrl = ""; + for (var i = 1; i < option.cols[0].length - 1; 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" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: [contentUrl, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + //#endregion + + //#region 鏄剧ず鍒楁暟鎹� + function DisPlay_HideColumn() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + success: function (data1) { + if (data1.data.length != 0) { + var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + /* var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/ + + dataCol = data1.data[0].HGridString.split(','); + + for (var i = 0; i < option.cols[0].length - 2; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option.cols[0][i + 1]["style"] = "font-size:100%"; + } + //璁剧疆鍒楀 + //if (data1.data[0].HColumnWidth != 0) { + // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + //} else { + // option.cols[0][i + 1]["width"] = ""; + //} + //鏄剧ず鍒� + if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + option.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option.cols[0].length - 1; i++) { + if (option.cols[0][i]["fixed"] != null) { + option.cols[0][i]["fixed"] = null; + } + else { + break; + } + } + //鍐荤粨鍒� + if (data1.data[0].HFixCols != 0) { + for (var i = 0; i < data1.data[0].HFixCols; i++) { + if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option); + } else { + table.render(option); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + //#endregion + + //#region 鍒楁槑鏄剧ず涓嬫媺妗� + function ColFilter() { + var Organization = '<option value="0" selected="selected" ></option>'; + for (var i = 1; i < option.cols[0].length; i++) { + if (option.cols[0][i].hide != true) { + Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; + } + } + $("#ColName").empty(); + $("#ColName").append(Organization); + form.render('select'); + } + //#endregion + }); + //#endregion + </script> + +</body> +</html> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceSupEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceSupEdit.html" new file mode 100644 index 0000000..ff6a866 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceSupEdit.html" @@ -0,0 +1,385 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <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"> + <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> + <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> + <script src="../../../layuiadmin/layui/layui.js"></script> + <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/PubCustom.js"></script> + <style type="text/css"> + .layui-form-label { + width: 85px; + } + + .layui-form-item .layui-input-inline { + width: 50%; + } + + .layui-inline { + width: 290px; + } + + .layui-form-item .layui-inline { + margin-right: 0px; + } + </style> +</head> +<body> + <div id="layout1" class="layui-fluid"> + <div class="layui-row layui-col-space15"> + <div class="layui-col-md12"> + <div class="layui-card"> + <form id="form0" class="layui-form" lay-filter="component-form-group" action=""> + <div class="layui-card-header"> + <div class="layui-btn-group"> + <button type="button" id="Saver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button> + <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button> + </div> + </div> + <div class="layui-card-body"> + <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> + <ul class="layui-tab-title"> + <li class="layui-this">鍩烘湰淇℃伅</li> + </ul> + <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" style="padding-top: 10px;"> + <div class="layui-row"> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">浠g爜</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="text" class="layui-input" name="HNumber" id="HNumber" readonly> + <input id="HItemID" name="HItemID" value="0" type="hidden" /> + <input id="HMakeEmp" name="HMakeEmp" value="" type="hidden" /> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">鍗曚环</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="text" class="layui-input" name="HPrice" id="HPrice" value="0"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">澶囨敞</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="text" class="layui-input" name="HRemark" id="HRemark"> + </div> + </div> + </div> + <div class="layui-row"> + <div class="layui-inline"> + <label class="layui-form-label">鐗╂枡浠g爜</label> + <div class="layui-input-block"> + <input type="text" readonly name="HMaterNumber" id="HMaterNumber" class="layui-input" value="" style="float: left; width: 135px;"> + <input type="hidden" name="HMaterID" id="HMaterID" class="layui-input" value="0" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HMaterList" id="HMaterList" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + </button> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">鐗╂枡鍚嶇О</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="text" class="layui-input" name="HMaterName" id="HMaterName" autocomplete="off"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">瑙勬牸鍨嬪彿</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="text" class="layui-input" name="HModel" id="HModel" autocomplete="off"> + </div> + </div> + </div> + <div class="layui-row"> + <div class="layui-inline"> + <label class="layui-form-label">鍗曚綅</label> + <div class="layui-input-block"> + <input type="text" readonly name="HUnitName" id="HUnitName" class="layui-input" value="" style="float: left; width: 135px;"> + <input type="hidden" name="HUnitID" id="HUnitID" class="layui-input" value="0" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HUnitList" id="HUnitList" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + </button> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">甯佸埆</label> + <div class="layui-input-block"> + <input type="text" readonly name="HCurName" id="HCurName" class="layui-input" value="" style="float: left; width: 135px;"> + <input type="hidden" name="HCurID" id="HCurID" class="layui-input" value="0" style="float:left;width:150px;"> + <button type="button" lay-submit="" class="layui-btn" lay-filter="HCurList" id="HCurList" style="width:40px;"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i> + </button> + </div> + </div> + </div> + <div class="layui-row" hidden> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">寮�濮嬫棩鏈�</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="date" class="layui-input" name="HBeginDate" id="HBeginDate"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">缁撴潫鏃ユ湡</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="date" class="layui-input" name="HEndDate" id="HEndDate"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">鍒涘缓鏃ユ湡</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="date" class="layui-input" name="HMakeDate" id="HMakeDate"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </form> + </div> + </div> + </div> + </div> +</body> +</html> + +<script> + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index', //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + var params = getUrlVars(); + //var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫 + var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜 + + //鍒ゆ柇鏄惁鏂板 + if (linterid == null || linterid == 0) { + + } + else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new + //绂佺敤缁勭粐閫夐」 + RoadBillMain(linterid); + } + + $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd")); + $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd")); + $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); + + set_ClearBill(); + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //淇濆瓨鎻愪氦 + form.on('submit(Saver)', function (data) {//鎻愪氦 + set_AddNew(data); + }); + + //閫�鍑� + form.on('submit(Exit)', function (data) { + Pub_Close(1); + }); + + //閫夋嫨鍗曚綅 + form.on('submit(HUnitList)', function () { + layer.open({ + type: 2 + , area: ['90%', '90%']//澶у皬 + , title: '鍗曚綅鍒楄〃' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_UnitList.html', 'yes'] + , resize: false + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + , 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('璇烽�夋嫨鏁版嵁'); + } + $("#HUnitName").val(checkStatus.data[0].HName); + $("#HUnitID").val(checkStatus.data[0].HItemID); + layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { } + }) + }); + + //閫夋嫨鐗╂枡 + form.on('submit(HMaterList)', function () { + layer.open({ + type: 2 + , area: ['90%', '90%']//澶у皬 + , title: '鐗╂枡鍒楄〃' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_MaterialList.html', 'yes'] + , resize: false + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + , 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('璇烽�夋嫨鏁版嵁'); + } + $("#HMaterName").val(checkStatus.data[0].HName); + $("#HMaterNumber").val(checkStatus.data[0].HNumber); + $("#HModel").val(checkStatus.data[0].HModel); + $("#HMaterID").val(checkStatus.data[0].HItemID); + layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { } + }) + }); + + //閫夋嫨甯佸埆 + form.on('submit(HCurList)', function () { + layer.open({ + type: 2 + , area: ['90%', '90%']//澶у皬 + , title: '甯佸埆鍒楄〃' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: ['../../../views/鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_Currency.html', 'yes'] + , resize: false + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + , 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('璇烽�夋嫨鏁版嵁'); + } + $("#HCurName").val(checkStatus.data[0].璐у竵鍚嶇О); + $("#HCurID").val(checkStatus.data[0].HItemID); + layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� + } + , btn2: function (index, layero) { } + }) + }); + + //#endregion + + //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉� + + // 鍒濆鍖栫晫闈� + function set_ClearBill() { + $("#HMakeEmp").val(sessionStorage["HUserName"]); + } + + + //淇濆瓨HMaker + function set_AddNew(data) { + var sMainStr = JSON.stringify(data.field); + var sMainSub = sMainStr + ";" + sessionStorage["HUserName"]; + + var index = layer.load(); + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_MatePriceSup/MatePriceSupEdit", + async: true, + data: { "msg": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + $('#Saver').addClass("layui-btn-disabled").attr("disabled", true); + layer.close(index); + layer.msg("鎻愪氦鎴愬姛"); + } + else { + layer.close(index); + layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + } + }, + error: function (err) { + layer.close(index); + layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + } + }); + } + + //缂栬緫 椤甸潰璧嬪�� + function RoadBillMain(linterid)//鍔犺浇琛ㄥご + { + var sWhere = " and HItemID='" + linterid + "'"; + $.ajax({ + url: GetWEBURL() + "/Gy_MatePriceSup/MatePriceSupList", + type: "GET", + async: false, + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"]}, + success: function (d) { + //涓昏〃 + form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫�� + "HItemID": d.data[0].HItemID + , "HNumber": d.data[0].閲囪喘浠锋牸璧勬枡浠g爜 + , "HPrice": d.data[0].鍗曚环 + , "HMaterID": d.data[0].HMaterID + , "HMaterNumber": d.data[0].鐗╂枡浠g爜 + , "HMaterName": d.data[0].鐗╂枡鍚嶇О + , "HModel": d.data[0].瑙勬牸鍨嬪彿 + , "HUnitID": d.data[0].HUnitID + , "HUnitName": d.data[0].璁¢噺鍗曚綅 + , "HCurID": d.data[0].HCurID + , "HCurName": d.data[0].甯佸埆 + , "HRemark": d.data[0].澶囨敞 + }); + form.render('checkbox'); + form.render('select'); + } + }) + } + + //鑾峰彇鍙傛暟 + function getUrlVars() { + var vars = [], hash; + var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); + for (var i = 0; i < hashes.length; i++) { + hash = hashes[i].split('='); + vars.push(hash[0]); + vars[hash[0]] = hash[1]; + } + return vars; + } + + //#endregion + + }); +</script> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SettleStyle.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SettleStyle.html" new file mode 100644 index 0000000..48d922a --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SettleStyle.html" @@ -0,0 +1,551 @@ +锘�<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <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"> + <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> + <script src="../../../layuiadmin/layui/layui.js"></script> +</head> +<body> + <div class="layui-fluid"> + <div class="layui-col-md12"> + <div class="layui-card" style="padding: 1px"> + <div class="layui-card-body" style="padding: 1px;"> + <form class="layui-form" action="" lay-filter="component-form-group"> + <div class="layui-collapse"> + <div class="layui-colla-item"> + <div class="layui-colla-title layui-inline"> + <div class="layui-inline"> + <span>鏇村</span> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">浠g爜</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HNumber" id="HNumber"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label">鍚嶇О</label> + <div class="layui-input-block"> + <input type="text" class="layui-input" name="HName" id="HName"> + </div> + </div> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch"> + <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> + </button> + <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button> + <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;"> + <div class="layui-row" style="margin-top:10px;"> + <div class="layui-row" style="margin-top:5px"> + <div class="layui-inline"> + <label class="layui-form-label">杩囨护</label> + <div class="layui-input-block"> + <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> + </select> + </div> + </div> + <div class="layui-inline"> + <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> + <option value="0" selected="selected"></option> + <option value="=">=</option> + <option value=">=">>=</option> + <option value=">">></option> + <option value="<="><=</option> + <option value="<"><</option> + <option value="<>"><></option> + <option value="7">鍖呭惈</option> + <option value="8">宸﹀寘鍚�</option> + <option value="9">鍙冲寘鍚�</option> + <option value="10">涓嶅寘鍚�</option> + </select> + </div> + <div class="layui-inline"> + <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> + </div> + </div> + </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-Add" id="btn-Add"><i class="layui-iconlayuiiconfileb"></i>鏂板</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit" id="btn-Edit"><i class="layuiiconlayuiiconform"></i>缂栬緫</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn-Delete"><i class="layuiiconlayuiicon-delete"></i>鍒犻櫎</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-iconlayuiiconrefresh-3"></i>鍒锋柊</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layuiiconform"></i>鍒楄缃�</button> + <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button> + </div> + </script> + </form> + </div> + </div> + </div> + </div> + <script src="../../../layuiadmin/layui/layui.js"></script> + <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> + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index', //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + var sWhere = ""; + + var option = []; + var Organization = sessionStorage["Organization"]; + var HModName = "Gy_SettleStyle"; + //涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞� + var titleData = ["HItemID", "HUSEORGID", "HCREATEORGID", "鐖剁骇ID"]; + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + //鍒濆鍖栫晫闈� + set_ClearBill(); + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //#region 澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(mainTable)', function (obj) { + switch (obj.event) { + //鏂板鎸夐挳 + case 'btn-Add': + set_AddNew(); + break; + case 'btn-Edit': + set_ShowBill(); + break; + case 'btn-Delete': + set_DeleteBill(); + break; + //鍒锋柊 + case 'get_Refresh': get_Refresh(); + break; + //閫�鍑烘寜閽� + case 'btn-Close': + parent.layui.admin.events.closeThisTabs(); + break; + //鍒楄缃� + case 'set_HideColumn': + get_HideColumn(); + break; + }; + }); + //#endregion + + //#region 閲嶇疆鎸夐挳 + form.on('submit(btnReSearch)', function (data) { + set_ClearQuery(); + }); + //#endregion + + //#region 鏌ヨ鎸夐挳 + form.on('submit(btnSearch)', function (data) { + get_FastQuery(); + }); + //#endregion + + //#endregion + + //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉� + + //#region 鍒濆鍖栫晫闈� + function set_ClearBill() { + //鍒濆鍖栬〃鏍� + set_InitGrid(); + //鏌ヨ + get_Display(sWhere); + } + //#endregion + + //#region 鍒濆鍖栬〃鏍兼柟娉� + function set_InitGrid() { + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , height: 500 + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + }; + } + //#endregion + + //#region 閲嶇疆杩囨护鏉′欢鏂规硶 + function set_ClearQuery() { + $("#HNumber").val(""); + $("#HName").val(""); + $("#ColContent").val(""); + $("#ColName").val("0"); + $("#Comparator").val("0"); + form.render('select'); + sWhere = ""; + } + //#endregion + + //#region 鏌ヨ + function get_Display(sWhere) { + var wait = layer.load();//閬僵 + var ajaxLoad = layer.load(); + $.ajax({ + url: GetWEBURL() + '/Gy_SettleStyle/SettleStyleList', + type: "GET", + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": Organization}, + success: function (data1) { + if (data1.count == 1) { + 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 ($.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: 200 }); + break; + default: + col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 }); + } + } + } + + //鍔ㄦ�佹樉绀哄垪鍚� + option = { + elem: '#mainTable' + , toolbar: '#toolbarDemo' + , cols: [col] + , data: data1.data + , height: 'full-80' + , page: true + , cellMinWidth: 90 + , limit: 50 + , limits: [50, 500, 5000, 20000] + } + table.render(option); + + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + + layer.close(ajaxLoad); + if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") { + ColFilter(); + } + //layer.alert("鏌ヨ鎴愬姛", { icon: 1 }); + } else { + layer.close(ajaxLoad); + layer.alert(data1.code + data1.Message, { icon: 5 }); + } + }, error: function () { + layer.close(ajaxLoad); + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }); + } + //#endregion + + //#region 蹇�熻繃婊� + function get_FastQuery() { + var HNumber = $("#HNumber").val(); + var HName = $("#HName").val(); + var ColName = $("#ColName").val();//澶嶉�夋 + var Comparator = $("#Comparator").val() + var ColContent = $("#ColContent").val(); + if (ColName != 0 && Comparator != 0) { + var com = ""; + switch (Comparator) { + case "7": + com = "like'%" + ColContent + "%'"; + break; + case "8": + com = "like'%" + ColContent + "'"; + break; + case "9": + com = "like'" + ColContent + "%'"; + break; + case "10": + com = "not like'%" + ColContent + "%'"; + break; + default: + com = "" + Comparator + "'" + ColContent + "'"; + break; + } + sWhere += " and " + ColName + " " + com; + } + if (HNumber) { + sWhere += " and 浠g爜 like '%" + HNumber + "%'"; + } + if (HName) { + sWhere += " and 鍚嶇О like '%" + HName + "%'"; + } + get_Display(sWhere); + sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨 + } + //#endregion + + //#region 鍒犻櫎 + function set_DeleteBill() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var ItemID = data[0].HItemID.toString(); + layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) { + var wait = layer.load(); + //#region 閫昏緫鍒犻櫎鏂规硶 + $.ajax({ + url: GetWEBURL() + 'Gy_SettleStyle/Delete', + type: "GET", + data: { "HItemID": ItemID, "user": sessionStorage["HUserName"]}, + success: function (result) { + //淇敼涓哄姛鍚庡埛鏂扮晫闈� + get_FastQuery(); + if (result.count == 1) { + layer.msg(result.Message, { icon: 1 }, function () { + //鍏抽棴褰撳墠frame + layer.close(wait); + }); + } else { + layer.alert(result.code + result.Message, { icon: 5 }); + layer.close(wait); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + layer.close(wait); + } + }); + }) + } + else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒'); + } + } + //#endregion + //#endregion + + //#region 鏂板 + function set_AddNew() { + layer.open({ + type: 2, + skin: 'layui-layer-rim', //鍔犱笂杈规 + title: '鏂板缁撶畻鏂瑰紡', + closeBtn: 1, + shift: 2, + area: ['100%', '100%'], + maxmin: true, + content: '../鍩虹璧勬枡/Gy_SettleStyleEdit.html', + end: function () { + //鍒锋柊椤甸潰, + get_FastQuery(table, option); + }, + success: function (layero, index) { + + } + }); + } + //#endregion + + //#region 缂栬緫鍗曟嵁 + function set_ShowBill() { + var checkStatus = table.checkStatus('mainTable') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + var hID = data[0].HItemID.toString(); + //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉 + layer.open({ + type: 2 + , area: ['100%', '100%'] + , title: '缂栬緫缁撶畻鏂瑰紡' + , shade: 0.6 //閬僵閫忔槑搴� + , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲 + , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚� + , content: '../鍩虹璧勬枡/Gy_SettleStyleEdit.html?hID=' + hID + , resize: false + , cancel: function () { + //$(".layui-btn").removeClass("layui-btn-disabled"); + } + , end: function () { + //鍒锋柊椤甸潰, + get_FastQuery(table, option); + } + }) + + } else { + layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒'); + } + } + //#endregion + + //#region 鍒锋柊 + function get_Refresh() { + set_ClearQuery(); + get_Display(sWhere); + } + //#endregion + + //#region 闅愯棌鍒楄缃� + function get_HideColumn() { + var colName = ""; + var contentUrl = ""; + for (var i = 1; i < option.cols[0].length - 1; 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" //鍔犱笂杈规 + , title: "闅愯棌鍒楄缃�" //鏍囬 + , closeBtn: 1 //绐椾綋鍙充笂瑙掑叧闂� 鐨� 鏍峰紡 + , shift: 2 //寮瑰嚭鍔ㄧ敾 + , area: ["50%", "90%"] //绐椾綋澶у皬 + , maxmin: true //璁剧疆鏈�澶ф渶灏忔寜閽槸鍚︽樉绀� + , content: [contentUrl, "yes"] + , btn: ["纭畾", "鍙栨秷"] + , btn1: function (index, laero) { + //鍒锋柊琛ㄦ牸鏁版嵁 + DisPlay_HideColumn(); + //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹� + layer.close(index);//鍏抽棴寮圭獥 + } + }) + } + //#endregion + + //#region 鏄剧ず鍒楁暟鎹� + function DisPlay_HideColumn() { + $.ajax({ + url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList', + type: "GET", + data: { "HModName": HModName, "user": sessionStorage["HUserName"] }, + success: function (data1) { + if (data1.data.length != 0) { + var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁 + /* var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/ + + dataCol = data1.data[0].HGridString.split(','); + + for (var i = 0; i < option.cols[0].length - 2; i++) { + if (dataCol[i]) { + var dataCols = dataCol[i].split('|'); + } + //闅愯棌鍒� + if (dataCols[1] == 1) { + option.cols[0][i + 1]["hide"] = true; + } + //璁剧疆鍒楀 + if (dataCols[3] > 0) { + option.cols[0][i + 1]["width"] = dataCols[3]; + } + //璁剧疆鍐呭瀛椾綋澶у皬 + if (data1.data[0].HFontSize != 0) { + option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;"; + } else { + option.cols[0][i + 1]["style"] = "font-size:100%"; + } + //璁剧疆鍒楀 + //if (data1.data[0].HColumnWidth != 0) { + // option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;"; + //} else { + // option.cols[0][i + 1]["width"] = ""; + //} + //鏄剧ず鍒� + if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) { + option.cols[0][i + 1]["hide"] = false; + } + //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�) + switch (dataCols[2]) { + case "L": + option.cols[0][i + 1]["align"] = "left"; + break; + case "M": + option.cols[0][i + 1]["align"] = "center"; + break; + case "R": + option.cols[0][i + 1]["align"] = "right"; + break; + } + } + + //鍙栨秷鍐荤粨鍒� + for (var i = 1; i < option.cols[0].length - 1; i++) { + if (option.cols[0][i]["fixed"] != null) { + option.cols[0][i]["fixed"] = null; + } + else { + break; + } + } + //鍐荤粨鍒� + if (data1.data[0].HFixCols != 0) { + for (var i = 0; i < data1.data[0].HFixCols; i++) { + if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) { + data1.data[0].HFixCols += 1; + } + option.cols[0][i + 1]["fixed"] = "left"; + } + } + table.render(option); + } else { + table.render(option); + } + }, error: function () { + layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 }); + } + }) + } + //#endregion + + //#region 鍒楁槑鏄剧ず涓嬫媺妗� + function ColFilter() { + var Organization = '<option value="0" selected="selected" ></option>'; + for (var i = 1; i < option.cols[0].length; i++) { + if (option.cols[0][i].hide != true) { + Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>'; + } + } + $("#ColName").empty(); + $("#ColName").append(Organization); + form.render('select'); + } + //#endregion + }); + //#endregion + </script> + +</body> +</html> \ No newline at end of file diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SettleStyleEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SettleStyleEdit.html" new file mode 100644 index 0000000..53f6559 --- /dev/null +++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_SettleStyleEdit.html" @@ -0,0 +1,233 @@ +锘�<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8" /> + <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"> + <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all"> + <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script> + <script src="../../../layuiadmin/layui/layui.js"></script> + <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/PubCustom.js"></script> + <style type="text/css"> + .layui-form-label { + width: 85px; + } + + .layui-form-item .layui-input-inline { + width: 50%; + } + + .layui-inline { + width: 290px; + } + + .layui-form-item .layui-inline { + margin-right: 0px; + } + </style> +</head> +<body> + <div id="layout1" class="layui-fluid"> + <div class="layui-row layui-col-space15"> + <div class="layui-col-md12"> + <div class="layui-card"> + <form id="form0" class="layui-form" lay-filter="component-form-group" action=""> + <div class="layui-card-header"> + <div class="layui-btn-group"> + <button type="button" id="Saver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button> + <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button> + </div> + </div> + <div class="layui-card-body"> + <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> + <ul class="layui-tab-title"> + <li class="layui-this">鍩烘湰淇℃伅</li> + </ul> + <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" style="padding-top: 10px;"> + <div class="layui-row"> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">浠g爜</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="text" class="layui-input" name="HNumber" id="HNumber"> + <input id="HItemID" name="HItemID" value="0" type="hidden" /> + <input id="HMakeEmp" name="HMakeEmp" value="" type="hidden" /> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label" style="width: 85px;">鍚嶇О</label> + <div class="layui-input-block" style="margin-left: 120px;"> + <input type="text" class="layui-input" name="HName" id="HName"> + </div> + </div> + <div class="layui-inline"> + <label class="layui-form-label"> 澶囨敞锛�</label> + <div class="layui-input-inline "> + <input type="text" class="layui-input" name="HRemark" id="HRemark" placeholder="璇疯緭鍏ュ娉�"> + </div> + </div> + </div> + <div class="layui-row"> + <div class="layui-inline"> + <label class="layui-form-label">绂佺敤鏍囧織锛�</label> + <div class="layui-input-inline"> + <input type="checkbox" name="HStopflag" id="HStopflag" lay-skin="primary" lay-filter="checkbox" value="true" title="鏄惁绂佺敤"> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </form> + </div> + </div> + </div> + </div> +</body> +</html> + +<script> + layui.config({ + base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰� + }).extend({ + index: 'lib/index', //涓诲叆鍙fā鍧� + }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () { + //#region 鍏敤鍙橀噺 + var $ = layui.$ + , admin = layui.admin + , layer = layui.layer + , table = layui.table + , form = layui.form + , element = layui.element + , laypage = layui.laypage + , laydate = layui.laydate + + //#endregion + + //#region 杩涘叆椤甸潰鍗冲姞杞� + + var params = getUrlVars(); + //var OperationType = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫 + var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜 + + //鍒ゆ柇鏄惁鏂板 + if (linterid == null || linterid == 0) { + + } + else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new + //绂佺敤缁勭粐閫夐」 + RoadBillMain(linterid); + } + + set_ClearBill(); + + //#endregion + + //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛� + + //淇濆瓨鎻愪氦 + form.on('submit(Saver)', function (data) {//鎻愪氦 + set_AddNew(data); + }); + + //閫�鍑� + form.on('submit(Exit)', function (data) { + Pub_Close(1); + }); + + //#endregion + + //#region 鏈〉闈㈣璋冪敤鐨勬墍鏈夋柟娉� + + // 鍒濆鍖栫晫闈� + function set_ClearBill() { + $("#HMakeEmp").val(sessionStorage["HUserName"]); + } + + + //淇濆瓨HMaker + function set_AddNew(data) { + var sMainStr = JSON.stringify(data.field); + var sMainSub = sMainStr + ";" + sessionStorage["HUserName"]; + + var index = layer.load(); + $.ajax({ + type: "POST", + url: GetWEBURL() + "/Gy_SettleStyle/SettleStyleEdit", + async: true, + data: { "msg": sMainSub }, + dataType: "json", + success: function (data) { + if (data.count == 1) { + $('#Saver').addClass("layui-btn-disabled").attr("disabled", true); + layer.close(index); + layer.msg("鎻愪氦鎴愬姛"); + } + else { + layer.close(index); + layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + } + }, + error: function (err) { + layer.close(index); + layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + } + }); + } + + //缂栬緫 椤甸潰璧嬪�� + function RoadBillMain(linterid)//鍔犺浇琛ㄥご + { + var sWhere = " and HItemID='" + linterid + "'"; + $.ajax({ + url: GetWEBURL() + "/Gy_SettleStyle/SettleStyleList", + type: "GET", + async: false, + data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"]}, + success: function (d) { + var IsHStopflag = d.data[0].绂佺敤鏍囪; + if (IsHStopflag === "Y") { + $("input[name='HStopflag']").prop("checked", true); + } else { + d.data[0].绂佺敤鏍囪 = ""; + } + //涓昏〃 + form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫�� + "HItemID": d.data[0].HItemID + , "HNumber": d.data[0].缁撶畻鏂瑰紡浠g爜 + , "HName": d.data[0].缁撶畻鏂瑰紡鍚嶇О + , "HStopflag": d.data[0].绂佺敤鏍囪 + , "HRemark": d.data[0].澶囨敞 + }); + form.render('checkbox'); + form.render('select'); + } + }) + } + + //鑾峰彇鍙傛暟 + function getUrlVars() { + var vars = [], hash; + var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); + for (var i = 0; i < hashes.length; i++) { + hash = hashes[i].split('='); + vars.push(hash[0]); + vars[hash[0]] = hash[1]; + } + return vars; + } + + //#endregion + + }); +</script> \ No newline at end of file -- Gitblit v1.9.1