This commit is contained in:
xiaofajia 2024-10-12 20:07:08 +08:00
commit 27f2b505ff
2 changed files with 32 additions and 2 deletions

View File

@ -46,6 +46,15 @@ export function setTicketsPaid(data){
}) })
} }
export function print(id) {
return request({
url: preUrl + "/print/" + id,
method: 'get'
})
}
// 新增客户、车辆信息 // 新增客户、车辆信息
export function updateCustomerAndCar(data){ export function updateCustomerAndCar(data){
return request({ return request({

View File

@ -99,7 +99,7 @@
<dict-tag :type="DICT_TYPE.REPAIR_TICKETS_STATUS" v-model="scope.row.ticketsStatus"/> <dict-tag :type="DICT_TYPE.REPAIR_TICKETS_STATUS" v-model="scope.row.ticketsStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180"> <el-table-column label="操作" fixed="right" align="center" width="230">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)" <el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
>查看 >查看
@ -115,6 +115,10 @@
@click="handleVoid(scope.row)" @click="handleVoid(scope.row)"
>作废 >作废
</el-button> </el-button>
<el-button size="mini" type="text" icon="el-icon-printer"
@click="handlePrint(scope.row)"
>打印
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -145,7 +149,7 @@
</template> </template>
<script> <script>
import {setTicketsVoid, setTicketsPaid} from "@/api/repair/tickets/Tickets"; import {setTicketsVoid, setTicketsPaid, setTicketsPrint} from '@/api/repair/tickets/Tickets'
import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue"; import TicketsShow from "@/views/repair/tickets/Components/TicketsShow.vue";
export default { export default {
@ -196,6 +200,23 @@ export default {
} catch { } catch {
} }
}, },
/**
* 打印
*/
async handlePrint(row) {
// window.location.href = process.env.VUE_APP_BASE_API + '/admin-api/repair/tickets/print/'+row.id;
window.open(process.env.VUE_APP_BASE_API + '/admin-api/repair/tickets/print/'+row.id)
},
async doPrint(data) {
try {
await setTicketsPrint(data)
this.$modal.msgSuccess("导出打印成功")
this.$emit("setPrint")
} catch {
}
},
handlePaid(row) { handlePaid(row) {
this.$prompt('结算备注', '提示', { this.$prompt('结算备注', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',