<script type="text/html" template lay-done="layui.data.done(d);">
|
<table class="layui-table layui-form" lay-filter="LAY-app-CoreCmsPlanOrder-detailsForm" id="LAY-app-CoreCmsPlanOrder-detailsForm">
|
<colgroup>
|
<col width="100">
|
<col>
|
</colgroup>
|
<tbody>
|
|
|
|
|
|
|
<tr>
|
<td style="background-color:lightsteelblue;width:25%;">
|
商品名称
|
</td>
|
<td style="background-color: lightsteelblue; width: 25%;">
|
商品规格
|
</td>
|
<td style="background-color: lightsteelblue; width: 25%;">
|
计划数量
|
</td>
|
|
<td style="background-color: lightsteelblue; width: 25%;">
|
调整数量
|
</td>
|
|
</tr>
|
|
{{# layui.each(d.params.data, function(index, item){ }}
|
<tr>
|
<td>
|
{{ item.name }}
|
</td>
|
<td>
|
{{ item.specification }}
|
</td>
|
<td>
|
{{ item.nums }}
|
</td>
|
|
<td>
|
{{ item.numsnew }}
|
</td>
|
|
</tr>
|
{{# }); }}
|
|
|
|
|
|
<!--<tr>
|
<td style="background-color:lightsteelblue;" colspan="4">
|
修改订单
|
</td>
|
|
</tr>
|
<tr>
|
<td style="background-color:lightsteelblue;">
|
商品名称
|
</td>
|
<td style="background-color:lightsteelblue;">
|
单价(元)
|
</td>
|
<td style="background-color:lightsteelblue;">
|
数量
|
</td>
|
<td style="background-color:lightsteelblue;">
|
总价(元)
|
</td>
|
</tr>
|
|
{{# layui.each(d.params.data.modelItem2, function(index, item){ }}
|
<tr>
|
<td>
|
{{ item.name }} {{ item.specification }}
|
</td>
|
<td>
|
{{ item.price }}
|
</td>
|
<td>
|
{{ item.nums }}
|
</td>
|
<td>
|
{{ item.amount }}
|
</td>
|
</tr>
|
{{# }); }}-->
|
|
</tbody>
|
</table>
|
|
|
<div class="layui-form-item text-right">
|
<input type="button" class="layui-btn" value="打印" onclick="print()">
|
</div>
|
</script>
|
<script>
|
var debug= layui.setter.debug;
|
layui.data.done = function (d) {
|
//开启调试情况下获取接口赋值数据
|
if (debug) { console.log(d.params.data); }
|
|
layui.use(['admin', 'form', 'coreHelper'], function () {
|
var $ = layui.$
|
, setter = layui.setter
|
, admin = layui.admin
|
, coreHelper = layui.coreHelper
|
, form = layui.form;
|
form.render(null, 'LAY-app-CoreCmsPlanOrder-detailsForm');
|
});
|
};
|
|
|
function print() {
|
|
// 使用方法:
|
// 假设你有一个id为"printSection"的HTML元素,你想打印这个元素的内容
|
|
|
var v = document.createElement("div");
|
$(v).append($("#LAY-app-CoreCmsPlanOrder-detailsForm").prop("outerHTML") + '<style type="text/css">table { width: 595px;border-collapse: collapse;} td {border:1px solid #F00 }</style></div>');
|
|
var h = window.open("Print_window", "_blank");
|
h.document.write($(v).prop("outerHTML"));
|
h.document.close();
|
h.print();
|
h.close();
|
}
|
|
|
|
|
|
|
|
</script>
|