|
@ -52,7 +52,7 @@ |
|
|
</crud> |
|
|
</crud> |
|
|
</div> |
|
|
</div> |
|
|
<!--表格内容--> |
|
|
<!--表格内容--> |
|
|
<CustomTable ref="customTable" :col-configs="colConfigs" :selection="false" :columns="columns" :crud="crud" :row-class-name="getTableRowClassName"> |
|
|
<CustomTable ref="customTable" :col-configs="colConfigs" :columns="columns" :crud="crud" :row-class-name="getTableRowClassName"> |
|
|
<el-table-column slot="operation" align="center" width="100" label="操作"> |
|
|
<el-table-column slot="operation" align="center" width="100" label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<Edit :permission="permission" :data="scope.row" :disabled-edit="false" /> |
|
|
<Edit :permission="permission" :data="scope.row" :disabled-edit="false" /> |
|
@ -131,22 +131,22 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="价值类型:" prop="valueType"> |
|
|
<el-form-item label="价值类型:" prop="valueType"> |
|
|
<el-select v-model="form.valueType" placeholder="请选择价值类型" clearable> |
|
|
<el-select v-model="form.valueType" placeholder="请选择价值类型" clearable> |
|
|
<el-option v-for="item in valueTypeList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in valueTypeList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="资产来源:" prop="assetSource"> |
|
|
<el-form-item label="资产来源:" prop="assetSource"> |
|
|
<el-select v-model="form.assetSource" placeholder="请选择资产来源" clearable> |
|
|
<el-select v-model="form.assetSource" placeholder="请选择资产来源" clearable> |
|
|
<el-option v-for="item in assetSourceList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in assetSourceList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="经费来源:" prop="fundingSource"> |
|
|
<el-form-item label="经费来源:" prop="fundingSource"> |
|
|
<el-select v-model="form.fundingSource" placeholder="请选择经费来源" clearable> |
|
|
<el-select v-model="form.fundingSource" placeholder="请选择经费来源" clearable> |
|
|
<el-option v-for="item in fundingSourceList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in fundingSourceList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="采购组织形式:" prop="procurementType"> |
|
|
<el-form-item label="采购组织形式:" prop="procurementType"> |
|
|
<el-select v-model="form.procurementType" placeholder="请选择采购组织形式" clearable> |
|
|
<el-select v-model="form.procurementType" placeholder="请选择采购组织形式" clearable> |
|
|
<el-option v-for="item in procurementTypeList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in procurementTypeList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="累计折扣:" prop="discount"> |
|
|
<el-form-item label="累计折扣:" prop="discount"> |
|
@ -157,7 +157,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="折旧状态:" prop="depreciationState"> |
|
|
<el-form-item label="折旧状态:" prop="depreciationState"> |
|
|
<el-select v-model="form.depreciationState" placeholder="请选择折旧状态" clearable> |
|
|
<el-select v-model="form.depreciationState" placeholder="请选择折旧状态" clearable> |
|
|
<el-option v-for="item in depreciationStateList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in depreciationStateList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="是否入账:" prop="bookedState"> |
|
|
<el-form-item label="是否入账:" prop="bookedState"> |
|
@ -192,17 +192,17 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="使用状况:" prop="useState"> |
|
|
<el-form-item label="使用状况:" prop="useState"> |
|
|
<el-select v-model="form.useState" placeholder="请选择使用状况" clearable> |
|
|
<el-select v-model="form.useState" placeholder="请选择使用状况" clearable> |
|
|
<el-option v-for="item in useStateList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in useStateList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="使用方向:" prop="useDirection"> |
|
|
<el-form-item label="使用方向:" prop="useDirection"> |
|
|
<el-select v-model="form.useDirection" placeholder="请选择使用方向" clearable> |
|
|
<el-select v-model="form.useDirection" placeholder="请选择使用方向" clearable> |
|
|
<el-option v-for="item in useDirectionList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in useDirectionList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="使用用途:" prop="usePurpose"> |
|
|
<el-form-item label="使用用途:" prop="usePurpose"> |
|
|
<el-select v-model="form.usePurpose" placeholder="请选择使用用途" clearable> |
|
|
<el-select v-model="form.usePurpose" placeholder="请选择使用用途" clearable> |
|
|
<el-option v-for="item in usePurposeList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in usePurposeList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="计量状态:" prop="measureState"> |
|
|
<el-form-item label="计量状态:" prop="measureState"> |
|
@ -212,13 +212,13 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item v-show="ifMeasure" label="校验周期:" prop="earlyWarningCycle"> |
|
|
<el-form-item v-show="ifMeasure" label="校验周期:" prop="earlyWarningCycle"> |
|
|
<el-select v-model="form.earlyWarningCycle" placeholder="请选择校验周期" clearable> |
|
|
<el-select v-model="form.earlyWarningCycle" placeholder="请选择校验周期" clearable> |
|
|
<el-option v-for="item in cycleList" :key="item.value" :label="item.label" :value="item.id" /> |
|
|
<el-option v-for="item in cycleList" :key="item.value" :label="item.name" :value="item.id" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item v-show="ifMeasure" label="去年校验日期:" prop="checkLastDate"> |
|
|
<el-form-item v-show="ifMeasure" label="校验日期:" prop="checkLastDate"> |
|
|
<el-date-picker v-model="form.checkLastDate" style="width: 215px;" value-format="yyyy-MM-dd" clearable type="date" placeholder="选择去年校验日期" /> |
|
|
<el-date-picker v-model="form.checkLastDate" style="width: 215px;" value-format="yyyy-MM-dd" clearable type="date" placeholder="选择去年校验日期" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item v-show="ifMeasure" label="今年校验日期:" prop="checkDate"> |
|
|
<el-form-item v-show="ifMeasure" label="下次校验日期:" prop="checkDate"> |
|
|
<el-date-picker v-model="form.checkDate" style="width: 215px;" value-format="yyyy-MM-dd" clearable type="date" placeholder="选择今年校验日期" /> |
|
|
<el-date-picker v-model="form.checkDate" style="width: 215px;" value-format="yyyy-MM-dd" clearable type="date" placeholder="选择今年校验日期" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
@ -326,8 +326,8 @@ export default { |
|
|
{ prop: 'unitPrice', label: '单价', align: 'center' }, |
|
|
{ prop: 'unitPrice', label: '单价', align: 'center' }, |
|
|
{ prop: 'totalPrice', label: '总价', align: 'center' }, |
|
|
{ prop: 'totalPrice', label: '总价', align: 'center' }, |
|
|
{ prop: 'departmentId', label: '使用部门', align: 'center', formatter: this.formatter.formatterDepartmentName }, |
|
|
{ prop: 'departmentId', label: '使用部门', align: 'center', formatter: this.formatter.formatterDepartmentName }, |
|
|
{ prop: 'principal', label: '使用人', align: 'center', formatter: this.formatter.formatterNickName }, |
|
|
{ prop: 'principal', label: '使用人', align: 'center', formatter: this.formatter.getChineseName }, |
|
|
{ prop: 'useState', label: '使用状况', align: 'center', component: PrefixPlusText, componentFunction: this.formatterDicData }, |
|
|
{ prop: 'useState', label: '使用状况', align: 'center', formatter: this.formatterDicData }, |
|
|
{ slot: 'operation' } |
|
|
{ slot: 'operation' } |
|
|
], |
|
|
], |
|
|
permission: { |
|
|
permission: { |
|
@ -400,6 +400,18 @@ export default { |
|
|
instrumentId: 0, |
|
|
instrumentId: 0, |
|
|
moveDialogVisible: false, |
|
|
moveDialogVisible: false, |
|
|
ifMeasure: false |
|
|
ifMeasure: false |
|
|
|
|
|
// pickerOptions1: { |
|
|
|
|
|
// //disabledDate是日期组件的一个方法 |
|
|
|
|
|
// disabledDate: (time) => { |
|
|
|
|
|
// //这里就涉及到日期的指定了 setMonth()函数可以设置月份 |
|
|
|
|
|
// let currentTime = this.value1; |
|
|
|
|
|
// let threeMonths = currentTime.setMonth(currentTime.getMonth()+3); |
|
|
|
|
|
// //一开始我没加下面减三个月的那个语句,他的值会一直累加 |
|
|
|
|
|
// currentTime.setMonth(currentTime.getMonth()-3) |
|
|
|
|
|
// return time.getTime() < this.value1 || time.getTime() > threeMonths ; |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
@ -428,6 +440,7 @@ export default { |
|
|
[CRUD.HOOK.afterToEdit](crud, form) { |
|
|
[CRUD.HOOK.afterToEdit](crud, form) { |
|
|
this.departmentId = form.departmentId |
|
|
this.departmentId = form.departmentId |
|
|
this.ifMeasure = form.measureState |
|
|
this.ifMeasure = form.measureState |
|
|
|
|
|
this.parentId = form.classCode |
|
|
}, |
|
|
}, |
|
|
// 编辑框取消后的操作 |
|
|
// 编辑框取消后的操作 |
|
|
[CRUD.HOOK.afterEditCancel]() { |
|
|
[CRUD.HOOK.afterEditCancel]() { |
|
@ -492,6 +505,7 @@ export default { |
|
|
getDicDataListByTypeName({ typeCode: 'use_purpose' }).then(data => { this.usePurposeList = data }) |
|
|
getDicDataListByTypeName({ typeCode: 'use_purpose' }).then(data => { this.usePurposeList = data }) |
|
|
// 预警周期列表 |
|
|
// 预警周期列表 |
|
|
getDicDataListByTypeName({ typeCode: 'verification_cycle' }).then(data => { this.cycleList = data }) |
|
|
getDicDataListByTypeName({ typeCode: 'verification_cycle' }).then(data => { this.cycleList = data }) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
// 部门选择回调事件 |
|
|
// 部门选择回调事件 |
|
|
getDepartmentValue(value) { |
|
|
getDepartmentValue(value) { |
|
@ -512,20 +526,31 @@ export default { |
|
|
this.query.departmentId = value === 0 ? '' : value |
|
|
this.query.departmentId = value === 0 ? '' : value |
|
|
}, |
|
|
}, |
|
|
// 更改行超期、预警字体颜色 |
|
|
// 更改行超期、预警字体颜色 |
|
|
getTableRowClassName({ row }) { |
|
|
// getTableRowClassName({ row }) { |
|
|
let color = '' |
|
|
// let color = '' |
|
|
switch (row.ifOverdue) { |
|
|
// switch (row.ifOverdue) { |
|
|
case 2: |
|
|
// case 2: |
|
|
color = 'table-row-color-red' |
|
|
// color = 'table-row-color-red' |
|
|
break |
|
|
// break |
|
|
case 1: |
|
|
// case 1: |
|
|
color = 'table-row-color-orange' |
|
|
// color = 'table-row-color-orange' |
|
|
break |
|
|
// break |
|
|
default: |
|
|
// default: |
|
|
color = '' |
|
|
// color = '' |
|
|
break |
|
|
// break |
|
|
|
|
|
// } |
|
|
|
|
|
// return color |
|
|
|
|
|
// }, |
|
|
|
|
|
getTableRowClassName({ row, rowIndex }) { |
|
|
|
|
|
// row.index = rowIndex |
|
|
|
|
|
const nextTime = new Date(row.checkDate).getTime() |
|
|
|
|
|
const currentTime = new Date().getTime() |
|
|
|
|
|
if (nextTime - currentTime < 7776000000) { |
|
|
|
|
|
return 'table-row-color-red' |
|
|
|
|
|
} else if (nextTime - currentTime >= 7776000000) { |
|
|
|
|
|
return 'table-row-color-orange' |
|
|
} |
|
|
} |
|
|
return color |
|
|
return '' |
|
|
}, |
|
|
}, |
|
|
// 仪器设备领用、借用管理 |
|
|
// 仪器设备领用、借用管理 |
|
|
moveAdministration(selections) { |
|
|
moveAdministration(selections) { |
|
@ -550,8 +575,8 @@ export default { |
|
|
formatterDicData(cellValue) { |
|
|
formatterDicData(cellValue) { |
|
|
if (cellValue != null) { |
|
|
if (cellValue != null) { |
|
|
let label = '' |
|
|
let label = '' |
|
|
this.useStateList.filter(dicData => dicData.id === cellValue).forEach(dicData => { |
|
|
this.useStateList.filter(dicData => dicData.id === cellValue.useState).forEach(dicData => { |
|
|
label = dicData.label |
|
|
label = dicData.name |
|
|
}) |
|
|
}) |
|
|
return label |
|
|
return label |
|
|
} |
|
|
} |
|
|