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.

154 lines
3.7 KiB

12 months ago
<template>
11 months ago
<view class="" style="background-color: #fff;">
<view class="uni-flex uni-column">
11 months ago
<!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
</com-issue-request-info> -->
<work-station :workshopCode="dataContent.workshopCode" :productionLineCode="dataContent.productionLineCode"
11 months ago
:workStationCode="dataContent.workStationCode" :rawLocationCode="dataContent.toLocationCode"></work-station>
11 months ago
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item,index)" :right-options="options">
11 months ago
<item-qty :dataContent="item" :isShowStdPack="false">
</item-qty>
12 months ago
<u-line />
11 months ago
</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>
12 months ago
</view>
</template>
<script>
11 months ago
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'
11 months ago
import workStation from '@/mycomponents/workStation/workStation.vue'
11 months ago
import {
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
} from '@/common/array.js';
12 months ago
export default {
11 months ago
emits: ['openDetail'],
12 months ago
components: {
11 months ago
itemCompareQty,
recommend,
balanceQtyEdit,
comMessage,
itemQty,
comIssueRequestInfo,
11 months ago
requestDetailInfoPopup,
workStation
12 months ago
},
props: {
dataContent: {
type: Object,
default: {}
},
11 months ago
settingParam: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isSwipe: {
type: Boolean,
default: true
},
11 months ago
},
watch: {
12 months ago
},
11 months ago
data() {
return {
option: [],
showItem: {},
editItem: {
record: {
12 months ago
11 months ago
}
},
detailOptions: [],
scanOptions: [],
options:[]
11 months ago
}
},
12 months ago
11 months ago
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailRemoveOption();
11 months ago
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
}
this.options =this.scanOptions
// if(!this.isSwipe){
// this.detailOptions=[]
// }
11 months ago
},
12 months ago
11 months ago
methods: {
swipeClick(e, item,index) {
11 months ago
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item,index)
11 months ago
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.record.qty);
},
12 months ago
11 months ago
detail(item) {
this.$refs.jobDetailPopup.openPopup(item)
// this.$emit('openDetail', item);
// // this.showItem = item;
// // this.$refs.jobDetailPopup.openPopup(item)
},
remove(item,index) {
11 months ago
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
this.dataContent.subList.splice(index, 1)
11 months ago
this.$forceUpdate()
}
});
},
confirm(qty) {
this.editItem.record.qty = qty;
this.$emit('updateData')
}
12 months ago
}
}
</script>
<style>
</style>