| | |
| | | } |
| | | |
| | | .small-printElement-types .hiprint-printElement-type > li > ul > li > a { |
| | | height: 22px; |
| | | height: 30px; |
| | | /* padding: 12px 6px; */ |
| | | /* margin-left: -1px; */ |
| | | line-height: 20px; |
| | | line-height: 30px; |
| | | text-decoration: none; |
| | | background-color: #009688; |
| | | border: 1px solid #fff; |
| | |
| | | for (var p = "", l = 0; l < r.length; l++) { |
| | | p += o[l + ""]; |
| | | } |
| | | |
| | | n.sentToClient(p, t, e); |
| | | } |
| | | }, s.send(); |
| | | }); |
| | | } else alert("连接客户端失败"); |
| | | } else { t || (t = {}), this.getHtml(t, e).hiwprint(); }; |
| | | }, t.prototype.imageToBase64 = function (t) { |
| | | var e = $(t).attr("src"); |
| | | if (-1 == e.indexOf("base64")) try { |
| | |
| | | //业务方法------------------------Start------------------------------------- |
| | | //打印渲染js configElementTypeProvider方法 |
| | | //配置字段 |
| | | var datalist = [ |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "入库单号", |
| | |
| | | return function (options) { |
| | | //内容渲染 |
| | | var addElementTypes = function (context) { |
| | | context.testModule = []; |
| | | context.allElementTypes = []; |
| | | context.addPrintElementTypes( |
| | | "testModule", |
| | | [ |
New file |
| | |
| | | function getPrintDataList() { |
| | | var datalist = []; |
| | | var printDataList = function (type) { |
| | | //入库单据 |
| | | if (type == 'ArrivalNotice') { |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "入库单号", |
| | | "field": "ASNNo", |
| | | "tid": "configModule.ASNNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料编码", |
| | | "field": "SkuNo", |
| | | "tid": "configModule.SkuNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料名称", |
| | | "field": "SkuName", |
| | | "tid": "configModule.SkuName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "规格", |
| | | "field": "Standard", |
| | | "tid": "configModule.Standard", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次号", |
| | | "field": "LotNo", |
| | | "tid": "configModule.LotNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次描述", |
| | | "field": "LotText", |
| | | "tid": "configModule.LotText", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "数量", |
| | | "field": "Qty", |
| | | "tid": "configModule.Qty", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "单价", |
| | | "field": "Price", |
| | | "tid": "configModule.Price", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "总金额", |
| | | "field": "Money", |
| | | "tid": "configModule.Money", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "供货批次", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.SupplierLot", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "创建人", |
| | | "field": "CreateUserName", |
| | | "tid": "configModule.CreateUserName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "创建时间", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.CreateTime", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "tid": 'configModule.ArrivalNoticeDetail', |
| | | "field": 'ArrivalNoticeDetail', |
| | | "title": '入库单详情', |
| | | "type": 'table', |
| | | "editable": true, |
| | | "columnDisplayEditable": true,//列显示是否能编辑 |
| | | "columnDisplayIndexEditable": true,//列顺序显示是否能编辑 |
| | | "columnTitleEditable": true,//列标题是否能编辑 |
| | | "columnResizable": true, //列宽是否能调整 |
| | | "columnAlignEditable": true,//列对齐是否调整 |
| | | "columns": [[ |
| | | { title: '入库单号', align: 'center', field: 'ASNNo', width: 100 }, |
| | | { title: '物料编码', align: 'center', field: 'SkuNo', width: 100 }, |
| | | { title: '物料名称', align: 'center', field: 'SkuName', width: 100 }, |
| | | { title: '规格', align: 'center', field: 'Standard', width: 100 }, |
| | | { title: '供货批次', align: 'center', field: 'SupplierLot', width: 100 }, |
| | | { title: '批次号', align: 'center', field: 'LotNo', width: 100 }, |
| | | { title: '数量', align: 'center', field: 'Qty', width: 100 }, |
| | | { title: '创建人', align: 'center', field: 'CreateUserName', width: 100 }, |
| | | { title: '创建时间', align: 'center', field: 'CreateTime', width: 100 }, |
| | | ]] |
| | | } |
| | | ] |
| | | } |
| | | //出库单据 |
| | | else if (type == 'ExportNotice') { |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "出库单号", |
| | | "field": "SONo", |
| | | "tid": "configModule.SONo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料编码", |
| | | "field": "SkuNo", |
| | | "tid": "configModule.SkuNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料名称", |
| | | "field": "SkuName", |
| | | "tid": "configModule.SkuName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "规格", |
| | | "field": "Standard", |
| | | "tid": "configModule.Standard", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次号", |
| | | "field": "LotNo", |
| | | "tid": "configModule.LotNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次描述", |
| | | "field": "LotText", |
| | | "tid": "configModule.LotText", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "数量", |
| | | "field": "Qty", |
| | | "tid": "configModule.Qty", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "单价", |
| | | "field": "Price", |
| | | "tid": "configModule.Price", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "总金额", |
| | | "field": "Money", |
| | | "tid": "configModule.Money", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "领料人", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.MaterialUserName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "创建人", |
| | | "field": "CreateUserName", |
| | | "tid": "configModule.CreateUserName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "创建时间", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.CreateTime", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "tid": 'configModule.ExportNoticeDetail', |
| | | "field": 'ExportNoticeDetail', |
| | | "title": '出库单详情', |
| | | "type": 'table', |
| | | "editable": true, |
| | | "columnDisplayEditable": true,//列显示是否能编辑 |
| | | "columnDisplayIndexEditable": true,//列顺序显示是否能编辑 |
| | | "columnTitleEditable": true,//列标题是否能编辑 |
| | | "columnResizable": true, //列宽是否能调整 |
| | | "columnAlignEditable": true,//列对齐是否调整 |
| | | "columns": [[ |
| | | { title: '出库单号', align: 'center', field: 'SONo', width: 100 }, |
| | | { title: '物料编码', align: 'center', field: 'SkuNo', width: 100 }, |
| | | { title: '物料名称', align: 'center', field: 'SkuName', width: 100 }, |
| | | { title: '规格', align: 'center', field: 'Standard', width: 100 }, |
| | | { title: '批次号', align: 'center', field: 'LotNo', width: 100 }, |
| | | { title: '数量', align: 'center', field: 'Qty', width: 100 }, |
| | | { title: '领料人', align: 'center', field: 'MaterialUserName', width: 100 }, |
| | | { title: '创建人', align: 'center', field: 'CreateUserName', width: 100 }, |
| | | { title: '创建时间', align: 'center', field: 'CreateTime', width: 100 }, |
| | | ]] |
| | | } |
| | | ] |
| | | } |
| | | //请验单 |
| | | else if (type == 'QTBill') { |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "物料编码", |
| | | "field": "SkuNo", |
| | | "tid": "configModule.SkuNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料名称", |
| | | "field": "SkuName", |
| | | "tid": "configModule.SkuName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "规格", |
| | | "field": "Standard", |
| | | "tid": "configModule.Standard", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次号", |
| | | "field": "LotNo", |
| | | "tid": "configModule.LotNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次描述", |
| | | "field": "LotText", |
| | | "tid": "configModule.LotText", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "数量", |
| | | "field": "Qty", |
| | | "tid": "configModule.Qty", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "单价", |
| | | "field": "Price", |
| | | "tid": "configModule.Price", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "总金额", |
| | | "field": "Money", |
| | | "tid": "configModule.Money", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "供货批次", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.SupplierLot", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "创建人", |
| | | "field": "CreateUserName", |
| | | "tid": "configModule.CreateUserName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "创建时间", |
| | | "field": "CreateTime", |
| | | "tid": "configModule.CreateTime", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "有效期至", |
| | | "field": "ValidityPeriod", |
| | | "tid": "configModule.ValidityPeriod", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "贮存期至", |
| | | "field": "StoragePeriod", |
| | | "tid": "configModule.StoragePeriod", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "生产日期", |
| | | "field": "ProductionDate", |
| | | "tid": "configModule.ProductionDate", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "生产日期", |
| | | "field": "ProductionDate", |
| | | "tid": "configModule.ProductionDate", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "总件数", |
| | | "field": "Count", |
| | | "tid": "configModule.Count", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "每件数量", |
| | | "field": "Index", |
| | | "tid": "configModule.Index", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "整件数", |
| | | "field": "ZeroCount", |
| | | "tid": "configModule.ZeroCount", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "整件数", |
| | | "field": "Total", |
| | | "tid": "configModule.Total", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "收货数量", |
| | | "field": "ReceivedCount", |
| | | "tid": "configModule.ReceivedCount", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "包装单位", |
| | | "field": "PackUnit", |
| | | "tid": "configModule.PackUnit", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "请验时间", |
| | | "field": "QTTime", |
| | | "tid": "configModule.QTTime", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "请验部门", |
| | | "field": "QTDepartment", |
| | | "tid": "configModule.QTDepartment", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "请验部门", |
| | | "field": "QTDepartment", |
| | | "tid": "configModule.QTDepartment", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "生产商", |
| | | "field": "Producer", |
| | | "tid": "configModule.Producer", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "供货商", |
| | | "field": "Supplier", |
| | | "tid": "configModule.Supplier", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "包装容器", |
| | | "field": "PackContainer", |
| | | "tid": "configModule.PackContainer", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "存放地点", |
| | | "field": "StorageLocation", |
| | | "tid": "configModule.StorageLocation", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | |
| | | ] |
| | | } |
| | | //物料标签 |
| | | else if (type == 'MaterialLabel') { |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "物料编码", |
| | | "field": "SkuNo", |
| | | "tid": "configModule.SkuNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料名称", |
| | | "field": "SkuName", |
| | | "tid": "configModule.SkuName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "规格", |
| | | "field": "Standard", |
| | | "tid": "configModule.Standard", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次号", |
| | | "field": "LotNo", |
| | | "tid": "configModule.LotNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次描述", |
| | | "field": "LotText", |
| | | "tid": "configModule.LotText", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "数量", |
| | | "field": "Qty", |
| | | "tid": "configModule.Qty", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "单价", |
| | | "field": "Price", |
| | | "tid": "configModule.Price", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "总金额", |
| | | "field": "Money", |
| | | "tid": "configModule.Money", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "供货批次", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.SupplierLot", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "生产日期", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.ProductionDate", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "生产厂家", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.Manufacturer", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "复验期至", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.RetestPeriod", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "有效期", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.ValidityPeriod", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "贮存期至", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.StoragePeriod", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "总件数", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.Count", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "第几件", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.Index", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "贮存条件", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.StorageConditions", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | ] |
| | | } |
| | | //取样标签 |
| | | else if (type == 'SamplingLabel') { |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "物料编码", |
| | | "field": "SkuNo", |
| | | "tid": "configModule.SkuNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料名称", |
| | | "field": "SkuName", |
| | | "tid": "configModule.SkuName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "规格", |
| | | "field": "Standard", |
| | | "tid": "configModule.Standard", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次号", |
| | | "field": "LotNo", |
| | | "tid": "configModule.LotNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次描述", |
| | | "field": "LotText", |
| | | "tid": "configModule.LotText", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "数量", |
| | | "field": "Qty", |
| | | "tid": "configModule.Qty", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "单价", |
| | | "field": "Price", |
| | | "tid": "configModule.Price", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "总金额", |
| | | "field": "Money", |
| | | "tid": "configModule.Money", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "供货批次", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.SupplierLot", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "生产厂家", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.Manufacturer", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "取样件号", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.SampleIndex", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "样品编码", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.SampleCode", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "容器编号", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.ContainerCode", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "贮存条件", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.StorageConditions", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | |
| | | { |
| | | "type": "text", |
| | | "title": "取样人", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.Sampler", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "复核人", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.Reviewer", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "取样日期", |
| | | "field": "SupplierLot", |
| | | "tid": "configModule.SamplingDate", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | ] |
| | | } |
| | | //原料日报 |
| | | else if (type == 'MaterialDaily') { |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "物料编码", |
| | | "field": "SkuNo", |
| | | "tid": "configModule.SkuNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料名称", |
| | | "field": "SkuName", |
| | | "tid": "configModule.SkuName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "规格", |
| | | "field": "Standard", |
| | | "tid": "configModule.Standard", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次号", |
| | | "field": "LotNo", |
| | | "tid": "configModule.LotNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | tid: 'configModule.MaterialDaily', field: 'MaterialDaily', title: '原料日报', |
| | | type: 'table', |
| | | editable: true, |
| | | columnDisplayEditable: true,//列显示是否能编辑 |
| | | columnDisplayIndexEditable: true,//列顺序显示是否能编辑 |
| | | columnTitleEditable: true,//列标题是否能编辑 |
| | | columnResizable: true, //列宽是否能调整 |
| | | columnAlignEditable: true,//列对齐是否调整 |
| | | columns: [ |
| | | [ |
| | | { title: '物料编码', align: 'center', field: 'SkuNo', width: 100, rowspan: 2 }, |
| | | { title: '物料名称', align: 'center', field: 'SkuName', width: 100, rowspan: 2 }, |
| | | { title: '规格', align: 'center', field: 'Standard', width: 100, rowspan: 2 }, |
| | | { title: '单位', align: 'center', field: 'UnitName', width: 100, rowspan: 2 }, |
| | | { title: '上期结存数量', align: 'center', field: 'BeforeBalanceQuantity', width: 100, rowspan: 2 }, |
| | | { title: '入库数量', align: 'center', field: 'ArrivalCount', width: 100, colspan: 3 }, |
| | | { title: '出库数量', align: 'center', field: 'ExportCount', width: 100, colspan: 3 }, |
| | | { title: '今日结存数量', align: 'center', field: 'TodayBalanceQuantity', width: 100, rowspan: 2 }, |
| | | { title: '检验中数量', align: 'center', field: 'QuantityInInspection', width: 100, rowspan: 2 }, |
| | | { title: '未到数量', align: 'center', field: 'NotArrivedCount', width: 100, rowspan: 2 }, |
| | | ], |
| | | [ |
| | | { title: '今日入库', align: 'center', field: 'TodayArrival', width: 100 }, |
| | | { title: '本月入库', align: 'center', field: 'MonthArrival', width: 100 }, |
| | | { title: '本年入库', align: 'center', field: 'YearArrival', width: 100 }, |
| | | { title: '今日出库', align: 'center', field: 'TodayExport', width: 100 }, |
| | | { title: '本月出库', align: 'center', field: 'MonthExport', width: 100 }, |
| | | { title: '本年出库', align: 'center', field: 'YearExport', width: 100 } |
| | | ] |
| | | ] |
| | | } |
| | | ]; |
| | | } |
| | | //成品日报 |
| | | else if (type == 'ProductDaily') { |
| | | datalist = [ |
| | | { |
| | | "type": "text", |
| | | "title": "物料编码", |
| | | "field": "SkuNo", |
| | | "tid": "configModule.SkuNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "物料名称", |
| | | "field": "SkuName", |
| | | "tid": "configModule.SkuName", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "规格", |
| | | "field": "Standard", |
| | | "tid": "configModule.Standard", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | "type": "text", |
| | | "title": "批次号", |
| | | "field": "LotNo", |
| | | "tid": "configModule.LotNo", |
| | | "editable": true, |
| | | "columndisplayeditable": true, |
| | | "columndisplayindexeditable": true, |
| | | "columntitleeditable": true, |
| | | "columnresizable": true, |
| | | "columnaligneditable": true, |
| | | "columns": null |
| | | }, |
| | | { |
| | | tid: 'configModule.MaterialDaily', field: 'MaterialDaily', title: '成品日报', |
| | | type: 'table', |
| | | editable: true, |
| | | columnDisplayEditable: true,//列显示是否能编辑 |
| | | columnDisplayIndexEditable: true,//列顺序显示是否能编辑 |
| | | columnTitleEditable: true,//列标题是否能编辑 |
| | | columnResizable: true, //列宽是否能调整 |
| | | columnAlignEditable: true,//列对齐是否调整 |
| | | columns: [ |
| | | [ |
| | | { title: '物料编码', align: 'center', field: 'SkuNo', width: 100, rowspan: 2 }, |
| | | { title: '物料名称', align: 'center', field: 'SkuName', width: 100, rowspan: 2 }, |
| | | { title: '规格', align: 'center', field: 'Standard', width: 100, rowspan: 2 }, |
| | | { title: '单位', align: 'center', field: 'UnitName', width: 100, rowspan: 2 }, |
| | | { title: '上月数量', align: 'center', field: 'LastMonthCount', width: 100, rowspan: 2 }, |
| | | { title: '上月折件', align: 'center', field: 'LastMonthDiscount', width: 100, rowspan: 2 }, |
| | | |
| | | { title: '入库累计数量', align: 'center', field: 'ArrivalCount', width: 100, colspan: 3 }, |
| | | { title: '出库累计数量', align: 'center', field: 'ExportCount', width: 100, colspan: 3 }, |
| | | { title: '当月结存数', align: 'center', field: 'MonthBalanceQuantity', width: 100, rowspan: 2 }, |
| | | ], |
| | | [ |
| | | { title: '今日入库', align: 'center', field: 'TodayArrival', width: 100 }, |
| | | { title: '本月入库', align: 'center', field: 'MonthArrival', width: 100 }, |
| | | { title: '本年入库', align: 'center', field: 'YearArrival', width: 100 }, |
| | | { title: '今日出库', align: 'center', field: 'TodayExport', width: 100 }, |
| | | { title: '本月出库', align: 'center', field: 'MonthExport', width: 100 }, |
| | | { title: '本年出库', align: 'center', field: 'YearExport', width: 100 } |
| | | ] |
| | | ] |
| | | } |
| | | ]; |
| | | } |
| | | return datalist; |
| | | } |
| | | return printDataList; |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | else if(field.Level == '0'){ |
| | | if(doing){ |
| | | doing = false; |
| | | sendData(IP + "/sys/AddDic", param, 'post',function(res) { |
| | | console.log(res); |
| | | if (res.code == 0) { //成功 |
| | | layer.msg(res.msg, { |
| | | icon: 1, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() { |
| | | layer.close(index); //关闭弹层 |
| | | refreshTable($("#DictName").val(),$("#ParentNo").val(),$("#Level").val(), $("#IsEdit").val(), $("#IsAdd").val()); |
| | | doing = true; |
| | | }); |
| | | } |
| | | else |
| | | { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function() {doing = true;}); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | }); |
| | | submit.trigger('click'); |
| | |
| | | <script src="../../js/HiPrint/plugins/JsBarcode.all.min.js"></script> |
| | | <script src="../../js/HiPrint/plugins/qrcode.js"></script> |
| | | <script src="../../js/HiPrint/plugins/jquery.hiwprint.js"></script> |
| | | <script src="../../js/HiPrint/plugins/socket.io.js"></script> |
| | | <script src="../../js/HiPrint/plugins/config-etype-provider.js"></script> |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | |
| | | //这里获取上级页面的printData数据打印 |
| | | // var printData = deepClone(parent.printData); |
| | | var printData = JSON.parse($("#printData").val()); |
| | | hiprintTemplate.print(printData); |
| | | hiprintTemplate.print(printData,'打印'); |
| | | parent.layer.closeAll(); |
| | | }, 100); |
| | | } |
| | |
| | | $('#directPrint').click(function () { |
| | | hiprintTemplate.print(printData); |
| | | }); |
| | | |
| | | var datalist = []; |
| | | </script> |
| | | </body> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">类型</label> |
| | | <div class="layui-input-block" style="width: 184.44px;"> |
| | | <select id="Type" name="Type" id="Type" lay-verify="" lay-search> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit |
| | | lay-filter="LAY-app-contlist-search"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>搜索 |
| | |
| | | } |
| | | } |
| | | } |
| | | var TypeList = []; |
| | | synData(IP + "/Sys/GetDictionaryByParentNo?parentNo=" + "PrintType", {}, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#Type").append('<option value =' + res.data[i].DictNo + '>' + |
| | | res.data[i].DictName + '</option>'); |
| | | } |
| | | form.render('select'); |
| | | TypeList = res.data; |
| | | } |
| | | }); |
| | | sendData(IP + "/basis/GetRoleRightList", {}, 'get', function (res) { |
| | | $(function () { |
| | | $("#approvalBtn").hide(); |
| | |
| | | }, |
| | | { |
| | | field: 'Type', title: '模板类型', align: 'center', fixed: 'left', width: 100, templet: function (d) { |
| | | switch (d.Type) { |
| | | case "1": |
| | | return "入库货品"; |
| | | default: |
| | | return ""; |
| | | var mod = TypeList.filter(s => s.DictNo == d.Type)[0]; |
| | | if (mod) { |
| | | return mod.DictName; |
| | | } |
| | | else { |
| | | return ''; |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | }); |
| | | |
| | | //测试打印 |
| | | printData = [{ |
| | | SkuNo: '000001', |
| | | SkuName: '测试物料1', |
| | | Standard: 'xxxxxx', |
| | | LotNo: '20230801', |
| | | Qty: 100 |
| | | }, { |
| | | SkuNo: '000002', |
| | | SkuName: '测试物料2', |
| | | Standard: 'xxxxxx', |
| | | LotNo: '20230801', |
| | | Qty: 100 |
| | | }]; |
| | | openPrintDialog(printData) |
| | | // //测试打印 |
| | | // printData = [{ |
| | | // SkuNo: '000001', |
| | | // SkuName: '测试物料1', |
| | | // Standard: 'xxxxxx', |
| | | // LotNo: '20230801', |
| | | // Qty: 100 |
| | | // }, { |
| | | // SkuNo: '000002', |
| | | // SkuName: '测试物料2', |
| | | // Standard: 'xxxxxx', |
| | | // LotNo: '20230801', |
| | | // Qty: 100 |
| | | // }]; |
| | | // openPrintDialog(printData) |
| | | }); |
| | | </script> |
| | | </body> |
| | |
| | | <link rel="stylesheet" type="text/css" href="../../js/HiPrint/css/hiprint.css?t=' + Math.random() + '" /> |
| | | <link rel="stylesheet" type="text/css" href="../../js/HiPrint/css/print-lock.css" /> |
| | | <!-- <link rel="stylesheet" type="text/css" href="../../js/HiPrint/css/bootstrap.min.css" > --> |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/hiprint/content/bootstrap.min.js"></script> |
| | | <script src="../../js/HiPrint/hiprint.bundle.js?t=' + Math.random() + '"></script> |
| | | <script src="../../js/HiPrint/polyfill.min.js"></script> |
| | | <script src="../../js/HiPrint/plugins/jquery.minicolors.min.js"></script> |
| | | <script src="../../js/HiPrint/plugins/JsBarcode.all.min.js"></script> |
| | | <script src="../../js/HiPrint/plugins/qrcode.js"></script> |
| | | <script src="../../js/HiPrint/plugins/jquery.hiwprint.js"></script> |
| | | <script src="../../js/HiPrint/plugins/config-etype-provider.js"></script> |
| | | <style> |
| | | .layui-form-label { |
| | | padding: 5px 1px; |
| | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">类型</label> |
| | | <div class="layui-input-block" style="width: 184.44px;"> |
| | | <select id="Type" name="Type" id="Type" lay-verify="" lay-search> |
| | | <option value="1">入库货品</option> |
| | | <select id="Type" name="Type" id="Type" lay-verify="" lay-filter="Type" lay-search> |
| | | <!-- <option value="1">入库货品</option> --> |
| | | <option value=""></option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | |
| | | </form> |
| | | </div> |
| | | <div class="row"> |
| | | |
| | | <!--左侧div--> |
| | | <div class="layui-col-xs2" style="padding-right:0px;max-height:250mm;"> |
| | | <div class="small-printElement-types hiprintEpContainer"> |
| | | <content style="border-left:1px solid #e8e8e8; "> |
| | | <!--左侧div--> |
| | | <div class="layui-col-xs2" style="padding-right:0px;max-height:250mm;"> |
| | | <div class="small-printElement-types hiprintEpContainer"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!--打印部分--> |
| | | <div class="layui-col-xs6" style="margin-right: 50px;margin-left: 30px;"> |
| | | <!--打印头部分--> |
| | | <div class="hiprint-toolbar" style="margin-top:15px;"> |
| | | <ul> |
| | | <!-- <li><a class="hiprint-tizee-btn" onclick="setPaper('A3')">A3</a></li> --> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('A4')">A4</a></li> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('A5')">A5</a></li> |
| | | <!-- <li><a class="hiprint-tizee-btn" onclick="setPaper('B3')">B3</a></li> --> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('B4')">B4</a></li> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('B5')">B5</a></li> |
| | | <li><a class="hiprint-toolbar-item"><input type="number" id="customWidth" |
| | | style="width: 50px;height: 19px;border: 0px;" placeholder="宽/mm" /></a></li> |
| | | <li><a class="hiprint-toolbar-item"><input type="number" id="customHeight" |
| | | style="width: 50px;height: 19px;border: 0px;" placeholder="高/mm" /></a></li> |
| | | <li><a class="hiprint-tizee-btn" |
| | | onclick="setPaper($('#customWidth').val(),$('#customHeight').val())">自定义</a> |
| | | </li> |
| | | <li><a class="hiprint-tizee-btn" onclick="clearTemplate()">清空</a></li> |
| | | <!-- <li> <a class="btn hiprint-toolbar-item " |
| | | <!--打印部分--> |
| | | <div class="layui-col-xs8" style="overflow: hidden;outline: none;"> |
| | | <!--打印头部分--> |
| | | <div class="hiprint-toolbar" style="margin-top:15px;"> |
| | | <ul> |
| | | <!-- <li><a class="hiprint-tizee-btn" onclick="setPaper('A3')">A3</a></li> --> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('A4')">A4</a></li> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('A5')">A5</a></li> |
| | | <!-- <li><a class="hiprint-tizee-btn" onclick="setPaper('B3')">B3</a></li> --> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('B4')">B4</a></li> |
| | | <li><a class="hiprint-tizee-btn" onclick="setPaper('B5')">B5</a></li> |
| | | <li><a class="hiprint-toolbar-item"><input type="number" id="customWidth" |
| | | style="width: 50px;height: 19px;border: 0px;" placeholder="宽/mm" /></a></li> |
| | | <li><a class="hiprint-toolbar-item"><input type="number" id="customHeight" |
| | | style="width: 50px;height: 19px;border: 0px;" placeholder="高/mm" /></a></li> |
| | | <li><a class="hiprint-tizee-btn" |
| | | onclick="setPaper($('#customWidth').val(),$('#customHeight').val())">自定义</a> |
| | | </li> |
| | | <li><a class="hiprint-toolbar-item" onclick="rotatePaper()">旋转</a></li> |
| | | <li><a class="hiprint-tizee-btn" onclick="clearTemplate()">清空</a></li> |
| | | <!-- <li> <a class="btn hiprint-toolbar-item " |
| | | style="color: #fff;background-color: #d9534f;border-color: #d43f3a;" |
| | | id="preview">快速预览</a> </li> --> |
| | | <li> <a id="directPrint" class="btn hiprint-toolbar-item " |
| | | style="color: #fff;background-color: #d9534f; border-color: #d43f3a;">打印</a> |
| | | </li> |
| | | <!-- <li> |
| | | <li> |
| | | <a id="directPrint" class="btn hiprint-toolbar-item " |
| | | style="color: #fff;background-color: #d9534f; border-color: #d43f3a;">打印</a> |
| | | </li> |
| | | <!-- <li> <a id="directPrint2" class="btn hiprint-toolbar-item " |
| | | style="color: #fff;background-color: #d9534f; border-color: #d43f3a;">直接打印</a> |
| | | </li> --> |
| | | <!-- <li> |
| | | <a class="btn hiprint-toolbar-item" |
| | | style="color: #fff;background-color: #d9534f; border-color: #d43f3a;" |
| | | id="A4_getJson_toTextarea" onclick="BtnSubmit_Click()">保存</a> |
| | | </li> --> |
| | | </ul> |
| | | <div style="clear:both;"></div> |
| | | </ul> |
| | | <div style="clear:both;"></div> |
| | | </div> |
| | | <!--打印主体部分--> |
| | | <div id="hiprint-printTemplate" class="hiprint-printTemplate" |
| | | style="margin-top:20px; overflow-x: scroll; overflow-y: hidden;"> |
| | | </div> |
| | | <textarea class="form-control" rows="10" id="A4_textarea_json" style="display: none;"></textarea> |
| | | </div> |
| | | <!--打印主体部分--> |
| | | <div id="hiprint-printTemplate" class="hiprint-printTemplate" style="margin-top:20px;"> |
| | | |
| | | <div class="layui-col-xs2" style="max-height:260mm; overflow-y: scroll;"> |
| | | <div id="PrintElementOptionSetting" style="margin-top: 10px;"></div> |
| | | </div> |
| | | <textarea class="form-control" rows="10" id="A4_textarea_json" style="display: none;"></textarea> |
| | | </div> |
| | | </content> |
| | | <!--右侧div--> |
| | | <div class="layui-col-xs2" style="margin-left: 6%;max-height:260mm; overflow-y: scroll;"> |
| | | <div id="PrintElementOptionSetting" style="margin-top: 10px;"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="../../js/jquery-3.5.1.min.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script src="../../js/hiprint/content/bootstrap.min.js"></script> |
| | | <script src="../../js/HiPrint/hiprint.bundle.js?t=' + Math.random() + '"></script> |
| | | <script src="../../js/HiPrint/polyfill.min.js"></script> |
| | | <script src="../../js/HiPrint/plugins/jquery.minicolors.min.js"></script> |
| | | <script src="../../js/HiPrint/plugins/JsBarcode.all.min.js"></script> |
| | | <script src="../../js/HiPrint/plugins/qrcode.js"></script> |
| | | <script src="../../js/HiPrint/plugins/jquery.hiwprint.js"></script> |
| | | <!-- <script src="../../js/HiPrint/plugins/socket.io.js"></script> --> |
| | | <script src="../../js/HiPrint/plugins/config-etype-provider.js"></script> |
| | | <script src="../../js/HiPrint/plugins/print-data-list.js"></script> |
| | | <script src="../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../js/public.js"></script> |
| | | <script src="../../js/jquery.cookie.js"></script> |
| | | <script> |
| | | var datalist = []; |
| | | var printData = { |
| | | SkuNo: '000001', |
| | | SkuName: '测试物料1' |
| | |
| | | var field = data.field; // 获取表单字段值 |
| | | var jsondata = JSON.stringify(hiprintTemplate.getJsonTid()) |
| | | var url = "/sys/AddPrintTemplate"; |
| | | debugger; |
| | | var param = { |
| | | Name: data.field.Name, |
| | | Type: data.field.Type, |
| | |
| | | }); |
| | | return false; // 阻止默认 form 跳转 |
| | | }); |
| | | form.on('select(Type)', function (data) { |
| | | datalist = getPrintDataList()(data.value); |
| | | $(".hiprintEpContainer").html(""); //清除div内容 |
| | | hiprint.init({ |
| | | providers: [new configElementTypeProvider()] |
| | | }); |
| | | hiprint.PrintElementTypeManager.build('.hiprintEpContainer', |
| | | 'testModule'); |
| | | }) |
| | | |
| | | //修改 |
| | | GetPrintType(); |
| | | var id = getQueryString('id'); |
| | | if (!id) { |
| | | $('#Id').val(''); |
| | | id = 0; |
| | | } |
| | | else { |
| | | debugger |
| | | $('#Id').val(id); |
| | | $('#Name').val(parent.objRowsData.Name); |
| | | $('#Type').val(parent.objRowsData.Type); |
| | | $('#Status').val(parent.objRowsData.Status); |
| | | |
| | | form.render(); |
| | | } |
| | | function GetPrintType() { |
| | | sendData(IP + "/Sys/GetDictionaryByParentNo?parentNo=" + "PrintType", {}, 'get', function (res) { |
| | | if (res.code == 0) { //成功 |
| | | for (var i = 0; i < res.data.length; i++) { |
| | | $("#Type").append('<option value =' + res.data[i].DictNo + '>' + |
| | | res.data[i].DictName + '</option>'); |
| | | } |
| | | $("#Type").val(parent.objRowsData.Type); |
| | | form.render('select'); |
| | | } else { //不成功 |
| | | layer.msg(res.msg, { |
| | | icon: 2, |
| | | time: 2000 //2秒关闭(如果不配置,默认是3秒) |
| | | }, function () { }); |
| | | } |
| | | }); |
| | | } |
| | | }) |
| | | |
| | |
| | | |
| | | //预览 |
| | | $('#preview').click(function () { |
| | | debugger |
| | | $('#myModal .modal-body .prevViewDiv').html(hiprintTemplate.getHtml(printData)) |
| | | $('#myModal').modal('show') |
| | | }); |
| | | $('#directPrint').click(function () { |
| | | hiprintTemplate.print(printData); |
| | | }); |
| | | $('#directPrint2').click(function () { |
| | | hiprintTemplate.print2(printData, '打印'); |
| | | }); |
| | | //旋转 |
| | | var rotatePaper = function () { |
| | | hiprintTemplate.rotatePaper(); |
| | | } |
| | | |
| | | |
| | | </script> |
| | | </body> |
| | | |