
<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-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.targetUoMId"
                    label="换算后单位"
                    :rules="form.rules.targetUoMIdRules"
                  ></v-text-field>
            
            

            

        
                               <v-text-field
                    v-model="form.model.sourceUoMId"
                    label="换算前单位"
                    :rules="form.rules.sourceUoMIdRules"
                  ></v-text-field>
            
            

            

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

export default {
    mixins: [mixins.formSave],
    data() {
        return {
          title: '单位换算',
          actions: { add, edit, update },
          parent: this,
          form: {
            model: {
                      /** 是否删除 */
              isDeleted: false,
                          /** 是否锁定 */
              isLocked: false,
                          /** 是否冻结 */
              isFrozen: false,
                           /** 原值 */
              k0Multiplier: '',
                       /** 附加数 */
              addend: '',
                       /** 换算值 */
              k1Multiplier: '',
                       /** 指数幂 */
              exponent: '',
                      /** 是否隐藏 */
              isHidden: false,
                          /** 是否系统定义 */
              isSystemDefined: false,
                           /** 换算后单位 */
              targetUoMId: '',
                       /** 换算前单位 */
              sourceUoMId: ''
                },
            rules: {
                        isDeletedRules: [
                                (v) => !!v || '是否删除 is required',
                                ],
                        isLockedRules: [
                                (v) => !!v || '是否锁定 is required',
                                ],
                        isFrozenRules: [
                                (v) => !!v || '是否冻结 is required',
                                ],
                        k0MultiplierRules: [
                                (v) => !!v || '原值 is required',
                                ],
                        addendRules: [
                                (v) => !!v || '附加数 is required',
                                ],
                        k1MultiplierRules: [
                                (v) => !!v || '换算值 is required',
                                ],
                        exponentRules: [
                                (v) => !!v || '指数幂 is required',
                                ],
                        isHiddenRules: [
                                (v) => !!v || '是否隐藏 is required',
                                ],
                        isSystemDefinedRules: [
                                (v) => !!v || '是否系统定义 is required',
                                ],
                        targetUoMIdRules: [
                                (v) => !!v || '换算后单位 is required',
                                ],
                        sourceUoMIdRules: [
                                (v) => !!v || '换算前单位 is required',
                                ],
                        }
          }
        }
      },
    }
</script>
