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