Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into master_hella

hella_online_20240829
wangyufei 5 months ago
parent
commit
d9ce8c6848
  1. 67
      src/mycomponents/scan/winComScanFg.vue
  2. 29
      src/pages/productPutaway/job/productPutawayDetail.vue
  3. 4
      src/pages/productReceipt/coms/comFgCard.vue
  4. 5
      src/pages/productReceipt/job/fgProductReceiptDetail.vue

67
src/mycomponents/scan/winComScanFg.vue

@ -139,7 +139,7 @@
}, 1000);
// #endif
},
setItemCodeSimulate(itemCode,scanMsg) {
setItemCodeSimulate(itemCode, scanMsg) {
this.itemCode = itemCode;
this.scanMsg = scanMsg;
},
@ -188,38 +188,53 @@
getMesPackInfo(this.itemCode).then(res => {
try {
if (res.data.list.length == 0) {
throw new Error("没有查找到物料号【"+this.itemCode+"】对应的mes物料号")
throw new Error("没有查找到物料号【" + this.itemCode + "】对应的生产条码配置")
}
var result = res.data.list[0]
var partNumber = result.partNumber;
var result = res.data.list[0] //Mes
var partNumber = result.partNumber; //
var lengthMat = result.lengthMat;
var lengthBc = result.lengthBc;
//Q5,,TypeQ5
if (result.Type == 'P') {
let scanPartNumber = content.substr(0, lengthMat); //
// let productDate = content.substr(lengthMat, 8);
// let batch = content.substr(lengthMat + 8, 3);
let order = content.substr(-8);
if (scanPartNumber != partNumber) {
that.clear();
throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber +
"】与生成条码配置表中的客户物料号【" + partNumber +
"】不一致")
}
let itemCode = content.substr(0, lengthMat);
let productDate = content.substr(lengthMat, 8);
let batch = content.substr(lengthMat + 8, 3);
let order = content.substr(-8);
if (itemCode != partNumber) {
let scanResult = {
itemCode: scanPartNumber,
// productDate: productDate,
// batch: batch,
order: order,
qty: 1,
content: content,
success: true,
};
that.clear();
throw new Error("解析错误:扫描物料号【" + itemCode + "】与查询物料号【" + partNumber +
"】不一致")
that.$emit("getResult", scanResult);
} else {
//,
let scanResult = {
itemCode: this.itemCode,
// productDate: new Date(),
// batch: new Date(),
order: 0,
qty: 1,
content: content,
success: true,
};
that.clear();
that.$emit("getResult", scanResult);
}
let scanResult = {
itemCode: itemCode,
productDate: productDate,
batch: batch,
order: order,
qty: 1,
content: content,
success: true,
};
that.clear();
that.$emit("getResult", scanResult);
} catch (error) {
this.$refs.comMessage.showErrorMessage( error.message, res => {
this.$refs.comMessage.showErrorMessage(error.message, res => {
if (res) {
that.getfocus();
}

29
src/pages/productPutaway/job/productPutawayDetail.vue

@ -333,41 +333,26 @@
.fromLocationCode + "】已经扫描")
} else {
this.addDetail(itemDetail, result);
return;
// this.addDetail(itemDetail, result);
// return;
//
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
// if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
']不一致,是否继续上架?', res => {
if (res) {
this.addDetail(itemDetail, result);
// itemDetail.scaned = true;
// itemDetail.handleQty = Number(result.balance.qty)
// itemDetail.toInventoryStatus = result.balance.inventoryStatus;
// itemDetail.balance = result.balance;
// itemDetail.balance.balanceQty = Number(result.balance.qty)
// itemDetail.balance.packQty = Number(result.package.packQty)
// itemDetail.balance.packUnit = result.package.packUnit
// this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
}
} else {
this.addDetail(itemDetail, result);
// itemDetail.scaned = true;
// itemDetail.handleQty = Number(result.balance.qty)
// itemDetail.balance = result.balance;
// itemDetail.toInventoryStatus = result.balance.inventoryStatus;
// itemDetail.balance.balanceQty = Number(result.balance.qty)
// itemDetail.balance.packQty = Number(result.package.packQty)
// itemDetail.balance.packUnit = result.package.packUnit
// this.calcHandleQty();
}
// } else {
// this.addDetail(itemDetail, result);
// }
}
}
}

4
src/pages/productReceipt/coms/comFgCard.vue

@ -7,10 +7,10 @@
<text class="card_item_code card_content ">零件号</text>
<text class="card_content ">{{detail.itemCode}}</text>
</view>
<view>
<!-- <view>
<text class="card_product_date card_content ">生产日期</text>
<text class="card_content ">{{detail.productDate}}</text>
</view>
</view> -->
<!-- <view>
<text class="card_batch card_content ">批次</text>

5
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -273,7 +273,7 @@
} else {
var itemIndex = subItem.fgList.findIndex(r =>
r.itemCode == result.itemCode &&
r.productDate == result.productDate &&
// r.productDate == result.productDate &&
r.order == result.order);
if (itemIndex == -1) {
subItem.fgList.push(result);
@ -525,7 +525,8 @@
if (detail.fgList) {
detail.fgList.forEach(res => {
res.outsideItemCode = res.itemCode
res.outsideProduceDate = res.productDate
// res.outsideProduceDate = res.productDate
res.outsideProduceDate = null
res.outsideSerialNumber = res.order
})
}else {

Loading…
Cancel
Save