Browse Source

返修列表打印功能

pull/117/head
wangxy 3 years ago
parent
commit
a7932b53b5
2 changed files with 38 additions and 1 deletions
  1. +8
    -0
      src/api/productplan/base.js
  2. +30
    -1
      src/views/quality/reportform/repairlist.vue

+ 8
- 0
src/api/productplan/base.js View File

@ -204,4 +204,12 @@ export function queryRepairRecord (query) {
method: 'get',
params: query
})
}
// 打印功能
export function addPrinterInfo (data) {
return request({
url: '/admin/qm/reclinerreclst/addprinterinfo',
method: 'post',
data
})
}

+ 30
- 1
src/views/quality/reportform/repairlist.vue View File

@ -29,6 +29,16 @@
<span v-else-if="item === 'QM_ReclinerReclst-CreateTime'"> {{ parseTime(scope.row[item]) }} </span>
<span v-else>{{ scope.row[item] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="125">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handlePrint(scope.row)"
>打印</el-button>
</template>
</el-table-column>
</el-table>
<pagination
@ -42,7 +52,7 @@
</template>
<script>
import { queryRepairRecord } from '@/api/productplan/base'
import { queryRepairRecord, addPrinterInfo } from '@/api/productplan/base'
export default {
name: 'reworklist',
data() {
@ -99,6 +109,25 @@ export default {
this.queryParams.pageNumber = 1
this.getList()
},
//
handlePrint(row) {
let params = {
"QM_ReclinerReclst-PlantNr": row['QM_ReclinerReclst-PlantNr'],
"QM_ReclinerReclst-ReclinerNr": row['QM_ReclinerReclst-ReclinerNr'],
"QM_ReclinerReclst-SerialOrderId": row['QM_ReclinerReclst-SerialOrderId'],
"QM_ReclinerReclst-ArtId": row['QM_ReclinerReclst-ArtId']
}
this.$confirm('是否确认打印"' + row['QM_ReclinerReclst-ArtId'] + '"的数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return addPrinterInfo(params)
}).then(() => {
this.msgSuccess('打印成功')
this.getList()
}).catch(function() {})
}
}
}
</script>

Loading…
Cancel
Save