|
|
@ -5,7 +5,7 @@ |
|
|
|
</comReturnRequestInfo> |
|
|
|
<uni-swipe-action ref="swipeAction"> |
|
|
|
<view v-for="(item, index) in dataContent.subList" :key="index"> |
|
|
|
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions"> |
|
|
|
<uni-swipe-action-item @click="swipeClick($event,item,index)" :right-options="options"> |
|
|
|
<item-qty :dataContent="item" :isShowStdPack="false"> |
|
|
|
</item-qty> |
|
|
|
<!-- <view v-if="item.batch!=''" style="margin-left: 10rpx;"> |
|
|
@ -36,7 +36,7 @@ |
|
|
|
import { |
|
|
|
getDetailOption, |
|
|
|
getDetailEditRemoveOption, |
|
|
|
getDetailRemoveOption |
|
|
|
getDetailRemoveOption, |
|
|
|
} from '@/common/array.js'; |
|
|
|
|
|
|
|
export default { |
|
|
@ -79,7 +79,6 @@ |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
dataContent(newVal) { |
|
|
|
this.requestItem = newVal.subList[0]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
@ -92,9 +91,9 @@ |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
requestItem: {}, |
|
|
|
detailOptions: [], |
|
|
|
scanOptions: [] |
|
|
|
scanOptions: [], |
|
|
|
options:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -103,26 +102,30 @@ |
|
|
|
this.detailOptions = getDetailOption(); |
|
|
|
} |
|
|
|
if (this.scanOptions.length == 0) { |
|
|
|
this.scanOptions = getDetailEditRemoveOption(); |
|
|
|
this.scanOptions = getDetailRemoveOption(); |
|
|
|
// if (this.dataContent.allowModifyQty == 1) { |
|
|
|
// this.scanOptions = getDetailEditRemoveOption(); |
|
|
|
// } else { |
|
|
|
// this.scanOptions = getDetailRemoveOption(); |
|
|
|
// } |
|
|
|
} |
|
|
|
if(!this.isSwipe){ |
|
|
|
this.detailOptions=[] |
|
|
|
} |
|
|
|
|
|
|
|
this.options =this.scanOptions |
|
|
|
// if(!this.isSwipe){ |
|
|
|
// this.options=[] |
|
|
|
// }else { |
|
|
|
// this.options =this.scanOptions |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
swipeClick(e, item) { |
|
|
|
swipeClick(e, item,index) { |
|
|
|
if (e.content.text == "详情") { |
|
|
|
this.detail(item) |
|
|
|
} else if (e.content.text == "编辑") { |
|
|
|
this.edit(item) |
|
|
|
} else if (e.content.text == "移除") { |
|
|
|
this.remove(item) |
|
|
|
this.remove(item,index) |
|
|
|
} |
|
|
|
}, |
|
|
|
edit(item) { |
|
|
@ -136,17 +139,13 @@ |
|
|
|
// // this.showItem = item; |
|
|
|
// // this.$refs.jobDetailPopup.openPopup(item) |
|
|
|
}, |
|
|
|
remove(item) { |
|
|
|
remove(item,index) { |
|
|
|
this.$refs.message.showQuestionMessage("确定移除扫描信息?", |
|
|
|
res => { |
|
|
|
if (res) { |
|
|
|
item.scaned = false |
|
|
|
item.record = {} |
|
|
|
item.balance = {} |
|
|
|
item.inventoryStatus = item.RecommendInventoryStatus |
|
|
|
// item.record.qty = 0; |
|
|
|
this.dataContent.subList.splice(index, 1) |
|
|
|
this.$forceUpdate() |
|
|
|
this.$emit('remove', item) |
|
|
|
// this.$emit('remove', item) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|