39 lines
2.0 KiB
Plaintext
39 lines
2.0 KiB
Plaintext
@model HHWMS.Web.MaterialListVM
|
|
@inject IStringLocalizer<Program> Localizer;
|
|
|
|
<wt:searchpanel vm="@Model" reset-btn="true">
|
|
<wt:row items-per-row="ItemsPerRowEnum.Three">
|
|
<wt:textbox field="Searcher.MaterialCode" />
|
|
<wt:textbox field="Searcher.MaterialType" />
|
|
<wt:textbox field="Searcher.MaterialName" />
|
|
<wt:textbox field="Searcher.MaterialSpec" />
|
|
<wt:textbox field="Searcher.MaterialUnit" />
|
|
<wt:textbox field="Searcher.Batch" />
|
|
</wt:row>
|
|
</wt:searchpanel>
|
|
<wt:grid vm="@Model" url="/configs/Material/Search"/>
|
|
<script>
|
|
let template =
|
|
{"panels":[{"index":0,"height":60,"width":100,"paperHeader":43.5,"paperFooter":170.07874015748033,"printElements":[{"options":{"left":22.5,"top":30,"height":22.5,"width":139.5,"title":"编码","field":"MaterialCode","testData":"code","textContentVerticalAlign":"middle"},"printElementType":{"type":"text"}},{"options":{"left":22.5,"top":73.5,"height":22.5,"width":138,"title":"图号","field":"MaterialType","testData":"tuhao","textContentVerticalAlign":"middle"},"printElementType":{"type":"text"}},{"options":{"left":22.5,"top":117,"height":22.5,"width":138,"title":"名称","field":"MaterialName","testData":"name","textContentVerticalAlign":"middle"},"printElementType":{"type":"text"}},{"options":{"left":189,"top":52.5,"height":63,"width":75,"field":"MaterialCode","testData":"code","textType":"qrcode"},"printElementType":{"type":"text"}}],"paperNumberLeft":253.5,"paperNumberTop":148.5,"paperNumberDisabled":true}]}
|
|
let printData = [];
|
|
|
|
function print(ids, datas) {
|
|
|
|
datas.forEach(function (value, index, arr) {
|
|
printData.push({
|
|
MaterialCode: value.MaterialCode,
|
|
MaterialType: value.MaterialType,
|
|
MaterialName: value.MaterialName,
|
|
})
|
|
});
|
|
|
|
hiprint.init();
|
|
var hiprintTemplate = new hiprint.PrintTemplate({
|
|
template: template
|
|
});
|
|
hiprintTemplate.print(printData);
|
|
printData = [];
|
|
|
|
}
|
|
</script>
|