<template>
    <view class="page">
      <StickyNavBar>
        <NavBar :title="$t('品号信息')"></NavBar>
      </StickyNavBar>
	  <view class="info">
			<view>
				<view>{{$t('品号')}}</view>
				<view>{{$t('品名')}}</view>
				<view>{{$t('规格')}}</view>
			</view>
			<view>
				<view>
					<text class="underline">{{ info.mb001 }}</text>
				</view>
				<view>
					<text class="underline">{{ info.mb002 }}</text>
				</view>
				<view>
					<text class="underline">{{ info.mb003 }}</text>
				</view>
			</view>
		</view>
      <ContentLoadingMore class="cardbox" :list="chargaArr">
        <view class="cardContent" v-for="(item, index) in chargaArr" :key="index">
			<view class="cardItem">
				<view class="cardRight">
					<view class="itemtitle">
						<text>{{item.ml003}}</text>
						<text style="color: #116d11;">{{item.ml005}}</text>
					</view>
					<view>
						<text>{{$t('仓库')}}</text>
						<text><text style="margin-right:20rpx">{{item.ml002}}</text></text>
					</view>
					<view>
						<text>{{$t('批号')}}</text>
						<text>{{item.ml004}}</text>
					</view>
				</view>
			</view>
        </view>
      </ContentLoadingMore>
    </view>
  </template>
  
  <script>
import i18n from '../../lang/index'

  import StickyNavBar from "@/components/StickyNavBar/index.vue";
  import ContentLoadingMore from "@/components/ContentLoadingMore/index.vue";
  export default {
    components: {
      StickyNavBar,
      ContentLoadingMore,
    },
	onLoad(option) {
		if (option.info) {
			let data = JSON.parse(decodeURIComponent(option.info));
			this.chargaArr = data.invmls
			this.info = data
		}
	},
    data() {
      return {
        chargaArr: [],
		loading: false,
		info: null
      };
    },
    created() {
    },
    methods: {
    },
  };
  </script>
  
  <style lang="scss" scoped>
  .page{
	background: #fff;
  }
  .cardbox {
    padding: 0rpx 20rpx;
  }
  .cardContent {
    background: #fff;
	padding: 10rpx 15rpx;
	.cardItem {
		display: flex;
	}
	.cardRight {
		color: #787878;
		font-size: 17px;
		width: 100%;
		border-bottom: 1px solid #f5f5f5;
		padding-bottom: 20rpx;
		padding-top: 10rpx;
		.itemtitle{
			font-weight: 600;
			font-size: 19px;
		}
		&>view{
			width: 100%;
			display: flex;
			justify-content: space-between;
		}
	}
  }
  ::v-deep .u-sticky {
    top: 0 !important;
    background: #fff;
  }
  .info {
	display: flex;
	line-height: 42px;
	padding: 20rpx 20rpx;
	padding-bottom: 0;
	font-size: 16px;
	border-bottom: 1px solid #f5f5f5;
	.underline {
		border-bottom: 1px solid #d5d5d5;
		padding-bottom: 0px;
    	line-height: 40px;
		font-weight: 500;
		margin-left: 20rpx;
		font-size: 18px;
	}
  }
  </style>
  