<template>
|
<u-swipe-action v-if="materialData.length>0">
|
<u-swipe-action-item :options="options" v-for="(item,index) in materialData"
|
:key="'material-list-item-'+index" style="margin-bottom: 20rpx;"
|
@click="deleteItem" :index="index" :name="item.materialId">
|
<view class="material-item-group">
|
<view class="material-list-item" >
|
<view class="close-btn">
|
<view class="icon-layer"><u-icon name="close" color="#ffffff" size="24" /></view>
|
</view>
|
<view class="badge-box"><u-badge :value="index+1" bg-color="#F18201" /></view>
|
<view class="item-row">
|
<view class="label">托盘编号:</view>
|
<view class="content auto-wrap">{{item.containerNo}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">托盘类型:</view>
|
<view class="content auto-wrap">{{item.containerTypeDesc}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">库位编号:</view>
|
<view class="content auto-wrap">{{item.placeNo}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">物料唯一码:</view>
|
<view class="content auto-wrap">{{item.materialId}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">物料名称:</view>
|
<view class="content auto-wrap">{{item.materialName}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">物料件号:</view>
|
<view class="content auto-wrap">{{item.materialNo}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">是否锁定:</view>
|
<view class="content auto-wrap">{{item.materialIsLock==1? '是' : '否'}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">操作人:</view>
|
<view class="content auto-wrap">{{item.lockUser}}</view>
|
</view>
|
<view class="item-row">
|
<view class="label">锁机制原因:</view>
|
<view class="content auto-wrap">{{item.lockReason}}</view>
|
</view>
|
<!-- <view class="item-row">
|
<view class="label">数量:</view>
|
<view class="content auto-wrap">{{item.stockNumber}}</view>
|
</view> -->
|
</view>
|
</view>
|
</u-swipe-action-item>
|
</u-swipe-action>
|
</template>
|
|
<script>
|
import {parseDic} from '@/static/js/utils/index.js'
|
export default {
|
props: {
|
materialData: {
|
type: Array,
|
default: () => []
|
},
|
// materialModalData:{
|
// type: Array,
|
// default: () => []
|
// }
|
},
|
data() {
|
return {
|
options: [{
|
text: '删除',
|
style:{
|
backgroundColor: '#F18202'
|
}
|
}],
|
materialModalData:[]
|
}
|
},
|
// created(){
|
// this.materialModalData=getDicList(this.$store,'material_modal')?.sysDictDatas
|
// console.log(this.materialModalData);
|
// },
|
methods:{
|
parseDic,
|
deleteItem({name}){
|
this.$emit('delMaterialData',name)
|
}
|
}
|
}
|
</script>
|
|
<style scoped lang="scss">
|
.material-item-group {
|
/* background-color: transparent!impor; */
|
padding-top: 10rpx;
|
|
.material-list-item {
|
border-bottom: 2rpx solid $uni-border-color;
|
padding-bottom: 10rpx;
|
padding-left: 60rpx;
|
/* margin-bottom: 10rpx; */
|
position: relative;
|
|
&:last-child {
|
border-bottom: 0;
|
}
|
|
.item-row {
|
display: flex;
|
|
.label {
|
flex-shrink: 0;
|
color: #000;
|
/* text-align: right; */
|
/* font-weight:5; */
|
width: 180rpx;
|
}
|
|
&>.content {
|
flex-grow: 1;
|
color: $u-content-color;
|
|
uni-input {
|
font: inherit;
|
color: $u-primary;
|
text-decoration: underline;
|
}
|
}
|
}
|
|
.badge-box {
|
position: absolute;
|
top: 8rpx;
|
left: 8rpx;
|
z-index: 1;
|
}
|
|
.close-btn {
|
$closeBtnSize: 70rpx;
|
width: $closeBtnSize;
|
height: $closeBtnSize;
|
z-index: 1;
|
position: absolute;
|
top: 0rpx;
|
right: 8rpx;
|
background-color: $u-error;
|
opacity: 0.6;
|
border-radius: 25rpx;
|
|
.icon-layer {
|
position: absolute;
|
width: 100%;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
z-index: 2;
|
}
|
}
|
}
|
}
|
</style>
|