优化
This commit is contained in:
@@ -22,6 +22,21 @@
|
||||
<el-form-item label="单据号" prop="repair_code">
|
||||
<el-input v-model="form.repair_code" style="width: 200px;" disabled placeholder="系统自动生成" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据状态" prop="invstatus">
|
||||
<el-select
|
||||
v-model="form.invstatus"
|
||||
disabled
|
||||
size="mini"
|
||||
style="width: 200px"
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.EM_DEVICE_WX_INVSTATUS"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划维修日期" prop="plan_start_date">
|
||||
<el-date-picker v-model="form.plan_start_date" type="date" placeholder="选择日期" style="width: 200px" value-format="yyyy-MM-dd" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
@@ -134,6 +149,7 @@ const defaultForm = {
|
||||
repair_code: null,
|
||||
devicerecord_id: null,
|
||||
maintenancecycle: '02',
|
||||
invstatus: '01',
|
||||
estimaterepair_times: 0,
|
||||
fault_desc: null,
|
||||
fault_level: null,
|
||||
@@ -149,7 +165,7 @@ import CRUD, { form, crud } from '@crud/crud'
|
||||
|
||||
export default {
|
||||
name: 'AddDialog',
|
||||
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_FAULT_LEVEL'],
|
||||
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_FAULT_LEVEL', 'EM_DEVICE_WX_INVSTATUS'],
|
||||
components: { ItemDialog, DeviceDialog },
|
||||
mixins: [form(defaultForm), crud()],
|
||||
props: {
|
||||
|
||||
@@ -100,17 +100,6 @@
|
||||
>
|
||||
委外维修
|
||||
</el-button>
|
||||
<!-- <el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="execu_flag"
|
||||
@click="executeRepair"
|
||||
>
|
||||
维修执行
|
||||
</el-button>-->
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -340,11 +329,16 @@ export default {
|
||||
},
|
||||
confirmRepair() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
if (data.invstatus !== '06') {
|
||||
return this.crud.notify('只能对结束状态的单据确认', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
if (_selectData.length === 0) {
|
||||
return this.crud.notify('请选择需要确认的记录!', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
crudDevicerepairmst.confirmRepair(data).then(res => {
|
||||
for (let i = 0; i < _selectData.length; i++) {
|
||||
const now = _selectData[i]
|
||||
if (now.invstatus !== '06') {
|
||||
return this.crud.notify('只能对结束状态的单据确认:' + now.repair_code, CRUD.NOTIFICATION_TYPE.INFO)
|
||||
}
|
||||
}
|
||||
crudDevicerepairmst.confirmRepair({ invstatus: '07', rows: _selectData }).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user