<template>
	<div class="diaClass">
		<!--		工作流引用  显示表单-->
		<!--		{{workflow.workId}}-->

    <el-card>
      <el-form :model="form" label-width="120px" label-position="right" inline ref="ruleFormRef" :rules="rules">
        <el-row>
          <el-col :span="8">
            <el-form-item label="退款编号" prop="prepaymentNo">
              <el-input v-model="form.prepaymentNo" disabled></el-input>
            </el-form-item>
          </el-col>

          <el-col :span="8">
            <el-form-item label="退款日期" prop="retreatDt">
              <el-date-picker readonly
                              style="width: 100%"
                              v-model="form.retreatDt"
                              type="date"
                              value-format="YYYY-MM-DD"
                              placeholder="申请日期"
              />
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="退款方式" prop="payMth">
              <el-select v-model="form.payMth" disabled>
                <el-option
                    v-for="item in dictList.COM_PAY_MTH"
                    :key="item.dicCode"
                    :label="item.dicName"
                    :value="item.dicCode"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="客户编码" prop="tradePartnerCode">
              <el-input v-model="form.tradePartnerCode" readonly>
              </el-input>

            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="客户名称" prop="tradePartnerName">
              <el-input v-model="form.tradePartnerName" readonly>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="退款金额" prop="procAmt">
              <el-input-number :min="0" v-model="form.procAmt" style="width: 100%;" disabled></el-input-number>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="收款收条号" prop="receiptCode">
              <el-input v-model="form.receiptCode" :maxlength="10" readonly></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="子收条号" prop="subReceiptCode">
              <el-input v-model="form.subReceiptCode" :maxlength="11" readonly></el-input>
            </el-form-item>
          </el-col>


          <!--            <el-col :span="8">-->
          <!--              <el-form-item label="实际支付金额" prop="actPayAmount">-->
          <!--                <el-input v-model="form.actPayAmount" readonly></el-input>-->
          <!--              </el-form-item>-->
          <!--            </el-col>-->

          <el-col :span="8">
          </el-col>
          <el-col :span="8">
            <el-form-item label="收款账号" prop="accountNo">
              <el-input v-model="form.accountNo" readonly>
              </el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="开户联行号" prop="bankNo">
              <el-input v-model="form.bankNo" readonly></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="开户行" prop="bankNm">
              <el-input v-model="form.bankNm" readonly></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="省" prop="payProv">
              <el-select v-model="form.payProv" disabled>
                <el-option
                    v-for="item in dictList.PROVINCE_CODE"
                    :key="item.dicCode"
                    :label="item.dicName"
                    :value="item.dicCode"
                />
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="市" prop="payCity">
              <el-input v-model="form.payCity" readonly></el-input>
            </el-form-item>
          </el-col>


          <!--            <el-col :span="8">-->
          <!--              <el-form-item label="支付日期" prop="year">-->
          <!--                <el-date-picker-->
          <!--                    style="width: 100%"-->
          <!--                    v-model="form.year"-->
          <!--                    type="year"-->
          <!--                    placeholder="actPayDate"-->
          <!--                    value-format="YYYY-MM-dd"-->
          <!--                />-->
          <!--              </el-form-item>-->
          <!--            </el-col>-->
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="备注信息" prop="remarks" >
              <el-input readonly
                        v-model="form.remarks"
                        :autosize="{ minRows: 2, maxRows: 4 }"
                        type="textarea"

              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>

    </el-card>
	</div>
</template>

<script setup>
	import {
		ref,
		reactive,
		onMounted,
		getCurrentInstance,
		nextTick
	} from 'vue'
	const {
		proxy
	} = getCurrentInstance()
	import style from '@/tools/style'
	const cardBodyStyle = ref(style.card)
	/**
	 * 新增表单form
	 */
	const form = ref({
		id: '',

	})
  const tableDataMx = ref([])

	import {
		useWorkflowStore
	} from "@/stores/workflow"
	const workflow = useWorkflowStore()
  const dictList = ref({})
  const dictData = () => {
    var url = 'framework/Common/querySelectorList'
    var param = {
      type: JSON.stringify([ 'MEASURING_UNIT' , 'COM_PAY_MTH' ,'PUR_PAY_STS' ,'PROVINCE_CODE'])
    }
    proxy.$axios.get(url, param).then(response => {
      if (response.data.code == '0') {
        dictList.value = response.data.data
      } else {
        ElMessage.error('操作失败！' + response.data.msg)
      }
    })

  }
  const currentPage = ref(1)
  const pageSize = ref(10)
  const getFrom = () =>{
    var url = 'sal/SalPrepayRetreat/queryByWorkId'
    var param = {
      id: 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)
      }
    })
  }
	onMounted(() => {
    dictData()
    getFrom()
	})
</script>

<style scoped>
::v-deep .el-form-item {
  width: 100%
}

::v-deep .el-dialog__body {
  background-color: #F2F6FC;
}

.el-date-editor--date {
  width: 100%;
}

::v-deep .diaClass .el-form-item__label {
  width: 140px !important;
}

</style>
