<template>
	<view style="margin: 25rpx 25rpx 75rpx 25rpx;">
		<view style = "text-align: center;font-size: 43rpx; margin-bottom:10rpx"><text>{{flowData.FLOW_TITLE}}</text></view>
		<view class="h-table" style="margin-bottom:20rpx">
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">日    期</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_RQ" auto-height/></view>
				<view class="h-td h-td-center left-width">编    号</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_BH" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">合    同</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_HT" auto-height/></view>
				<view class="h-td h-td-center left-width">申 请 人</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_SQR" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">合同总金额</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_HTZJE" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">合同标的</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_HTBD" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">收款单位</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_SKDW" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">集团内/外</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_JTNW" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">开户行/账号</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_KHHZH1" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">开户行/账号</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_KHHZH2" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">金额（元）</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_JEY" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">金额(大写)</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_JEDX" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">重量(吨)</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_ZLD" auto-height/></view>
				<view class="h-td h-td-center left-width">单    价</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_DJ" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">用    途</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_YT" auto-height/></view>
				<view class="h-td h-td-center left-width">付款期限</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_FKQX" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">备    注</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_BZ" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">付款单位</view>
				<view class="h-td h-td-left h-td-colspan"><textarea v-model="flowData.FLOW_FKDW" auto-height/></view>
			</view>
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">附    件</view>
				<view class="h-td h-td-left h-td-colspan">
					<view v-if="!!flowData.FLOW_FJ" style="color: #ff0f07;" @click="downLoadFile()">点击查看附件</view>
					<view v-else >无</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">铝产品部申请人</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">1.审核填写的《付款申请及确认》信息是否完整</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_LCPB_SQR_1" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">2.审核收款单位、开户行/账号是否与合同或对方出具的开票函 （加盖对方企业公章或财务专用章）的信息一致；</view>
						<view class="h-td h-td-left"><textarea v-model = "flowData.FLOW_LCPB_SQR_2" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">3.审核重量、单价是否填写正确，审核金额计算是否正确（单价* 重量），且金额的大小写一致；涉及月度结算或尾款结算，审核计 算金额是否扣除或添加上次结算的差额；货款差额依据《确认函》 上确认的金额</view>
						<view class="h-td h-td-left"><textarea v-model = "flowData.FLOW_LCPB_SQR_3" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">4.审核附件《确认函》单价是否与合同规定的定价方式一致，重量 与入库信息或合同信息一致，金额计算是否正确，且盖有公司及对 方单位的业务专用章。</view>
						<view class="h-td h-td-left"><textarea v-model = "flowData.FLOW_LCPB_SQR_4" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 100rpx;"><textarea v-model = "flowData.FLOW_LCPB_SQR_DESC" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_SQR_SQR" auto-height/></view>
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_SQR_SQRQ" auto-height/></view>
					</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">铝产品部复核人</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">1.复核金额是否计算正确，且与《确认函》的计算金额一致，且大小写一致。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_LCPB_FHR_1" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 100rpx;"><textarea v-model = "flowData.FLOW_LCPB_FHR_DESC" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_FHR_SQR" auto-height/></view>
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_FHR_SQRQ" auto-height/></view>
					</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">铝产品部副主任</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">1.审核《付款申请及确认》信息填写内容及附件资料完整、准 确。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_LCPB_FUZHUREN_1" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">2.逐一复核经办人合规要求第2-4项。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_LCPB_FUZHUREN_2" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 100rpx;"><textarea v-model = "flowData.FLOW_LCPB_FUZHUREN_DESC" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_FUZHUREN_SQR" auto-height/></view>
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_FUZHUREN_SQRQ" auto-height/></view>
					</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">铝产品部负责人</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">1.审核《付款申请及确认》信息填写内容及附件资料完整、准 确。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_LCPB_FUZEREN_1" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">2.逐一复核经办人合规要求第2-4项。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_LCPB_FUZEREN_2" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 100rpx;"><textarea v-model = "flowData.FLOW_LCPB_FUZEREN_DESC" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_FUZEREN_SQR" auto-height/></view>
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_LCPB_FUZEREN_SQRQ" auto-height/></view>
					</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">财务部主任</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">1.复核经办部门填写的《付款申请及确认》及附件是否完整、准 确，审核经办部门经办人、复核人、部门主任是否签字，并加盖 部门章；</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_CWB_ZHUREN_1" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">2.复核计算金额是否正确，且金额的大小写是否一致；</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_CWB_ZHUREN_2" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">3.审核收款单位信息是否与合同一致。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_CWB_ZHUREN_3" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 100rpx;"><textarea v-model = "flowData.FLOW_CWB_ZHUREN_DESC" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_CWB_ZHUREN_SQR" auto-height/></view>
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_CWB_ZHUREN_SQRQ" auto-height/></view>
					</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">财务总监</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">1.对集团内5000万以上，20000万以下的资金和集团外2000万 以上，5000万以下的资金支付进行审批，审核资金支出的合规 性以及支付金额的准确性，确认付款申请经过了前置审查。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_CWZJ_1" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 100rpx;"><textarea v-model = "flowData.FLOW_CWZJ_DESC" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_CWZJ_SQR" auto-height/></view>
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_CWZJ_SQRQ" auto-height/></view>
					</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-4">
				<view class="h-td h-td-center left-width">总经理</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan">1.对集团内20000万及以上的资金和集团外5000万及以上的 资金支付进行审批，审核资金支出的合规性以及支付金额的 准确性，确认付款申请经过了前置审查。</view>
						<view class="h-td h-td-left"><textarea v-model="flowData.FLOW_ZJL_1" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 100rpx;"><textarea v-model = "flowData.FLOW_ZJL_DESC" auto-height/></view>
					</view>
					<view class="h-tr h-tr-3">
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_ZJL_SQR" auto-height/></view>
						<view class="h-td h-td-left h-td-colspan" style = "height: 50rpx;"><textarea v-model = "flowData.FLOW_ZJL_SQRQ" auto-height/></view>
					</view>
				</view>
			</view>
			
			<view class="h-tr h-tr-8">
				<view class="h-td h-td-center left-width">确    认</view>
				<view class="h-td h-td-colspan h-td-rowspan">
					<view class="h-tr h-tr-7">
						<view class="h-td h-td-left">付款方式</view>
						<view class="h-td h-td-left">金额</view>
						<view class="h-td h-td-left">时间</view>
						<view class="h-td h-td-left">付款银行</view>
						<view class="h-td h-td-left">出纳</view>
						<view class="h-td h-td-left">复核一</view>
						<view class="h-td h-td-left">复核二</view>
					</view>
					<view class="h-tr h-tr-7" v-for="n in 10" :key="n">
						<view class="h-td h-td-left"><textarea v-model = "flowData['FLOW_FKFS' + (n + 1)]" auto-height/></view>
						<view class="h-td h-td-left"><textarea v-model = "flowData['FLOW_JE' + (n + 1)]" auto-height/></view>
						<view class="h-td h-td-left"><textarea v-model = "flowData['FLOW_SJ' + (n + 1)]" auto-height/></view>
						<view class="h-td h-td-left"><textarea v-model = "flowData['FLOW_FKYH' + (n + 1)]" auto-height/></view>
						<view class="h-td h-td-left"><textarea v-model = "flowData['FLOW_CN' + (n + 1)]" auto-height/></view>
						<view class="h-td h-td-left"><textarea v-model = "flowData['FLOW_FHY' + (n + 1)]" auto-height/></view>
						<view class="h-td h-td-left"><textarea v-model = "flowData['FLOW_FHE' + (n + 1)]" auto-height/></view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['businessKey'],
		data() {
			return {
				flowData : {}
			}
		},
		beforeMount() {
			let self = this;
			this.admRequest({
				action : 'FlowMessageAction/paymentFlowInfo',
				data : {
					id : self.businessKey
				},
				success(res){
					self.flowData = JSON.parse(res.data.data.dataText);
					self.flowData.step = res.data.data.step;
					self.flowData.id = res.data.data.id;
					var date = new Date();
					if (self.flowData.step == "1") {
						self.flowData.FLOW_LCPB_SQR_SQR = res.data.userName;
						self.flowData.FLOW_LCPB_SQR_SQRQ = (date.getFullYear() + "-" + (date .getMonth() + 1) + "-" + date .getDate());
					} else if (self.flowData.step == "2") {
						self.flowData.FLOW_LCPB_FHR_SQR = res.data.userName;
						self.flowData.FLOW_LCPB_FHR_SQRQ = (date.getFullYear() + "-" + (date .getMonth() + 1) + "-" + date .getDate());
					} else if (self.flowData.step == "3") {
						self.flowData.FLOW_LCPB_FUZHUREN_SQR = res.data.userName;
						self.flowData.FLOW_LCPB_FUZHUREN_SQRQ = (date.getFullYear() + "-" + (date .getMonth() + 1) + "-" + date .getDate());
					} else if (self.flowData.step == "4") {
						self.flowData.FLOW_LCPB_FUZEREN_SQR = res.data.userName;
						self.flowData.FLOW_LCPB_FUZEREN_SQRQ = (date.getFullYear() + "-" + (date .getMonth() + 1) + "-" + date .getDate());
					} else if (self.flowData.step == "5") {
						self.flowData.FLOW_CWB_ZHUREN_SQR = res.data.userName;
						self.flowData.FLOW_CWB_ZHUREN_SQRQ = (date.getFullYear() + "-" + (date .getMonth() + 1) + "-" + date .getDate());
					} else if (self.flowData.step == "6") {
						self.flowData.FLOW_CWZJ_SQR = res.data.userName;
						self.flowData.FLOW_CWZJ_SQRQ = (date.getFullYear() + "-" + (date .getMonth() + 1) + "-" + date .getDate());
					} else if (self.flowData.step == "7") {
						self.flowData.FLOW_ZJL_SQR = res.data.userName;
						self.flowData.FLOW_ZJL_SQRQ = (date.getFullYear() + "-" + (date .getMonth() + 1) + "-" + date .getDate());
					}
					
				}
			})
		},
		methods:{
			downLoadFile(){
				let self = this;
				uni.showLoading({
					title:"加载中..."
				})
				uni.downloadFile({
					url : self.fileUrl,
					success: (res) => {
						let filePath = res.tempFilePath;
						if (res.statusCode === 200) {
							uni.openDocument({
								filePath: filePath,
								success: function (r) {
									console.log('打开文档成功');
								}
							});
						}
					},
					complete: (res)=> {
						uni.hideLoading();
					}
				})
			},
			getCallBackData(){
				var data = {};
				data.param = {callBackData : this.flowData};
				data.callBackUrl = "adm/FlowableApiAction/paymentBackDeal";
				return data;
			}
		}
	}
</script>

<style lang="scss">
	/* 引入表格样式表 */
	@import "@/static/css/helang-table10.scss";
</style>
