代码更新

This commit is contained in:
2022-09-14 09:36:49 +08:00
parent 10f5b7fe3b
commit fafff4b0e4
4 changed files with 35 additions and 8 deletions

View File

@@ -55,7 +55,7 @@
<el-col :span="8">
<el-form-item label="设备" prop="devicerecord_id">
<el-input v-model="form.device_code" :disabled="true" style="width: 200px;">
<el-button slot="append" icon="el-icon-plus" @click="putDevice" />
<el-button slot="append" icon="el-icon-plus" :disabled="crud.status.view > 0" @click="putDevice" />
</el-input>
</el-form-item>
</el-col>
@@ -65,6 +65,7 @@
v-model="form.fault_level"
size="mini"
placeholder="请选择"
:disabled="crud.status.view > 0"
class="filter-item"
>
<el-option
@@ -102,6 +103,7 @@
type="primary"
icon="el-icon-check"
size="mini"
:disabled="crud.status.view > 0"
@click="putItem"
>
添加项目
@@ -126,13 +128,13 @@
<el-table-column show-overflow-tooltip prop="requirement" label="要求" align="center" />
<el-table-column prop="dtl_remark" label="备注" align="center">
<template slot-scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select"/>
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" :disabled="crud.status.view > 0" class="input-with-select"/>
</template>
</el-table-column>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" />
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" :disabled="crud.status.view > 0" @click.native.prevent="delRow(scope.$index, form.tableData)" />
</template>
</el-table-column>
</el-table>
@@ -219,6 +221,14 @@ export default {
this.form.tableData = res
})
},
[CRUD.HOOK.afterToView]() {
const data = {
'repair_id': this.form.repair_id
}
crudDevicerepairmst.getDtl(data).then(res => {
this.form.tableData = res
})
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {

View File

@@ -95,7 +95,11 @@
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="repair_id" label="设备维修单标识" />
<el-table-column prop="repair_code" label="维修单号" width="120px" show-overflow-tooltip />
<el-table-column prop="device_code" label="设备编码" width="120px" show-overflow-tooltip />
<el-table-column prop="device_code" label="设备编码" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.device_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName"/>

View File

@@ -55,7 +55,7 @@
<el-col :span="8">
<el-form-item label="设备" prop="devicerecord_id">
<el-input v-model="form.device_code" :disabled="true" style="width: 200px;">
<el-button slot="append" icon="el-icon-plus" @click="putDevice" />
<el-button slot="append" icon="el-icon-plus" @click="putDevice" :disabled="crud.status.view > 0" />
</el-input>
</el-form-item>
</el-col>
@@ -79,6 +79,7 @@
icon="el-icon-check"
size="mini"
@click="putItem"
:disabled="crud.status.view > 0"
>
添加项目
</el-button>
@@ -104,13 +105,13 @@
<el-table-column show-overflow-tooltip prop="requirement" label="要求" align="center" />
<el-table-column prop="dtl_remark" label="备注" align="center">
<template slot-scope="scope">
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" class="input-with-select"/>
<el-input v-show="!scope.row.edit" v-model="scope.row.dtl_remark" :disabled="crud.status.view > 0" class="input-with-select" />
</template>
</el-table-column>
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
<template slot-scope="scope">
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delRow(scope.$index, form.tableData)" />
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" :disabled="crud.status.view > 0" @click.native.prevent="delRow(scope.$index, form.tableData)" />
</template>
</el-table-column>
</el-table>
@@ -191,6 +192,14 @@ export default {
this.form.tableData = res
})
},
[CRUD.HOOK.afterToView]() {
const data = {
'maint_id': this.form.maint_id
}
crudDevicemaintenancemst.getDtl(data).then(res => {
this.form.tableData = res
})
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {

View File

@@ -106,7 +106,11 @@
<el-table-column type="selection" width="55" />
<el-table-column v-if="false" prop="maint_id" label="保养单标识" />
<el-table-column prop="maint_code" label="保养单号" width="120px" show-overflow-tooltip />
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip>
<template slot-scope="scope">
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.device_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
<el-table-column prop="invstatus" label="单据状态" show-overflow-tooltip :formatter="formatInvsName" />