shish 1 год назад
Родитель
Сommit
c2ae528061
1 измененных файлов с 22 добавлено и 2 удалено
  1. 22 2
      ghs/src/views/order/list.vue

+ 22 - 2
ghs/src/views/order/list.vue

@@ -138,6 +138,7 @@
           <el-button type="primary" size="small" v-if="scope.row.status!=5 && scope.row.status!=1">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
           <el-button size="small" v-else>更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
           <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item command="printPin">打多联</el-dropdown-item>
             <el-dropdown-item command="refundRecord">售后记录</el-dropdown-item>
             <el-dropdown-item command="cancel">取消</el-dropdown-item>
           </el-dropdown-menu>
@@ -417,13 +418,32 @@ export default {
       this.staffData = {title:'修改开单人',changeType:'changeKd',obj:order}
       this.$refs.selectStaffRef.init()
     },
-    doMore(cmd,data){
+    doMore(cmd,info){
+      if(cmd == 'printPin'){
+        if(info.payStatus != 1){
+          this.$message.error('没有付款')
+          return false
+        }
+        this.$service.order.info({ id: info.id,printType:1 }).then(res => {
+        let printData = res.printData ? res.printData : ''
+        let str = res.template ? res.template:''
+        let template = JSON.parse(str)
+        hiprint.init();
+        var hiprintTemplate = new hiprint.PrintTemplate({template:template});
+        hiprintTemplate.print(printData)
+        //增加打印次数
+        this.$service.order.addPrintNum({id:info.id}).then(data => {
+          this.app.refresh({ status: this.tabIndex,book:this.book,clearSign:this.clearSign,name:this.name })
+        })
+			});
+
+      }
       if(cmd == 'cancel'){
         this.$message.error('开发中')
         return false
       }
       if(cmd == 'refundRecord'){
-        this.refundRecordData = data
+        this.refundRecordData = info
         setTimeout(() => {
           this.$refs.refundRecordRef.init()
         })