Explorar o código

On master: 批发-打印日志功能

ouyang hai 1 semana
pai
achega
3c1c5a1fd2

+ 115 - 2
ghsApp/src/admin/home/components/OrderItem.vue

@@ -160,6 +160,7 @@
 
     <uni-popup ref="morePopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
       <view class="more-popup-body">
+        <view class="text-center"><button class="admin-button-com" @click="openPrintLog(item)">打印时间</button></view>
         <block v-if="item.sendStatus == -4 && item.status == 2">
           <view class="text-center"><button class="admin-button-com" @click="callIntraCity(item)">呼叫跑腿</button></view>
         </block>
@@ -178,6 +179,26 @@
       </view>
     </uni-popup>
 
+    <uni-popup ref="printLogPopup" background-color="#fff" type="center" :animation="true" class="class-popup-style">
+      <view class="print-log-popup-body">
+        <view class="print-log-sn-box">
+          <view class="print-log-sn-label">打印机编号</view>
+          <view class="print-log-sn-value">{{ printLogData.printSn || '-' }}</view>
+        </view>
+        <view class="print-log-head">打印时间 / 打印订单ID</view>
+        <view class="print-log-list" v-if="printLogData.list && printLogData.list.length">
+          <view class="print-log-item" v-for="(log, idx) in printLogData.list" :key="log.feieOrderId + '_' + idx">
+            <view class="print-log-time">{{ log.printTimeText || '等待回调' }}</view>
+            <view class="print-log-order-id">{{ log.feieOrderId }}</view>
+          </view>
+        </view>
+        <view class="print-log-empty" v-else>暂无打印记录</view>
+        <view class="text-center print-log-close">
+          <button class="admin-button-com default" @click="closePrintLog">关闭</button>
+        </view>
+      </view>
+    </uni-popup>
+
     <!-- 新增物流下单弹窗 -->
     <uni-popup ref="expressAddressRef" background-color="#fff" type="center" :animation="true" class="class-popup-style" :mask-click="false">
       <view class="express-popup-body">
@@ -278,7 +299,7 @@ import { getUserDet } from '@/api/member';
 import { createExpressOrder, cancelExpressOrder as cancelSFExpressOrder } from '@/api/express';
 import { cancelDeliveryOrder } from '@/api/express/delivery';
 import { createCallExpressOrder, cancelCallExpressOrder,getOrderFee } from '@/api/shop/shop-express';
