|
@ -5,15 +5,18 @@ |
|
|
<uni-collapse ref="collapse2" @change="collapseChange"> |
|
|
<uni-collapse ref="collapse2" @change="collapseChange"> |
|
|
<uni-collapse-item :disabled="false"> |
|
|
<uni-collapse-item :disabled="false"> |
|
|
<template v-slot:title> |
|
|
<template v-slot:title> |
|
|
<package-card :dataContent="item" :isShowLocation="false" :isShowFromLocation ="isShowFromLocation" |
|
|
<package-card :dataContent="item" :isShowLocation="false" |
|
|
></package-card> |
|
|
:isShowFromLocation="isShowFromLocation"></package-card> |
|
|
</template> |
|
|
</template> |
|
|
<view v-for="(pack,index) in item.packList" :key="pack.id" style=" width: 100%; background-color: antiquewhite;"> |
|
|
<view v-for="(pack,index) in item.packList" :key="pack.id" |
|
|
<uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions:removeOptions" |
|
|
style=" width: 100%; background-color: antiquewhite;"> |
|
|
|
|
|
<uni-swipe-action> |
|
|
|
|
|
<uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions : pack.scaned? removeOptions:options" |
|
|
@click="swipeClick($event,pack)"> |
|
|
@click="swipeClick($event,pack)"> |
|
|
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false" |
|
|
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false" |
|
|
:isShowToLocation="false" :isShowBatch="false"></package-card> |
|
|
:isShowToLocation="false" :isShowBatch="false"></package-card> |
|
|
</uni-swipe-action-item> |
|
|
</uni-swipe-action-item> |
|
|
|
|
|
</uni-swipe-action> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</uni-collapse-item> |
|
|
</uni-collapse-item> |
|
@ -21,6 +24,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> |
|
|
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> |
|
|
</recommend-qty-edit> |
|
|
</recommend-qty-edit> |
|
|
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -35,7 +39,7 @@ |
|
|
getEditRemoveOption |
|
|
getEditRemoveOption |
|
|
} from '@/common/array.js'; |
|
|
} from '@/common/array.js'; |
|
|
export default { |
|
|
export default { |
|
|
emits: ["collapseChange"], |
|
|
emits: ["collapseChange", "updateData"], |
|
|
components: { |
|
|
components: { |
|
|
packageCard, |
|
|
packageCard, |
|
|
recommendQtyEdit |
|
|
recommendQtyEdit |
|
@ -46,12 +50,12 @@ |
|
|
editItem: {}, |
|
|
editItem: {}, |
|
|
options: [], |
|
|
options: [], |
|
|
removeOptions: [], |
|
|
removeOptions: [], |
|
|
editAndRemoveOptions:[] |
|
|
editAndRemoveOptions: [] |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.removeOptions = getRemoveOption(); |
|
|
this.removeOptions = getRemoveOption(); |
|
|
this.editAndRemoveOptions =getEditRemoveOption() |
|
|
this.editAndRemoveOptions = getEditRemoveOption() |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
dataContent: { |
|
|
dataContent: { |
|
@ -91,7 +95,7 @@ |
|
|
type: Object, |
|
|
type: Object, |
|
|
default: null |
|
|
default: null |
|
|
}, |
|
|
}, |
|
|
isEdit:{ |
|
|
isEdit: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default: false |
|
|
default: false |
|
|
} |
|
|
} |
|
@ -104,8 +108,22 @@ |
|
|
swipeClick(e, item) { |
|
|
swipeClick(e, item) { |
|
|
if (e.content.text == "编辑") { |
|
|
if (e.content.text == "编辑") { |
|
|
this.edit(item) |
|
|
this.edit(item) |
|
|
|
|
|
} else if (e.content.text == "移除") { |
|
|
|
|
|
this.remove(item) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
remove(item) { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", |
|
|
|
|
|
res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
item.scaned = false |
|
|
|
|
|
item.handleQty = 0 |
|
|
|
|
|
this.$emit('updateData') |
|
|
|
|
|
this.$forceUpdate() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
edit(item) { |
|
|
edit(item) { |
|
|
this.editItem = item; |
|
|
this.editItem = item; |
|
|
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); |
|
|
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty); |
|
@ -180,8 +198,8 @@ |
|
|
isDevlement() { |
|
|
isDevlement() { |
|
|
return config.isDevelopment; |
|
|
return config.isDevelopment; |
|
|
}, |
|
|
}, |
|
|
confirm(qty){ |
|
|
confirm(qty) { |
|
|
this.editItem.handleQty =qty; |
|
|
this.editItem.handleQty = qty; |
|
|
this.$emit("updateData") |
|
|
this.$emit("updateData") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|