Explorar o código

fix: 少了await

zh %!s(int64=2) %!d(string=hai) anos
pai
achega
c57d334fc4

+ 10 - 7
src/views/supply/pickup/check.vue

@@ -419,7 +419,7 @@
         <el-button type="primary" @click="submitDialogForm">确 定</el-button>
       </div>
     </el-dialog>
-    <print-preview ref="preView" :add-print="addPrint" @initPrint="handleInitPrint" @refreshList="handleRefreshList" :getNewDetailPrintDisString="getNewDetailPrintDisString"/>
+    <print-preview ref="preView" :add-print="addPrint" :get-oval-dateil="getOvalDateil" :get-new-detail-print-dis-string="getNewDetailPrintDisString" @initPrint="handleInitPrint" @refreshList="handleRefreshList" />
 
     <!-- <PickupPrint :listItem="queryItem" v-if="isShowPrint" @backListFormDetail="backList" /> -->
   </div>
@@ -745,7 +745,7 @@ export default {
 
     // 点击打印
     async toPrint() {
-      const { data } = this.getNewDetailPrintDisString()
+      const { data } = await this.getNewDetailPrintDisString()
       if (data) {
         this.$confirm(<p class='text'>{data}</p>, '提示', {
           confirmButtonText: '确定',
@@ -759,13 +759,16 @@ export default {
           }
         })
       } else {
-        this.getDateil(this.tableSelection, 'getDtailPrintDis', this.check).then(res => {
-          this.tableSelection = []
-          this.$endLoading()
-          this.$refs.preView.show(this.hiprintTemplate, this.outputData)
-        })
+        this.getOvalDateil()
       }
     },
+    getOvalDateil() {
+      this.getDateil(this.tableSelection, 'getDtailPrintDis', this.check).then(res => {
+        this.tableSelection = []
+        this.$endLoading()
+        this.$refs.preView.show(this.hiprintTemplate, this.outputData)
+      })
+    },
     async getNewDetailPrintDisString() {
       const params = []
       const len = this.tableSelection.length

+ 13 - 1
src/views/supply/pickup/components/design/preview.vue

@@ -39,6 +39,10 @@ export default {
     getNewDetailPrintDisString: {
       type: Function,
       default: null
+    },
+    getOvalDateil: {
+      type: Function,
+      default: null
     }
   },
 
@@ -116,7 +120,15 @@ export default {
           // '调用打印次数接口失败'
           }
         } else {
-          this.myConfirm()
+          this.$confirm('已打印', '提示', {
+            showClose: false,
+            confirmButtonText: '确定',
+            showCancelButton: false,
+            type: 'warning',
+            center: true
+          }).then(() => {
+            this.getOvalDateil()
+          })
         }
       }
     },