修改事务,标签打印
This commit is contained in:
1 parent
cfbddf7e9e
commit
f15b26fcc5
8 files changed
+171
-5
No files matched your search
@@ -256,5 +256,10 @@ namespace HHWMS.Web.Controllers
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
[ActionDescription("Sys.Print")]
|
||||||
|
public ActionResult Print()
|
||||||
|
{
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,8 @@ public class XWMSMFMController : BaseController
|
|||||||
{
|
{
|
||||||
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
||||||
var _unitwork = new UnitWork(Wtm);
|
var _unitwork = new UnitWork(Wtm);
|
||||||
using (var tran = _unitwork.BeginTransaction())
|
var dc = Wtm.CreateDC(cskey: "hangyong");
|
||||||
|
using (var tran = dc.BeginTransaction())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -93,7 +93,8 @@ public class XWMSPOHController : BaseController
|
|||||||
{
|
{
|
||||||
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
||||||
var _unitwork = new UnitWork(Wtm);
|
var _unitwork = new UnitWork(Wtm);
|
||||||
using (var tran = _unitwork.BeginTransaction())
|
var dc = Wtm.CreateDC(cskey: "hangyong");
|
||||||
|
using (var tran = dc.BeginTransaction())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -99,7 +99,8 @@ public class XWMSPTHController : BaseController
|
|||||||
{
|
{
|
||||||
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
||||||
var _unitwork = new UnitWork(Wtm);
|
var _unitwork = new UnitWork(Wtm);
|
||||||
using (var tran = _unitwork.BeginTransaction())
|
var dc = Wtm.CreateDC(cskey: "hangyong");
|
||||||
|
using (var tran = dc.BeginTransaction())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ public class XWMSSHIPController : BaseController
|
|||||||
{
|
{
|
||||||
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
||||||
var _unitwork = new UnitWork(Wtm);
|
var _unitwork = new UnitWork(Wtm);
|
||||||
using (var tran = _unitwork.BeginTransaction())
|
var dc = Wtm.CreateDC(cskey: "hangyong");
|
||||||
|
using (var tran = dc.BeginTransaction())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -87,7 +87,8 @@ public class XWMSSOHController : BaseController
|
|||||||
{
|
{
|
||||||
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
var warehouseId = Wtm.LoginUserInfo.Groups.FirstOrDefault().GroupCode;
|
||||||
var _unitwork = new UnitWork(Wtm);
|
var _unitwork = new UnitWork(Wtm);
|
||||||
using (var tran = _unitwork.BeginTransaction())
|
var dc = Wtm.CreateDC(cskey: "hangyong");
|
||||||
|
using (var tran = dc.BeginTransaction())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ namespace HHWMS.Web
|
|||||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800),
|
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.BatchDelete, Localizer["Sys.BatchDelete"], "xwms", dialogWidth: 800),
|
||||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800),
|
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.Import, Localizer["Sys.Import"], "xwms", dialogWidth: 800),
|
||||||
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"),
|
this.MakeStandardAction("ReceiptDetail2", GridActionStandardTypesEnum.ExportExcel, Localizer["Sys.Export"], "xwms"),
|
||||||
|
this.MakeAction("ReceiptDetail2","Print",Localizer["Sys.Print"],Localizer["Sys.Print"],GridActionParameterTypesEnum.SingleId,"xwms")
|
||||||
|
.SetShowDialog(false).SetOnClickScript("print"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,5 +28,159 @@
|
|||||||
ff.OpenDialog('/xwms/ReceiptDetail2/Create/' + headerId, '@Guid.NewGuid()', '添加明细', 600);
|
ff.OpenDialog('/xwms/ReceiptDetail2/Create/' + headerId, '@Guid.NewGuid()', '添加明细', 600);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let template = {
|
||||||
|
"panels": [{
|
||||||
|
"index": 0,
|
||||||
|
"height": 50,
|
||||||
|
"width": 80,
|
||||||
|
"paperHeader": 43.5,
|
||||||
|
"paperFooter": 141.73228346456693,
|
||||||
|
"printElements": [{
|
||||||
|
"options": {
|
||||||
|
"left": 3,
|
||||||
|
"top": 3,
|
||||||
|
"height": 40,
|
||||||
|
"width": 220,
|
||||||
|
"field": "lot",
|
||||||
|
"testData": "123123124412412544534214354432255424213412341324123",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textContentVerticalAlign": "middle"
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 3,
|
||||||
|
"top": 3,
|
||||||
|
"height": 130,
|
||||||
|
"width": 220,
|
||||||
|
"borderWidth": "1.5",
|
||||||
|
"borderStyle": "solid"
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "rect"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 3,
|
||||||
|
"top": 42,
|
||||||
|
"height": 9,
|
||||||
|
"width": 219
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "hline"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 135,
|
||||||
|
"top": 42,
|
||||||
|
"height": 90,
|
||||||
|
"width": 9
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "vline"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 3,
|
||||||
|
"top": 43.5,
|
||||||
|
"height": 28.5,
|
||||||
|
"width": 132,
|
||||||
|
"field": "code",
|
||||||
|
"testData": "1324123412341234123",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textContentVerticalAlign": "middle"
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 150,
|
||||||
|
"top": 49.5,
|
||||||
|
"height": 48,
|
||||||
|
"width": 51,
|
||||||
|
"textType": "qrcode",
|
||||||
|
"field": "qrcode",
|
||||||
|
"testData": "1234123413234132"
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 3,
|
||||||
|
"top": 72,
|
||||||
|
"height": 9,
|
||||||
|
"width": 132
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "hline"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 3,
|
||||||
|
"top": 72,
|
||||||
|
"height": 30,
|
||||||
|
"width": 132,
|
||||||
|
"field": "qty",
|
||||||
|
"testData": "5555",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textContentVerticalAlign": "middle"
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 4.5,
|
||||||
|
"top": 102,
|
||||||
|
"height": 9,
|
||||||
|
"width": 217.5
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "hline"
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
"options": {
|
||||||
|
"left": 4.5,
|
||||||
|
"top": 102,
|
||||||
|
"height": 28.5,
|
||||||
|
"width": 132,
|
||||||
|
"field": "batch",
|
||||||
|
"testData": "HYB2202030003",
|
||||||
|
"textAlign": "center",
|
||||||
|
"textContentVerticalAlign": "middle"
|
||||||
|
},
|
||||||
|
"printElementType": {
|
||||||
|
"type": "text"
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
"paperNumberLeft": 196.5,
|
||||||
|
"paperNumberTop": 118.5,
|
||||||
|
"paperNumberDisabled": true
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
|
||||||
|
let printData = [];
|
||||||
|
|
||||||
|
function print(ids, datas) {
|
||||||
|
datas.forEach(function (value, index, arr) {
|
||||||
|
printData.push({
|
||||||
|
lot:value.MaterialName + '|' + value.Lot,
|
||||||
|
code: value.MaterialCode,
|
||||||
|
batch: value.Batch,
|
||||||
|
qty: value.Qty,
|
||||||
|
qrcode: 'MT.' + value.MaterialCode + '@@@@LT.' + value.Batch
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
hiprint.init();
|
||||||
|
var hiprintTemplate = new hiprint.PrintTemplate({
|
||||||
|
template: template
|
||||||
|
});
|
||||||
|
hiprintTemplate.print(printData);
|
||||||
|
printData = [];
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
Reference in new issue
Block a user