关于物料条码生成的实现
企业内对管理的物料(产品、零件、材料等)都可能需要对其进行条码打印。打印条码后,贴在物料上,后期可以通过条码枪来识别该物料。是制造业企业内部物料流转的重要识别手段
Mobox数据平台可以通过数据建模来管理各种物料,因此系统提供了一个物料条码自定义格式打印的功能点。一下是一个例子(给一个产品打条码)
产品数据对象的条码定义(界面样式)
新建一个样式
设置自由布局json描述
Json 格式1 (2行)
{
“styles”: { “width”: “650px”, “height”: “360px”, “font-size”: “14px”, “text-align”: “center” }, “colgroup”: [ “14%”, “36%”, “14%”, “36%” ], “rowgroup”: [ “70%”, “30%” ], “thead”: [], “tbody”: [ [ { “type”: “text”, “value”: “条码” }, { “span”: [ 1, 3 ], “type”: “attr-barcode”, “value”: [ { “type”: “attr”, “value”: “S_GDS_CODE” } ], “compose”: true } ], [ { “type”: “text”, “value”: “产品编号” }, { “type”: “attr”, “value”: “S_GDS_CODE” }, { “type”: “text”, “value”: “产品名称” }, { “type”: “attr”, “value”: “S_GDS_NAME” } ] ] } |
Json 格式2 (4行)
{
“styles”: { “width”: “650px”, “height”: “360px”, “font-size”: “14px”, “text-align”: “center” }, “colgroup”: [ “14%”, “36%”, “14%”, “36%” ], “rowgroup”: [ “25%”, “25%”, “25%”, “25%” ], “thead”: [], “tbody”: [ [ { “type”: “text”, “value”: “条码” }, { “span”: [ 1, 3 ], “type”: “attr-barcode”, “value”: [ { “type”: “attr”, “value”: “S_B_CODE” }, { “type”: “text”, “value”: “-” }, { “type”: “attr”, “value”: “S_B_SUPPLIER” } ], “compose”: true } ], [ { “type”: “text”, “value”: “物料编码” }, { “type”: “attr”, “value”: “S_ITEM_CODE” }, { “type”: “text”, “value”: “物料名称” }, { “type”: “attr”, “value”: “S_ITEM_NAME” } ], [ { “type”: “text”, “value”: “数量” }, { “type”: “attr”, “value”: “S_ITEM_CODE” }, { “type”: “text”, “value”: “单位” }, { “type”: “attr”, “value”: “S_ITEM_NAME” } ], [ { “type”: “text”, “value”: “SAP批次号” }, { “type”: “attr”, “value”: “S_ITEM_CODE” }, { “type”: “text”, “value”: “可追溯批量号” }, { “type”: “attr”, “value”: “S_ITEM_NAME” } ] ] } |
3000功能点里面的页面按钮定义
为产品维护的3000功能点里面加入,条码生成的 页面按钮
设置页面按钮,绑定条码
注意,目前版本 支持支持页面按钮 (不支持 行按钮)
打印条码