<template>
	<div>
		<el-form :model="form" label-width="90px" label-position="right" inline ref="ruleFormRef" :rules="rules">
			<el-form :model="form" label-width="110px" label-position="right" inline ref="ruleFormRef" :rules="rules">
				<el-form-item label="申请单号" prop="reqNo">
					<el-input v-model="form.reqNo" clearable style="width: 200px" disabled>
					</el-input>
				</el-form-item>
				<el-form-item label="申请单行号" prop="reqLn">
					<el-input v-model="form.reqLn" clearable style="width: 200px" disabled>
					</el-input>
				</el-form-item>
				<el-form-item label="结算单号" prop="accountNo">
					<el-input v-model="form.accountNo" clearable style="width: 200px" disabled>
					</el-input>
				</el-form-item>
				<el-form-item label="发票编号" prop="invoiceNo">
					<el-input v-model="form.invoiceNo" clearable style="width: 200px" disabled>
					</el-input>
				</el-form-item>
				<el-form-item label="合同编号" prop="purContrCd">
					<el-input v-model="form.purContrCd" clearable style="width: 200px" disabled>
					</el-input>
				</el-form-item>
				<el-form-item label="已付金额" prop="payedAmount">
					<el-input v-model="form.payedAmount" clearable style="width: 200px" disabled></el-input>
				</el-form-item>
				<el-form-item label="退款金额" prop="refundAmount">
					<el-input-number v-model="form.refundAmount" :precision="2" :step="0.1" :min="0.01"
						controls-position="right" clearable style="width: 200px"></el-input-number>
				</el-form-item>
				<el-form-item label="退款日期" prop="refundDate">
					<el-date-picker v-model="form.refundDate" type="date" style="width: 200px;"
						value-format="YYYY-MM-DD" format="YYYY-MM-DD" :disabled-date="disabledDate"></el-date-picker>
				</el-form-item>
			</el-form>
		</el-form>
	</div>
</template>

<script setup>

import {
	ref,
	reactive,
	onMounted,
	onActivated,
	getCurrentInstance,
	nextTick
} from 'vue'
import { Search } from '@element-plus/icons-vue'

const {
	proxy
} = getCurrentInstance()

import style from '@/tools/style'
const cardBodyStyle = ref(style.card)

import {
	useWorkflowStore
} from "@/stores/workflow"


const workflow = useWorkflowStore()

onMounted(() => {
	getTableData()
})

onActivated(() => {
	getTableData()
})

const form = ref({
	pId: '',
    reqNo: '',
    reqLn: '',
    accountNo: '',
    invoiceNo: '',
    purContrCd: '',
    payedAmount: '',
    reqTy: '',
    payMth: '',
    refundDate: '',
    addId: '',
    addCode: '',
    addName: '',
    addDeptId: '',
    addDeptCode: '',
    addDeptName: '',
    addTime: '',
    modifyId: '',
    modifyCode: '',
    modifyName: '',
    modifyTime: '',
    cancelId: '',
    cancelCode: '',
    cancelName: '',
})

const getTableData = () => {
	var url = 'pur/PayRefund/queryByWorkId'
	var param = {
		workId: workflow.workId
	}
	proxy.$axios.get(url, param).then(response => {
		if (response.data.code == '0') {
			form.value = response.data.data
		} else {
			ElMessage.error('操作失败！' + response.data.msg)
		}
	})
}
</script>
<style></style>