| | |
| | | // 系统打印数据,校验data字段 |
| | | if (btn.verify.printMode !== 'custom' && (!cell.data || cell.data.length === 0)) return |
| | | |
| | | cell.templateID = baseTemp |
| | | cell.printType = baseType |
| | | cell.printCount = 0 |
| | | let templateID = baseTemp |
| | | let printType = baseType |
| | | let printCount = 0 |
| | | |
| | | Object.keys(cell).forEach(key => { |
| | | if (!cell[key]) return |
| | |
| | | let _key = key.toLowerCase() |
| | | |
| | | if (_key === 'templateid') { |
| | | cell.templateID = cell[key] |
| | | templateID = cell[key] |
| | | } else if (_key === 'printtype') { |
| | | cell.printType = cell[key] |
| | | printType = cell[key] |
| | | } else if (_key === 'printcount') { |
| | | cell.printCount = +cell[key] |
| | | printCount = +cell[key] |
| | | } |
| | | }) |
| | | |
| | | cell.templateID = templateID |
| | | cell.printType = printType |
| | | cell.printCount = printCount |
| | | |
| | | if (isNaN(cell.printCount) || cell.printCount < 1) { |
| | | cell.printCount = baseCount |
| | | } |