This commit is contained in:
cwchen 2024-11-16 14:10:44 +08:00
parent 032f542711
commit 33e84b5e0c
1 changed files with 7 additions and 6 deletions

View File

@ -4,8 +4,6 @@ let pageNum = 1;
function setParams(params) {
objParam = JSON.parse(params);
console.log(objParam);
$('#code').html(objParam.code);
$('#titleName').html(objParam.times + '配件盘点记录');
layui.use(["form", "table", 'upload', 'layer'], function () {
@ -38,8 +36,9 @@ function getDetailsById() {
}, null);
// 基本数据表格赋值
function setTableData(obj) {
let content = '盘盈:' + obj.addNum + ' 盘亏:' + obj.subNum + '';
$('#codeValue').html(obj.code + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs(' + JSON.stringify(obj) + ')\'>查看概述</a>');
$('#addOrSubNum').html(0 + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs2(' + JSON.stringify(obj) + ')\'>查看概述</a>');
$('#addOrSubNum').html(content + '<a style="margin:0 5px;color:#409EFF;cursor: pointer;" onclick=\'viewGs2(' + JSON.stringify(obj) + ')\'>查看概述</a>');
$('#startTime').html(obj.startTime);
$('#endTime').html(obj.endTime);
$('#remark').html(obj.remark);
@ -305,17 +304,19 @@ function viewGs(obj) {
}
function viewGs2(obj) {
let content = '<p style="color: #F56C6C;font-size:16px;">盘盈:<span style="color: #262626;font-size:14px;">' + obj.addMsg + '</span></p><p style="color: #F56C6C;font-size:16px;">盘亏:<span style="color: #262626;font-size:14px;">' + obj.subMsg + '</span></p>';
let content2 = '盘盈:'+obj.addMsg+' 盘亏:'+obj.subMsg+'';
layer.open({
type: 1,
shade: false, // 不显示遮罩
content: '<div style="padding: 1%;">盘盈喷漆165=>180 防撞条210=>280 晾衣杆12=>18 挡水胶7=>80洗菜盆2=>10 主控楼隔板10=>18 不锈钢踢脚板3=>18喷漆165=>180 喷漆165=>180 防撞条210=>280 晾衣杆12=>18 挡水胶7=>80洗菜盆2=>10 主控楼隔板10=>18 不锈钢踢脚板3=>18 。<br>盘亏喷漆165=>100 防撞条210=>200 晾衣杆12=>10 挡水胶7=>1洗菜盆2=>0 主控楼隔板10=>8 不锈钢踢脚板3=>1喷漆165=>120 喷漆165=>110 防撞条210=>180 晾衣杆12=>11 挡水胶7=>2洗菜盆2=>1 主控楼隔板10=>3 不锈钢踢脚板3=>1 。</div>',
title: '<h3 style="color: #F56C6C;">' + obj.inputDay + '盘点概述:</h3>',
content: '<div style="padding: 1%;">' + content + '</div>',
title: '<h3 style="color: #F56C6C;">' + obj.startTime + '~' + obj.endTime + '盘点概述:</h3>',
btn: ['复制文字', '关闭'],
area: ['60%', '50%'],
move: false,
btnAlign: 'c', // 按钮居中显示
btn1: function () {
exeCommandCopyText(obj.infoMsg);
exeCommandCopyText(content2);
},
btn2: function () {
layer.close();