<template>
	<view class="fabric-out-page">
		<OrderStatusBar class="fabric-out-mt32" :status="displayAuditStatus" :name="displayAuditStatusName" />

		<view class="flex-white-plr26 ptb10 bdb_f5">
			<text class="mr26">出仓单号</text>
			<text>{{ form.order_no }}</text>
		</view>
		<view class="flex-white-plr26 ptb20 bdb_f5">
			<text class="mr26">出仓类型</text>
			<text>正常加工出仓单</text>
		</view>
		<view class="flex-white-plr26 ptb20 bdb_f5">
			<text class="mr26">加工单位</text>
			<text>{{ form.process_name || '-' }}</text>
		</view>
		<view class="flex-white-plr26 ptb20 bdb_f5">
			<text class="mr26">仓库名称</text>
			<text>{{ form.warehouse_name || '-' }}</text>
		</view>
		<view class="flex-white-plr26 ptb20 bdb_f5">
			<text class="mr26">单据备注</text>
			<text>{{ form.remark || '-' }}</text>
		</view>

		<FabricOutScanBar
			:can-scan="showQrScanBar"
			:value="QRBarCode"
			:delete-mode="BarCodeDelStatus"
			:message="BillDataMessage"
			:disabled-tip="qrDisabledTip"
			:show-phone-scan="canScanQr"
			@input="QRBarCode = $event"
			@scan="handleScan"
			@phone-scan="handlePhoneScan"
			@delete-mode-change="BarCodeDelChange"
		/>
		<ProcessOutScanDetail :detail="scanDetail" />

		<ProcessOutDetailList
			:list="form.item_data"
			:deletable="canScan"
			@delete="onDeleteFineCode"
		/>

		<FabricOutFooter :buttons="statusActionButtons" @action="handleStatusAction" />

		<u-select v-model="selectShow" :list="selectList" @confirm="selectConfirmFun"></u-select>
	</view>
</template>

<script>
import formMixin from './storeGoodsProcessOutMixin.js';
import OrderStatusBar from '@/components/storefabric/OrderStatusBar.vue';
import FabricOutScanBar from '@/components/storefabric/FabricOutScanBar.vue';
import FabricOutFooter from '@/components/storefabric/FabricOutFooter.vue';
import ProcessOutScanDetail from '@/components/storegoods/ProcessOutScanDetail.vue';
import ProcessOutDetailList from '@/components/storegoods/ProcessOutDetailList.vue';

export default {
	components: {
		OrderStatusBar,
		FabricOutScanBar,
		FabricOutFooter,
		ProcessOutScanDetail,
		ProcessOutDetailList,
	},
	mixins: [formMixin],
	onLoad(e) {
		uni.setNavigationBarTitle({ title: '编辑加工出仓单' });
		this.pageMode = 'edit';
		if (e.id) {
			this.loadOrder(Number(e.id), { rejectIfLocked: true });
		}
	},
};
</script>

<style lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
page {
	background-color: #F8F8F8;
	padding-bottom: 260rpx;
}
</style>
