<!--  -->
<template>
  <div >
    <el-form ref="formRef" :model="otherInfo"  label-position="top"   disabled>
        <el-form-item label="申请人：" prop="loanUserName">
            <el-input v-model="otherInfo.loanUserName"/>
        </el-form-item>
        <el-form-item label="借款事由：">
            <el-input type="textarea" v-model="otherInfo.loanDesc" :autosize="{ minRows: 3, maxRows: 5 }"/>
        </el-form-item>
        <el-form-item prop="loanMoney">
            <template #label>
                <span>申请金额：</span>
                <span style="color: #8f8d8d;">{{otherInfo.loanMoneyText}}</span>
            </template>
            <el-input v-model="otherInfo.loanMoney" >
                <template #append>元</template>
            </el-input>
        </el-form-item>
        <div class="hc-form-item">
            <el-form-item label="使用日期：" prop="useDate">
                <el-date-picker type="date" class="block" v-model="otherInfo.useDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
            </el-form-item>
            <el-form-item label="归还日期：" prop="returnDate">
                <el-date-picker type="date" class="block" v-model="otherInfo.returnDate" format="YYYY-MM-DD" value-format="YYYY-MM-DD"/>
            </el-form-item>
        </div>
        <el-form-item label="备注：">
            <el-input type="textarea" v-model="otherInfo.remarks" :autosize="{ minRows: 3, maxRows: 5 }"/>
        </el-form-item>
    </el-form>
  </div>
</template>

<script setup>
import { ref, watch,onActivated } from 'vue'
import {getProjectList} from "~api/other";
import {getArrValue} from "js-fast-way";
onActivated(()=>{
  getProjectData()
 })
//参数
const props = defineProps({
  otherInfo: {
    type: Object,
    default: {}
  }
})
const trafficTypeData=ref([])
const wayType=ref([])
const cityType=ref([])
const projectType=ref([])
const partneroptions=ref([])
//监听
watch(() => [
  props.otherInfo,
], ([otherInfo]) => {
  console.log(otherInfo, 'otherInfo');

})
const getProjectData = async () => {
    const {error, code, data} = await getProjectList()
    //判断状态
    if (!error && code === 200) {
      projectType.value = getArrValue(data)
    } else {
      projectType.value = []
    }
}

</script>
<style lang='scss' scoped>
</style>