库位打印 库位编码 可批量打印

This commit is contained in:
zgf 2023-09-13 23:45:30 +08:00
parent 1fa11ab235
commit b7acbf18ca
2 changed files with 65 additions and 0 deletions

View File

@ -33,6 +33,9 @@ namespace HHWMS.Web
this.MakeStandardAction("Location", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "configs", dialogWidth: 800),
this.MakeStandardAction("Location", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "configs"),
this.MakeAction("Location","AddLocation",Localizer["Location.AddLocation"],Localizer["Location.AddLocation"],GridActionParameterTypesEnum.NoId,"configs"),
this.MakeAction("Location","Print",Localizer["Sys.Print"],Localizer["Sys.Print"],GridActionParameterTypesEnum.MultiIds,"configs")
.SetShowDialog(false).SetOnClickScript("print"),
};
}

View File

@ -17,3 +17,65 @@
</wt:row>
</wt:searchpanel>
<wt:grid vm="@Model" url="/configs/Location/Search"/>
<script>
let template = {
"panels": [
{
"index": 0,
"height": 20,
"width": 30,
"paperHeader": 43.5,
"paperFooter": 56.69291338582678,
"printElements": [
{
"options": {
"left": 0,
"top": 0,
"height": 38,
"width": 84,
"field": "code",
"textType": "qrcode",
"barcodeMode": "CODE128A",
"hideTitle": true
},
"printElementType": {
"type": "text"
}
},
{
"options": {
"left": 0,
"top": 40,
"height": 10,
"width": 84,
"field": "code",
"textAlign": "center",
"hideTitle": true
},
"printElementType": {
"type": "text"
}
}
],
"paperNumberLeft": 55.5,
"paperNumberTop": 34.5,
"paperNumberDisabled": true
}
]
};
let printData = [];
function print(ids, 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>