优化
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="设备档案" prop="devicerecord_id">
|
||||
<el-form-item label="设备名称" prop="devicerecord_id">
|
||||
<el-input v-model="form.devicerecord_id" :disabled="true" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="repair"
|
||||
>
|
||||
维修
|
||||
@@ -79,7 +78,6 @@
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="notRepair"
|
||||
>
|
||||
不维修
|
||||
@@ -155,6 +153,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
classes: [],
|
||||
checkrows: [],
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
statusList: [
|
||||
@@ -240,23 +239,23 @@ export default {
|
||||
}
|
||||
},
|
||||
repair() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
if (data.status !== '01') {
|
||||
return this.crud.notify('只能对生成状态的单据进行维修', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
crudDevicerepairrequest.repair(data).then(res => {
|
||||
crudDevicerepairrequest.repair({ rows: this.checkrows}).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
},
|
||||
notRepair() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
if (data.status !== '01') {
|
||||
return this.crud.notify('只能对生成状态的单据进行操作', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
this.checkrows = this.$refs.table.selection
|
||||
if(this.checkrows.length === 0 ){
|
||||
this.crud.notify('请勾选需要操作的记录!')
|
||||
return false
|
||||
}
|
||||
crudDevicerepairrequest.notRepair(data).then(res => {
|
||||
crudDevicerepairrequest.notRepair({ rows: this.checkrows}).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
|
||||
@@ -128,7 +128,9 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;"
|
||||
@cell-dblclick = "mydb"
|
||||
@selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="runrecord_id" label="记录标识" />
|
||||
<el-table-column prop="run_date" label="填报日期" width="120px" show-overflow-tooltip />
|
||||
@@ -312,6 +314,10 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
mydb(row){
|
||||
this.openParam = row
|
||||
this.addPaDialog = true
|
||||
},
|
||||
addPa() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
|
||||
Reference in New Issue
Block a user