Browse Source

完善Mes标签解析的提示

hella_online_20240829
niexiting 5 months ago
parent
commit
60818e9066
  1. 14
      src/mycomponents/scan/winComScanFg.vue

14
src/mycomponents/scan/winComScanFg.vue

@ -188,27 +188,27 @@
getMesPackInfo(this.itemCode).then(res => { getMesPackInfo(this.itemCode).then(res => {
try { try {
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
throw new Error("没有查找到物料号【"+this.itemCode+"】对应的mes物料号") throw new Error("没有查找到物料号【"+this.itemCode+"】对应的生产条码配置")
} }
var result = res.data.list[0] var result = res.data.list[0] //Mes
var partNumber = result.partNumber; var partNumber = result.partNumber; //
var lengthMat = result.lengthMat; var lengthMat = result.lengthMat;
var lengthBc = result.lengthBc; var lengthBc = result.lengthBc;
let itemCode = content.substr(0, lengthMat); let scanPartNumber = content.substr(0, lengthMat); //
let productDate = content.substr(lengthMat, 8); let productDate = content.substr(lengthMat, 8);
let batch = content.substr(lengthMat + 8, 3); let batch = content.substr(lengthMat + 8, 3);
let order = content.substr(-8); let order = content.substr(-8);
if (itemCode != partNumber) { if (scanPartNumber != partNumber) {
that.clear(); that.clear();
throw new Error("解析错误:扫描物料号【" + itemCode + "】与查询物料号【" + partNumber + throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber + "】与生成条码配置表中的客户物料号【" + partNumber +
"】不一致") "】不一致")
} }
let scanResult = { let scanResult = {
itemCode: itemCode, itemCode: scanPartNumber,
productDate: productDate, productDate: productDate,
batch: batch, batch: batch,
order: order, order: order,

Loading…
Cancel
Save