This commit is contained in:
parent
576d555ac3
commit
f574b7142e
|
|
@ -703,6 +703,7 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
context.setVariable("currencyType", saleContract.getCurrencyType());
|
||||
context.setVariable("zhTotalAmount", "合共人民币" + NumberChineseFormatterUtils.convertToChinese(saleContract.getAmount()) + "整");
|
||||
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
for (int i = 0; i < saleContractEntrys.size(); i++) {
|
||||
SaleContractEntryDO saleContractEntryDO = saleContractEntrys.get(i);
|
||||
ProductInfoDO productInfo = productInfoService.getProductInfo(saleContractEntryDO.getProductId());
|
||||
|
|
@ -735,20 +736,35 @@ public class SaleOrderServiceImpl implements SaleOrderService {
|
|||
specBuilder.append(thickness);
|
||||
}
|
||||
String spec = specBuilder.toString();
|
||||
Map<String,Object> items = new LinkedHashMap<>();
|
||||
int j = i + 1;
|
||||
PageUtil.setFirstPageNo(1);
|
||||
int start = PageUtil.getStart(pageIndex, pdfPageSize);
|
||||
context.setVariable("item" + j, start+j + "");
|
||||
context.setVariable("explain" + j, code);
|
||||
context.setVariable("qty" + j, saleContractEntryDO.getQty());
|
||||
context.setVariable("price" + j, saleContractEntryDO.getPrice());
|
||||
context.setVariable("discount" + j, saleContractEntryDO.getDiscount());
|
||||
context.setVariable("amount" + j, saleContractEntryDO.getAmount());
|
||||
context.setVariable("deliverydate" + j, DateUtil.date(saleContractEntryDO.getDeliveryDate()).toDateStr());
|
||||
context.setVariable("explain" + j + "1", name);
|
||||
context.setVariable("explain" + j + "2", details);
|
||||
context.setVariable("explain" + j + "3", spec);
|
||||
// context.setVariable("item" + j, start+j + "");
|
||||
// context.setVariable("explain" + j, code);
|
||||
// context.setVariable("qty" + j, saleContractEntryDO.getQty());
|
||||
// context.setVariable("price" + j, saleContractEntryDO.getPrice());
|
||||
// context.setVariable("discount" + j, saleContractEntryDO.getDiscount());
|
||||
// context.setVariable("amount" + j, saleContractEntryDO.getAmount());
|
||||
// context.setVariable("deliverydate" + j, DateUtil.date(saleContractEntryDO.getDeliveryDate()).toDateStr());
|
||||
// context.setVariable("explain" + j + "1", name);
|
||||
// context.setVariable("explain" + j + "2", details);
|
||||
// context.setVariable("explain" + j + "3", spec);
|
||||
|
||||
|
||||
items.put("item", start+j + "");
|
||||
items.put("explain", code);
|
||||
items.put("qty", saleContractEntryDO.getQty());
|
||||
items.put("price", saleContractEntryDO.getPrice());
|
||||
items.put("discount", saleContractEntryDO.getDiscount());
|
||||
items.put("amount", saleContractEntryDO.getAmount());
|
||||
items.put("deliverydate", DateUtil.date(saleContractEntryDO.getDeliveryDate()).toDateStr());
|
||||
items.put("explain"+ "1", name);
|
||||
items.put("explain"+ "2", details);
|
||||
items.put("explain"+ "3", spec);
|
||||
list.add(items);
|
||||
}
|
||||
context.setVariable("items",list);
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -125,30 +125,31 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td th:text="${item1}">1</td>
|
||||
<td th:text="${explain1}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${qty1}">12344</td>
|
||||
<td style="text-align: center; " th:text="${price1}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${discount1}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${amount1}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${deliverydate1}">2024-01-12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td scope="row" colspan="6" th:text="${explain11}">跨越多列的标题</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td scope="row" colspan="6" th:text="${explain12}">跨越多列的标题</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td scope="row" colspan="6" th:text="${explain13}">跨越多列的标题</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<span th:each="item, stat : ${items}" >
|
||||
<tr>
|
||||
<td th:text="${item.item}">1</td>
|
||||
<td th:text="${item.explain}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${item.qty}">12344</td>
|
||||
<td style="text-align: center; " th:text="${item.price}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${item.discount}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${item.amount}">Doe</td>
|
||||
<td style="text-align: center; " th:text="${item.deliverydate}">2024-01-12</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td scope="row" colspan="6" th:text="${item.explain1}">跨越多列的标题</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td scope="row" colspan="6" th:text="${item.explain2}">跨越多列的标题</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td scope="row" colspan="6" th:text="${item.explain3}">跨越多列的标题</td>
|
||||
</tr>
|
||||
</span>
|
||||
<!--
|
||||
<tr>
|
||||
<td th:text="${item2}">1</td>
|
||||
<td th:text="${explain2}">Doe</td>
|
||||
|
|
@ -262,7 +263,7 @@
|
|||
<tr>
|
||||
<td></td>
|
||||
<td scope="row" colspan="6" th:text="${explain63}">跨越多列的标题</td>
|
||||
</tr>
|
||||
</tr>-->
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue