lijuncheng 3 days ago
parent
commit
ce9495b3f8
  1. 20
      src/common/detail.js
  2. 16
      src/mycomponents/detail/comRecommendDetailCard.vue
  3. 17
      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) { export function calcHandleNewQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {

16
src/mycomponents/detail/comRecommendDetailCard.vue

@ -38,7 +38,10 @@
</view> </view>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </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' <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage> <comMessage ref="message"></comMessage>
@ -48,7 +51,8 @@
<script> <script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.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 winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import { import {
getDetailOption, getDetailOption,
@ -60,8 +64,9 @@
components: { components: {
itemCompareQty, itemCompareQty,
recommend, recommend,
balanceQtyEdit, // balanceQtyEdit,
winScanLocation winScanLocation,
recommendQtyEdit
}, },
props: { props: {
dataContent: { dataContent: {
@ -159,7 +164,8 @@
}, },
edit(item) { edit(item) {
this.editItem = 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) { detail(item) {

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

@ -503,6 +503,7 @@
submitJob() { submitJob() {
var params = this.setParams() var params = this.setParams()
console.log(params)
// if (!params.subList || params.subList.length == 0) { // if (!params.subList || params.subList.length == 0) {
// uni.hideLoading() // uni.hideLoading()
@ -538,12 +539,14 @@
var createTime = getCurrDateTime(); var createTime = getCurrDateTime();
var creator = this.$store.state.user.id var creator = this.$store.state.user.id
this.detailSource.forEach(toLocationCode => { this.detailSource.forEach(toLocationCode => {
let obj = {...toLocationCode} let arr = []
delete obj.subList toLocationCode.subList.forEach(record=>{
if(record.scaned){
let obj = {...toLocationCode,...record}
obj.recordList = [] obj.recordList = []
delete obj.balance
delete obj.subList
let obj1 ={} let obj1 ={}
let arr = toLocationCode.subList.filter(item=>item.scaned)
arr.forEach(record=>{
obj1.supplierCode = record.supplierCode; obj1.supplierCode = record.supplierCode;
obj1.batch = record.batch; obj1.batch = record.batch;
obj1.copyContent =record.copyContent; obj1.copyContent =record.copyContent;
@ -569,9 +572,11 @@
obj1.singlePrice = single_price; obj1.singlePrice = single_price;
obj1.amount = single_price *record.qty; obj1.amount = single_price *record.qty;
obj.recordList.push(obj1) obj.recordList.push(obj1)
})
subList.push(obj) subList.push(obj)
}
}) })
})
this.jobContent.subList = subList this.jobContent.subList = subList
this.jobContent.createTime = createTime; this.jobContent.createTime = createTime;
this.jobContent.creator = creator; this.jobContent.creator = creator;
@ -686,7 +691,6 @@
str3 = str3+",是否提交" str3 = str3+",是否提交"
this.$refs.comMessage.showQuestionMessage1(str3, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str3, 'red', res => {
if (res) { if (res) {
return
// //
this.$throttle(this.submit, 2000, this)() this.$throttle(this.submit, 2000, this)()
} else { } else {
@ -694,7 +698,6 @@
} }
}); });
}else { }else {
return
// //
this.$throttle(this.submit, 2000, this)() 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="uni-flex uni-column">
<view class="item"> <view class="item">
<text class="item_title">原因 : </text> <text class="item_title">原因 : </text>
<text class="text_wrap">{{dataContent.Reason}} </text> <text class="text_wrap">{{dataContent.reason}} </text>
</view> </view>
</view> </view>
</view> </view>

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

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

Loading…
Cancel
Save