zhouhao пре 2 година
родитељ
комит
bad448d8af

+ 1 - 0
src/mixin/print.js

@@ -238,6 +238,7 @@ export default {
         this.clonelData = []
         this.$errorMsg('添加打印次数失败' + JSON.stringify(requestParams))
       }
+      return Promise.resolve()
     },
     /**
      * 设置纸张大小

+ 10 - 7
src/views/supply/deliver/components/design/preview.vue

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

+ 21 - 14
src/views/supply/pickup/check.vue

@@ -67,7 +67,8 @@
                   type="primary"
                   @click="getCode"
                   :disabled="!screenForm.phone || countDown != 60"
-                  >{{ countDown == 60 ? getCodeText : '重新获取(' + countDown + 's)' }}</el-button
+                >{{ countDown == 60 ? getCodeText : '重新获取(' + countDown + 's)' }}
+                </el-button
                 >
               </el-col>
               <el-col :xs="24" :sm="8" :lg="8">
@@ -81,7 +82,8 @@
                   type="primary"
                   :disabled="!screenForm.phone || !screenForm.code"
                   @click="getPickupManInfo"
-                  >确 认</el-button
+                >确 认
+                </el-button
                 >
               </el-col>
             </el-row>
@@ -147,8 +149,9 @@
               <el-form-item prop="status" label-width="0">
                 <el-radio-group v-model="screenForm.status" size="mini" @change="getList()">
                   <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{
-                    item.label
-                  }}</el-radio-button>
+                      item.label
+                    }}
+                  </el-radio-button>
                 </el-radio-group>
               </el-form-item>
             </el-col>
@@ -248,13 +251,13 @@
                   "
                 />
                 <span>{{
-                  scope.row.orderType === 'TRADE' ||
-                  scope.row.orderType === 'HOME' ||
-                  scope.row.orderType === 'REQUISITION_TRADE' ||
-                  scope.row.orderType === 'REQUISITION_HOME'
-                    ? scope.row.enginOrderNo
-                    : scope.row.mainOrderId
-                }}</span>
+                    scope.row.orderType === 'TRADE' ||
+                    scope.row.orderType === 'HOME' ||
+                    scope.row.orderType === 'REQUISITION_TRADE' ||
+                    scope.row.orderType === 'REQUISITION_HOME'
+                      ? scope.row.enginOrderNo
+                      : scope.row.mainOrderId
+                  }}</span>
               </template>
             </el-table-column>
             <el-table-column align="left" label="发货申请单号" prop="invoiceId" min-width="130" show-overflow-tooltip>
@@ -366,7 +369,8 @@
             @click="toPrint"
             :disabled="tableSelection.length < 1"
             v-if="$checkBtnRole('print', $route.meta.roles)"
-            >打印发货单</el-button
+          >打印发货单
+          </el-button
           >
         </div>
       </div>
@@ -434,6 +438,7 @@ import { getDealerList, getListCustomer } from '@/api/basic_data/dealer'
 import PickupPrint from '@/views/supply/pickup/components/pickup_print'
 
 import printPreview from './components/design/preview.vue'
+
 export default {
   components: {
     PickupPrint,
@@ -654,7 +659,7 @@ export default {
       }
       this.listLoading = true
 
-      let params = {
+      const params = {
         pageNum: this.currentPage,
         pageSize: 200,
         // takerId: this.screenForm.manId,
@@ -708,7 +713,7 @@ export default {
     // 检查是否一致
     isAllEqual(array) {
       if (array.length > 0) {
-        return !array.some(function (item, index) {
+        return !array.some(function(item, index) {
           return item.informationKey !== array[0].informationKey
         })
       } else {
@@ -785,12 +790,14 @@ export default {
   height: 60px;
   border-bottom: 1px solid #dcdfe6;
   margin-bottom: 20px;
+
   .title {
     font-size: 16px;
     font-weight: 600;
     padding-left: 10px;
   }
 }
+
 .text {
   word-break: break-all !important;
   height: 200px;

+ 8 - 6
src/views/supply/pickup/components/design/preview.vue

@@ -75,7 +75,13 @@ export default {
           callback: async() => {
             try {
               if (typeof this.$parent.addPrint === 'function') {
-                this.$parent.addPrint('getDtailPrintDis')
+                this.$parent.addPrint('getDtailPrintDis').then(() => {
+                  setTimeout(() => {
+                    console.error('更新发货汇总列表')
+                    this.$parent.getList()
+
+                  }, 2000)
+                })
               } else {
                 throw new Error('加载失败,刷新重试')
               }
@@ -85,11 +91,7 @@ export default {
             }
             this.hiprintTemplate = {}
             this.$parent.tableSelection = []
-            console.log(222)
-            this.$parent.getList()
-            setTimeout(() => {
-              console.error('更新发货汇总列表')
-            }, 1000)
+
           }
         }
       )