From cb2fc709d4e2aec6bbea3e6f4e8ccc24f3d27756 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期日, 06 十月 2024 17:27:08 +0800
Subject: [PATCH] 工艺路线工价
---
WebTM/views/销售管理/销售订单变更单/Xs_SeOrderChangeBillList.html | 602 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 579 insertions(+), 23 deletions(-)
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Xs_SeOrderChangeBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Xs_SeOrderChangeBillList.html"
index 82500c2..3c68969 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Xs_SeOrderChangeBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225\345\217\230\346\233\264\345\215\225/Xs_SeOrderChangeBillList.html"
@@ -19,7 +19,7 @@
<script src="../../../layuiadmin/Scripts/webConfig.js"></script>
<script src="../../../layuiadmin/PubCustom.js"></script>
<script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
-
+ <script src="../../../layuiadmin/PageTitle.js"></script>
</head>
<body>
<div class="layui-fluid">
@@ -37,36 +37,47 @@
<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="HBillNo" id="HBillNo">
+ <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <label class="layui-form-label">鏃ユ湡闂撮殧</label>
+ <div class="layui-input-block">
+ <select name="HInitTimeCycle" id="HInitTimeCycle" class="ForFilteringSchemes" lay-filter="HInitTimeCycle" style="width:190px;">
+ </select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">寮�濮嬫棩鏈�</label>
<div class="layui-input-block">
- <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">缁撴潫鏃ユ湡</label>
<div class="layui-input-block">
- <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
+ <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
</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-inline" style="margin-left:5px;">
+ <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
+ </div>
<div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
<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 name="ColName" id="ColName" class="ForFilteringSchemes" lay-filter="ColName" style="width:190px;">
</select>
</div>
</div>
<div class="layui-inline">
- <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
+ <select name="Comparator" id="Comparator" class="ForFilteringSchemes" lay-filter="Comparator" style="width:190px;">
<option value="0" selected="selected"></option>
<option value="=">=</option>
<option value=">=">>=</option>
@@ -81,7 +92,62 @@
</select>
</div>
<div class="layui-inline">
- <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
+ <input type="text" class="layui-input ForFilteringSchemes" value="" name="ColContent" id="ColContent">
+ </div>
+ </div>
+ <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName1" id="ColName1" class="ForFilteringSchemes" lay-filter="ColName1" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator1" id="Comparator1" class="ForFilteringSchemes" lay-filter="Comparator1" 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 ForFilteringSchemes" value="" name="ColContent1" id="ColContent1">
+ </div>
+ </div>
+
+ <div class="layui-row" style=" margin-top: 10px; margin-left: 70px;">
+ <div class="layui-inline">
+ <label class="layui-form-label">杩囨护</label>
+ <div class="layui-input-block">
+ <select name="ColName2" id="ColName2" class="ForFilteringSchemes" lay-filter="ColName2" style="width:190px;">
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <select name="Comparator2" id="Comparator2" class="ForFilteringSchemes" lay-filter="Comparator2" 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 ForFilteringSchemes" value="" name="ColContent2" id="ColContent2">
</div>
</div>
</div>
@@ -97,14 +163,17 @@
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="get_view"><i class="layui-icon layui-icon-form"></i>娴忚</button>-->
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></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-DeAudit"><i class="layui-icon layui-icon-circle"></i>鍙嶅鏍�</button>-->
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close"><i class="layui-icon layui-icon-radio"></i>鍏抽棴</button>-->
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose"><i class="layui-icon layui-icon-radio"></i>鍙嶅叧闂�</button>-->
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop"><i class="layui-icon layui-icon-radio"></i>浣滃簾</button>-->
<!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeDrop"><i class="layui-icon layui-icon-radio"></i>鍙嶄綔搴�</button>-->
<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-form"></i>鎵撳嵃</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>瀵煎嚭</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
<button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>鍒楄缃�</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>淇濆瓨鏂规</button>
+ <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
</div>
</script>
</form>
@@ -117,7 +186,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.$
, admin = layui.admin
@@ -127,12 +196,34 @@
, element = layui.element
, laypage = layui.laypage
, laydate = layui.laydate
+ , soulTable = layui.soulTable
var option = [];
var sWhere = "";
var HModName = "Xs_SeOrderChangeBillList";
//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
//var titleData = ["hmainid", "HMaterID", "HUnitID", "璁¢噺鍗曚綅浠g爜", "HCusID", "涓氬姟瀹㈡埛浠g爜", "HEmpID", "閿�鍞憳浠g爜", "HMainSourceInterID", "HMainSourceEntryID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType", "", "HDeptID", "閿�鍞儴闂ㄤ唬鐮�", "閿�鍞儴闂�", "HCurID", "甯佸埆浠g爜", "甯佸埆", "姹囩巼", "HSSID", "缁撶畻鏂瑰紡浠g爜", "缁撶畻鏂瑰紡", "HSellSID", "閿�鍞柟寮�", "HOrgID", "琛ㄤ綋澶囨敞"];
var titleData = ["hmainid", "HMaterID", "HUnitID", "HCusID", "HEmpID", "HMainSourceInterID", "HMainSourceEntryID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType", "HDeptID", "HCurID", "HSSID", "HSellSID", "HOrgID"];
+
+
+ var ins; //鐢ㄤ簬瀵煎嚭excel
+ //#region 銆愯繃婊ゆ柟妗堛��
+
+ //#region 銆愬姩鎬佽幏鍙栨ā鍧楀悕绉般��
+ var HModuleType = "1425";
+ //閫氳繃鍗曟嵁绫诲瀷锛屼粠鏁版嵁搴撳姩鎬佽幏鍙栧崟鎹ā鍧楀懡鍚�,寮曠敤js鏂囦欢 PageTitle.js
+ var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
+ //#endregion
+
+ //杩囨护鏉′欢鐨刢lass绫�
+ var HClassTag = "ForFilteringSchemes";
+ //妯″潡鍚嶇О锛堜腑鏂囩増锛� 姣忎釜妯″潡椤甸潰閮介渶瑕佷慨鏀�
+ window.HModuleName = "閿�鍞鍗曞彉鏇村崟缁存姢";
+ //鏄惁宸茬粡閫夋嫨浜嗚繃婊ゆ柟妗堬紙鍏ㄥ眬鍙橀噺锛�
+ window.HDefaultFilter = "";
+ //閫夋嫨鐨勮繃婊ゆ柟妗堝唴鐮侊紙鍏ㄥ眬鍙橀噺锛�
+ window.HInterID_Choose = 0;
+
+ //#endregion
//#endregion
//#region 杩涘叆椤甸潰鍗冲姞杞�
@@ -194,11 +285,21 @@
//鎵撳嵃
case 'btn-print': get_PrintReport();
break;
+ //瀵煎嚭excel
+ case 'get_export':
+ get_Export();
+ break;
//閫�鍑烘寜閽�
case 'get_Exit': Pub_Close(2);
break;
//鍒楄缃�
case 'set_HideColumn': get_HideColumn();
+ break;
+ //淇濆瓨鏂规
+ case 'set_SaveScheme': set_SaveScheme();
+ break;
+ //璇诲彇鏂规
+ case 'set_ReadScheme': set_ReadScheme();
break;
};
});
@@ -242,7 +343,7 @@
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '閿�鍞鍗曞彉鏇村崟-缂栬緫'
+ , title: '缂栬緫' + HPageTitle
, shift: 0//寮瑰嚭鍔ㄧ敾
, content: '../../閿�鍞鐞�/閿�鍞鍗曞彉鏇村崟/Xs_SeOrderChangeBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
, btn: ['纭畾'],
@@ -266,19 +367,54 @@
});
//#endregion
+ //鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+ form.on('select(HInitTimeCycle)', function (data) {
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery();
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+ });
+
//#endregion
//#region 鏈〉闈㈡墍鏈夎璋冪敤鐨勬柟娉�
//#region 鍒濆鍖栫晫闈�
function set_ClearBill() {
- $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
+ //鍒濆鍖栨棩鏈熼棿闅斻�佸紑濮嬫棩鏈熴�佺粨鏉熸棩鏈�
+ setSelect_HInitTimeCycle();
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+
+ //鏍规嵁鏃ユ湡闂撮殧璁剧疆寮�濮嬫椂闂翠笌缁撴潫鏃堕棿
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
$("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
//鍒濆鍖栬〃鏍�
set_InitGrid();
//鏌ヨ
get_FastQuery(1);
//Organ();
+
+ //鏌ヨ褰撳墠鐧诲綍鐢ㄦ埛鏈夋病鏈夊湪褰撳墠妯″潡璁剧疆榛樿杩囨护鏂规
+ get_DefaultModule();
}
//#endregion
@@ -292,17 +428,47 @@
, totalRow: true
//, cellMinWidth: 90
, limit: 50
- , limits: [50, 500, 5000, 50000]
+ , limits: [50, 500, 5000, 20000]
};
}
//#endregion
//#endregion
+ //#endregion 鐩戝惉缃戞牸琛ㄤ綋浜嬩欢
+ table.on('tool(mainTable)', function (obj) {
+ var data = obj.data;
+
+ //鍗曟嵁鍙疯秴閾炬帴
+ if (obj.event == '鍗曟嵁鍙�') { //妫�鏌� obj.event 鏄惁绛変簬瀛楃涓� '鍗曟嵁鍙�'銆傚鏋滅瓑浜庯紝鍒欐墽琛宨f寰幆
+ var linterid = data.hmainid.toString(); //澹版槑鍙橀噺linterid 涓� data.hmainid
+ //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+ layer.open({ //浣跨敤 layer鐨刼pen鎵撳紑寮瑰嚭 灞�
+ type: 2 //琛ㄧず寮瑰嚭灞傜殑鍐呭鏄竴涓� iframe
+ , area: ['100%', '100%']
+ , title: '缂栬緫' + HPageTitle //璁剧疆寮瑰嚭灞傜殑鍚嶅瓧鍜屽彉閲�
+ , closeBtn: 1//鏄剧ず鍏抽棴鎸夐挳
+ , shade: 0.6 //閬僵閫忔槑搴�
+ , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+ , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+ , content: '../../閿�鍞鐞�/閿�鍞鍗曞彉鏇村崟/Xs_SeOrderChangeBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=' //璁剧疆 iframe 鐨� URL锛孶RL 涓寘鍚簡鏌ヨ鍙傛暟锛屾潵璋冪敤鎵�闇�瑕佺殑鍊�
+
+ , resize: false, //鏄惁鍏佽鐢ㄦ埛璋冩暣寮瑰嚭澶у皬
+ end: function () { //褰撳叧闂椂璋冪敤
+ get_FastQuery(table, option);
+ }
+ , cancel: function () { //鐐瑰嚮鍙栨秷鏃朵娇鐢ㄥ洖璋�
+ //$(".layui-btn").removeClass("layui-btn-disabled");
+ }
+ })
+ }
+ });
+ //#endregion
//#region 鏌ヨ
function get_Display(sWhere) {
var ajaxLoad = layer.load();
$.ajax({
url: GetWEBURL() + '/Xs_SeOrderChangeBill/list',
+ async: false,
type: "GET",
data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
success: function (data1) {
@@ -323,7 +489,12 @@
}
else if ($.inArray(data[i].name, totalArray) > -1) {
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, totalRow: true, width: 120 });
- } else {
+ } else if (data[i].name == '鍗曟嵁鍙�') {
+ col.push({
+ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200, event: '鍗曟嵁鍙�', event: '鍗曟嵁鍙�', templet: function (d) {
+ return '<span style="color: blue;">' + d.鍗曟嵁鍙� + '</span>'
+ }, style: 'cursor: pointer;' });
+ }else {
switch (data[i].Type) {
//int
case 'DateTime':
@@ -334,10 +505,25 @@
}
}
}
-
+ //鍔ㄦ�佹樉绀哄垪鍚�
+ option = {
+ elem: '#mainTable'
+ , toolbar: '#toolbarDemo'
+ , cols: [col]
+ , data: data1.data
+ , height: 800
+ , page: true
+ , totalRow: true
+ , cellMinWidth: 90
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , done: function (res, curr, count) {
+ soulTable.render(this);
+ }
+ }
option.cols = [col];
option.data = data1.data;
- table.render(option);
+ ins = table.render(option);
//鍒锋柊琛ㄦ牸鏁版嵁
DisPlay_HideColumn();
@@ -371,6 +557,12 @@
var ColName = $("#ColName").val();//澶嶉�夋
var Comparator = $("#Comparator").val()
var ColContent = $("#ColContent").val();
+ var ColName1 = $("#ColName1").val();//澶嶉�夋
+ var Comparator1 = $("#Comparator1").val()
+ var ColContent1 = $("#ColContent1").val();
+ var ColName2 = $("#ColName2").val();//澶嶉�夋
+ var Comparator2 = $("#Comparator2").val()
+ var ColContent2 = $("#ColContent2").val();
if (ColName != 0 && Comparator != 0) {
var com = "";
@@ -393,6 +585,48 @@
}
sWhere += " and " + ColName + " " + com;
}
+ if (ColName1 != 0 && Comparator1 != 0) {
+ var com1 = "";
+ switch (Comparator1) {
+ case "7":
+ com1 = "like'%" + ColContent1 + "%'";
+ break;
+ case "8":
+ com1 = "like'%" + ColContent1 + "'";
+ break;
+ case "9":
+ com1 = "like'" + ColContent1 + "%'";
+ break;
+ case "10":
+ com1 = "not like'%" + ColContent1 + "%'";
+ break;
+ default:
+ com1 = "" + Comparator1 + "'" + ColContent1 + "'";
+ break;
+ }
+ sWhere += " and " + ColName1 + " " + com1;
+ }
+ if (ColName2 != 0 && Comparator2 != 0) {
+ var com2 = "";
+ switch (Comparator2) {
+ case "7":
+ com2 = "like'%" + ColContent2 + "%'";
+ break;
+ case "8":
+ com2 = "like'%" + ColContent2 + "'";
+ break;
+ case "9":
+ com2 = "like'" + ColContent2 + "%'";
+ break;
+ case "10":
+ com2 = "not like'%" + ColContent2 + "%'";
+ break;
+ default:
+ com2 = "" + Comparator + "'" + ColContent + "'";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
if (HDate) {
sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
}
@@ -412,12 +646,19 @@
//#region 閲嶇疆杩囨护鏉′欢鏂规硶
function set_ClearQuery() {
- $("#HBeginDate").val(Format(new Date(), "yyyy-MM-dd"));
- $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")); //寮�濮嬫棩鏈�
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd")); //缁撴潫鏃ユ湡
$("#HBillNo").val("");
$("#ColContent").val("");
$("#ColName").val("0");
$("#Comparator").val("0");
+ $("#ColContent1").val("");
+ $("#ColName1").val("0");
+ $("#Comparator1").val("0");
+ $("#ColContent2").val("");
+ $("#ColName2").val("0");
+ $("#Comparator2").val("0");
form.render('select');
sWhere = "";
@@ -430,7 +671,7 @@
type: 2
, skin: 'layui-layer-rim' //鍔犱笂杈规
, area: ['100%', '100%']
- , title: '閿�鍞鍗曞彉鏇村崟-鏂板'
+ , title: '鏂板' + HPageTitle
, shift: 0//寮瑰嚭鍔ㄧ敾
, content: '../../閿�鍞鐞�/閿�鍞鍗曞彉鏇村崟/Xs_SeOrderChangeBill.html?OperationType=1&linterid=0&HSouceBillType='
,btn: [],
@@ -452,7 +693,7 @@
layer.open({
type: 2
, area: ['100%', '100%']
- , title: '閿�鍞鍗曞彉鏇村崟-缂栬緫'
+ , title: '缂栬緫' + HPageTitle
, shift: 0//寮瑰嚭鍔ㄧ敾
, content: '../../閿�鍞鐞�/閿�鍞鍗曞彉鏇村崟/Xs_SeOrderChangeBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
, btn: [],
@@ -490,6 +731,28 @@
} else {
layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
}
+ }
+ //#endregion
+
+ //#region 瀵煎嚭Execel
+ function get_Export() {
+ var ModRightNameCheck = "Xs_SeOrderChangeBillList_ExportExcel";
+
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ table.exportFile(ins.config.id, option.data, "xls");
+ } else {
+ layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
}
//#endregion
@@ -541,7 +804,8 @@
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
if (data[0].鐘舵�� != "鍒涘缓") {
- layer.alert("涓嬫帹澶辫触!鍘熷洜锛氬崟鎹姸鎬佷笉涓�'鍒涘缓'鐘舵��!!", { icon: 5 });
+ var err = "涓嬫帹澶辫触!鍘熷洜锛氬綋鍓嶅崟鎹姸鎬佷负鈥�" + data[0].鐘舵�� + "鈥�,涓嶅厑璁镐笅鎺紒";
+ layer.alert(err, { icon: 5 });
return;
}
@@ -713,7 +977,7 @@
var colName = "";
var contentUrl = "";
for (var i = 1; i < option.cols[0].length; i++) {
- colName += option.cols[0][i]["title"] + ",";
+ colName += option.cols[0][i]["field"] + ",";
}
var urlStr = window.document.location.pathname;//鑾峰彇鏂囦欢璺緞
var urlLen = urlStr.split('/');
@@ -743,10 +1007,12 @@
})
}
//#endregion
+
//#region 鏄剧ず鍒楁暟鎹�
function DisPlay_HideColumn() {
$.ajax({
url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+ async: false,
type: "GET",
data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
success: function (data1) {
@@ -754,7 +1020,7 @@
var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
//var titleData = ["鍗曟嵁ID", "HMouldID", "hsubid", "HManagerID", "婧愬崟涓诲唴鐮�", "婧愬崟瀛愬唴鐮�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
-
+ var titleData = ["hmainid", "HMaterID", "HUnitID", "HCusID", "HEmpID", "HMainSourceInterID", "HMainSourceEntryID", "HSourceInterID", "HSourceEntryID", "HSourceBillNo", "HSourceBillType", "HDeptID", "HCurID", "HSSID", "HSellSID", "HOrgID"];
dataCol = data1.data[0].HGridString.split(',');
for (var i = 0; i < option.cols[0].length - 1; i++) {
@@ -795,6 +1061,10 @@
option.cols[0][i + 1]["align"] = "right";
break;
}
+ //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+ if (dataCols[4] != null && dataCols[4] != "") {
+ option.cols[0][i + 1]["title"] = dataCols[4];
+ }
}
//鍙栨秷鍐荤粨鍒�
@@ -826,16 +1096,263 @@
}
//#endregion
+ //#region 鍒濆鏃ユ湡闂撮殧 涓嬫媺鍒楄〃
+ function setSelect_HInitTimeCycle() {
+ var valueList = [0, 1, 2, 3, 4, 5, 6, 29];
+ var titleList = ["浠婂ぉ", "杩戜袱澶�", "杩戜笁澶�", "杩戝洓澶�", "杩戜簲澶�", "杩戝叚澶�", "杩戜竷澶�", "杩�30澶�"];
+
+ var HInitTimeCycle_ArrayList = '<option value="-1" selected="selected" >浠绘剰闂撮殧</option>';
+ for (var i = 0; i < valueList.length; i++) {
+ HInitTimeCycle_ArrayList += '<option style="color:blue;" value="' + valueList[i] + '">' + titleList[i] + '</option>';
+ }
+
+ $("#HInitTimeCycle").empty();
+ $("#HInitTimeCycle").append(HInitTimeCycle_ArrayList);
+ form.render('select');
+
+ $("#HInitTimeCycle").val("29");
+ }
+ //#endregion
+
+ //#region 銆愯繃婊ゆ柟妗堛��
+
+ //鑾峰彇褰撳墠鐢ㄦ埛鐨勯粯璁よ繃婊ゆ柟妗�
+ function get_DefaultModule() {
+ $.ajax({
+ url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+ type: "GET",
+ data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
+ success: function (data1) {
+ if (data1.count == 1) {
+ //褰撳墠鐢ㄦ埛璁剧疆鏈夐粯璁ょ殑杩囨护鏂规
+ var data = data1.data;
+ //褰撳墠閫夋嫨鐨勮繃婊ゆ柟妗�
+ HInterID_Choose = data[0].hmainid;
+ //杩囨护鏂规鍐呯爜
+ HInterID = data[0].hmainid
+ //杩囨护鏂规鍚嶇О
+ HDefaultFilter = data[0].鏂规鍚嶇О
+ //杩囨护鏂规鐨勫娉紙鏂规淇℃伅鎻忚堪锛�
+ var HRemark = data[0].澶囨敞
+ //鏄剧ず鍑哄綋鍓嶇殑榛樿杩囨护鏂规
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>';
+ //鎶婅繃婊ゆ潯浠跺�煎洖鍐欏埌椤甸潰涓�
+ for (let i = 0; i < data.length; i++) {
+ $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+ if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+ $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+ }
+ }
+ var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
+ //鑻ユ棩鏈熼棿闅斾笉涓� 浠绘剰闂撮殧锛屽垯绂佺敤寮�濮嬫棩鏈熶笌缁撴潫鏃ユ湡鐨勯�夋嫨
+ if (HInitTimeCycle != -1) {
+ $('#HBeginDate').prop('disabled', true);
+ $('#HEndDate').prop('disabled', true);
+
+ $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
+ $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery();
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery()
+ form.render("select");
+ } else {
+ //褰撳墠鐢ㄦ埛娌℃湁璁剧疆榛樿鐨勮繃婊ゆ柟妗�
+ //闅愯棌鏄剧ず杩囨护鏂规鐨勬爣绛句俊鎭�
+ document.getElementById("HFilterScheme_Now").style.display = "none";
+ //鎵ц鏌ヨ鏂规硶
+ //get_FastQuery()
+ //form.render("select");
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+
+ //淇濆瓨鏂规
+ function set_SaveScheme() {
+ var index = layer.open()
+ //鍒ゆ柇鐢ㄦ埛鏄惁鐐瑰嚮浜嗗彸涓婅鐨勨�滃弶鍙封�濆叧闂脊绐楅〉闈�
+ var HIsClose_Manual = false;
+ //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+ var Filter = document.getElementsByClassName(HClassTag);
+
+ var HFilterIdList = "";//杩囨护鏉′欢
+ var HFilterIdLists = "";//鎷兼帴澶氫釜杩囨护鏉′欢
+ var HValue = "";//杩囨护鍊�
+ var HElement_type = "";//杩囨护鏍囩绫诲瀷
+
+ for (var i = 0; i < Filter.length; i++) {
+ HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ //褰撳墠椤甸潰涓婃病鏈夐�夋嫨杩囨护鏂规锛岃繘鍏ユ柊澧炴柟娉�
+ if (HDefaultFilter == "") {
+ layer.open({
+ type: 2
+ , area: ['40%', '80%']
+ , title: '杩囨护鏂规'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+ , cancel: function () {
+ // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+ HIsClose_Manual = true;
+ }
+ , end: function () {
+ if (HIsClose_Manual != true) {
+ get_FastQuery();
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+ }
+ }
+ })
+ layer.close(index)
+ } else {
+ //褰撳墠椤甸潰宸叉湁杩囨护鏂规锛岀敤鎴烽�夋嫨 鏂板鎴栬�呯紪杈�
+ layer.confirm('褰撳墠宸查�夋嫨杩囨护鏂规锛屾槸鍚︿慨鏀癸紵璇烽�夋嫨瀵瑰簲鎿嶄綔', {
+ title: "鎿嶄綔鎻愮ず",
+ icon: 0,
+ btn: ['鏂板鏂规', '淇濆瓨淇敼褰撳墠鏂规', '鍙栨秷']
+ }, function (index, layero) {
+ //鏂板
+ layer.open({
+ type: 2
+ , area: ['40%', '80%']
+ , title: '杩囨护鏂规'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
+ , end: function () {
+ get_FastQuery()
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
+ }
+ })
+ layer.close(index)
+ }, function (index) {
+ //缂栬緫
+ var Filter_Edit = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+ HFilterIdList = "";
+ HFilterIdLists = "";
+ HValue = "";
+ HElement_type = "";
+ for (var i = 0; i < Filter_Edit.length; i++) {
+ HFilterIdList = Filter_Edit[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter_Edit[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3;
+
+ //淇敼
+ $.ajax({
+ type: "POST",
+ url: GetWEBURL() + "/Xt_FastICScheme/save", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ async: true,
+ data: { "oMain": sMainSub },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ layer.msg(data.Message, { time: 1 * 1000, icon: 1 });
+ }
+ else {
+
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+
+
+ }
+ });
+ layer.close(index)
+ }, function (index) {
+ //鍙栨秷
+ layer.alert('鍙栨秷')
+ layer.close(index)
+ });
+ }
+
+ }
+
+ //璇诲彇鏂规
+ function set_ReadScheme() {
+ var HIsClose_Manual = false;
+ var Filter = document.getElementsByClassName(HClassTag); //鑾峰彇鏈〉鎵�鏈夎繃婊ゆ潯浠跺璞�(class涓寘鍚�"ForFilteringSchemes"鐨勫厓绱�)
+
+ var HFilterIdList = "";
+ var HFilterIdLists = "";
+ var HValue = "";
+ var HElement_type = "";
+ for (var i = 0; i < Filter.length; i++) {
+ HFilterIdList = Filter[i].id; //杩囨护鏉′欢ID
+ HFilterIdLists += Filter[i].id + ","; //杩囨护鏉′欢ID(鎷兼帴)
+ HValue += $("#" + HFilterIdList).val() + ","; //杩囨护鏉′欢涓緭鍏ョ殑鍊�
+ HElement_type += document.getElementById(HFilterIdList).tagName + ",";//閫氳繃鏍囩id鑾峰彇鏍囩绫诲瀷
+ }
+ //鍘婚櫎鏈熬閫楀彿
+ HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
+ HValue = HValue.substring(0, HValue.length - 1);
+ HElement_type = HElement_type.substring(0, HElement_type.length - 1);
+
+ layer.open({
+ type: 2
+ , area: ['80%', '80%']
+ , title: '杩囨护鏂规鍒楄〃'
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../绯荤粺绠$悊/杩囨护鏂规璁剧疆/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
+ , cancel: function () {
+ // 鍙充笂瑙掑叧闂簨浠剁殑閫昏緫
+ HIsClose_Manual = true;
+ }
+ , end: function () {
+ if (HIsClose_Manual != true) {
+ get_FastQuery()
+ form.render("select");
+ }
+ }
+ })
+ }
+
+ //#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>';
+ Organization += '<option style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
}
}
$("#ColName").empty();
$("#ColName").append(Organization);
+ $("#ColName1").empty();
+ $("#ColName1").append(Organization);
+ $("#ColName2").empty();
+ $("#ColName2").append(Organization);
form.render('select');
}
//#endregion
@@ -868,6 +1385,45 @@
//#endregion
+ //#region 銆愯繃婊ゆ柟妗堣繑鍥炴暟鎹��
+ function HFilterScheme(obj) //杩斿洖杩囨护鏂规
+ {
+ var HInterID = obj[0].hmainid;
+ HInterID_Choose = obj[0].hmainid;
+ $.ajax({
+ url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
+ type: "GET",
+ data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var data = data1.data;
+ //璧嬪�艰繃婊ゆ柟妗堝悕绉�
+ HDefaultFilter = data[0].鏂规鍚嶇О
+ var HRemark = data[0].澶囨敞
+ //鏄剧ず褰撳墠鐨勮繃婊ゆ柟妗�
+ document.getElementById("HFilterScheme_Now").style.display = "block";
+ document.getElementById('HFilterScheme_Now').innerHTML = "褰撳墠杩囨护鏂规锛�" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb"> ' + "(" + HRemark + ")" + '</span>';
+ HInterID = data[0].hmainid
+ //鏍规嵁閫夋嫨鐨勮繃婊ゆ柟妗堝洖濉暟鎹埌鍒楄〃杩囨护鏉′欢
+ for (let i = 0; i < data.length; i++) {
+ $("#" + data[i].杩囨护瀛楁ID).val(data[i].杩囨护鍊�);
+ if (data[i].杩囨护鏍囩绫诲瀷 == 'SELECT') {
+ $("#" + data[i].杩囨护瀛楁ID).find("option[value='" + data[i].杩囨护鍊� + "']").attr("selected", true);
+ }
+ }
+
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(data1.code + data1.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
+
//浠ヤ笂鏄痩ayui妯″潡
</script>
--
Gitblit v1.9.1