|
|
@@ -98,7 +98,7 @@ function partRenderer(e) {
|
|
|
if (record.IsPartRefund == 1) {
|
|
|
html += ("<div style='color:blue;'>部分</div>");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return html;
|
|
|
}
|
|
|
|
|
|
@@ -166,7 +166,7 @@ function setTagFn(eid) {
|
|
|
var ww = ("<a class='marginleft20' href='http://amos.alicdn.com/msg.aw?v=2&uid=" + rec.buyer_nick + "&site=cntaobao&s=2&charset=utf-8' target='ww'><img border='0' src='http://amos.alicdn.com/online.aw?v=2&uid=" + rec.buyer_nick + "&site=cntaobao&s=2&charset=utf-8' alt='点击这里给我发消息'><span id = 'customerName' >" + rec.buyer_nick + "</span></a >");
|
|
|
ohtml += ww;
|
|
|
$("#txtTid").html(ohtml);
|
|
|
-
|
|
|
+
|
|
|
$("#txtAfterMemo").val(rec.Memo);
|
|
|
}
|
|
|
function cancelHandleFn() {
|
|
|
@@ -222,7 +222,7 @@ function searchFn() {
|
|
|
//form.setIsValid(false);
|
|
|
//console.log("565656565", data);
|
|
|
grid.load({
|
|
|
- tid: s.tid, shopname: s.shop, buyer_nick: s.ww, design: s.design, orderState: s.state,ispartrefund: s.ispartrefund,
|
|
|
+ tid: s.tid, shopname: s.shop, buyer_nick: s.ww, design: s.design, orderState: s.state, ispartrefund: s.ispartrefund,
|
|
|
date1: s.date1, date2: s.date2, price1: s.price1, price2: s.price2, seller_memo: s.memo, refunddate1: s.refunddate1, refunddate2: s.refunddate2, responsibleman: s.responsibleman
|
|
|
});
|
|
|
}
|
|
|
@@ -232,7 +232,84 @@ function clearFn() {
|
|
|
var form = new mini.Form("#ctl00_f_all");
|
|
|
form.clear();
|
|
|
}
|
|
|
+function onSearchCheckedChanged(e) {
|
|
|
+ var btn = e.sender;
|
|
|
+ var checked = btn.getChecked();
|
|
|
+ var text = btn.getText();
|
|
|
+ var form = new mini.Form("#ctl00_f_all");
|
|
|
+ var data = form.getData(true, false);
|
|
|
+ var s = data;
|
|
|
+
|
|
|
+ if (checked) {
|
|
|
+ var stime = "";
|
|
|
+ var etime = "";
|
|
|
+ var timearr = [];
|
|
|
+ if (text == "本日") {
|
|
|
+ let currentTime = new Date();
|
|
|
+ let start = new Date(currentTime.getFullYear(), currentTime.getMonth(), currentTime.getDate(), 0, 0, 0);
|
|
|
+ let end = new Date(currentTime.getFullYear(), currentTime.getMonth(), currentTime.getDate(), 23, 59, 59);
|
|
|
+ timearr.push(formatDate(start));
|
|
|
+ timearr.push(formatDate(end));
|
|
|
+ }
|
|
|
+ else if (text == "本周") {
|
|
|
+ timearr = getWeekStartEnd();
|
|
|
+ }
|
|
|
+ else if (text == "本月") {
|
|
|
+ timearr = getMonthStartEnd();
|
|
|
+ }
|
|
|
+ console.log(timearr)
|
|
|
+ stime = timearr[0];
|
|
|
+ etime = timearr[1];
|
|
|
+ grid.load({
|
|
|
+ tid: s.tid, shopname: s.shop, buyer_nick: s.ww, design: s.design, orderState: s.state, ispartrefund: s.ispartrefund,
|
|
|
+ refunddate1: stime, refunddate2: etime, price1: s.price1, price2: s.price2, seller_memo: s.memo, responsibleman: s.responsibleman
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function getWeekStartEnd() {
|
|
|
+ const now = new Date();
|
|
|
+ const dayOfWeek = now.getDay(); // 获取当前是周几,周日为0,周六为6
|
|
|
+ const startOfWeek = new Date(now);
|
|
|
+ const endOfWeek = new Date(now);
|
|
|
+
|
|
|
+ // 设置开始时间为本周一(如果周一不是每周的第一天,可以调整这里的逻辑)
|
|
|
+ startOfWeek.setDate(now.getDate() - dayOfWeek + (dayOfWeek === 0 ? -6 : 1)); // 如果周一是一周的第一天,则调整为-6;否则+1
|
|
|
+ startOfWeek.setHours(0, 0, 0, 0);
|
|
|
+ // 设置结束时间为周日
|
|
|
+ endOfWeek.setDate(now.getDate() + (7 - dayOfWeek)); // 从今天开始算起,加上剩余的天数直到周日
|
|
|
+ endOfWeek.setHours(23, 59, 59, 59);
|
|
|
+
|
|
|
+ return [formatDate(startOfWeek), formatDate(endOfWeek)]
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+function getMonthStartEnd() {
|
|
|
+ // 获取当前日期
|
|
|
+ const now = new Date();
|
|
|
|
|
|
+ // 设置日期为当月的第一天(即月初)
|
|
|
+ const firstDayOfMonth = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
|
+ firstDayOfMonth.setHours(0, 0, 0, 0);
|
|
|
+ // 设置日期为当月的最后一天(即月末)
|
|
|
+ const lastDayOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
|
+ lastDayOfMonth.setHours(23, 59, 59, 59);
|
|
|
+
|
|
|
+ return [formatDate(firstDayOfMonth), formatDate(lastDayOfMonth)]
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+function formatDate(date) {
|
|
|
+ let year = date.getFullYear();
|
|
|
+ let month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份是从0开始的
|
|
|
+ let day = date.getDate().toString().padStart(2, '0');
|
|
|
+ let hours = date.getHours().toString().padStart(2, '0');
|
|
|
+ let minutes = date.getMinutes().toString().padStart(2, '0');
|
|
|
+ let seconds = date.getSeconds().toString().padStart(2, '0');
|
|
|
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
+}
|
|
|
|
|
|
|
|
|
function newPageSearchFn() {
|