httpPrint 打印配置 报错排查
君哥
阅读:1833
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 },
];
};
支持博主优质文章,讲解的非常详细
写的不错 说明方法之后顺便害科普了一下
长见识了