Compare commits
No commits in common. "ff1d7088efd2d717c3467e1dec95a9f6ea854c47" and "1e061b101b0577c4444c6fdd94c4cf6885fb3b80" have entirely different histories.
ff1d7088ef
...
1e061b101b
@ -46,15 +46,6 @@ export function setTicketsPaid(data){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打印导出
|
|
||||||
export function setTicketsPrint(data){
|
|
||||||
return request({
|
|
||||||
url: preUrl + "/print",
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增客户、车辆信息
|
// 新增客户、车辆信息
|
||||||
export function updateCustomerAndCar(data){
|
export function updateCustomerAndCar(data){
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@ -115,10 +115,6 @@
|
|||||||
@click="handleVoid(scope.row)"
|
@click="handleVoid(scope.row)"
|
||||||
>作废
|
>作废
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-print"
|
|
||||||
@click="handlePrint(scope.row)"
|
|
||||||
>打印
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -149,7 +145,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { setTicketsVoid, setTicketsPaid, setTicketsPrint } from '@/api/repair/tickets/Tickets'
|
import {setTicketsVoid, setTicketsPaid} 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 {
|
||||||
@ -200,31 +196,6 @@ export default {
|
|||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async handlePrint(row) {
|
|
||||||
//console.log('Handling print for:', row);
|
|
||||||
this.$confirm('确认打印吗?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning',
|
|
||||||
}).then(async () => {
|
|
||||||
const response = await this.$http.post('/repair/tickets/print', row);
|
|
||||||
console.log('Print request data:', row); // 调试输出请求数据
|
|
||||||
// 处理文件下载或预览
|
|
||||||
const fileUrl = response.data.url; // 假设返回文件的下载链接
|
|
||||||
window.open(fileUrl); // 直接打开文件或下载, 可以根据需求调整
|
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async doPrint(data) {
|
|
||||||
try {
|
|
||||||
await setTicketsPrint(data)
|
|
||||||
this.$modal.msgSuccess("导出打印成功")
|
|
||||||
this.$emit("setPrint")
|
|
||||||
} catch {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
handlePaid(row) {
|
handlePaid(row) {
|
||||||
this.$prompt('结算备注', '提示', {
|
this.$prompt('结算备注', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user