|
|
|
<template>
|
|
|
|
<view class="" style="background-color: #fff;">
|
|
|
|
<!-- <comReturnRequestInfo :workShopCode="dataContent.workshopCode" :dataContent="requestItem">
|
|
|
|
</comReturnRequestInfo> -->
|
|
|
|
<uni-collapse ref="collapse1" @change="">
|
|
|
|
<uni-collapse-item :open="true">
|
|
|
|
<template v-slot:title>
|
|
|
|
<item-compare-qty
|
|
|
|
:dataContent="dataContent"
|
|
|
|
:handleQty="Number(dataContent.handleQty)"
|
|
|
|
:isShowStdPack="false">
|
|
|
|
</item-compare-qty>
|
|
|
|
</template>
|
|
|
|
<u-line />
|
|
|
|
<view class="" v-for="(item,index) in dataContent.subList">
|
|
|
|
<uni-swipe-action ref="swipeAction">
|
|
|
|
<uni-swipe-action-item @click="swipeClick($event,item)"
|
|
|
|
:right-options="item.scaned?scanOptions:detailOptions">
|
|
|
|
<recommend :detail="item" :record="item.record" :isShowPack="isShowPack"
|
|
|
|
:isShowBatch="isShowBatch" :isShowFromLocation="isShowLocation"></recommend>
|
|
|
|
</uni-swipe-action-item>
|
|
|
|
</uni-swipe-action>
|
|
|
|
<u-line />
|
|
|
|
</view>
|
|
|
|
</uni-collapse-item>
|
|
|
|
</uni-collapse>
|
|
|
|
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
|
|
|
|
<com-message ref="message"></com-message>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
|
|
|
|
import recommend from '@/mycomponents/recommend/recommend.vue'
|
|
|
|
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
|
|
|
|
import comMessage from '@/mycomponents/common/comMessage.vue'
|
|
|
|
import comReturnRequestInfo from '@/pages/productionReturn/coms/comReturnRequestInfo.vue'
|
|
|
|
import {
|
|
|
|
getDetailOption,
|
|
|
|
getDetailEditRemoveOption,
|
|
|
|
getDetailRemoveOption
|
|
|
|
} from '@/common/array.js';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
emits: ['openDetail'],
|
|
|
|
components: {
|
|
|
|
itemCompareQty,
|
|
|
|
recommend,
|
|
|
|
balanceQtyEdit,
|
|
|
|
comMessage,
|
|
|
|
comReturnRequestInfo
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
dataContent: {
|
|
|
|
type: Object,
|
|
|
|
default: {}
|
|
|
|
},
|
|
|
|
settingParam: {
|
|
|
|
type: Object,
|
|
|
|
default: {}
|
|
|
|
},
|
|
|
|
isShowPack: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
isShowBatch: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
isShowLocation: {
|
|
|
|
type: Boolean,
|
|
|
|
default: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
dataContent(newVal) {
|
|
|
|
var test =this.dataContent
|
|
|
|
debugger
|
|
|
|
this.requestItem = newVal.subList[0];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
option: [],
|
|
|
|
showItem: {},
|
|
|
|
editItem: {
|
|
|
|
record: {
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
detailOptions: [],
|
|
|
|
scanOptions: [],
|
|
|
|
requestItem:{}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
if (this.detailOptions.length == 0) {
|
|
|
|
this.detailOptions = getDetailOption();
|
|
|
|
}
|
|
|
|
if (this.scanOptions.length == 0) {
|
|
|
|
this.scanOptions = getDetailEditRemoveOption();
|
|
|
|
// if (this.dataContent.allowModifyQty == 1) {
|
|
|
|
// this.scanOptions = getDetailEditRemoveOption();
|
|
|
|
// } else {
|
|
|
|
// this.scanOptions = getDetailRemoveOption();
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
swipeClick(e, item) {
|
|
|
|
if (e.content.text == "详情") {
|
|
|
|
this.detail(item)
|
|
|
|
} else if (e.content.text == "编辑") {
|
|
|
|
this.edit(item)
|
|
|
|
} else if (e.content.text == "移除") {
|
|
|
|
this.remove(item)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
edit(item) {
|
|
|
|
this.editItem = item;
|
|
|
|
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
|
|
|
|
},
|
|
|
|
|
|
|
|
detail(item) {
|
|
|
|
this.$emit('openDetail', item);
|
|
|
|
// this.showItem = item;
|
|
|
|
// this.$refs.jobDetailPopup.openPopup(item)
|
|
|
|
},
|
|
|
|
remove(item) {
|
|
|
|
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
|
|
|
|
res => {
|
|
|
|
if (res) {
|
|
|
|
item.scaned = false
|
|
|
|
item.record = {}
|
|
|
|
item.balance = {}
|
|
|
|
item.inventoryStatus = item.RecommendInventoryStatus
|
|
|
|
// item.record.qty = 0;
|
|
|
|
this.$forceUpdate()
|
|
|
|
this.$emit('remove', item)
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
confirm(qty) {
|
|
|
|
this.editItem.record.qty = qty;
|
|
|
|
this.$emit('updateData')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|