|
|
|
<template>
|
|
|
|
<view>
|
|
|
|
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
|
|
|
|
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
|
|
|
|
|
|
|
|
<view v-for="(item,index) in dataContent.Items">
|
|
|
|
<uni-collapse ref="collapse">
|
|
|
|
<uni-collapse-item :open="true">
|
|
|
|
<template v-slot:title>
|
|
|
|
<!-- 物品 -->
|
|
|
|
<uni-swipe-action ref="swipeAction">
|
|
|
|
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
|
|
|
|
:right-options="removeOptions">
|
|
|
|
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
|
|
|
|
</uni-swipe-action-item>
|
|
|
|
</uni-swipe-action>
|
|
|
|
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
|
|
|
|
</com-issue-request-info> -->
|
|
|
|
</template>
|
|
|
|
<u-line />
|
|
|
|
<view v-for="(loacation,index) in item.Locations">
|
|
|
|
<view>
|
|
|
|
<view class="uni-flex uni-row space-between">
|
|
|
|
<!-- 推荐库位 -->
|
|
|
|
<location :locationCode="loacation.fromLocationCode">
|
|
|
|
</location>
|
|
|
|
</view>
|
|
|
|
<view v-for="(batch,index) in loacation.Batchs">
|
|
|
|
<recommend-balance style='margin-left: 0rpx;' :detail="batch" :isShowLocation="false"
|
|
|
|
:isShowPack="batch.packingNumber!=null && batch.packingNumber!=''">
|
|
|
|
</recommend-balance>
|
|
|
|
<view class="uni-flex uni-row " v-if='batch.Records.length>0'>
|
|
|
|
<view class="center " style=" width: 20px;background-color: #0CC2B6; color: #fff; margin-left: 40px;padding: 0px 2px;">
|
|
|
|
扫描
|
|
|
|
</view>
|
|
|
|
<view class="uni-flex uni-column scan_view" style="width: 100%;">
|
|
|
|
<view v-for="(record,index) in batch.Records">
|
|
|
|
<uni-swipe-action ref="swipeAction">
|
|
|
|
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
|
|
|
|
:right-options="scanOptions">
|
|
|
|
<handle-balance :detail="record" :isShowLocation="false"
|
|
|
|
:isShowBatch="batch.packingNumber!=null">
|
|
|
|
</handle-balance>
|
|
|
|
</uni-swipe-action-item>
|
|
|
|
</uni-swipe-action>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</uni-collapse-item>
|
|
|
|
</uni-collapse>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
|
|
|
|
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
|
|
|
|
<comMessage ref="message"></comMessage>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import itemQty from '@/mycomponents/item/itemQty.vue'
|
|
|
|
import recommend from '@/mycomponents/recommend/recommend.vue'
|
|
|
|
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
|
|
|
|
import handleBalance from '@/mycomponents/balance/handleBalance.vue'
|
|
|
|
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
|
|
|
|
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
|
|
|
|
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
|
|
|
|
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
|
|
|
|
import location from '@/mycomponents/balance/location.vue'
|
|
|
|
import comMessage from '@/mycomponents/common/comMessage.vue'
|
|
|
|
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
|
|
|
|
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
|
|
|
|
import {
|
|
|
|
getDetailOption,
|
|
|
|
getEditRemoveOption,
|
|
|
|
getRemoveOption
|
|
|
|
} from '@/common/array.js';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
emits: ['updateData',"removeItemCode"],
|
|
|
|
components: {
|
|
|
|
itemQty,
|
|
|
|
recommend,
|
|
|
|
recommendBalance,
|
|
|
|
handleBalance,
|
|
|
|
recommendQtyEdit,
|
|
|
|
requiredLocation,
|
|
|
|
balanceQtyEdit,
|
|
|
|
location,
|
|
|
|
comMessage,
|
|
|
|
detailInfoPopup,
|
|
|
|
comIssueRequestInfo
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
dataContent: {
|
|
|
|
type: Object,
|
|
|
|
default: {}
|
|
|
|
},
|
|
|
|
settingParam: {
|
|
|
|
type: Object,
|
|
|
|
default: {}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
option: [],
|
|
|
|
showItem: {},
|
|
|
|
editItem: {},
|
|
|
|
batchItem: {},
|
|
|
|
detailOptions: [],
|
|
|
|
scanOptions: [],
|
|
|
|
removeOptions:[]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
this.detailOptions = getDetailOption();
|
|
|
|
this.scanOptions = getEditRemoveOption();
|
|
|
|
this.removeOptions = getRemoveOption()
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
resizeCollapse() {
|
|
|
|
this.$nextTick(r => {
|
|
|
|
this.$refs.collapse.forEach(r => {
|
|
|
|
r.childrens.forEach(i => {
|
|
|
|
i.init();
|
|
|
|
})
|
|
|
|
r.resize();
|
|
|
|
})
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
swipeClick(e, batch, record, index) {
|
|
|
|
if (e.content.text == "编辑") {
|
|
|
|
this.edit(batch, record)
|
|
|
|
} else if (e.content.text == "移除") {
|
|
|
|
this.remove(batch, record, index)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
itemCoceClick(e,item,index){
|
|
|
|
if (e.content.text == "移除") {
|
|
|
|
this.dataContent.Items.splice(index, 1);
|
|
|
|
this.$emit('removeItemCode')
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
edit(batch, item) {
|
|
|
|
let that = this;
|
|
|
|
that.editItem = item;
|
|
|
|
that.batchItem = batch;
|
|
|
|
item.balance.balanceQty = item.balance.qty;
|
|
|
|
that.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
|
|
|
|
},
|
|
|
|
|
|
|
|
detail(item) {
|
|
|
|
this.showItem = item;
|
|
|
|
this.$refs.receiptHint.openScanPopup()
|
|
|
|
},
|
|
|
|
remove(batch, record, index) {
|
|
|
|
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
|
|
|
|
res => {
|
|
|
|
if (res) {
|
|
|
|
batch.Records.splice(index, 1);
|
|
|
|
this.resizeCollapse();
|
|
|
|
this.$emit('updateData', record)
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
confirm(val) {
|
|
|
|
this.editItem.qty = val;
|
|
|
|
this.$emit('updateData', this.editItem)
|
|
|
|
// let qty = 0;
|
|
|
|
// this.batchItem.Records.forEach(r => {
|
|
|
|
// qty += Number(r.qty);
|
|
|
|
// })
|
|
|
|
// this.batchItem.handleQty = qty;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|