Browse Source

修改数据精度问题

wms3.0_pda
lijuncheng 10 months ago
parent
commit
1ac633ed43
  1. 6
      pages/container/record/containerBindRecord.vue
  2. 6
      pages/container/record/containerUnBindRecord.vue
  3. 7
      pages/count/job/countDetail.vue
  4. 16
      pages/count/record/countRecord.vue
  5. 14
      pages/deliver/coms/comScanDeliverPack.vue
  6. 8
      pages/deliver/job/deliverDetail.vue
  7. 8
      pages/deliver/request/deliverRequestCreate.vue
  8. 14
      pages/inspect/job/inspectFullDetail.vue
  9. 10
      pages/issue/coms/comScanIssuePack.vue
  10. 20
      pages/issue/job/issueDetail.vue
  11. 5
      pages/issue/js/issue.js
  12. 22
      pages/issue/record/issueRecord.vue
  13. 9
      pages/issue/request/issueRequestCreate.vue
  14. 10
      pages/package/record/splitPackageRecord.vue
  15. 6
      pages/productPutaway/request/putawayRequestCreate.vue
  16. 6
      pages/productReceipt/record/productReceiptRecord.vue
  17. 6
      pages/productionReturn/coms/comReturn.vue
  18. 9
      pages/productionReturn/coms/comScanReturnPack.vue
  19. 8
      pages/productionReturn/request/returnRequestCreate.vue
  20. 7
      pages/putaway/record/putawayRecord.vue
  21. 7
      pages/putaway/request/putawayRequestCreate.vue
  22. 6
      pages/query/container.vue
  23. 6
      pages/query/location.vue
  24. 6
      pages/query/location_copy.vue
  25. 6
      pages/repleinsh/coms/comScanReplishPack.vue
  26. 10
      pages/repleinsh/job/repleinshDetail.vue
  27. 19
      pages/repleinsh/record/repleinshRecord.vue
  28. 8
      pages/transfer/job/transferDetail.vue
  29. 6
      pages/unPlanned/record/receiptRecord.vue
  30. 11
      pages/unPlanned/request/receiptRequestCreate.vue

6
pages/container/record/containerBindRecord.vue

@ -57,6 +57,10 @@
getDirectoryItemArray
} from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
createItemInfo,
@ -226,7 +230,7 @@
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}

6
pages/container/record/containerUnBindRecord.vue

@ -52,6 +52,10 @@
goHome
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -171,7 +175,7 @@
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}

7
pages/count/job/countDetail.vue

@ -63,6 +63,9 @@
cancleTakeCountJob,
countJobSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
@ -72,7 +75,7 @@
import {
getCountStageName
} from '@/common/directory.js';
import { calc } from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -381,7 +384,7 @@
"]不在列表中,是否添加到列表?",
res => {
if (res) {
detail.qty += Number(detail.qty)
detail.qty = calc.add(detail.qty,detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
detail.subList.push(newDetail);
this.updateData()

16
pages/count/record/countRecord.vue

@ -51,6 +51,10 @@
navigateBack
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -136,8 +140,7 @@
uni.stopPullDownRefresh();
},
mounted() {
},
mounted() {},
methods: {
calcScanCount(closeScan) {
let items = this.subList.filter(r => {
@ -156,7 +159,8 @@
item.handleQty = 0;
for (let detail of item.subList) {
if (item.scaned) {
item.handleQty += Number(detail.qty)
item.handleQty = calc.add(item.handleQty,detail.qty)
}
}
}
@ -263,9 +267,7 @@
if (res) {
this.$refs.CountQtyEdit.openEditPopup(this.itemEditInfo,
detail.subList);
}
else
{
} else {
this.scanPopupGetFocus();
}
})
@ -303,7 +305,7 @@
return record;
},
addExistItemCodeToList(detail, result) {
detail.qty += detail.qty
detail.qty = calc.add(detail.qty,detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
detail.subList.push(newDetail);
},

14
pages/deliver/coms/comScanDeliverPack.vue

@ -45,8 +45,8 @@
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true" :headerType="headerType"
:isShowHistory="false">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
:headerType="headerType" :isShowHistory="false">
</win-com-scan>
<view style="width: 100%;">
@ -102,6 +102,11 @@
getDetailOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import {
calc
} from '@/common/calc.js';
import {
getWorkShopLineStation
} from '@/api/request2.js';
@ -250,7 +255,8 @@
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => {
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
@ -391,7 +397,7 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},

8
pages/deliver/job/deliverDetail.vue

@ -55,6 +55,10 @@
deliverJobSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -338,10 +342,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty)
}
})
}

