<template>
  <a-form v-bind="formLayout" :form="form">
    <a-form-item label="变动数量">
			<a-input-number
				:min="0"
				style="width:100%"
				v-decorator="[
					'count',
					{
						initialValue: modalData.count || 0,
						rules: [{ required: true, message: '变动数量不能为空' }]
					}
				]" />
    </a-form-item>
    <a-form-item label="初始金额">
			<a-input-number
				:min="0"
				style="width:100%"
				v-decorator="[
					'initial_count',
					{
						initialValue: modalData.initial_count || 0,
						rules: [{ required: true, message: '初始金额不能为空' }]
					}
				]" />
    </a-form-item>
    <a-form-item label="总额">
			<a-input-number
				:min="0"
				style="width:100%"
				v-decorator="[
					'total_count',
					{
						initialValue: modalData.total_count || 0,
						rules: [{ required: true, message: '总额不能为空' }]
					}
				]" />
    </a-form-item>
  </a-form>
</template>
<script>
import mix from './mixins'
import common from '../mixins/common'
export default {
  data() {
    return {
      formLayout: {
        labelCol: { span: 6 },
        wrapperCol: { span: 18 }
      }
    }
  },
  mixins: [mix, common],
  computed: {
    successMessage() {
      return '修改成功'
    }
  },
  methods: {
    async submit(values) {
      const res = await this.request_api.finance_property_detial.correct({
				uuid: this.modalData.uuid,
				version: this.modalData.version,
				...values
			})
      return res
    }
  }
}
</script>
