add:维修单挂起功能
This commit is contained in:
@@ -56,6 +56,14 @@ export function startRepair(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function pendingRepair(data) {
|
||||
return request({
|
||||
url: 'api/devicerepairmst/pendingRepair',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function endRepair(data) {
|
||||
return request({
|
||||
url: 'api/devicerepairmst/endRepair',
|
||||
@@ -168,4 +176,4 @@ export function getUser(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { findByCode, add, edit, del, getDtl, submit, startRepair, endRepair, submitRepair, confirmRepair, submitResuft, getResult, outRepair, checkRepair, uditRepair, getNormBom, getFileBom, submitReceive, getDeviceInfo, getIosMst, getUser }
|
||||
export default { findByCode, add, edit, del, getDtl, submit, startRepair,pendingRepair, endRepair, submitRepair, confirmRepair, submitResuft, getResult, outRepair, checkRepair, uditRepair, getNormBom, getFileBom, submitReceive, getDeviceInfo, getIosMst, getUser }
|
||||
|
||||
@@ -129,7 +129,37 @@
|
||||
>
|
||||
结束维修
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="Pending_flag"
|
||||
@click="PendingStart"
|
||||
>
|
||||
维修单挂起
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
|
||||
<el-dialog
|
||||
:before-close="crud.cancelCU"
|
||||
:close-on-click-modal="false"
|
||||
title="维修单挂起"
|
||||
:visible.sync="PendingVisible"
|
||||
width="450px"
|
||||
>
|
||||
<el-form ref="form" :model="PendingForm" :rules="rules" size="mini">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="PendingForm.remark" style="width: 350px;" rows="2" type="textarea" />
|
||||
</el-form-item>
|
||||
<br>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="info" @click="PendingClose">取消</el-button>
|
||||
<el-button type="primary" @click="Pending">挂起</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :row-style="tableRowClassName" :data="crud.data" size="mini" style="width: 100%;" @selection-change="mySelectionChange">
|
||||
<el-table-column type="selection" min-width="35" />
|
||||
@@ -195,6 +225,7 @@ import resuftDialog from '@/views/wms/device_manage/repair/devicerepairpa/resuft
|
||||
import ReceiveDialog from '@/views/wms/device_manage/repair/devicerepairpa/ReceiveDialog'
|
||||
import StartDialog from '@/views/wms/device_manage/repair/devicerepairpa/StartDialog'
|
||||
import AddDialog from '@/views/wms/device_manage/repair/devicerepair/AddDialog'
|
||||
import {pendingRepair} from "../devicerepair/devicerepairmst";
|
||||
|
||||
export default {
|
||||
name: 'Devicerepairpa',
|
||||
@@ -220,12 +251,15 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
start_flag: true,
|
||||
Pending_flag: true,
|
||||
execu_flag: true,
|
||||
end_flag: true,
|
||||
open_flag: true,
|
||||
confirm_flag: true,
|
||||
result_flag: true,
|
||||
classes: [],
|
||||
PendingVisible: false,
|
||||
PendingForm: {},
|
||||
class_idStr: null,
|
||||
materOpt_code: '23',
|
||||
openParam: null,
|
||||
@@ -234,6 +268,11 @@ export default {
|
||||
receiveDialog: false,
|
||||
startDialog: false,
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
remark: [
|
||||
{ required: true, message: '标识不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -249,6 +288,24 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
PendingStart() {
|
||||
this.PendingVisible = true
|
||||
this.PendingForm = {}
|
||||
},
|
||||
PendingClose() {
|
||||
this.PendingForm = {}
|
||||
this.PendingVisible = false
|
||||
},
|
||||
Pending() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
data.remark = this.PendingForm.remark
|
||||
crudDevicerepairmst.pendingRepair(data).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
this.dialogVisible = false
|
||||
})
|
||||
},
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
@@ -306,7 +363,7 @@ export default {
|
||||
const _selectData = this.$refs.table.selection
|
||||
debugger
|
||||
const data = _selectData[0]
|
||||
if (data.invstatus === '03' || data.invstatus === '05') {
|
||||
if (data.invstatus === '03' || data.invstatus === '05' || data.invstatus === '04') {
|
||||
crudDevicerepairmst.getDtl(data).then(res => {
|
||||
this.openParam = {
|
||||
'form': data,
|
||||
@@ -391,18 +448,25 @@ export default {
|
||||
if (rows.length !== 0) {
|
||||
this.start_flag = false
|
||||
this.execu_flag = false
|
||||
this.Pending_flag = false
|
||||
this.end_flag = false
|
||||
this.open_flag = false
|
||||
this.confirm_flag = false
|
||||
this.result_flag = false
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if ('03,04,05,06,07,99'.includes(rows[i].invstatus)) {
|
||||
if ('03,05,06,07,99'.includes(rows[i].invstatus)) {
|
||||
this.start_flag = true
|
||||
}
|
||||
if ('04'.includes(rows[i].invstatus)) {
|
||||
this.Pending_flag = true
|
||||
}
|
||||
if ('01'.includes(rows[i].invstatus)) {
|
||||
this.Pending_flag = true
|
||||
}
|
||||
if ('01,02,04,05,06,07,99'.includes(rows[i].invstatus)) {
|
||||
this.execu_flag = true
|
||||
}
|
||||
if ('01,02,04,06,07,99'.includes(rows[i].invstatus)) {
|
||||
if ('01,02,06,07,99'.includes(rows[i].invstatus)) {
|
||||
this.end_flag = true
|
||||
}
|
||||
if ('01,02,06,07,99'.includes(rows[i].invstatus)) {
|
||||
@@ -424,6 +488,7 @@ export default {
|
||||
},
|
||||
handleCurrentChange() {
|
||||
this.start_flag = true
|
||||
this.Pending_flag = true
|
||||
this.execu_flag = true
|
||||
this.end_flag = true
|
||||
this.open_flag = true
|
||||
|
||||
Reference in New Issue
Block a user