修改详情页面

This commit is contained in:
haozq 2026-02-06 18:02:45 +08:00
parent 9c73349f1b
commit f76d4f2233
3 changed files with 62 additions and 15 deletions

View File

@ -256,7 +256,7 @@
const params = {
"username": 'sa',
// "password": '3NBzZK7qxhMhrmvi63FnuQ==',
"password": 'ebbd6ea34bbab2b0813afcf59c8c9556',
"password": '44b572eb0784cccd96cde6f09e724e58',
}
// alert(params.username);

View File

@ -40,14 +40,55 @@ function getPurchaseDetails() {
}, null);
// 基本数据表格赋值
function setTableData(obj) {
$('#planCode').html(obj.planCode);
$('#cgNum').html(obj.cgNum);
$('#money').html(formatMoney(obj.money));
$('#lkNum').html(obj.lkNum);
$('#fhDay').html(obj.fhDay);
$('#jbUser').html(obj.jbUser);
$('#address').html(obj.address);
$('#remark').html(obj.remark);
const $dataBody = $('#dataBody');
$dataBody.empty();
if(obj.length > 0){
for (let i = 0; i < obj.length; i++) {
const dataList = obj[i];
const trHtml = `
<tr style='background-color:#FFFFFF;'>
<td>${dataList.planCode || '--'}</td>
<td>${dataList.cgNum || '--'}</td>
<td>${formatMoney(dataList.money)}</td>
<td>${dataList.lkNum || '--'}</td>
<td>${dataList.fhDay || '--'}</td>
<td>${dataList.jbUser || '--'}</td>
<td>${dataList.address || '--'}</td>
<td>
<button type="button" class="layui-btn layui-bg-blue no-print" onclick="print()">打印</button>
</td>
</tr>
`;
$dataBody.append(trHtml);
}
$('#remark').html(obj[0].remark);
}else{
const trHtml = `
<tr style='background-color:#FFFFFF;'>
<td>${obj.planCode || '--'}</td>
<td>${obj.cgNum || '--'}</td>
<td>${formatMoney(obj.money)}</td>
<td>${obj.lkNum || '--'}</td>
<td>${obj.fhDay || '--'}</td>
<td>${obj.jbUser || '--'}</td>
<td>${obj.address || '--'}</td>
<td>
<button type="button" class="layui-btn layui-bg-blue no-print" onclick="print()">打印</button>
</td>
</tr>
`;
$dataBody.append(trHtml);
// $('#planCode').html(obj.planCode);
// $('#cgNum').html(obj.cgNum);
// $('#money').html(formatMoney(obj.money));
// $('#lkNum').html(obj.lkNum);
// $('#fhDay').html(obj.fhDay);
// $('#jbUser').html(obj.jbUser);
// $('#address').html(obj.address);
$('#remark').html(obj.remark);
}
// 供应商信息
setSubInfos(obj.supInfoList);
// 附件文档

View File

@ -78,7 +78,8 @@
</div>
<div id="basic-table">
<table class="classTable">
<tr>
<thead>
<tr>
<th>需求计划编号</th>
<th>采购数量</th>
<th>采购金额</th>
@ -86,8 +87,11 @@
<th>采购发货时间</th>
<th>经办人</th>
<th>收货地址</th>
<th>操作</th>
</tr>
<tr>
</thead>
<tbody id="dataBody"></tbody>
<!-- <tr>
<td id="planCode"></td>
<td id="cgNum"></td>
<td id="money"></td>
@ -95,13 +99,15 @@
<td id="fhDay"></td>
<td id="jbUser"></td>
<td id="address"></td>
</tr> -->
<tfoot>
<tr>
<th colspan="8">备注</th>
</tr>
<tr>
<th colspan="7">备注</th>
</tr>
<tr>
<td colspan="7" id="remark"></td>
<td colspan="8" id="remark"></td>
</tr>
</tfoot>
</table>
</div>
</div>