|
@@ -1,45 +1,3 @@
|
|
|
-<!--
|
|
|
-actualPrice: 50
|
|
|
-addTime: 1631094304000
|
|
|
-address: "港湾一号港11"
|
|
|
-brandId: 1046508
|
|
|
-brandName: "一楼展厅-多点位"
|
|
|
-callbackStatus: null
|
|
|
-city: "珠海市"
|
|
|
-confirmTime: null
|
|
|
-consignee: "cy"
|
|
|
-country: null
|
|
|
-couponId: ""
|
|
|
-couponPrice: 0
|
|
|
-district: "香洲区"
|
|
|
-freightPrice: 0
|
|
|
-goodsList: null
|
|
|
-goodsPrice: 50
|
|
|
-id: 676
|
|
|
-integral: 0
|
|
|
-integralMoney: 0
|
|
|
-logistics: null
|
|
|
-mobile: "15975119071"
|
|
|
-newId: "6761046508"
|
|
|
-nickName: "sousya"
|
|
|
-orderPrice: 50
|
|
|
-orderSn: "20210908174503807397842"
|
|
|
-orderStatus: 0
|
|
|
-orderType: "4"
|
|
|
-parentId: null
|
|
|
-payId: "wx0817450412422539ab24fc31729b920000"
|
|
|
-payName: null
|
|
|
-payStatus: 0
|
|
|
-payTime: null
|
|
|
-postscript: null
|
|
|
-province: "广东省"
|
|
|
-shippingFee: 0
|
|
|
-shippingId: 0
|
|
|
-shippingName: null
|
|
|
-shippingNo: null
|
|
|
-shippingStatus: 0
|
|
|
-userId: 17
|
|
|
-userName: "微信用户q0zj95zuo4pv" -->
|
|
|
<template>
|
|
|
<div class="p-4">
|
|
|
<BasicTable @register="registerTable" :rowSelection="{ type: 'checkbox' }">
|
|
@@ -92,9 +50,7 @@ userName: "微信用户q0zj95zuo4pv" -->
|
|
|
icon: 'mdi:printer-outline',
|
|
|
label: '打印',
|
|
|
color: 'error',
|
|
|
- onClick: () => {
|
|
|
- createMessage.info(`暂未接入`);
|
|
|
- },
|
|
|
+ onClick: printDetail.bind(null, record),
|
|
|
},
|
|
|
]"
|
|
|
/>
|
|
@@ -122,7 +78,7 @@ userName: "微信用户q0zj95zuo4pv" -->
|
|
|
import { useGo } from '/@/hooks/web/usePage';
|
|
|
import { Time } from '/@/components/Time';
|
|
|
import { PopConfirmButton } from '/@/components/Button';
|
|
|
-
|
|
|
+ import printJS from 'print-js';
|
|
|
import { useModal } from '/@/components/Modal';
|
|
|
import ConfirmModal from './confirmModal.vue';
|
|
|
export default defineComponent({
|
|
@@ -381,6 +337,22 @@ userName: "微信用户q0zj95zuo4pv" -->
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ function printDetail(record: Recordable) {
|
|
|
+ console.log('record', record);
|
|
|
+ printJS({
|
|
|
+ printable: [
|
|
|
+ { name: '订单号', email: '20210908174503807397842', phone: '123' },
|
|
|
+ { name: 'qq', email: '456@gmail.com', phone: '456' },
|
|
|
+ ],
|
|
|
+ properties: ['name', 'email', 'phone'],
|
|
|
+ type: 'json',
|
|
|
+ gridHeaderStyle: 'color: red; border: 2px solid #3971A5;',
|
|
|
+ gridStyle: 'border: 2px solid #3971A5;',
|
|
|
+ header: '<h3 class="custom-h3">订单详情</h3>',
|
|
|
+ documentTitle: '订单详情',
|
|
|
+ style: '.custom-h3 { color: red; }',
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
return {
|
|
|
registerTable,
|
|
@@ -396,6 +368,7 @@ userName: "微信用户q0zj95zuo4pv" -->
|
|
|
handleConfirmReceive,
|
|
|
registerConfirmModal,
|
|
|
reload,
|
|
|
+ printDetail,
|
|
|
};
|
|
|
},
|
|
|
});
|