lijuncheng 3 days ago
parent
commit
ce9495b3f8
  1. 20
      src/common/detail.js
  2. 16
      src/mycomponents/detail/comRecommendDetailCard.vue
  3. 71
      src/pages/issue/job/issueDetailBatch.vue
  4. 2
      src/pages/unPlanned/coms/detailInfoPopup.vue
  5. 28
      src/pages/unPlanned/job/receiptJobDetail.vue

20
src/common/detail.js

@ -155,7 +155,25 @@ export function calcHandleQty(detailSource) {
}
}
}
//计算计划外入库实际数量和任务数量
export function calcHandleQtyPlanOut(detailSource) {
console.log(999,detailSource)
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
console.log(detail.isRecommend)
if(detail.isRecommend){
item.qty = calc.add(item.qty, detail.qty);
}
}
}
}
}
//计算推荐和扫描的不是用一个的数量
export function calcHandleNewQty(detailSource) {
for (let item of detailSource) {

16
src/mycomponents/detail/comRecommendDetailCard.vue

@ -38,7 +38,10 @@
</view>
</uni-collapse-item>
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :queryBalance="queryBalance" @confirm="confirm"></balance-qty-edit>
<!-- <balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :queryBalance="queryBalance" @confirm="confirm"></balance-qty-edit> -->
<recommend-qty-edit ref="recommendQtyEdit" :dataContent="editItem" :handleQty="editItem.qty" @confirm="confirm" :settingParam='settingParam'
:isShowStatus="isShowStatus"></recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
@ -48,7 +51,8 @@
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
// import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import {
getDetailOption,
@ -60,8 +64,9 @@
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation
// balanceQtyEdit,
winScanLocation,
recommendQtyEdit
},
props: {
dataContent: {
@ -159,7 +164,8 @@
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
// this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
this.$refs.recommendQtyEdit.openTaskEditPopup(item.qty,item.handleQty,item.labelQty);
},
detail(item) {

71
src/pages/issue/job/issueDetailBatch.vue

@ -503,6 +503,7 @@
submitJob() {
var params = this.setParams()
console.log(params)
// if (!params.subList || params.subList.length == 0) {
// uni.hideLoading()
@ -538,40 +539,44 @@
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(toLocationCode => {
let obj = {...toLocationCode}
delete obj.subList
obj.recordList = []
let obj1 ={}
let arr = toLocationCode.subList.filter(item=>item.scaned)
arr.forEach(record=>{
obj1.supplierCode = record.supplierCode;
obj1.batch = record.batch;
obj1.copyContent =record.copyContent;
obj1.fromInventoryStatus =record.fromInventoryStatus;
obj1.fromLocationCode =record.fromLocationCode;
obj1.handleQty =record.handleQty;
obj1.inventoryStatus =record.fromInventoryStatus;
obj1.packQty =record.packQty;
obj1.packUnit =record.packUnit;
obj1.packingNumber =record.packingNumber;
obj1.qty =record.qty;
obj1.scaned =record.scaned;
obj1.toLocationCode =record.toLocationCode;
obj1.fromPackingNumber ='';
obj1.fromBatch = record.batch;
obj1.toBatch = record.batch;
obj1.toInventoryStatus = record.inventoryStatus;
obj1.toPackingNumber ="";
obj1.packingNumber = "";
let single_price = record.balance.singlePrice == null ? 0 : record.balance.singlePrice;
obj1.singlePrice = single_price;
obj1.amount = single_price *record.qty;
obj.recordList.push(obj1)
let arr = []
toLocationCode.subList.forEach(record=>{
if(record.scaned){
let obj = {...toLocationCode,...record}
obj.recordList = []
delete obj.balance
delete obj.subList
let obj1 ={}
obj1.supplierCode = record.supplierCode;
obj1.batch = record.batch;
obj1.copyContent =record.copyContent;
obj1.fromInventoryStatus =record.fromInventoryStatus;
obj1.fromLocationCode =record.fromLocationCode;
obj1.handleQty =record.handleQty;
obj1.inventoryStatus =record.fromInventoryStatus;
obj1.packQty =record.packQty;
obj1.packUnit =record.packUnit;
obj1.packingNumber =record.packingNumber;
obj1.qty =record.qty;
obj1.scaned =record.scaned;
obj1.toLocationCode =record.toLocationCode;
obj1.fromPackingNumber ='';
obj1.fromBatch = record.batch;
obj1.toBatch = record.batch;
obj1.toInventoryStatus = record.inventoryStatus;
obj1.toPackingNumber ="";
obj1.packingNumber = "";
let single_price = record.balance.singlePrice == null ? 0 : record.balance.singlePrice;
obj1.singlePrice = single_price;
obj1.amount = single_price *record.qty;
obj.recordList.push(obj1)
subList.push(obj)
}
})
subList.push(obj)
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
@ -686,7 +691,6 @@
str3 = str3+",是否提交"
this.$refs.comMessage.showQuestionMessage1(str3, 'red', res => {
if (res) {
return
//
this.$throttle(this.submit, 2000, this)()
} else {
@ -694,7 +698,6 @@
}
});
}else {
return
//
this.$throttle(this.submit, 2000, this)()
}

2
src/pages/unPlanned/coms/detailInfoPopup.vue

@ -6,7 +6,7 @@
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">原因 : </text>
<text class="text_wrap">{{dataContent.Reason}} </text>
<text class="text_wrap">{{dataContent.reason}} </text>
</view>
</view>
</view>

28
src/pages/unPlanned/job/receiptJobDetail.vue

@ -68,7 +68,8 @@
getDataSource,
createRecordInfo,
calcHandleQty,
getScanCount
getScanCount,
calcHandleQtyPlanOut
} from '@/common/detail.js';
import {
@ -242,7 +243,7 @@
}
}
}
calcHandleQty(this.detailSource);
calcHandleQtyPlanOut(this.detailSource);
this.$forceUpdate()
},
@ -292,6 +293,8 @@
toLocationCode:locationCode,
// inventoryStatus:inventoryStatus,
// toInventoryStatus:inventoryStatus,
packQty:Number(result.package.packQty),
packUnit:result.package.packUnit,
balance:{},
isRecommend:false,
isNewAdd:"newAdd"
@ -308,20 +311,19 @@
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail
.toLocationCode;
itemDetail.packQty = result.package.packQty
// itemDetail.toLocationCode = this.toLocationCode ? this.toLocationCode : itemDetail
// .toLocationCode;
itemDetail.packQty = Number(result.package.packQty)
itemDetail.packUnit = result.package.packUnit
itemDetail.labelQty = Number(result.label.qty);
itemDetail.balance={}
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.continueScan()
}
}
let array = []
this.detailSource.forEach((item=>{
let obj = {...item}
obj.subList=item.subList.filter(cur=>cur.isRecommend == true)
array.push(obj)
}))
calcHandleQty(array);
calcHandleQtyPlanOut(this.detailSource);
}
} catch (e) {
@ -352,7 +354,7 @@
.toLocationCode;
itemDetail.packQty = result.package.packQty
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
calcHandleQtyPlanOut(this.detailSource);
this.continueScan()
}
}

Loading…
Cancel
Save