容器编码打印,入库页面编写

This commit is contained in:
zhougf committed 2025-05-22 13:29:30 +08:00
1 parent e90e0db019
commit 541fb5df6e
10 files changed
+432 -362

No files matched your search

@@ -3,11 +3,11 @@
<wt:form vm="@Model">
<wt:row items-per-row="ItemsPerRowEnum.Two">
<wt:textbox field="Entity.Type" />
<wt:textbox field="Num" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
<wt:combobox field="Entity.Type" items="ContainerType" />
<wt:textbox field="Num" />
<wt:textbox field="Entity.Length" />
<wt:textbox field="Entity.Width" />
<wt:textbox field="Entity.Height" />
</wt:row>
<wt:row align="AlignEnum.Right">
<wt:submitbutton />
@@ -2,15 +2,62 @@
@inject IStringLocalizer<Program> Localizer;
<wt:searchpanel vm="@Model" reset-btn="true">
<wt:row items-per-row="ItemsPerRowEnum.Three">
<wt:textbox field="Searcher.Code" />
<wt:combobox field="Searcher.Type" items="ContainerType" />
<wt:combobox field="Searcher.IsLock" />
<wt:combobox field="Searcher.Status" items="ContainerStatus" />
<wt:textbox field="Searcher.LocationCode" />
<wt:textbox field="Searcher.Length" />
<wt:textbox field="Searcher.Width" />
<wt:textbox field="Searcher.Height" />
</wt:row>
<wt:row items-per-row="ItemsPerRowEnum.Three">
<wt:textbox field="Searcher.Code"/>
<wt:combobox field="Searcher.Type" items="ContainerType"/>
<wt:combobox field="Searcher.IsLock"/>
<wt:combobox field="Searcher.Status" items="ContainerStatus"/>
<wt:textbox field="Searcher.LocationCode"/>
<wt:textbox field="Searcher.Length"/>
<wt:textbox field="Searcher.Width"/>
<wt:textbox field="Searcher.Height"/>
</wt:row>
</wt:searchpanel>
<wt:grid vm="@Model" url="/configs/Container/Search"/>
<script>
let template =
{
"panels": [{
"index": 0,
"height": 60,
"width": 100,
"paperHeader": 43.5,
"paperFooter": 170.07874015748033,
"printElements": [{
"options": {
"left": 18,
"top": 25.5,
"height": 106.5,
"width": 246,
"title": "code",
"testData": "",
"field": "code",
"fontSize": 18,
"textAlign": "center",
"lineHeight": 24,
"textType": "barcode"
}, "printElementType": {"type": "text"}
}],
"paperNumberLeft": 258,
"paperNumberTop": 144,
"paperNumberDisabled": true
}]
};
let printData = [];
function print(ids, datas) {
console.log(datas)
datas.forEach(function (value, index, arr) {
printData.push({code: value.Code})
});
hiprint.init();
var hiprintTemplate = new hiprint.PrintTemplate({
template: template
});
hiprintTemplate.print(printData);
printData = [];
}
</script>