|
@ -4,14 +4,23 @@ |
|
|
<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> |
|
|
|
|
|
<uni-swipe-action> |
|
|
|
|
|
<uni-swipe-action-item |
|
|
|
|
|
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options" |
|
|
|
|
|
@click="swipeClick($event,item,'parent')"> |
|
|
<package-card :dataContent="item" :isShowLocation="false" |
|
|
<package-card :dataContent="item" :isShowLocation="false" |
|
|
:isShowFromLocation="isShowFromLocation" :isShowStatus="isShowStatus"></package-card> |
|
|
:isShowFromLocation="isShowFromLocation" |
|
|
|
|
|
:isShowStatus="isShowStatus"></package-card> |
|
|
|
|
|
</uni-swipe-action-item> |
|
|
|
|
|
</uni-swipe-action> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
<view v-for="(pack,index) in item.packList" :key="pack.id" |
|
|
<view v-for="(pack,index) in item.packList" :key="pack.id" |
|
|
style=" width: 100%; background-color: antiquewhite;"> |
|
|
style=" width: 100%; background-color: antiquewhite;"> |
|
|
<uni-swipe-action> |
|
|
<uni-swipe-action> |
|
|
<uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions : pack.scaned? removeOptions:options" |
|
|
<uni-swipe-action-item |
|
|
@click="swipeClick($event,pack)"> |
|
|
:right-options="(pack.scaned&&isEdit)?editAndRemoveOptions : pack.scaned? removeOptions:options" |
|
|
|
|
|
@click="swipeClick($event,pack,'child')"> |
|
|
<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> |
|
@ -104,13 +113,36 @@ |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
swipeClick(e, item) { |
|
|
swipeClick(e, item, type) { |
|
|
if (e.content.text == "编辑") { |
|
|
if (e.content.text == "编辑") { |
|
|
this.edit(item) |
|
|
this.edit(item) |
|
|
} else if (e.content.text == "移除") { |
|
|
} else if (e.content.text == "移除") { |
|
|
|
|
|
if (type == 'parent') { |
|
|
|
|
|
this.removeParent(item); |
|
|
|
|
|
} else { |
|
|
this.remove(item) |
|
|
this.remove(item) |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
removeParent(item) { |
|
|
|
|
|
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", |
|
|
|
|
|
res => { |
|
|
|
|
|
if (res) { |
|
|
|
|
|
item.scaned = false |
|
|
|
|
|
item.handleQty = null; |
|
|
|
|
|
item.packList.forEach(subItem => { |
|
|
|
|
|
subItem.scaned = false |
|
|
|
|
|
subItem.handleQty = null; |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.$emit('updateData') |
|
|
|
|
|
this.$forceUpdate() |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
remove(item) { |
|
|
remove(item) { |
|
|
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", |
|
|
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?", |
|
|
res => { |
|
|
res => { |
|
|