代码更新
This commit is contained in:
@@ -100,6 +100,17 @@
|
||||
>
|
||||
维修结果
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="createExcel"
|
||||
>
|
||||
生成派工单
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
@@ -152,6 +163,8 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import resuftDialog from '@/views/wms/sb/repair/devicerepairudit/resuftDialog'
|
||||
import ReceiveDialog from '@/views/wms/sb/repair/devicerepairudit/ReceiveDialog'
|
||||
import {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: 'Devicerepairudit',
|
||||
@@ -270,6 +283,15 @@ export default {
|
||||
}
|
||||
this.receiveDialog = true
|
||||
})
|
||||
},
|
||||
createExcel() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
download('api/devicerepairmst/createExcel', { 'repair_id': data.repair_id }).then(result => {
|
||||
const name = data.repair_code + '派工单'
|
||||
this.crud.toQuery()
|
||||
downloadFile(result, name, 'xlsx')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,17 @@
|
||||
>
|
||||
提交
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="createExcel"
|
||||
>
|
||||
生成设备保养
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
@@ -140,6 +151,8 @@ import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import AddDialog from '@/views/wms/sb/upkeep/devicemaintenance/AddDialog'
|
||||
import {download} from "@/api/data";
|
||||
import {downloadFile} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: 'Devicemaintenance',
|
||||
@@ -234,6 +247,15 @@ export default {
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
createExcel() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = _selectData[0]
|
||||
download('api/devicemaintenancemst/createExcel', { 'maint_id': data.maint_id }).then(result => {
|
||||
const name = data.maint_code + '保养工单'
|
||||
this.crud.toQuery()
|
||||
downloadFile(result, name, 'xlsx')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user