';
if (type === 1) { // 需用量
html += '
';
- } else if (type === 2) { // 需用天数
- html += '
';
+ } else if (type === 2) { // 退还日期
+ html += '
';
} else if (type === 3) { // 备注
html += '';
}
@@ -352,7 +360,7 @@ function goOnAddData() {
// 校验数据
function checkValue(that, type, name) {
let value = $(that).val();
- if (type === 1 || type === 2) { // 需用量 / 需用天数
+ if (type === 1) { // 需用量 / 需用天数
const regex = /^(0|[1-9]\d{0,6})$/;
if (!regex.test(value) && value) {
layer.msg('' + name + '输入有误,请重新输入!', { icon: 5 })
diff --git a/js/aq_demand_plan/child/choose_type_list.js b/js/aq_demand_plan/child/choose_type_list.js
index a5fe253..c174e9b 100644
--- a/js/aq_demand_plan/child/choose_type_list.js
+++ b/js/aq_demand_plan/child/choose_type_list.js
@@ -8,12 +8,13 @@ let cjList = [];
let jjDetailArr = []; // 入库配件类型数据
function setParams(obj) {
objParam = JSON.parse(obj);
- layui.use(["form", "table", 'element', 'layer', 'util'], function () {
+ layui.use(["form", "table", 'element', 'layer', 'util', 'laydate'], function () {
form = layui.form;
table = layui.table;
element = layui.element;
layer = layui.layer;
util = layui.util;
+ laydate = layui.laydate;
initTable();
});
}
@@ -155,12 +156,17 @@ function initTable() {
},
{
field: "times",
- width: '15%',
- title: "
* 需用天数",
+ width: "15%",
+ title: "退还日期",
unresize: true,
align: "center",
- edit: 'text',
- style: 'outline: 1px solid #e6e6e6;outline-offset: -5px;',
+ templet: (d) =>
+ '
',
+ style: "outline: 1px solid #e6e6e6;outline-offset: -5px;",
},
{
field: "remarks",
@@ -195,6 +201,22 @@ function initTable() {
}
}
}
+
+ // 初始化日期选择器
+ res.data.forEach((item) => {
+ laydate.render({
+ elem: "#date_" + item.id,
+ done: (value) => {
+ // 更新数据
+ const data = {}
+ data.id = item.id
+ data.times = value
+ item.times = data.times
+ updateOrAddObject(item.id, item)
+ },
+ })
+ })
+
//设置全选checkbox的选中状态,只有改变LAY_CHECKED的值, table.checkStatus才能抓取到选中的状态
let checkStatus = table.checkStatus('currentTableId');//这里的lightTable是指分页中的id
if (checkStatus.isAll) {//是否全选
@@ -207,7 +229,7 @@ function initTable() {
table.on('edit(currentTableId2)', function (obj) {
var field = obj.field; // 得到修改的字段
var value = obj.value // 得到修改后的值
- if (field === 'needNum' || field === 'times') { // 需用量 / 需用天数
+ if (field === 'needNum') { // 需用量 / 需用天数
if (value) {
const regex = /^(0|[1-9]\d{0,6})$/;
if (!regex.test(value)) {
diff --git a/js/aq_demand_plan/child/send_out_edit_form.js b/js/aq_demand_plan/child/send_out_edit_form.js
index e502957..48a9be8 100644
--- a/js/aq_demand_plan/child/send_out_edit_form.js
+++ b/js/aq_demand_plan/child/send_out_edit_form.js
@@ -229,9 +229,9 @@ function beforeSubmitApply() {
return layer.msg('序号为' + (i + 1) + '的数据,未选择检验日期', { icon: 7 });
}
}
- if (parseInt(o.needNum) < (cgNum + lkNum)) { // 采购量 大于需求量
- return layer.msg('序号为' + (i + 1) + '的数据,采购量和利库量不能大于需要量', { icon: 7 });
- }
+ // if (parseInt(o.needNum) < (cgNum + lkNum)) { // 采购量 大于需求量
+ // return layer.msg('序号为' + (i + 1) + '的数据,采购量和利库量不能大于需要量', { icon: 7 });
+ // }
}
openIframeByParamObj("quickAddForm", "采购发货确认", "./send_out_confirm.html", "92%", "92%", dataList);
}
diff --git a/js/aq_demand_plan/child/send_out_edit_form_table.js b/js/aq_demand_plan/child/send_out_edit_form_table.js
index 864d522..dfd4020 100644
--- a/js/aq_demand_plan/child/send_out_edit_form_table.js
+++ b/js/aq_demand_plan/child/send_out_edit_form_table.js
@@ -92,14 +92,14 @@ function checkValue(that, type) {
$(that).val(0);
return layer.msg('采购量输入有误,请重新输入!', { icon: 5 })
}
- if (value) {
- // 采购量不能大于需要量
- let needNum = $(that).parents('td').prev().html();
- if (parseInt(value) > parseInt(needNum)) {
- $(that).val(0);
- return layer.msg('采购量不能大于需要量,请重新输入!', { icon: 5 })
- }
- }
+ // if (value) {
+ // // 采购量不能大于需要量
+ // let needNum = $(that).parents('td').prev().html();
+ // if (parseInt(value) > parseInt(needNum)) {
+ // $(that).val(0);
+ // return layer.msg('采购量不能大于需要量,请重新输入!', { icon: 5 })
+ // }
+ // }
} else if (type === 2) { // 利库量
const regex = /^(0|[1-9]\d{0,6})$/;
if (!regex.test(value) && value) {
diff --git a/js/aq_demand_plan/child/send_out_form.js b/js/aq_demand_plan/child/send_out_form.js
index c9b2f7b..a2f1a67 100644
--- a/js/aq_demand_plan/child/send_out_form.js
+++ b/js/aq_demand_plan/child/send_out_form.js
@@ -160,9 +160,9 @@ function beforeSubmitApply() {
return layer.msg('序号为' + (i + 1) + '的数据,未选择检验日期', { icon: 7 });
}
}
- if (parseInt(o.needNum) < (cgNum + lkNum)) { // 采购量 大于需求量
- return layer.msg('序号为' + (i + 1) + '的数据,采购量和利库量不能大于需要量', { icon: 7 });
- }
+ // if (parseInt(o.needNum) < (cgNum + lkNum)) { // 采购量 大于需求量
+ // return layer.msg('序号为' + (i + 1) + '的数据,采购量和利库量不能大于需要量', { icon: 7 });
+ // }
}
openIframeByParamObj("quickAddForm", "采购发货确认", "./send_out_confirm.html", "92%", "92%", dataList);
}
diff --git a/js/aq_demand_plan/child/send_out_form_table.js b/js/aq_demand_plan/child/send_out_form_table.js
index 25a74ee..3d2ac06 100644
--- a/js/aq_demand_plan/child/send_out_form_table.js
+++ b/js/aq_demand_plan/child/send_out_form_table.js
@@ -74,14 +74,14 @@ function checkValue(that, type) {
$(that).val(0);
return layer.msg('采购量输入有误,请重新输入!', { icon: 5 })
}
- if (value) {
- // 采购量不能大于需要量
- let needNum = $(that).parents('td').prev().html();
- if (parseInt(value) > parseInt(needNum)) {
- $(that).val(0);
- return layer.msg('采购量不能大于需要量,请重新输入!', { icon: 5 })
- }
- }
+ // if (value) {
+ // // 采购量不能大于需要量
+ // let needNum = $(that).parents('td').prev().html();
+ // if (parseInt(value) > parseInt(needNum)) {
+ // $(that).val(0);
+ // return layer.msg('采购量不能大于需要量,请重新输入!', { icon: 5 })
+ // }
+ // }
} else if (type === 2) { // 利库量
const regex = /^(0|[1-9]\d{0,6})$/;
if (!regex.test(value) && value) {
diff --git a/js/aq_demand_plan/send_out_list.js b/js/aq_demand_plan/send_out_list.js
index e8b535e..c352ae7 100644
--- a/js/aq_demand_plan/send_out_list.js
+++ b/js/aq_demand_plan/send_out_list.js
@@ -5,6 +5,12 @@ layui.use(["form", "table", 'element'], function () {
form = layui.form;
table = layui.table;
element = layui.element;
+ laydate = layui.laydate;
+ laydate.render({
+ elem: '#ID-laydate-rangeLinked',
+ range: ['#startTime', '#endTime'],
+ rangeLinked: true
+ });
/* // 动态插入进度条元素
$("#num-progress").after(`
@@ -81,6 +87,8 @@ function queryTable(type) {
} else if (type === 2) {
$('#proName').val('');
$('#status').val('');
+ $('#startTime').val('');
+ $('#endTime').val('');
layui.form.render();
reloadTable(1);
}
@@ -101,7 +109,9 @@ function reloadTable(pageNum) {
where: {
encryptedData: JSON.stringify({
'proName': $('#proName').val(),
- 'status': $('#status').val()
+ 'status': $('#status').val(),
+ 'startTime': $('#startTime').val(),
+ 'endTime': $('#endTime').val()
}),
},
},
@@ -121,7 +131,9 @@ function initTable() {
where: {
encryptedData: JSON.stringify({
'proName': $('#proName').val(),
- 'status': $('#status').val()
+ 'status': $('#status').val(),
+ 'startTime': $('#startTime').val(),
+ 'endTime': $('#endTime').val()
}),
},
request: {
@@ -346,7 +358,9 @@ function schedule(d) {
function exportExcel() {
let params = {
'proName': $('#proName').val(),
- 'status': $('#status').val()
+ 'status': $('#status').val(),
+ 'startTime': $('#startTime').val(),
+ 'endTime': $('#endTime').val()
}
let url = dataUrl + "backstage/purchase/export";
exportExcelUtil(url, '采购发货', JSON.stringify(params));
diff --git a/page/aq_demand_plan/child/apply_plan_edit_form.html b/page/aq_demand_plan/child/apply_plan_edit_form.html
index d72efd6..922ecb0 100644
--- a/page/aq_demand_plan/child/apply_plan_edit_form.html
+++ b/page/aq_demand_plan/child/apply_plan_edit_form.html
@@ -114,7 +114,7 @@
规格 |
单位 |
*需用量 |
- *需用天数 |
+ 退还日期 |
备注 |
diff --git a/page/aq_demand_plan/child/apply_plan_form.html b/page/aq_demand_plan/child/apply_plan_form.html
index 1a358fc..aee8c9d 100644
--- a/page/aq_demand_plan/child/apply_plan_form.html
+++ b/page/aq_demand_plan/child/apply_plan_form.html
@@ -114,7 +114,7 @@
规格 |
单位 |
*需用量 |
- *需用天数 |
+ 退还日期 |
备注 |
diff --git a/page/aq_demand_plan/send_out_list.html b/page/aq_demand_plan/send_out_list.html
index fc79845..d290f9e 100644
--- a/page/aq_demand_plan/send_out_list.html
+++ b/page/aq_demand_plan/send_out_list.html
@@ -94,6 +94,17 @@
+