<template>
|
<u-swipe-action>
|
<u-swipe-action-item v-for="(item,index) in workPieceData" :key="index" :options="options"
|
:name="index" @click="actionClick" style="margin-bottom: 10rpx;background-color: #fff;">
|
<view class="content" >
|
<view class="content_flex">
|
<view class="flex_index">{{workPieceData.length-index}}</view>
|
<view class="flex_code">OP80成品码: {{item.oP80NewCode}}</view>
|
<view class="flex_status">{{item.qualityStateName}}</view>
|
</view>
|
<view class="content_flex">
|
<view class="flex_color" style="width: 100%;">工件号: {{item.workPieceID}}</view>
|
<!-- <view class="flex_color" style="text-align: right;">当前工序: {{item.workingProcedureCurrent}}</view> -->
|
</view>
|
<view class="content_flex">
|
<view class="flex_color" style="width: 100%;">工件状态: {{item.workPieceStateName}}</view>
|
</view>
|
<view class="content_flex">
|
<view class="flex_color" style="width: 100%;">当前工序: {{item.workingProcedureCurrent}}</view>
|
</view>
|
<view class="content_flex">
|
<view class="flex_color" style="width: 100%;">设备编号: {{item.equipmentID}}</view>
|
</view>
|
</view>
|
</u-swipe-action-item>
|
</u-swipe-action>
|
</template>
|
|
<script>
|
export default {
|
props: {
|
workPieceData: {
|
type: Array,
|
default: () => []
|
}
|
},
|
data() {
|
return {
|
options: [{
|
text: "移除",
|
style: {
|
background: '#F08202'
|
}
|
}],
|
}
|
},
|
methods:{
|
actionClick(opt){
|
uni.showModal({
|
title: '提示',
|
content: '是否确认移除工件号"'+this.workPieceData[opt.name].workPieceID+'"?',
|
showCancel: true,
|
cancelColor: '#333333',
|
success: (res => {
|
if (res.confirm) {
|
console.log('移除',opt);
|
this.$emit('deleteData',this.workPieceData[opt.name])
|
} else if (res.cancel) {
|
|
}
|
})
|
});
|
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.content {
|
background-color: #fff;
|
width: 100%;
|
box-sizing: border-box;
|
border: 1px solid #fff;
|
padding: 15rpx;
|
margin-bottom: 10rpx;
|
|
.content_flex {
|
display: flex;
|
justify-content: flex-start;
|
align-items: center;
|
margin-bottom: 5rpx;
|
|
.flex_index {
|
width: 50rpx;
|
height: 50rpx;
|
background: $color-common;
|
color: #fff;
|
font-size: 30rpx;
|
line-height: 50rpx;
|
text-align: center;
|
border-radius: 50%;
|
margin-right: 15rpx;
|
}
|
|
.flex_code {
|
font-size: 32rpx;
|
color: $color-common;
|
width: 75%;
|
}
|
|
.flex_status {
|
width: 90rpx;
|
text-align: center;
|
padding: 10rpx;
|
background: $color-common;
|
color: #fff;
|
font-weight: 550;
|
align-self: flex-end;
|
|
}
|
|
.flex_color {
|
font-size: 32rpx;
|
color: #000;
|
width: 75%;
|
|
}
|
|
.card-action {
|
width: 100%;
|
display: flex;
|
justify-content: flex-end;
|
align-items: center;
|
}
|
|
}
|
}
|
</style>
|