From d6db3fa707f470fd8a6160c6daf6bcea75b8a6ce Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 06 六月 2024 15:18:45 +0800
Subject: [PATCH] 上下模单优化
---
WebTM/views/销售管理/销售订单/Xs_SeOrderBillList.html | 270 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 244 insertions(+), 26 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/Xs_SeOrderBillList.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/Xs_SeOrderBillList.html"
index c926121..972c2ed 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/Xs_SeOrderBillList.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/Xs_SeOrderBillList.html"
@@ -39,6 +39,13 @@
</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 ForFilteringSchemes" id="HBeginDate" style="width:190px;">
@@ -123,6 +130,62 @@
<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>
</div>
</div>
@@ -155,9 +218,9 @@
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" 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" style="display:none;" lay-event="HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>闅愯棌鍒楄缃�</button>
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>鎸夐挳璁剧疆</button>
- <!--<button type="button" class="layui-btn layui-btn-sm" style="display:none;" 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" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
- <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_QueryCondition" id="set_QueryCondition"><i class="layui-icon layui-icon-set"></i>楂樼骇杩囨护</button>-->
+ <button type="button" class="layui-btn layui-btn-sm" style="display:none;" 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" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>璇诲彇鏂规</button>
+ <!--<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_QueryCondition" id="set_QueryCondition"><i class="layui-icon layui-icon-set"></i>楂樼骇杩囨护</button>-->
<button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
</div>
</script>
@@ -191,7 +254,7 @@
//鏌ヨ鏉′欢
var sWhere = "";
var option = [];
- var HModName = "Xs_SeOrderBill";
+ var HModName = "Xs_SeOrderBillList";
var HBillType = "1401";
@@ -457,6 +520,30 @@
})
});
//#endregion
+
+ //#region 鏃ユ湡闂撮殧涓嬫媺鍒楄〃鐩戝惉
+ 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"));
+
+ //var HEndDate = Date.parse($("#HEndDate").val());
+ //var HBeginDate = Format(new Date(new Date(HEndDate) - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")
+ //$("#HBeginDate").val(HBeginDate);
+
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery();
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+ });
+ //#endregion
//#endregion
@@ -464,7 +551,20 @@
//#region 鍒濆鍖栫晫闈�
function set_ClearBill() {
- $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "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();
@@ -504,6 +604,10 @@
, { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', sort: true }
, { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', sort: true }
, { field: '鏁伴噺', title: '鏁伴噺', sort: true, totalRow: true }
+ , { field: '鐢熶骇鍏ュ簱鏁伴噺', title: '鐢熶骇鍏ュ簱鏁伴噺', sort: true, totalRow: true }
+ , { field: '鎶ュ簾鏁伴噺', title: '鎶ュ簾鏁伴噺', sort: true, totalRow: true }
+ , { field: '鍓╀綑璁㈤噾', title: '鍓╀綑璁㈤噾', sort: true, totalRow: true }
+ , { field: '鍏宠仈鏁伴噺', title: '閿�鍞嚭搴撳叧鑱旀暟閲�', sort: true, totalRow: true }
, { field: 'HUnitID', title: 'HUnitID', hide: true, sort: true }
//, { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', sort: true }
, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', sort: true }
@@ -519,8 +623,8 @@
, { field: '閲戦', title: '閲戦', sort: true, totalRow: true }
, { field: '浠风◣鍚堣', title: '浠风◣鍚堣', sort: true, totalRow: true }
, { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞', sort: true }
- , { field: '鍓╀綑璁㈤噾', title: '鍓╀綑璁㈤噾', sort: true, totalRow: true }
- , { field: '鍏宠仈鏁伴噺', title: '閿�鍞嚭搴撳叧鑱旀暟閲�', sort: true, totalRow: true }
+ , { field: '鎶曟枡', title: '鎶曟枡', sort: true }
+ , { field: '娣卞姞宸�', title: '娣卞姞宸�', sort: true }
, { field: '鏈叧鑱旀暟閲�', title: '閿�鍞嚭搴撴湭鍏宠仈鏁伴噺', sort: true, totalRow: true }
, { field: '鐢熶骇鍏宠仈鏁伴噺', title: '鐢熶骇鍏宠仈鏁伴噺', sort: true, totalRow: true }
, { field: '鐢熶骇鏈叧鑱旀暟閲�', title: '鐢熶骇鏈叧鑱旀暟閲�', sort: true, totalRow: true }
@@ -536,7 +640,8 @@
, { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
, { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 125, sort: true }
, { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
-
+ , { field: 'HWhID', title: 'HWhID', hide: true, sort: true }
+ , { field: '瀛愪粨搴�', title: '瀛愪粨搴�', hide: true, sort: true }
//, { field: 'HBillType', title: 'HBillType', hide: true, sort: true }
//, { field: '浜よ揣鍦板潃', title: '浜よ揣鍦板潃', width: 125, sort: true }
@@ -544,19 +649,19 @@
//, { field: '缁撶畻鏂瑰紡浠g爜', title: '缁撶畻鏂瑰紡浠g爜', width: 125, sort: true }
//, { field: '缁撶畻鏂瑰紡', title: '缁撶畻鏂瑰紡', width: 125, sort: true }
//, { field: '缁撶畻鏃ユ湡', title: '缁撶畻鏃ユ湡', width: 170, sort: true }
- , { field: 'HCurID', title: 'HCurID', hide: true, sort: true }
- //, { field: '甯佸埆浠g爜', title: '甯佸埆浠g爜', sort: true }
- , { field: '甯佸埆', title: '甯佸埆', hide: true, sort: true }
- , { field: '姹囩巼', title: '姹囩巼', hide: true, sort: true }
- , { field: 'HDeptID', title: 'HDeptID', hide: true, sort: true }
- //, { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 125, sort: true }
- , { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 125, hide: true,sort: true }
- //, { field: '閿�鍞柟寮�', title: '閿�鍞柟寮�', sort: true }
- , { field: 'HManagerID', title: 'HManagerID', hide: true, sort: true }
- //, { field: '涓荤浠g爜', title: '涓荤浠g爜', sort: true }
- , { field: '涓荤', title: '涓荤', hide: true, sort: true }
- , { field: '涓讳粨搴搃d', title: '涓讳粨搴搃d', hide: true, sort: true }
- , { field: '涓讳粨搴�', title: '涓讳粨搴�', hide: true, sort: true }
+ //, { field: 'HCurID', title: 'HCurID', hide: true, sort: true }
+ ////, { field: '甯佸埆浠g爜', title: '甯佸埆浠g爜', sort: true }
+ //, { field: '甯佸埆', title: '甯佸埆', hide: true, sort: true }
+ //, { field: '姹囩巼', title: '姹囩巼', hide: true, sort: true }
+ //, { field: 'HDeptID', title: 'HDeptID', hide: true, sort: true }
+ ////, { field: '閮ㄩ棬浠g爜', title: '閮ㄩ棬浠g爜', width: 125, sort: true }
+ //, { field: '閮ㄩ棬', title: '閮ㄩ棬', width: 125, hide: true,sort: true }
+ ////, { field: '閿�鍞柟寮�', title: '閿�鍞柟寮�', sort: true }
+ //, { field: 'HManagerID', title: 'HManagerID', hide: true, sort: true }
+ ////, { field: '涓荤浠g爜', title: '涓荤浠g爜', sort: true }
+ //, { field: '涓荤', title: '涓荤', hide: true, sort: true }
+ //, { field: '涓讳粨搴搃d', title: '涓讳粨搴搃d', hide: true, sort: true }
+ //, { field: '涓讳粨搴�', title: '涓讳粨搴�', hide: true, sort: true }
//, { field: '鎽樿', title: '鎽樿', sort: true }
//, { field: '鎵瑰彿', title: '鎵瑰彿', sort: true }
//, { field: '绋庨', title: '绋庨', sort: true }
@@ -660,6 +765,14 @@
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 = "";
switch (Comparator) {
@@ -681,6 +794,51 @@
}
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 = "" + Comparator2 + "'" + ColContent2 + "'";
+ break;
+ }
+ sWhere += " and " + ColName2 + " " + com2;
+ }
+
if (HDate) {
sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
}
@@ -718,8 +876,9 @@
//#region 閲嶇疆杩囨护鏉′欢
function set_ClearQuery() {
- $("#HDate").val("");//寮�濮嬫棩鏈�
- $("#HDate1").val("");//缁撴潫鏃ユ湡
+ 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("");//
$("#HCusID").val("");
$("#HMaterNumber").val("");
@@ -727,6 +886,15 @@
$("#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 = "";
}
@@ -1267,7 +1435,7 @@
get_needClose_Bar = 1;
//涓鸿繃婊ゆ潯浠跺鍔犳帓搴�
- sWhere_Bak += " and 鍓╀綑璁㈤噾>0 and 鍓╀綑璁㈤噾<=500 and 鍏抽棴浜�='' and 琛屽叧闂汉='' and 鐘舵�� = '宸插鏍�' order by 鍗曟嵁鍙� desc";
+ sWhere_Bak += " and 鍓╀綑璁㈤噾>0 and 鍓╀綑璁㈤噾<=1000 and 鍏抽棴浜�='' and 琛屽叧闂汉='' and 鐘舵�� = '宸插鏍�' order by 鍗曟嵁鍙� desc";
//鑾峰彇鎺掑簭鍚庣殑鏁版嵁骞堕噸鏂版覆鏌�
var ajaxLoad = layer.load();
@@ -1389,7 +1557,7 @@
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
if (get_needClose_Bar == 0) {
- $("#btnSearch").trigger('click');
+ //$("#btnSearch").trigger('click');
} else if (get_needClose_Bar == 1) {
$("#get_needClose").trigger('click');
}
@@ -1430,7 +1598,7 @@
layer.close(index);
//淇敼涓哄姛鍚庡埛鏂扮晫闈�
if (get_needClose_Bar == 0) {
- $("#btnSearch").trigger('click');
+ //$("#btnSearch").trigger('click');
} else if (get_needClose_Bar == 1) {
$("#get_needClose").trigger('click');
}
@@ -1700,6 +1868,30 @@
$("#" + 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"));
+
+ //var HEndDate = Date.parse($("#HEndDate").val());
+ //var HBeginDate = Format(new Date(new Date(HEndDate) - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd")
+ //$("#HBeginDate").val(HBeginDate);
+
+ //鎵ц鏌ヨ鏂规硶
+ get_FastQuery();
+ } else {
+ $('#HBeginDate').prop('disabled', false);
+ $('#HEndDate').prop('disabled', false);
+ }
+
+
+
//鎵ц鏌ヨ鏂规硶
get_FastQuery()
form.render("select");
@@ -1946,6 +2138,32 @@
$("#ColName").empty();
$("#ColName").append(Organization);
form.render('select');
+
+ $("#ColName1").empty();
+ $("#ColName1").append(Organization);
+ form.render('select');
+
+ $("#ColName2").empty();
+ $("#ColName2").append(Organization);
+ form.render('select');
+ }
+ //#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
--
Gitblit v1.9.1