|
@@ -1,11 +1,12 @@
|
|
<template>
|
|
<template>
|
|
<div class="detailPage">
|
|
<div class="detailPage">
|
|
<div class="topButton">
|
|
<div class="topButton">
|
|
|
|
+ <a-button type="primary" style="margin-right: 20px" @click="enterDialog"> 打印 </a-button>
|
|
<a-button type="primary" @click="goBack">
|
|
<a-button type="primary" @click="goBack">
|
|
{{ t('common.back') }}
|
|
{{ t('common.back') }}
|
|
</a-button>
|
|
</a-button>
|
|
</div>
|
|
</div>
|
|
- <div class="content">
|
|
|
|
|
|
+ <div class="content" ref="print" id="print">
|
|
<div class="content_left">
|
|
<div class="content_left">
|
|
<div class="content_left_info">
|
|
<div class="content_left_info">
|
|
<Descriptions title="客户信息" :column="3" v-if="detailData.customer">
|
|
<Descriptions title="客户信息" :column="3" v-if="detailData.customer">
|
|
@@ -17,6 +18,23 @@
|
|
</DescriptionsItem>
|
|
</DescriptionsItem>
|
|
<DescriptionsItem label="联系电话"> {{ detailData.customer.phone }} </DescriptionsItem>
|
|
<DescriptionsItem label="联系电话"> {{ detailData.customer.phone }} </DescriptionsItem>
|
|
</Descriptions>
|
|
</Descriptions>
|
|
|
|
+ <Descriptions title="发票信息" :column="3" v-if="detailData.repairInvoice">
|
|
|
|
+ <DescriptionsItem label="是否开票">
|
|
|
|
+ {{ detailData.repairInvoice.repairId ? '是' : '否' }}</DescriptionsItem
|
|
|
|
+ >
|
|
|
|
+ <DescriptionsItem
|
|
|
|
+ v-if="detailData.repairInvoice && detailData.repairInvoice.invoiceHead"
|
|
|
|
+ label="发票抬头"
|
|
|
|
+ >
|
|
|
|
+ {{ detailData.repairInvoice.invoiceHead }}
|
|
|
|
+ </DescriptionsItem>
|
|
|
|
+ <DescriptionsItem
|
|
|
|
+ v-if="detailData.repairInvoice && detailData.repairInvoice.invoiceNum"
|
|
|
|
+ label="税号"
|
|
|
|
+ >
|
|
|
|
+ {{ detailData.repairInvoice.invoiceNum }}
|
|
|
|
+ </DescriptionsItem>
|
|
|
|
+ </Descriptions>
|
|
<Descriptions title="产品及故障信息" :column="3">
|
|
<Descriptions title="产品及故障信息" :column="3">
|
|
<DescriptionsItem label="产品名称" v-if="detailData.repairerVo">
|
|
<DescriptionsItem label="产品名称" v-if="detailData.repairerVo">
|
|
{{ t(`routes.scene.tableType.${detailData.repairerVo.cameraType}`) }}
|
|
{{ t(`routes.scene.tableType.${detailData.repairerVo.cameraType}`) }}
|
|
@@ -166,7 +184,7 @@
|
|
</PreviewGroup>
|
|
</PreviewGroup>
|
|
</div>
|
|
</div>
|
|
</DescriptionsItem>
|
|
</DescriptionsItem>
|
|
- <DescriptionsItem label="支付备注" :span="3">
|
|
|
|
|
|
+ <DescriptionsItem style="padding-bottom: 16px" label="支付备注" :span="3">
|
|
{{ detailData.repairPay?.remark }}
|
|
{{ detailData.repairPay?.remark }}
|
|
</DescriptionsItem>
|
|
</DescriptionsItem>
|
|
<DescriptionsItem label="回单备注" :span="3">
|
|
<DescriptionsItem label="回单备注" :span="3">
|
|
@@ -339,6 +357,7 @@
|
|
import { detail, process, detailDownExport } from '/@/api/spares';
|
|
import { detail, process, detailDownExport } from '/@/api/spares';
|
|
import { detailResult } from '/@/api/spares/model';
|
|
import { detailResult } from '/@/api/spares/model';
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
|
|
+ import printJS from 'print-js';
|
|
// import recoveryModal from './recoveryModal.vue';//录单
|
|
// import recoveryModal from './recoveryModal.vue';//录单
|
|
import quoteModel from './quoteModel.vue';
|
|
import quoteModel from './quoteModel.vue';
|
|
import deliveryModal from './deliveryModal.vue';
|
|
import deliveryModal from './deliveryModal.vue';
|
|
@@ -385,6 +404,7 @@
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const { createMessage, createConfirm } = useMessage();
|
|
const { createMessage, createConfirm } = useMessage();
|
|
const { t } = useI18n();
|
|
const { t } = useI18n();
|
|
|
|
+ const print = ref(null);
|
|
const permissionStore = usePermissionStore();
|
|
const permissionStore = usePermissionStore();
|
|
const { getCheckPerm } = permissionStore;
|
|
const { getCheckPerm } = permissionStore;
|
|
const repairId = ref<string | string[]>(router.currentRoute.value.params.id || '0');
|
|
const repairId = ref<string | string[]>(router.currentRoute.value.params.id || '0');
|
|
@@ -435,6 +455,18 @@
|
|
width: 140,
|
|
width: 140,
|
|
},
|
|
},
|
|
];
|
|
];
|
|
|
|
+ async function enterDialog() {
|
|
|
|
+ const style =
|
|
|
|
+ '@page {margin:0mm 10mm};' +
|
|
|
|
+ '@media print { .status{ overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }}'; //打印时去掉眉页眉尾
|
|
|
|
+ printJS({
|
|
|
|
+ printable: 'print', // 标签元素id
|
|
|
|
+ type: 'html',
|
|
|
|
+ headerStyle: 'font-weight:400;text-align:center;',
|
|
|
|
+ targetStyles: ['*'],
|
|
|
|
+ style,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
async function getData() {
|
|
async function getData() {
|
|
const stepRes = await process({ repairId: repairId.value });
|
|
const stepRes = await process({ repairId: repairId.value });
|
|
let butTypeList = {
|
|
let butTypeList = {
|
|
@@ -659,6 +691,8 @@
|
|
stepList,
|
|
stepList,
|
|
dowmFile,
|
|
dowmFile,
|
|
t,
|
|
t,
|
|
|
|
+ enterDialog,
|
|
|
|
+ print,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
});
|
|
});
|
|
@@ -687,8 +721,13 @@
|
|
|
|
|
|
&_right {
|
|
&_right {
|
|
width: 400px;
|
|
width: 400px;
|
|
- padding: 40px 20px;
|
|
|
|
|
|
+ padding: 40px 0px 40px 20px;
|
|
.timeItem {
|
|
.timeItem {
|
|
|
|
+ .status {
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ }
|
|
.ant-image-img {
|
|
.ant-image-img {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
height: 100%;
|