You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
4.0 KiB
164 lines
4.0 KiB
<template>
|
|
<view class="" style="background-color: #fff;">
|
|
<view class="uni-flex uni-column">
|
|
<!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
|
|
</com-issue-request-info> -->
|
|
<work-station :workshopCode="dataContent.workShopCode" :productionLineCode="dataContent.productionLineCode"
|
|
:workStationCode="dataContent.workStationCode" :rawLocationCode="dataContent.toLocationCode"></work-station>
|
|
|
|
<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">
|
|
<item-qty :dataContent="item" :isShowStdPack="false">
|
|
</item-qty>
|
|
<u-line />
|
|
</uni-swipe-action-item>
|
|
</view>
|
|
</uni-swipe-action>
|
|
</view>
|
|
<request-detail-info-popup ref="jobDetailPopup"></request-detail-info-popup>
|
|
<com-message ref="message"></com-message>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
|
|
import recommend from '@/mycomponents/recommend/recommend.vue'
|
|
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
|
|
import comMessage from '@/mycomponents/common/comMessage.vue'
|
|
import itemQty from '@/mycomponents/item/itemQty.vue'
|
|
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
|
|
import requestDetailInfoPopup from '@/pages/issue/coms/requestDetailInfoPopup.vue'
|
|
import workStation from '@/mycomponents/workStation/workStation.vue'
|
|
|
|
import {
|
|
getDetailOption,
|
|
getDetailEditRemoveOption,
|
|
getDetailRemoveOption
|
|
} from '@/common/array.js';
|
|
|
|
export default {
|
|
emits: ['openDetail'],
|
|
components: {
|
|
itemCompareQty,
|
|
recommend,
|
|
balanceQtyEdit,
|
|
comMessage,
|
|
itemQty,
|
|
comIssueRequestInfo,
|
|
requestDetailInfoPopup,
|
|
workStation
|
|
},
|
|
props: {
|
|
dataContent: {
|
|
type: Object,
|
|
default: {}
|
|
},
|
|
settingParam: {
|
|
type: Object,
|
|
default: {}
|
|
},
|
|
isShowPack: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
isShowBatch: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
isShowLocation: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
isSwipe: {
|
|
type: Boolean,
|
|
default: true
|
|
},
|
|
},
|
|
watch: {
|
|
dataContent: {
|
|
handler(newval, oldval) {
|
|
this.requestItem = this.dataContent.subList[0];
|
|
},
|
|
immediate: true,
|
|
deep: true
|
|
}
|
|
},
|
|
|
|
data() {
|
|
return {
|
|
option: [],
|
|
showItem: {},
|
|
editItem: {
|
|
record: {
|
|
|
|
}
|
|
},
|
|
requestItem: {},
|
|
detailOptions: [],
|
|
scanOptions: []
|
|
}
|
|
},
|
|
|
|
mounted() {
|
|
if (this.detailOptions.length == 0) {
|
|
this.detailOptions = getDetailOption();
|
|
}
|
|
if (this.scanOptions.length == 0) {
|
|
this.scanOptions = getDetailEditRemoveOption();
|
|
// if (this.dataContent.allowModifyQty == 1) {
|
|
// this.scanOptions = getDetailEditRemoveOption();
|
|
// } else {
|
|
// this.scanOptions = getDetailRemoveOption();
|
|
// }
|
|
}
|
|
if(!this.isSwipe){
|
|
this.detailOptions=[]
|
|
}
|
|
},
|
|
|
|
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.remove(item)
|
|
}
|
|
},
|
|
edit(item) {
|
|
this.editItem = item;
|
|
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
|
|
},
|
|
|
|
detail(item) {
|
|
this.$refs.jobDetailPopup.openPopup(item)
|
|
// this.$emit('openDetail', item);
|
|
// // this.showItem = item;
|
|
// // this.$refs.jobDetailPopup.openPopup(item)
|
|
},
|
|
remove(item) {
|
|
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
|
|
res => {
|
|
if (res) {
|
|
item.scaned = false
|
|
item.record = {}
|
|
item.balance = {}
|
|
item.inventoryStatus = item.RecommendInventoryStatus
|
|
// item.record.qty = 0;
|
|
this.$forceUpdate()
|
|
this.$emit('remove', item)
|
|
}
|
|
});
|
|
},
|
|
confirm(qty) {
|
|
this.editItem.record.qty = qty;
|
|
this.$emit('updateData')
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|
|
|