<template>
  <nm-form-vuetify-drawer ref="form" v-bind="form" v-on="on" :parent="parent" :title="title" placement="left" :visible.sync="visible_">
    <v-text-field v-model="form.model.nId" label="编码" :rules="form.rules.nIdRules"></v-text-field>

    <v-text-field v-model="form.model.propertyType" label="属性类型" :rules="form.rules.propertyTypeRules"></v-text-field>

    <v-text-field v-model="form.model.propertyValue" label="属性值" :rules="form.rules.propertyValueRules"></v-text-field>

    <v-text-field v-model="form.model.propertyUomNId" label="属性单位编码" :rules="form.rules.propertyUomNIdRules"></v-text-field>

    <v-text-field v-model="form.model.materialLotTemplate" label="物料批次模板" :rules="form.rules.materialLotTemplateRules"></v-text-field>
  </nm-form-vuetify-drawer>
</template>
<script>
import { mixins } from 'xmanager-ui'
const { add, edit, update } = $api.materialApp.materialLotTemplateProperty

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '物料批次模板属性',
      actions: { add, edit, update },
      parent: this,
      form: {
        model: {
          /** 编码 */
          nId: '',
          /** 属性类型 */
          propertyType: '',
          /** 属性值 */
          propertyValue: '',
          /** 属性单位编码 */
          propertyUomNId: '',
          /** 物料批次模板 */
          materialLotTemplate: '',
          /** 是否冻结 */
          isFrozen: false,
          /** 是否锁定 */
          isLocked: false
        },
        rules: {
          nIdRules: [],
          propertyTypeRules: [],
          propertyValueRules: [],
          propertyUomNIdRules: [],
          materialLotTemplateRules: [],
          isFrozenRules: [],
          isLockedRules: []
        }
      }
    }
  }
}
</script>