8
pages/deliver/request/deliverRequestCreate.vue

@ -29,6 +29,10 @@
issueRecordSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -123,7 +127,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
@ -136,7 +140,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},

14
pages/inspect/job/inspectFullDetail.vue

@ -59,6 +59,10 @@
getManagementPrecisions
} from '@/common/balance.js';
import {
calc
} from '@/common/calc.js';
import {
getDataSource,
createRecordInfo,
@ -254,8 +258,8 @@
for (let item of this.detailSource) {
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
failedQty += Number(detail.failedQty)
crackQty += Number(detail.crackQty)
failedQty= calc.add(failedQty,detail.failedQty)
crackQty= calc.add(crackQty,detail.crackQty)
}
}
}
@ -326,7 +330,8 @@
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续检验?', res => {
if (res) {
itemDetail.scaned = true;
@ -338,7 +343,8 @@
}
});
} else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});

10
pages/issue/coms/comScanIssuePack.vue

@ -45,8 +45,8 @@
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true" headerType ="HPQ,HMQ"
:isShowHistory="false">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
headerType="HPQ,HMQ" :isShowHistory="false">
</win-com-scan>
<view style="width: 100%;">
@ -106,6 +106,10 @@
getWorkShopLineStation
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
@ -391,7 +395,7 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;

20
pages/issue/job/issueDetail.vue

@ -11,8 +11,10 @@
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource">
<work-station :workshopCode="jobContent.workShopCode" :productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode"></work-station>
<work-station :workshopCode="jobContent.workShopCode"
:productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode">
</work-station>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'>
</com-issue-detail-card>
</view>
@ -42,6 +44,10 @@
issueJobSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -307,13 +313,15 @@
record.supplierCode = r.supplierCode;
//使
if (this.jobContent.useOnTheWayLocation ==
if (this.jobContent
.useOnTheWayLocation ==
'TRUE') {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;
} else {
var info = getPackingNumberAndBatch(
var info =
getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
@ -379,10 +387,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty)
}
})
}

5
pages/issue/js/issue.js

@ -1,3 +1,6 @@
import {
calc
} from '@/common/calc.js';
export function getDataSource(list, subList) {
for (var i = 0; i < subList.length; i++) {
let detail = subList[i];
@ -25,7 +28,7 @@ export function createDetailInfo(location, detail) {
item = createItemInfo(detail);
location.Items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
//在零件下查找库位
let location = item.Locations.find(r => r.fromLocationCode == detail.fromLocationCode);
if (location == undefined) {

22
pages/issue/record/issueRecord.vue

@ -341,17 +341,17 @@
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
// issueRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br><br>" + res.data)
// } else {
// this.showErrorMessage(":" + res.msg)
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
issueRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败:" + res.msg)
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
showCommitSuccessMessage(hint) {

9
pages/issue/request/issueRequestCreate.vue

@ -31,6 +31,10 @@
issueRequestSubmit,
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -131,8 +135,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
this.caclcQty();
@ -142,7 +145,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},

10
pages/package/record/splitPackageRecord.vue

@ -48,6 +48,10 @@
splitPackageRecordSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -180,9 +184,9 @@
var sumQty = 0;
item.subList[0].Records.forEach(function(item1, index) {
sumQty += item1.qty;
sumQty = calc.add(sumQty,item1.qty)
});
if ((Number(qty) + sumQty) > item.subList[0].qty) {
if (calc.add(qty,sumQty)> item.subList[0].qty) {
this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" +
sumQty +
"】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!");
@ -200,7 +204,7 @@
if (detail.Records.length > 0) {
detail.Records.forEach(r => {
hQty += Number(r.qty)
hQty = calc.add(hQty,r.qty)
})
}
detail.handleQty = hQty;

6
pages/productPutaway/request/putawayRequestCreate.vue

@ -61,6 +61,10 @@
getDirectoryItemArray
} from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
createItemInfo,
@ -210,7 +214,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}

6
pages/productReceipt/record/productReceiptRecord.vue

@ -61,6 +61,10 @@
deepCopyData
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -210,7 +214,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}

6
pages/productionReturn/coms/comReturn.vue

@ -57,6 +57,10 @@
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -237,7 +241,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty, detail.qty)
}
}
}

9
pages/productionReturn/coms/comScanReturnPack.vue

@ -106,6 +106,10 @@
getWorkShopLineStation
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
@ -243,7 +247,8 @@
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => {
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
@ -381,7 +386,7 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},

8
pages/productionReturn/request/returnRequestCreate.vue