-import { printWlLabel, cloudPrintOrder } from '@/api/order';
+import { printWlLabel, cloudPrintOrder, getOrderPrintLog } from '@/api/order';
 import { iconSrc } from '@/utils/iconSrc';
 export default {
   name: 'OrderItem',
@@ -313,7 +334,8 @@ export default {
       receiverFloor: '',
       receiverName: '',
       receiverMobile: '',
-      callExpressData: {sendCost:0,packageNum:1,weight:0}
+      callExpressData: {sendCost:0,packageNum:1,weight:0},
+      printLogData: { printSn: '', list: [] }
     };
   },
   mounted() {
@@ -396,6 +418,25 @@ export default {
     closeMore() {
       this.$refs.morePopup.close();
     },
+    openPrintLog(item) {
+      this.closeMore();
+      uni.showLoading({ title: '加载中...' });
+      getOrderPrintLog({ id: item.id }).then(res => {
+        uni.hideLoading();
+        if (res.code == 1) {
+          this.printLogData = {
+            printSn: res.data.printSn || '',
+            list: res.data.list || []
+          };
+          this.$refs.printLogPopup.open('center');
+        }
+      }).catch(() => {
+        uni.hideLoading();
+      });
+    },
+    closePrintLog() {
+      this.$refs.printLogPopup.close();
+    },
     callIntraCity(item) {
       this.closeMore();
       // this.callExpressData = {
@@ -743,6 +784,78 @@ export default {
   }
 }
 
+.print-log-popup-body {
+  padding: 40upx 30upx 30upx;
+  width: 88vw;
+  max-height: 70vh;
+  box-sizing: border-box;
+}
+
+.print-log-sn-box {
+  border: 2upx solid #333;
+  border-radius: 12upx;
+  padding: 24upx 20upx;
+  text-align: center;
+  margin-bottom: 30upx;
+}
+
+.print-log-sn-label {
+  font-size: 30upx;
+  color: #333;
+  margin-bottom: 12upx;
+}
+
+.print-log-sn-value {
+  font-size: 34upx;
+  color: #333;
+  font-weight: bold;
+}
+
+.print-log-head {
+  color: #3385ff;
+  font-size: 28upx;
+  margin-bottom: 20upx;
+}
+
+.print-log-list {
+  max-height: 45vh;
+  overflow-y: auto;
+}
+
+.print-log-item {
+  padding: 18upx 0;
+  border-bottom: 1upx solid #eee;
+}
+
+.print-log-time {
+  color: #b8860b;
+  font-size: 28upx;
+  margin-bottom: 8upx;
+}
+
+.print-log-order-id {
+  color: #2e7d32;
+  font-size: 26upx;
+  word-break: break-all;
+}
+
+.print-log-empty {
+  text-align: center;
+  color: #999;
+  font-size: 28upx;
+  padding: 40upx 0;
+}
+
+.print-log-close {
+  margin-top: 24upx;
+  .admin-button-com {
+    width: 210upx;
+    height: 80upx;
+    line-height: 80upx;
+    font-size: 29upx;
+  }
+}
+
 .express-popup-body,
 .call-express-popup-body {
   padding: 40upx 50upx;

+ 3 - 0
ghsApp/src/api/order/index.js

@@ -256,6 +256,9 @@ export const addPrintNum = data => https.get("/order/add-print-num", data);
 //云打印 shish 20210714
 export const cloudPrintOrder = data => https.get("/order/cloud-print-order", data);
 
+//飞鹅云打印日志
+export const getOrderPrintLog = data => https.get("/order/print-log", data);
+
 //确认完成订单 shish 20210810
 export const confirmFinish = data => https.get("/order/confirm-finish", data);
 

+ 2 - 2
ghsApp/src/config.js

@@ -1,5 +1,5 @@
 export const ProjectName = 'ghs'
-export const APIHOST = 'https://api.shop.hzghd.com'
-export const IMGHOST = 'https://img.hzghd.com'
+export const APIHOST = 'http://api.shop.hzghd.com'
+export const IMGHOST = 'http://img.hzghd.com'
 export const CURRENT_ENV = 'dev'
 export const APP_VERSION = '1.2.90'

+ 2 - 2
ghsApp/src/ext.json

@@ -4,9 +4,9 @@
   "directCommit": false,
   "ext": {
     "account": 12362,
-    "apiHost": "https://api.shop.hzghd.com",
+    "apiHost": "http://api.shop.hzghd.com",
     "socketApiHost": "api.shop.hzghd.com",
-    "imgHost": "https://img.hzghd.com",
+    "imgHost": "http://img.hzghd.com",
     "name":"花掌柜"
   }
 }

+ 6 - 6
ghsApp/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('https://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.eot');
-  src: url('https://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
-  url('https://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('https://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
-  url('https://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
-  url('https://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
+  src: url('http://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.eot');
+  src: url('http://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
+  url('http://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('http://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
+  url('http://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
+  url('http://api.shop.hzghd.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
 }
 
 .iconfont {

+ 3 - 3
hdApp/src/config.js

@@ -1,7 +1,7 @@
 export const ProjectName = 'hd'
-export const APIHOST = 'https://api.shop.huaml.com'
-export const FORMALHOST = 'https://shop.huaml.com'
-export const IMGHOST = 'https://img.huaml.com'
+export const APIHOST = 'http://api.shop.huaml.com'
+export const FORMALHOST = 'http://shop.huaml.com'
+export const IMGHOST = 'http://img.huaml.com'
 export const CURRENT_ENV = 'dev'
 export const WSSHOST = 'wss://chat.shop.huaml.com'
 export const APP_VERSION = '2.3.7'

+ 2 - 2
hdApp/src/ext.json

@@ -4,9 +4,9 @@
   "directCommit": false,
   "ext": {
     "account": 12362,
-    "apiHost": "https://api.shop.huaml.com",
+    "apiHost": "http://api.shop.huaml.com",
     "socketApiHost": "api.shop.huaml.com",
-    "imgHost": "https://img.huaml.com",
+    "imgHost": "http://img.huaml.com",
     "name":"花美玲"
   }
 }

+ 1 - 1
hdApp/src/manifest.json

@@ -224,7 +224,7 @@
             "subPackages" : true
         },
         "lazyCodeLoading":"requiredComponents",
-       "uniStatistics" : {
+        "uniStatistics" : {
             "enable" : false
         },
         "unipush" : {

+ 6 - 6
hdApp/src/static/iconfont/iconfont.css

@@ -1,11 +1,11 @@
 @font-face {
   font-family: 'iconfont';  /* project id 1525256 */
-  src: url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot');
-  src: url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
-  url('https://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
+  src: url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot');
+  src: url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.eot?#iefix') format('embedded-opentype'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff2') format('woff2'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.woff') format('woff'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.ttf') format('truetype'),
+  url('http://api.shop.huaml.com/iconfont/font_1525256_6bxwphhntqh.svg#iconfont') format('svg');
 }
 
 .iconfont {