From 23d7909b52e22eb42900a506c7d8b72f58f28944 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期一, 03 七月 2023 17:36:21 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/salesOrder/salsesOrder.js | 191 +++++++++++++++++++++++++++++++----------------
1 files changed, 126 insertions(+), 65 deletions(-)
diff --git a/src/main/webapp/static/js/salesOrder/salsesOrder.js b/src/main/webapp/static/js/salesOrder/salsesOrder.js
index df18260..3618842 100644
--- a/src/main/webapp/static/js/salesOrder/salsesOrder.js
+++ b/src/main/webapp/static/js/salesOrder/salsesOrder.js
@@ -1,21 +1,32 @@
-var pageCurr;
+var pageCurr = 1;
+var limit = 16;
function getCol() {
var cols = [];
cols.push(
- {field: 'orderCode', align: 'center', title: '璁㈠崟缂栧彿'}
- , {field: 'orderDate', align: 'center', title: '璁㈠崟鏃ユ湡'}
- , {field: 'invCode', align: 'center', title: '鐗╂枡缂栫爜'}
- , {field: 'invName', align: 'center', title: '鐗╂枡鍚嶇О'}
- , {field: 'invStd', align: 'center', title: '瑙勬牸鍨嬪彿'}
- , {field: 'invUnit', align: 'center', title: '鍗曚綅'}
- , {field: 'orderQty', align: 'center', title: '璁㈠崟鏁伴噺'}
- , {field: 'izMrp', align: 'center', title: '鏄惁mrp璁$畻', hide: true}
- , {field: 'productQty', align: 'center', title: '鐢熶骇浠诲姟鍗曟暟閲�'}
- , {field: 'izReceive', align: 'center', title: '鏄惁鏀舵枡', hide: true}
- , {field: 'inQty', align: 'center', title: '浜ф垚鍝佸叆搴撴暟閲�'}
- , {field: 'outQty', align: 'center', title: '鍙戣揣鏁伴噺'}
- , {fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}
+ {field: 'orderCode', align: 'center', title: '璁㈠崟缂栧彿', width: 110}
+ , {field: 'orderDate', align: 'center', title: '璁㈠崟鏃ユ湡', width: 120}
+ , {field: 'invCode', align: 'center', title: '鐗╂枡缂栫爜', width: 130}
+ , {field: 'invName', align: 'center', title: '鐗╂枡鍚嶇О', width: 350}
+ , {field: 'invStd', align: 'center', title: '瑙勬牸鍨嬪彿', width: 160}
+ , {field: 'invUnit', align: 'center', title: '鍗曚綅', width: 80, hide: true}
+ , {field: 'orderQty', align: 'center', title: '璁㈠崟鏁伴噺', width: 120}
+ , {field: 'izMrp', align: 'center', title: '澶ц鍗�(mrp)',width: 115}
+ , {field: 'productQty', align: 'center', title: '浠诲姟鍗�', width: 110}
+ , {field: 'izReceive', align: 'center', title: '灏忚鍗�', width: 80}
+ , {field: 'inQty', align: 'center', title: '鍏ュ簱鏁伴噺', width: 110}
+ , {field: 'disQty', align: 'center', title: '閫氱煡鍗�', width: 110}
+ , {field: 'outQty', align: 'center', title: '鍑哄簱鏁伴噺', width: 110}
+ , {field: 'invoiceQty', align: 'center', title: '寮�绁ㄦ暟閲�', width: 110}
+ , {field: 'unInvoiceQty', align: 'center', title: '鏈紑绁ㄦ暟閲�', width: 110}
+ , {field: 'deliveryDate', align: 'center', title: '浜よ揣鏃ユ湡', width: 110}
+ , {field: 'personName', align: 'center', title: '涓氬姟鍛�', width: 110}
+ , {field: 'outDate', align: 'center', title: '鍑哄簱鏃ユ湡', width: 110}
+ , {field: 'outPrice', align: 'center', title: '鍑哄簱鍗曚环', width: 110}
+ , {field: 'outAmount', align: 'center', title: '鍑哄簱閲戦', width: 110}
+ , {field: 'invoiceDate', align: 'center', title: '寮�绁ㄦ棩鏈�', width: 110}
+ , {field: 'invoiceAmount', align: 'center', title: '寮�绁ㄩ噾棰�', width: 110}
+ , {field: 'custName', align: 'center', title: '瀹㈡埛鍚嶇О', width: 110}
);
return cols;
}
@@ -32,25 +43,11 @@
tableIns = table.render({
elem: '#salesOrder',
headers: {token: localStorage.getItem('token')},
- // url: baseUrl+'/matCode/list/auth',
- data: [
- {
- "orderCode": 20210315000001,
- "orderDate": "2021-03-26 13:40",
- "invCode": "CPXXX00123",
- "invName": "鍏板崥鍩哄凹鎺堟潈鍎跨杞�",
- "invStd": "21脳25",
- "invUnit": "杈�",
- "orderQty": 300,
- "izMrp": "鍚�",
- "productQty": 150,
- "izReceive": "鏄�",
- "inQty": 50,
- "outQty": 0,
- }
- ],
+ url: 'http://192.168.0.253:8073/api/report/getorderreport',
+ height: 650,
+ width: '100%',
page: true,
- limit: 16,
+ limit: limit,
limits: [16, 50, 100, 200, 500],
even: true,
toolbar: '#toolbar',
@@ -71,11 +68,11 @@
response: {
statusCode: 200
},
- done: function(res, curr, count) {
+ done: function (res, curr, count) {
if (res.code === 403) {
- top.location.href = baseUrl+"/";
+ top.location.href = baseUrl + "/";
}
- pageCurr=curr;
+ pageCurr = curr;
}
});
@@ -83,6 +80,8 @@
form.on('submit(reset)', function (data) {
pageCurr = 1;
clearFormVal($('#search-box'));
+ debugger
+
tableReload(false);
});
@@ -95,46 +94,108 @@
// 鏃堕棿閫夋嫨鍣�
layDate.render({
- elem: '.layui-laydate-range'
- , type: 'datetime'
+ elem: '#orderTimeRange'
+ ,style: 'width: 150px'
, range: true
});
+ layDate.render({
+ elem: '#orderTimeDeliveryRange'
+ ,style: 'width: 150px'
+ , range: true
+ });
+ layDate.render({
+ elem: '#orderTimeOutRange'
+ ,style: 'width: 150px'
+ , range: true
+ });
+
+ // layDate.render({
+ // elem: '.layui-laydate-range'
+ // ,style: 'width: 150px'
+ // , range: true
+ // });
});
/* 琛ㄦ牸鏁版嵁閲嶈浇 */
function tableReload(child) {
var searchData = {};
- $.each($('#search-box [name]').serializeArray(), function () {
+ $.each($('#search-box [name]').serializeArray(), function() {
searchData[this.name] = this.value;
+ if (this.name == 'orderTime') {
+ searchData.startTime = this.value.substring(0, 10);
+ searchData.endTime = this.value.substring(13, this.value.length);
+ }
+ if (this.name == 'orderTimeDelivery') {
+ searchData.startTimeDelivery = this.value.substring(0, 10);
+ searchData.endTimeDelivery = this.value.substring(13, this.value.length);
+ }
+ if (this.name == 'orderTimeOut') {
+ searchData.startTimeOut = this.value.substring(0, 10);
+ searchData.endTimeOut = this.value.substring(13, this.value.length);
+ }
});
-
- console.log('鎼滅储鍐呭', searchData);
-
- // (child ? parent.tableIns : tableIns).reload({
- // where: searchData,
- // page: {
- // curr: pageCurr
- // },
- // done: function (res, curr, count) {
- // if (res.code === 403) {
- // top.location.href = baseUrl + "/";
- // }
- // pageCurr = curr;
- // if (res.data.length === 0 && count !== 0) {
- // tableIns.reload({
- // where: searchData,
- // page: {
- // curr: pageCurr - 1
- // }
- // });
- // pageCurr -= 1;
- // }
- // limit(child);
- // // 褰撳墠鍒嗛〉鏁版嵁瀛樺偍
- // locNormalList = res.data;
- // }
- // });
+ (child ? parent.tableIns : tableIns).reload({
+ where: searchData,
+ page: {
+ curr: pageCurr
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl+"/";
+ }
+ pageCurr=curr;
+ if (res.data.length === 0 && count !== 0) {
+ tableIns.reload({
+ where: searchData,
+ page: {
+ curr: pageCurr-1
+ }
+ });
+ pageCurr -= 1;
+ }
+ // limit(child);
+ }
+ });
}
+// function tableReload(child) {
+// var searchData = {};
+// $.each($('#search-box [name]').serializeArray(), function () {
+// if (this.name == 'orderCode') {
+// searchData.orderCode = this.value;
+// }
+// if (this.name == 'orderTime') {
+// searchData.startTime = this.value.substring(0, 10);
+// searchData.endTime = this.value.substring(13, this.value.length);
+// }
+// });
+//
+// console.log(searchData);
+//
+// (child ? parent.tableIns : tableIns).reload({
+// where: searchData,
+// page: {
+// curr: pageCurr
+// },
+// done: function (res, curr, count) {
+// if (res.code === 403) {
+// top.location.href = baseUrl + "/";
+// }
+// pageCurr = curr;
+// if (res.data.length === 0 && count !== 0) {
+// tableIns.reload({
+// where: searchData,
+// page: {
+// curr: pageCurr - 1
+// }
+// });
+// pageCurr -= 1;
+// }
+// // limit(child);
+// // 褰撳墠鍒嗛〉鏁版嵁瀛樺偍
+// locNormalList = res.data;
+// }
+// });
+// }
/* 鐩戝惉鍥炶溅浜嬩欢 */
$('body').keydown(function () {
--
Gitblit v1.9.1