@ -31,6 +31,10 @@
productionReturnRequestCreate,
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -142,7 +146,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
@ -152,7 +156,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},

7
pages/putaway/record/putawayRecord.vue

@ -62,6 +62,11 @@
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -237,7 +242,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}

7
pages/putaway/request/putawayRequestCreate.vue

@ -68,6 +68,11 @@
getDirectoryItemArray
} from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
createItemInfo,
@ -217,7 +222,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}

6
pages/query/container.vue

@ -47,6 +47,10 @@
goHome
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import locationInfo from '@/mycomponents/location/locationInfo.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -217,7 +221,7 @@
data.list.push(item)
resultlist.push(data)
} else {
temp.qty += Number(res.qty)
temp.qty = calc.add(temp.qty,res.qty)
var item = {
packingNumber: res.packingNumber,
batch: res.batch,

6
pages/query/location.vue

@ -44,6 +44,10 @@
goHome
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import locationInfo from '@/mycomponents/location/locationInfo.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -192,7 +196,7 @@
data.list.push(item)
resultlist.push(data)
} else {
temp.qty += Number(res.qty)
temp.qty = calc.add(temp.qty,res.qty)
var item = {
packingNumber: res.packingNumber,
batch: res.batch,

6
pages/query/location_copy.vue

@ -61,6 +61,10 @@
getBalanceByLocationcodeGroup
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
maxPageSize,
goHome
@ -214,7 +218,7 @@
data.list.push(item)
resultlist.push(data)
} else {
temp.qty += Number(res.qty)
temp.qty = calc.add(temp.qty,res.qty)
var item = {
packingNumber: res.packingNumber,
batch: res.batch,

6
pages/repleinsh/coms/comScanReplishPack.vue

@ -106,6 +106,10 @@
getWorkShopLineStation
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
@ -386,7 +390,7 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},

10
pages/repleinsh/job/repleinshDetail.vue

@ -63,6 +63,10 @@
getDataSource
} from '@/pages/issue/js/issue.js';
import {
calc
} from '@/common/calc.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
@ -358,10 +362,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty)
}
})
}
@ -449,7 +453,7 @@
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
if (batch.Records.length > 0) {
scanCount += batch.Records.length
scanCount = calc.add(scanCount,batch.Records.length)
}
})
})

19
pages/repleinsh/record/repleinshRecord.vue

@ -48,6 +48,10 @@
getBalanceByBatchOffShelf
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -73,6 +77,10 @@
calcHandleQty
} from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
import {
getDataSource
} from '@/pages/issue/js/issue.js';
@ -233,7 +241,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty, res.qty)
})
this.detailSource.totalQty = totalQty;
},
@ -265,10 +273,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty, res.qty)
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty, handleQty)
}
})
}
@ -290,7 +298,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -406,7 +414,8 @@
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.fromLocationCode = fromLocation.fromLocationCode
record.fromLocationCode = fromLocation
.fromLocationCode
record.supplierCode = r.supplierCode;
//使

8
pages/transfer/job/transferDetail.vue

@ -49,6 +49,10 @@
import {
getBasicLocationByCode
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
getCurrDateTime,
@ -196,7 +200,7 @@
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}
@ -244,7 +248,7 @@
item.handleQty = 0;
for (let detail of item.subList) {
if (detail.record != undefined) {
item.handleQty += Number(detail.record.qty)
item.handleQty = calc.add(item.handleQty,detail.record.qty)
}
}
}

6
pages/unPlanned/record/receiptRecord.vue

@ -64,6 +64,10 @@
import {
getBusinessType,
} from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -199,7 +203,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}

11
pages/unPlanned/request/receiptRequestCreate.vue

@ -9,7 +9,8 @@
<view class="" style="margin-left: 20rpx; margin-top: 20rpx;margin-bottom:20rpx;font-size: 30rpx;">
目标库位{{detailSource.toLocationCode}}
</view>
<view class="flex u-col-center" style="width: 100%;background-color:#fff;margin-bottom: 20rpx;margin-top: 20rpx;">
<view class="flex u-col-center"
style="width: 100%;background-color:#fff;margin-bottom: 20rpx;margin-top: 20rpx;">
<view class="" style="margin-left: 20rpx; font-size: 30rpx;flex-shrink: 0;">入库原因</view>
<view style="width: 100%">
<uni-data-picker style="background-color:#fff;margin-right: 20rpx;" class='uni-data-picker'
@ -46,6 +47,10 @@
unPlannedReceiptRequestCreate
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -138,7 +143,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
@ -149,7 +154,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},

Loading…
Cancel
Save