Browse Source

采购收货添加供应商采购数量和采购单位,转换率

intex_online20241216
张立 2 months ago
parent
commit
76e85974b0
  1. 3
      src/common/detail.js
  2. 2
      src/common/label.js
  3. 8
      src/mycomponents/qty/recommendHandleQty.vue
  4. 1
      src/mycomponents/scan/winComScan.vue
  5. 11
      src/pages/purchaseReceipt/job/receiptDetail.vue

3
src/common/detail.js

@ -112,6 +112,9 @@ export function createItemInfo(detail) {
itemName: detail.itemName, itemName: detail.itemName,
packQty: Number(detail.packQty) || undefined, packQty: Number(detail.packQty) || undefined,
packUnit: detail.packUnit, packUnit: detail.packUnit,
supplierQty: Number(detail.supplierQty) || undefined,
supplierUom: detail.supplierUom?detail.supplierUom:'',
convertRate: detail.convertRate?detail.convertRate:'',
qty: Number(detail.qty), qty: Number(detail.qty),
handleQty: 0, handleQty: 0,
uom: detail.uom, uom: detail.uom,

2
src/common/label.js

@ -194,7 +194,7 @@ export function analysisQRCodeLabel(labelItem, scanMsg) {
labelResult.label.header = item; labelResult.label.header = item;
} else if (type == 'V') { } else if (type == 'V') {
labelResult.label.version = item; labelResult.label.version = item;
} else { }else {
let barcode = labelItem.label.subList.find(code => code.prefixChar.toUpperCase() == let barcode = labelItem.label.subList.find(code => code.prefixChar.toUpperCase() ==
type type
.toUpperCase()); .toUpperCase());

8
src/mycomponents/qty/recommendHandleQty.vue

@ -10,6 +10,14 @@
{{Number(dataContent.qty)}} {{Number(dataContent.qty)}}
</view> </view>
<uom :uom="dataContent.uom"></uom> <uom :uom="dataContent.uom"></uom>
<view class="uni-flex uni-row center" v-if="dataContent.uom != dataContent.supplierUom && dataContent.convertRate != 1 && dataContent.convertRate!=0 && dataContent.convertRate !=null && dataContent.convertRate!=''">
<span class="uom">|</span>
<view class="text_recommend " style="font-size: 30rpx;margin-left: 12rpx;">
{{Number(dataContent.supplierQty) || 0}}
</view>
<uom :uom="dataContent.supplierUom" style="font-size: 30rpx;margin-left: 12rpx;"></uom>
</view>
</view> </view>
<view> <view>

1
src/mycomponents/scan/winComScan.vue

@ -190,6 +190,7 @@
if (scanResult.success) { if (scanResult.success) {
that.clear(); that.clear();
// that.getfocus();// // that.getfocus();//
console.log(88,scanResult)
that.$emit("getResult", scanResult); that.$emit("getResult", scanResult);
} else { } else {
that.clear(); that.clear();

11
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -282,6 +282,7 @@
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.detailSource = getTreeDataSource(that.subList) that.detailSource = getTreeDataSource(that.subList)
console.log(333,that.detailSource)
that.isCheckLocation = getSwitchInfoByCode(that.isCheckLocation) that.isCheckLocation = getSwitchInfoByCode(that.isCheckLocation)
if (that.isCheckLocation) { if (that.isCheckLocation) {
that.toLocationCode = "" that.toLocationCode = ""
@ -528,6 +529,9 @@
// //
if(handleQtySub >= parseFloat(qty)){ if(handleQtySub >= parseFloat(qty)){
pack.handleQty = Number(qty); pack.handleQty = Number(qty);
pack.convertRate = result.label.convertRate
pack.supplierQty = parseFloat(calc.div(parseFloat(pack.handleQty),parseFloat(pack.convertRate)).toFixed(5))
pack.supplierUom = result.label.purchaseUom
batchDetailList[i].packList.push(pack) batchDetailList[i].packList.push(pack)
batchDetailList[i].scaned = true batchDetailList[i].scaned = true
const isHave = this.packingNumberList.find(item=>item.packingNumber == packingNumber) const isHave = this.packingNumberList.find(item=>item.packingNumber == packingNumber)
@ -546,6 +550,9 @@
// //
pack.handleQty = handleQtySub; pack.handleQty = handleQtySub;
} }
pack.convertRate = result.label.convertRate
pack.supplierQty = parseFloat(calc.div(parseFloat(pack.handleQty),parseFloat(pack.convertRate)).toFixed(5))
pack.supplierUom = result.label.purchaseUom
batchDetailList[i].packList.push(pack) batchDetailList[i].packList.push(pack)
batchDetailList[i].scaned = true batchDetailList[i].scaned = true
qty = calc.sub(parseFloat(qty),parseFloat(handleQtySub)) qty = calc.sub(parseFloat(qty),parseFloat(handleQtySub))
@ -557,11 +564,7 @@
calcTreeHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource);
} }
} }
} }
console.log(8777,this.detailSource)
setTimeout(()=>{ setTimeout(()=>{
this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{ this.$refs.comReceiptDetailCardBacthRef.forEach(item=>{
item.resizeCollapse() item.resizeCollapse()

Loading…
Cancel
Save