Browse Source

打印优化

DESKTOP-T5C0CIA\lhch 1 month ago
parent
commit
7a64ca1e59

+ 4 - 4
admin-ui/.env.development

@@ -5,10 +5,10 @@ VUE_APP_TITLE = 一七管理系统
 ENV = 'development'
 
 
-VUE_APP_BASE_API_HOST = 'http://127.0.0.1:9801'
-VUE_APP_BASE_API = 'http://127.0.0.1:9801'
-# VUE_APP_BASE_API_HOST = 'http://139.224.65.227:8091/prod-api'
-# VUE_APP_BASE_API = 'http://139.224.65.227:8091/prod-api'
+# VUE_APP_BASE_API_HOST = 'http://127.0.0.1:9801'
+# VUE_APP_BASE_API = 'http://127.0.0.1:9801'
+VUE_APP_BASE_API_HOST = 'http://139.224.65.227:8091/prod-api'
+VUE_APP_BASE_API = 'http://139.224.65.227:8091/prod-api'
 # VUE_APP_BASE_API_HOST = 'http://192.168.5.247:9801/'
 # VUE_APP_BASE_API = 'http://192.168.5.247:9801/'
 

+ 24 - 18
admin-ui/src/utils/index.js

@@ -555,6 +555,12 @@ export function collectClothPrinter(LODOP, data, lodopName) {
   LODOP.ADD_PRINT_TEXT(height + 15, 160, 150, 20, `总金额:${data.orderAmount}元`);
 
   LODOP.ADD_PRINT_LINE(height + 35, 10, height + 35, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(height + 45, 10, 150, 20, `优惠金额:${(data.activityDiscountAmount || 0) + (data.cashDeductAmount || 0) + (data.couponDeductAmount || 0)}`);
+  LODOP.ADD_PRINT_TEXT(height + 45, 160, 150, 20, `实付金额:${(data.payAmount || 0)}`);
+  LODOP.ADD_PRINT_TEXT(height + 65, 10, 150, 20, `优惠券:-${(data.activityDiscountAmount || 0)}`);
+  LODOP.ADD_PRINT_TEXT(height + 65, 160, 150, 20, `折扣活动:${(data.activityDiscountAmount || 0) + (data.cashDeductAmount || 0) + (data.couponDeductAmount || 0)}`);
+  LODOP.ADD_PRINT_TEXT(height + 85, 10, 150, 20, `现金券:${(data.activityDiscountAmount || 0) + (data.cashDeductAmount || 0) + (data.couponDeductAmount || 0)}`);
+  LODOP.ADD_PRINT_LINE(height + 105, 10, height + 105, 295, 1, 1);
 
   //金额
   let payTypename = '';
@@ -572,36 +578,36 @@ export function collectClothPrinter(LODOP, data, lodopName) {
 
 
 
-  LODOP.ADD_PRINT_TEXT(height + 45, 10, 150, 20, `付款方式:${payTypename}`);
-  LODOP.ADD_PRINT_TEXT(height + 45, 160, 150, 20, `会员金额:${data.memberBeforeBalance?data.memberBeforeBalance+'元':''}`);
-  LODOP.ADD_PRINT_TEXT(height + 75, 10, 150, 20, `本次扣款:${data.memberChangeAmount?data.memberChangeAmount+'元':'0'}`);
-  LODOP.ADD_PRINT_TEXT(height + 75, 160, 150, 20, `会员余额:${data.memberBeforeBalance?data.memberBeforeBalance +'元':''}`);
+  LODOP.ADD_PRINT_TEXT(height + 115, 10, 150, 20, `付款方式:${payTypename}`);
+  LODOP.ADD_PRINT_TEXT(height + 115, 160, 150, 20, `会员金额:${data.memberBeforeBalance?data.memberBeforeBalance+'元':''}`);
+  LODOP.ADD_PRINT_TEXT(height + 135, 10, 150, 20, `本次扣款:${data.memberChangeAmount?data.memberChangeAmount+'元':'0'}`);
+  LODOP.ADD_PRINT_TEXT(height + 135, 160, 150, 20, `会员余额:${data.memberBeforeBalance?data.memberBeforeBalance +'元':''}`);
 
-  LODOP.ADD_PRINT_TEXT(height + 105, 10, 150, 20, `客户:${data.appUserInfoVO.contactName}`);
-  LODOP.ADD_PRINT_TEXT(height + 105, 160, 180, 20, `客户电话:${data.appUserInfoVO.contactPhone}`);
+  LODOP.ADD_PRINT_TEXT(height + 155, 10, 150, 20, `客户:${data.appUserInfoVO.contactName}`);
+  LODOP.ADD_PRINT_TEXT(height + 155, 160, 180, 20, `客户电话:${data.appUserInfoVO.contactPhone}`);
   let address = `客户地址:${data.appUserInfoVO.province || ''}${ data.appUserInfoVO.city|| ''}${ data.appUserInfoVO.area|| ''}${ data.appUserInfoVO.address|| ''}${ data.appUserInfoVO.addressDetail|| ''}`
-  LODOP.ADD_PRINT_TEXT(height + 135, 10, 300, 20, address);
+  LODOP.ADD_PRINT_TEXT(height + 175, 10, 300, 20, address);
   var userHeight = addDynamicText(90, address)
   height += userHeight
 
-  LODOP.ADD_PRINT_LINE(height + 140, 10, height + 140, 295, 1, 1);
+  LODOP.ADD_PRINT_LINE(height + 180, 10, height + 180, 295, 1, 1);
   console.log(data.sysOrg)
-  LODOP.ADD_PRINT_TEXT(height + 150, 10, 300, 20, `本店地址:${data.sysOrg.address || ''}`);
+  LODOP.ADD_PRINT_TEXT(height + 190, 10, 300, 20, `本店地址:${data.sysOrg.address || ''}`);
   var sysHeight = addDynamicText(90, `本店地址:${data.sysOrg.address || ''}`)
   height += sysHeight
-  LODOP.ADD_PRINT_TEXT(height + 160, 10, 300, 20, `联系电话:${data.sysOrg.contactPhone}`);
+  LODOP.ADD_PRINT_TEXT(height + 200, 10, 300, 20, `联系电话:${data.sysOrg.contactPhone}`);
 
   // LODOP.ADD_PRINT_TEXT(height + 210, 10, 180, 20, `营业时间:${data.sysOrg.businessStartTime?data.sysOrg.businessStartTime:''}-${data.sysOrg.businessEndTime?data.sysOrg.businessEndTime:''}`);
   // LODOP.ADD_PRINT_TEXT(height + 210, 200, 120, 20, `员工:${data.createBy?data.createBy:''}`);
 
-  LODOP.ADD_PRINT_LINE(height + 185, 10, height + 185, 295, 1, 1);
-  LODOP.ADD_PRINT_TEXT(height + 195, 10, 300, 20, `订单备注:${data.remark?data.remark:''}`);
+  LODOP.ADD_PRINT_LINE(height + 220, 10, height + 220, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(height + 230, 10, 300, 20, `订单备注:${data.remark?data.remark:''}`);
   var remarkHeight = addDynamicText(90, `订单备注:${data.remark?data.remark:''}`)
   height += remarkHeight
-  LODOP.ADD_PRINT_TEXT(height + 210, 10, 300, 50, `客户签名:`);
-  LODOP.ADD_PRINT_LINE(height + 250, 10, height + 250, 295, 1, 1);
-  LODOP.ADD_PRINT_TEXT(height + 260, 50, 300, 20, `请仔细阅读店内张贴的取衣凭证注意事项`);
-  LODOP.ADD_PRINT_LINE(height + 280, 10, height + 280, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(height + 250, 10, 300, 50, `客户签名:`);
+  LODOP.ADD_PRINT_LINE(height + 290, 10, height + 290, 295, 1, 1);
+  LODOP.ADD_PRINT_TEXT(height + 300, 50, 300, 20, `请仔细阅读店内张贴的取衣凭证注意事项`);
+  LODOP.ADD_PRINT_LINE(height + 320, 10, height + 320, 295, 1, 1);
   if (this.LODOP.SET_PRINTER_INDEXA(lodopName))
 
   // this.LODOP.PREVIEW(); //打印预览
@@ -777,12 +783,12 @@ export function barCodePrinter(LODOP, data, lodopName){
     let _flaws = ''
     let n = 0
     item.orderClothFlaws.forEach(item_n=>{
-      if (n < 10) {
+      if (n < 5) {
         _flaws += item_n.clothFlawName+';'
       } 
       n++
     })
-    if (n >= 10) {
+    if (n >= 5) {
       _flaws += '...'
     }
     let junInfo = ''

+ 1 - 1
admin-ui/src/views/order/cloth/orderList.vue

@@ -150,7 +150,7 @@
         <el-table-column label="操作" align="center" min-width="240" fixed="right">
           <template slot-scope="scope">
             <el-button type="text" icon="el-icon-s-order" size="mini" @click="handleDetail(scope.row)"> 订单详情 </el-button>
-            <el-button type="text" icon="el-icon-printer" size="mini" @click="btn_lodop(scope.row)" v-if="userInfoVO.userType != '00'"> 打印订单 </el-button>
+            <el-button type="text" icon="el-icon-printer" size="mini" @click="btn_lodop(scope.row)" v-if="userInfoVO.userType != '00' && scope.row.orderAmount"> 打印订单 </el-button>
             <el-button type="text" icon="el-icon-close" size="mini" @click="handleClose(scope.row)" v-if="scope.row.refundStatus == '0' && (scope.row.orderStatus == '0' || scope.row.orderStatus == '1' || scope.row.orderStatus == '2'  || scope.row.orderStatus == '5' )"> 撤销 </el-button>
           </template>
         </el-table-column>