Browse Source

【修改】调整

howie 2 năm trước cách đây
mục cha
commit
54f47dd21a

+ 9 - 2
src/views/supply/deliver/components/design/preview.vue

@@ -78,15 +78,22 @@ export default {
         {
           callback: async () => {
             try {
-              await this.$parent.addPrint('addPrints')
+              if (typeof this.$parent.addPrint === 'function') {
+                await this.$parent.addPrint('addPrints')
+              } else {
+                throw new Error('加载失败,刷新重试')
+              }
             } catch (e) {
-              console.log('调用打印次数接口失败')
+              this.$errorMsg(e)
+              // '调用打印次数接口失败'
             }
+
             this.hiprintTemplate = {}
             this.$parent.tableSelection = []
             await this.$parent.getList()
             setTimeout(() => {
               console.error('更新发货汇总列表')
+              // this.$successMsg('更新成功')
             }, 1000)
           }
         }

+ 7 - 2
src/views/supply/pickup/components/design/preview.vue

@@ -72,9 +72,14 @@ export default {
         {
           callback: async () => {
             try {
-              await this.$parent.addPrint('getDtailPrintDis')
+              if (typeof this.$parent.addPrint === 'function') {
+                await this.$parent.addPrint('getDtailPrintDis')
+              } else {
+                throw new Error('加载失败,刷新重试')
+              }
             } catch (e) {
-              console.log('调用打印次数接口失败')
+              this.$errorMsg(e)
+              // '调用打印次数接口失败'
             }
             this.hiprintTemplate = {}
             this.$parent.tableSelection = []