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 48a9be8..e57b3b5 100644
--- a/js/aq_demand_plan/child/send_out_edit_form.js
+++ b/js/aq_demand_plan/child/send_out_edit_form.js
@@ -229,11 +229,18 @@ 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)) { // 采购量 大于需求量
+ layer.confirm('序号为' + (i + 1) + '的数据,采购量和利库量大于需要量是否确认?', {
+ btn: ['确定', '关闭'] //按钮
+ }, function(){
+ openIframeByParamObj("quickAddForm", "采购发货确认", "./send_out_confirm.html", "92%", "92%", dataList);
+ }, function(){
+
+ });
+ }
+
}
- openIframeByParamObj("quickAddForm", "采购发货确认", "./send_out_confirm.html", "92%", "92%", dataList);
}
// 提交
@@ -426,4 +433,4 @@ function closePage(data) {
frameId.contentWindow.sendOutSuccess(JSON.stringify(obj));
}
parent.layer.close(index); // 再执行关闭
-}
\ No newline at end of file
+}
diff --git a/js/aq_demand_plan/child/send_out_pro_detail.js b/js/aq_demand_plan/child/send_out_pro_detail.js
index ed7410b..b863aa6 100644
--- a/js/aq_demand_plan/child/send_out_pro_detail.js
+++ b/js/aq_demand_plan/child/send_out_pro_detail.js
@@ -41,9 +41,18 @@ function getProDetails() {
$('#money').html(' ¥ ' + (obj.money ? obj.money : 0));
$('#bmname').html(obj.bmname);
$('.layui-progress').remove();
+ console.log(obj)
+ var color = "layui-bg-orange";
+ if (obj.process < 100) {
+ color = "layui-bg-orange";
+ } else if (obj.process == 100) {
+ color = "layui-bg-primary";
+ } else if (obj.process > 100) {
+ color = "layui-bg-red";
+ }
$("#progress").after(`
`);
element.render();
@@ -58,7 +67,7 @@ function queryTable(type) {
let flag = checkValue(planCode);
if (flag) {
$('#planCode').val('');
- return layer.msg('需求计划编号查询包含特殊字符,请重新输入', { icon: 2 });
+ return layer.msg('需求计划编号查询包含特殊字符,请重新输入', {icon: 2});
}
reloadTable(1);
} else if (type === 2) {
@@ -77,17 +86,17 @@ function reloadData() {
// 重载表格
function reloadTable(pageNum) {
table.reload("currentTableId", {
- page: {
- curr: pageNum ? pageNum : 1,
+ page: {
+ curr: pageNum ? pageNum : 1,
+ },
+ where: {
+ encryptedData: JSON.stringify({
+ 'planCode': $('#planCode').val(),
+ 'status': $('#status').val(),
+ 'proId': objParam.proId
+ }),
+ },
},
- where: {
- encryptedData: JSON.stringify({
- 'planCode': $('#planCode').val(),
- 'status': $('#status').val(),
- 'proId': objParam.proId
- }),
- },
- },
);
}
@@ -139,7 +148,7 @@ function initTable() {
title: "需求计划编号",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
templet: function (d) {
return "" + d.planCode + "";
},
@@ -150,7 +159,7 @@ function initTable() {
title: "申请人",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
{
field: "createTime",
@@ -158,7 +167,7 @@ function initTable() {
width: '12%',
unresize: true,
align: "center",
- sort:true,
+ sort: true,
},
{
field: "remark",
@@ -166,7 +175,7 @@ function initTable() {
width: '14%',
unresize: true,
align: "center",
- sort:true,
+ sort: true,
templet: function (d) {
if (d.remark) {
if (d.remark.length > 60) {
@@ -185,7 +194,7 @@ function initTable() {
width: '8%',
unresize: true,
align: "center",
- sort:true,
+ sort: true,
templet: function (d) {
if (d.status === '未发货') {
return ' ● 待发货';
@@ -202,7 +211,7 @@ function initTable() {
title: "采购数量",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
templet: function (d) {
if (d.status === '未发货') {
return '/';
@@ -217,7 +226,7 @@ function initTable() {
title: "采购金额",
unresize: true,
align: "center",
- sort:true,
+ sort: true,
templet: function (d) {
if (d.status === '未发货') {
return '/';
@@ -232,7 +241,7 @@ function initTable() {
width: '8%',
align: "center",
unresize: true,
- sort:true,
+ sort: true,
templet: function (d) {
if (d.status === '未发货') {
return '/';
@@ -257,6 +266,7 @@ function initTable() {
html += "|
修改发货";
html += "|
二维码下载";
}
+ html += "|
撤销";
return html;
},
},
@@ -272,6 +282,25 @@ function initTable() {
});
}
+function deleteDetail(id){
+ console.log(id)
+ layer.confirm('是否撤销此数据?', {
+ btn: ['确定', '关闭'] //按钮
+ }, function(){
+ let url = dataUrl + `backstage/purchase/deleteDetail/${id}`;
+ ajaxRequest(url, "POST","", true, function () {
+ }, function (result) {
+ if (result.code === 200) {
+ layer.msg(result.msg, {icon: 1})
+ tableIns.reload("currentTableId");
+ }
+ }, function (xhr, status, error) {
+ errorFn(xhr, status, error)
+ }, null);
+ }, function(){
+
+ });
+}
// 导出
function exportExcel() {
diff --git a/js/aq_demand_plan/send_out_list.js b/js/aq_demand_plan/send_out_list.js
index d9c1536..cee8a0f 100644
--- a/js/aq_demand_plan/send_out_list.js
+++ b/js/aq_demand_plan/send_out_list.js
@@ -344,7 +344,7 @@ function schedule(d) {
} else if (d.progress === 100) {
color = "layui-bg-primary";
} else if (d.progress > 100) {
- color = "layui-bg-blue";
+ color = "layui-bg-red";
}
//设置页面进度条
return (