lijuncheng
12 months ago
7 changed files with 264 additions and 24 deletions
@ -0,0 +1,148 @@ |
|||||
|
<template> |
||||
|
<view class="" style="background-color: #fff;"> |
||||
|
<uni-collapse ref="collapse1" @change=""> |
||||
|
<uni-collapse-item :open="true"> |
||||
|
<template v-slot:title> |
||||
|
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty> |
||||
|
</template> |
||||
|
<u-line /> |
||||
|
<view class="" v-for="(item,index) in dataContent.subList"> |
||||
|
<uni-swipe-action ref="swipeAction"> |
||||
|
<uni-swipe-action-item @click="swipeClick($event,item)" |
||||
|
:right-options="item.scaned?scanOptions:detailOptions"> |
||||
|
<recommend :detail="item" :isShowLocation="false" :isShowFromLocation="false" :isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend> |
||||
|
</uni-swipe-action-item> |
||||
|
</uni-swipe-action> |
||||
|
<u-line color="#D8D8D8"></u-line> |
||||
|
</view> |
||||
|
</uni-collapse-item> |
||||
|
</uni-collapse> |
||||
|
|
||||
|
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" |
||||
|
@confirm="confirm"> |
||||
|
</recommend-qty-edit> |
||||
|
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' |
||||
|
:locationTypeList="locationTypeList"></win-scan-location> |
||||
|
<returnDetailInfoPopup ref="jobDetailPopup" :dataContent="showItem"></returnDetailInfoPopup> |
||||
|
<com-message ref="message"></com-message> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' |
||||
|
import recommend from '@/mycomponents/recommend/recommend.vue' |
||||
|
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' |
||||
|
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue' |
||||
|
import comMessage from '@/mycomponents/common/comMessage.vue' |
||||
|
import returnDetailInfoPopup from '@/pages/productionReturn/coms/returnDetailInfoPopup.vue' |
||||
|
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" |
||||
|
|
||||
|
import { |
||||
|
getDetailOption, |
||||
|
getPurchaseReceiptOption |
||||
|
} from '@/common/array.js'; |
||||
|
|
||||
|
export default { |
||||
|
components: { |
||||
|
itemCompareQty, |
||||
|
recommend, |
||||
|
recommendQtyEdit, |
||||
|
jobDetailPopup, |
||||
|
returnDetailInfoPopup, |
||||
|
comMessage, |
||||
|
winScanLocation |
||||
|
}, |
||||
|
props: { |
||||
|
dataContent: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
}, |
||||
|
settingParam: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
}, |
||||
|
locationTypeList: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
}, |
||||
|
watch: { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
data() { |
||||
|
return { |
||||
|
showItem: {}, |
||||
|
editItem: { |
||||
|
record: { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
locatonItem:{}, |
||||
|
detailOptions: [], |
||||
|
scanOptions: [] |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
mounted() { |
||||
|
if (this.detailOptions.length == 0) { |
||||
|
this.detailOptions = getDetailOption(); |
||||
|
} |
||||
|
if (this.scanOptions.length == 0) { |
||||
|
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty,this.settingParam.allowModifyLocation) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
methods: { |
||||
|
swipeClick(e, item) { |
||||
|
if (e.content.text == "详情") { |
||||
|
this.detail(item) |
||||
|
} else if (e.content.text == "编辑") { |
||||
|
this.edit(item) |
||||
|
} else if (e.content.text == "库位") { |
||||
|
this.showLocation(item) |
||||
|
} else if (e.content.text == "移除") { |
||||
|
this.remove(item) |
||||
|
} |
||||
|
}, |
||||
|
edit(item) { |
||||
|
this.editItem = item; |
||||
|
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty,item.labelQty); |
||||
|
}, |
||||
|
showLocation(item) { |
||||
|
this.locatonItem =item; |
||||
|
this.$refs.scanLocationCode.openScanPopup(); |
||||
|
}, |
||||
|
//扫描源库位 |
||||
|
getLocation(location, code) { |
||||
|
this.locatonItem.toLocationCode =code; |
||||
|
this.$emit('updateData') |
||||
|
}, |
||||
|
|
||||
|
detail(item) { |
||||
|
this.showItem = item; |
||||
|
this.$refs.jobDetailPopup.openPopup(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') |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
</style> |
@ -0,0 +1,68 @@ |
|||||
|
<template> |
||||
|
<view class=""> |
||||
|
<uni-popup ref="popup"> |
||||
|
<detail-common-info :dataContent="dataContent" @onClose="closePopup"> |
||||
|
<view class=""> |
||||
|
<view class="uni-flex uni-column"> |
||||
|
<view class="item"> |
||||
|
<text class="item_title">标包数量 : </text> |
||||
|
<text class="text_wrap">{{dataContent.stdPackQty}} </text> |
||||
|
</view> |
||||
|
<view class="item"> |
||||
|
<text class="item_title">标包单位 : </text> |
||||
|
<text class="text_wrap">{{getStdPackUnitInfo(dataContent.stdPackUnit)}} </text> |
||||
|
</view> |
||||
|
|
||||
|
</view> |
||||
|
</view> |
||||
|
<u-line></u-line> |
||||
|
</detail-common-info> |
||||
|
</uni-popup> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import {getStdPackUnitInfo} from "@/common/directory.js" |
||||
|
import { |
||||
|
dateFormat |
||||
|
} from '@/common/basic.js'; |
||||
|
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' |
||||
|
export default { |
||||
|
components: { |
||||
|
detailCommonInfo |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
dataContent: { |
||||
|
type: Object, |
||||
|
default: {} |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
mounted() {}, |
||||
|
props: {}, |
||||
|
|
||||
|
methods: { |
||||
|
openPopup(val) { |
||||
|
this.dataContent = val; |
||||
|
this.$refs.popup.open('bottom') |
||||
|
}, |
||||
|
closePopup() { |
||||
|
this.$refs.popup.close() |
||||
|
}, |
||||
|
getStdPackUnitInfo(value){ |
||||
|
return getStdPackUnitInfo(value).label |
||||
|
}, |
||||
|
dateFormat(value){ |
||||
|
return dateFormat(value) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
|
||||
|
|
||||
|
</style> |
Loading…
Reference in new issue