소스 검색

贺卡打印优化

Funny 2 년 전
부모
커밋
184221fdd7
3개의 변경된 파일18개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 1
      src/api/shop.js
  2. 6 1
      src/components/orderComponents/orderDetail.vue
  3. 8 3
      src/components/settingComponents/print/greetingCardPrinter.vue

+ 4 - 1
src/api/shop.js

@@ -236,7 +236,10 @@ export const getCloudDevice = (params) => {
 export const cloudPrint = (params) => {
   return post('app/order/print/card', params)
 }
-
+// 云盒打印测试
+export const cloudPrintTest = (params) => {
+  return post('app/order/print/test/card', params)
+}
 // 云盒配置列表
 export const cloudConfigList = (params) => {
   return get('app/shop/cloud/card/list', params)

+ 6 - 1
src/components/orderComponents/orderDetail.vue

@@ -392,7 +392,12 @@ export default {
                       }
 
                       .card-con {
-                          margin-top: ${this.params.paddingTop}mm;
+                          margin-top: ${
+                            this.params.direction === 1 &&
+                            ["z1", "z4", "z7"].includes(this.params.jpAutoAlign)
+                              ? this.params.paddingTop - 10
+                              : this.params.paddingTop
+                          }mm;
                           margin-right: ${this.params.paddingRight}mm;
                           margin-bottom: ${this.params.paddingBottom}mm;
                           margin-left: ${this.params.paddingLeft}mm;

+ 8 - 3
src/components/settingComponents/print/greetingCardPrinter.vue

@@ -173,6 +173,7 @@ import {
   getCloudDevice,
   deviceAdd,
   cloudPrint,
+  cloudPrintTest,
   shopDeviceList,
   deviceDelete,
   cloudConfigList,
@@ -567,7 +568,12 @@ export default {
                       }
 
                       .card-con {
-                          margin-top: ${this.params.paddingTop}mm;
+                          margin-top: ${
+                            this.params.direction === 1 &&
+                            ["z1", "z4", "z7"].includes(this.params.jpAutoAlign)
+                              ? this.params.paddingTop - 10
+                              : this.params.paddingTop
+                          }mm;
                           margin-right: ${this.params.paddingRight}mm;
                           margin-bottom: ${this.params.paddingBottom}mm;
                           margin-left: ${this.params.paddingLeft}mm;
@@ -589,11 +595,10 @@ export default {
               </html>`;
 
       let params = {
-        orderId: 0,
         shopId: this.params.shopIdList[0],
         jobFile: html,
       };
-      cloudPrint(params).then((res) => {
+      cloudPrintTest(params).then((res) => {
         console.log("云盒打印信息", res);
         if (res.code === 200) {
           this.$message({