httpPrint 打印配置 报错排查

君哥 阅读:1655 2023-09-20 17:29:32 评论:3

报错排查

需要先确认数据的 字段名称,数量的类型 ,字段的个数 三个数据 都需要一一对应!

如有报错,需要数据一一排除,仔细检查~!

1.需要打印的数据


{
   "drugCode": "1802042LQ1",
   "drugName": "0.9%氯化钠液(可立袋)",
   "drugForm": "大液",
   "dosePerUnit": "100",
   "doseUnits": "ml",
   "drugIndicator": 1,
   "quantity": 9,
   "firmId": "湖伦",
   "drugSpec": "100ml",
   "units": "袋",
   "packageSpec": "100ml",
   "packageUnits": "袋",
   "batchNo": "X",
   "manuDate": null,
   "expireDate": "200:00:00",
   "documentBchno": "PT",
   "storage": "012",
   "subStorage": "普库",
   "retailPrice": "3.45",
   "costs": 31.05,
   "usedQty": null,
   "ableQty": null,
   "orderDosageInStockUnits": "100",
   "sortQty": null,
   "key": "row_159"
}


2.根据打印的数据取提取  打印配置文件中 fieldsTypeSchema 的字段

const doctDrugPrescMasterFieldsSchema = (): fieldsTypeSchema[] => {
 return [
   { type: 'ftString', name: 'drugSpec', size: 255, required: true },
   { type: 'ftString', name: 'drugName', size: 255, required: false },
   { type: 'ftString', name: 'packageUnits', size: 255, required: false },
   { type: 'ftInteger', name: 'quantity', size: 255, required: false },
   { type: 'ftFloat', name: 'costs', size: 255, required: false },
   { type: 'ftString', name: 'firmId', size: 255, required: false },
   // { type: 'ftString', name: 'location', size: 255, required: false },
 ];
};


3.报表文件 中也需要 把类型对应上

httpPrint 打印配置 报错排查 第1张

httpPrint 打印配置 报错排查 第2张


本文链接:https://www.yanjun202.com/post/83.html 

分享到:
可以去百度分享获取分享代码输入这里。
发表评论
搜索
关注我们

扫一扫关注我们,了解最新精彩内容