|
|
@ -3,10 +3,17 @@ |
|
|
|
<uni-collapse ref="collapse"> |
|
|
|
<uni-collapse-item :open="true"> |
|
|
|
<template v-slot:title> |
|
|
|
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
|
|
|
:isShowPackUnit="false"></itemCompareQty> |
|
|
|
<uni-swipe-action> |
|
|
|
<uni-swipe-action-item :right-options="dataContent.handleQty>0? removeOptions:options" |
|
|
|
@click="swipeClick($event,dataContent)"> |
|
|
|
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" |
|
|
|
:isShowPackUnit="false"></itemCompareQty> |
|
|
|
</uni-swipe-action-item> |
|
|
|
</uni-swipe-action> |
|
|
|
</template> |
|
|
|
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty=='TRUE'" :settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData" :isShowFromLocation="false"></package-list> |
|
|
|
<package-list :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty=='TRUE'" |
|
|
|
:settingParam="settingParam" @collapseChange="collapseChange" @updateData="updateData" |
|
|
|
:isShowFromLocation="false"></package-list> |
|
|
|
</uni-collapse-item> |
|
|
|
</uni-collapse> |
|
|
|
|
|
|
@ -32,11 +39,12 @@ |
|
|
|
|
|
|
|
import { |
|
|
|
getDetailOption, |
|
|
|
getPurchaseReceiptOption |
|
|
|
getPurchaseReceiptOption, |
|
|
|
getRemoveOption |
|
|
|
} from '@/common/array.js'; |
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
|
|
|
|
|
|
components: { |
|
|
|
itemCompareQty, |
|
|
|
recommend, |
|
|
@ -77,7 +85,9 @@ |
|
|
|
}, |
|
|
|
locatonItem: {}, |
|
|
|
detailOptions: [], |
|
|
|
scanOptions: [] |
|
|
|
scanOptions: [], |
|
|
|
options: [], |
|
|
|
removeOptions: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -89,21 +99,23 @@ |
|
|
|
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam |
|
|
|
.allowModifyLocation) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.removeOptions.length == 0) { |
|
|
|
this.removeOptions = getRemoveOption(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
updated() { |
|
|
|
console.log('updated') |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
collapseChange(){ |
|
|
|
methods: { |
|
|
|
collapseChange() { |
|
|
|
setTimeout(() => { |
|
|
|
this.resizeCollapse(); |
|
|
|
}, 500) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
resizeCollapse() { |
|
|
|
this.$nextTick(r => { |
|
|
|
this.$refs.collapse.resize() |
|
|
@ -132,7 +144,7 @@ |
|
|
|
} else if (e.content.text == "库位") { |
|
|
|
this.showLocation(item) |
|
|
|
} else if (e.content.text == "移除") { |
|
|
|
this.remove(item) |
|
|
|
this.removeScan(item) |
|
|
|
} |
|
|
|
}, |
|
|
|
edit(item) { |
|
|
@ -153,22 +165,42 @@ |
|
|
|
this.showItem = item; |
|
|
|
this.$refs.jobDetailPopup.openPopup(item) |
|
|
|
}, |
|
|
|
remove(item) { |
|
|
|
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
|
|
|
|
|
|
|
removeScan(item) { |
|
|
|
this.$refs.message.showQuestionMessage("确定移除物料的所有扫描信息?", |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
|
item.scaned = false |
|
|
|
item.handleQty = null |
|
|
|
this.$forceUpdate() |
|
|
|
this.$emit('remove', item) |
|
|
|
item.subList.forEach(lst => { |
|
|
|
lst.scaned = false; |
|
|
|
lst.handleQty = null; |
|
|
|
lst.packList.forEach(pack => { |
|
|
|
pack.scaned = false; |
|
|
|
pack.handleQty = null; |
|
|
|
}) |
|
|
|
}) |
|
|
|
// this.$forceUpdate() |
|
|
|
// this.$emit('remove', item) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// remove(item) { |
|
|
|
// this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
|
|
|
// res => { |
|
|
|
// if (res) { |
|
|
|
// item.scaned = false |
|
|
|
// item.handleQty = null |
|
|
|
// this.$forceUpdate() |
|
|
|
// this.$emit('remove', item) |
|
|
|
// } |
|
|
|
// }); |
|
|
|
// }, |
|
|
|
confirm(qty) { |
|
|
|
this.editItem.handleQty = qty; |
|
|
|
this.$emit('updateData') |
|
|
|
}, |
|
|
|
updateData(){ |
|
|
|
updateData() { |
|
|
|
this.$emit('updateData') |
|
|
|
} |
|
|
|
} |
|
|
|