import { ZC_STATUS } from "@/config/dict"; export default { height: 'auto', calcHeight: 30, tip: false, searchShow: true, searchMenuSpan: 6, border: true, index: true, editBtn: false, delBtn: false, searchLabelWidth: 140, labelWidth: 140, menuWidth: 290, dialogClickModal: false, dialogWidth: 500, dialogType: "drawer", column: [ { label: '资产编码', prop: 'zcbm', type: 'input', span: 24, search: true, width: 100, align: 'center', editDisabled: true, showOverflowTooltip: true, rules: [ { required: true, message: '请输入资产编码', trigger: 'blur', }, ], }, { label: '资产名称', prop: 'zcmc', type: 'input', span: 24, minWidth: 160, search: true, showOverflowTooltip: true, rules: [ { required: true, message: '请输入资产名称', trigger: 'blur', }, ], }, { label: '资产类别', prop: 'zclb', type: 'select', dicUrl: '/api/kd-system/dict/dictionary?code=zclb', props: { label: 'dictValue', value: 'dictKey', }, span: 24, width: 90, align: 'center', showOverflowTooltip: true, search: true, rules: [ { required: true, message: '请选择资产类别', trigger: 'change', }, ], }, { label: '功率', prop: 'gl', type: 'number', min: 0, precision: 0, span: 24, width: 60, align: 'center', showOverflowTooltip: true, display: true }, { label: '用途', prop: 'yt', type: 'select', dicUrl: '/api/kd-system/dict/dictionary?code=zcyt', props: { label: 'dictValue', value: 'dictKey', }, search: true, span: 24, width: 65, align: 'center', showOverflowTooltip: true, rules: [ { required: true, message: '请选择用途', trigger: 'blur', }, ], }, { label: '开始时间', prop: 'kssj', type: 'date', valueFormat: 'yyyy-MM-dd', span: 24, width: 90, search: true, align: 'center', showOverflowTooltip: true, rules: [ { required: true, message: '请选择开始时间', trigger: 'blur', }, ], }, { label: '使用寿命(月)', prop: 'sysm', type: 'number', span: 24, width: 90, min: 0, precision: 0, search: true, align: 'center', showOverflowTooltip: true, rules: [ { required: true, message: '请输入使用寿命', trigger: 'blur', }, ], }, { label: '已使用月数', prop: 'ysysm', type: 'number', span: 24, width: 85, min: 0, precision: 0, align: 'center', addDisplay: false, editDisplay: true, editDisabled: true, showOverflowTooltip: true, rules: [ { required: true, message: '请输入已使用月数', trigger: 'blur', }, ], }, { label: '资产原值(元)', prop: 'zcyz', type: 'number', span: 24, width: 95, min: 0, precision: 2, align: 'center', showOverflowTooltip: true, rules: [ { required: true, message: '请输入资产原值', trigger: 'blur', }, ], }, { label: '净残值率(%)', prop: 'jcz', type: 'number', span: 24, width: 70, min: 0, max: 100, align: 'center', showOverflowTooltip: true, rules: [ { required: true, message: '请输入净残值率', trigger: 'change', }, ], formatter:(row, value)=>{ return value+'%' } }, { label: '月折旧额/月摊销额(元)', prop: 'yzje', type: 'number', span: 24, width: 140, min: 0, precision: 2, align: 'center', showOverflowTooltip: true, rules: [ { required: true, message: '请输入月折旧额/月摊销额', trigger: 'blur', }, ], }, { label: '状态', prop: 'status', type: 'select', dicData: ZC_STATUS, search: true, span: 24, width: 90, align: 'center', showOverflowTooltip: true, display: false, formatter(row, value) { if (row.zclb == '软件' && value == 2) { return '已足额摊销'; } else { return ZC_STATUS[value] && ZC_STATUS[value].label; } }, } ], };