<!--非生产领料任务卡片-->
<template>
	<view class="device-detail issuelist">
		<!-- <view class="card_task issuecard nopad uni-flex space-between"> -->
		<view class="card_task nopad space-between">
			<com-job-top-info :jobContent="dataContent"></com-job-top-info>
			<image v-if="dataContent.useOnTheWayLocation" class="tag_icon" src="@/static/icons_ui/icon_kw_use.svg">
			</image>
		</view>
		<view class="margin_xs_bottom" style="clear: both;">
			<view class="label_order">
				<!-- <image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image> -->
				<text>单号：</text>
				<text  style="font-weight: bold; color:black"  v-if="fromType=='pick'">{{dataContent.unplannedIssueRequestNumber}}</text>
				<!-- <text>申请单：{{dataContent.materialRequestNumber}}</text> -->
				<text  style="font-weight: bold; color:black"  v-else>{{dataContent.unplannedReceiptRequestNumber}}</text>
			
			</view>
			<view class="label_order">
				<text >ERP储位：</text>
				<text style="font-weight: bold; color:black" >{{dataContent.fromErpLocationCode}}</text>
			</view>
			<view class="label_order">
				<text >料号：</text>
				<text style="font-weight: bold; color:black" >{{dataContent.itemCode}}</text>
			</view>
			
			<view class="label_order">
				<text >名称：</text>
				<text style="font-weight: bold; color:black" >{{dataContent.itemName}}</text>
			</view>
			
			<view class="label_order">
				<text >描述1：</text>
				<text style="font-weight: bold; color:black" >{{dataContent.itemDesc1}}</text>
			</view>
			
			<view class="label_order">
				<text >描述2：</text>
				<text style="font-weight: bold; color:black" >{{dataContent.itemDesc2}}</text>
			</view>
			
		</view>
		<view class="uni-flex uni-row receipt_bot">
			<view class="label_order">
				<image class="icon_normal" src="@/static/icons_ui/icon_date.svg">
				</image>
				<text
					class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text>
			</view>
			<view class="">
				{{dataContent.worker}}
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getJobStatuStyle,
		getJobStatuDesc,
		getInventoryTypeStyle,
		getInventoryStatusDesc,
		dateFormat
	} from '@/common/basic.js';
	import comItemTop from '@/mycomponents/comItem/comItemTop.vue'
	import comItemBottom from '@/mycomponents/comItem/comItemBottom.vue'
	import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'

	export default {
		name: "comissue",
		components: {
			comItemTop,
			comItemBottom,
			comJobTopInfo
		},
		data() {
			return {};
		},
		computed: {},
		// 此处定义传入的数据
		props: {
			dataContent: {
				type: Object,
				value: null
			},
			fromType:{
				type: String,
				value: "pick"
			}
		},
		filters: {
			jobStatusStyle: function(val) {
				return getJobStatuStyle(val);
			},
			jobStatusColor: function(val) {
				return getJobStatuDesc(val);
			},
			statusStyle: function(val) {
				return getInventoryTypeStyle(val);
			},
			statusColor: function(val) {
				return getInventoryStatusDesc(val);
			},
			formatDate: function(val) {
				return dateFormat(val)
			}
		},
	}
</script>

<style scoped lang="scss">
</style>
