
<template>
   <nm-form-vuetify-drawer ref="form" v-bind="form" v-on="on" :parent="parent" :title="title" placement="left" :visible.sync="visible_">
          
              
            

                             <v-checkbox  
                    v-model="form.model.isDeleted"
                    label="是否删除"
                    :rules="form.rules.isDeletedRules"
                 >
                  </v-checkbox>
            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isLocked"
                    label="是否锁定"
                    :rules="form.rules.isLockedRules"
                 >
                  </v-checkbox>
            

        
              
            

                             <v-checkbox  
                    v-model="form.model.isFrozen"
                    label="是否冻结"
                    :rules="form.rules.isFrozenRules"
                 >
                  </v-checkbox>
            

        
                               <v-text-field
                    v-model="form.model.nId"
                    label="单位编码"
                    :rules="form.rules.nIdRules"
                  ></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.description"
                    label="单位描述"
                    :rules="form.rules.descriptionRules"
                  ></v-text-field>
            
            

            

        
              
            

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

        
              
            

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

        
                               <v-text-field
                    v-model="form.model.uoMDimensenId"
                    label="单位类别Id"
                    :rules="form.rules.uoMDimensenIdRules"
                  ></v-text-field>
            
            

            

            </nm-form-vuetify-drawer>
</template>
<script>
import { mixins } from 'xmanager-ui'
const { add, edit, update } = $api.reference.uoM

export default {
    mixins: [mixins.formSave],
    data() {
        return {
          title: '单位',
          actions: { add, edit, update },
          parent: this,
          form: {
            model: {
                      /** 是否删除 */
              isDeleted: false,
                          /** 是否锁定 */
              isLocked: false,
                          /** 是否冻结 */
              isFrozen: false,
                           /** 单位编码 */
              nId: '',
                       /** 单位名称 */
              name: '',
                       /** 单位描述 */
              description: '',
                      /** 是否隐藏 */
              isHidden: false,
                          /** 是否系统定义 */
              isSystemDefined: false,
                           /** 单位类别Id */
              uoMDimensenId: ''
                },
            rules: {
                        isDeletedRules: [
                                (v) => !!v || '是否删除 is required',
                                ],
                        isLockedRules: [
                                (v) => !!v || '是否锁定 is required',
                                ],
                        isFrozenRules: [
                                (v) => !!v || '是否冻结 is required',
                                ],
                        nIdRules: [
                                (v) => !!v || '单位编码 is required',
                                ],
                        nameRules: [
                                (v) => !!v || '单位名称 is required',
                                ],
                        descriptionRules: [
                                (v) => !!v || '单位描述 is required',
                                ],
                        isHiddenRules: [
                                (v) => !!v || '是否隐藏 is required',
                                ],
                        isSystemDefinedRules: [
                                (v) => !!v || '是否系统定义 is required',
                                ],
                        uoMDimensenIdRules: [
                                (v) => !!v || '单位类别Id is required',
                                ],
                        }
          }
        }
      },
    }
</script>
