<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-checkbox v-model="form.model.isHidden" label="是否隐藏" :rules="form.rules.isHiddenRules"> </v-checkbox>

    <v-text-field v-model="form.model.uoMDimension" label="计量单位" :rules="form.rules.uoMDimensionRules"></v-text-field>

    <v-text-field v-model="form.model.isSystemDefined" label="是否定义系统" :rules="form.rules.isSystemDefinedRules"></v-text-field>

    <v-text-field v-model="form.model.description" label="描述" :rules="form.rules.descriptionRules"></v-text-field>

    <v-text-field v-model="form.model.name" label="名称" :rules="form.rules.nameRules"></v-text-field>

    <v-text-field v-model="form.model.uoMBase" label="导航属性" :rules="form.rules.uoMBaseRules"></v-text-field>
  </nm-form-vuetify-drawer>
</template>
<script>
import { mixins } from 'xmanager-ui'
const { add, edit, update } = $api.materialApp.materialUoM

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '物料单位',
      actions: { add, edit, update },
      parent: this,
      form: {
        model: {
          /** NId连接id */
          nId: '',
          /** 是否隐藏 */
          isHidden: false,
          /** 计量单位 */
          uoMDimension: '',
          /** 是否定义系统 */
          isSystemDefined: '',
          /** 描述 */
          description: '',
          /** 名称 */
          name: '',
          /** 导航属性 */
          uoMBase: ''
        },
        rules: {
          nIdRules: [v => !!v || 'NId连接id is required'],
          // isHiddenRules: [v => !!v || '是否隐藏 is required'],
          uoMDimensionRules: [],
          // isSystemDefinedRules: [v => !!v || '是否定义系统 is required'],
          descriptionRules: [],
          nameRules: [],
          uoMBaseRules: []
        }
      }
    }
  }
}
</script>
