This commit is contained in:
jiang 2025-07-08 16:10:01 +08:00
parent 61d2818495
commit f40086b3b7
3 changed files with 62 additions and 26 deletions

View File

@ -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); // 再执行关闭
}
}

View File

@ -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(`
<div class="layui-progress" lay-showpercent="true" lay-filter="demo-filter-progress">
<div class="layui-progress-bar layui-bg-blue" lay-percent="${obj.process}%"></div>
<div class="layui-progress-bar ${color}" lay-percent="${obj.process}%"></div>
</div>
`);
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 "<a style='color:#409eff;' onclick='viewPlanDetail(" + JSON.stringify(d) + ")'>" + d.planCode + "</a>";
},
@ -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 '<span style="color:#ff9900;font-weight:bold;"> ● </span>待发货';
@ -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 += "<div class='splitLine'>|</div><a onclick='sendOutForm(" + JSON.stringify(d) + ",2)'>修改发货</a>";
html += "<div class='splitLine'>|</div><a onclick='downLoadQrCode(" + JSON.stringify(d) + ")'>二维码下载</a>";
}
html += "<div class='splitLine' >|</div><a style='color: red' onclick='deleteDetail(" + d.id + ")'>撤销</a>";
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() {

View File

@ -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 (