lichao před 3 roky
rodič
revize
98ac115eb6

+ 21 - 4
src/components/change-approve/main.vue

@@ -35,8 +35,8 @@
     </el-form>
 
     <span slot="footer" class="dialog-footer">
-      <el-button type="primary" @click="sendHandle">发送</el-button>
-      <el-button @click="closeDialog">取消</el-button>
+      <el-button type="primary" @click="sendHandle" :loading="buttonLoading">发送</el-button>
+      <el-button @click="closeDialog" :loading="buttonLoading">取消</el-button>
     </span>
   </el-dialog>
 </template>
@@ -54,6 +54,10 @@ export default {
     url: {
       type: String
     },
+    routerTag: {
+      type: String,
+      default: ''
+    },
   },
   data() {
     return {
@@ -67,6 +71,7 @@ export default {
         auditUserId: [{required: true, message: " ", trigger: "change"}],
         // messageBody: [{required: true, message: " ", trigger: "blur"}],
       },
+      buttonLoading: false,
     }
   },
   created() {
@@ -89,10 +94,22 @@ export default {
     sendHandle() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          this.buttonLoading = true;
           changeApprove(this.url, {...this.form, id: this.auditId}).then(res => {
+            this.$message.success('修改成功')
             this.closeDialog()
-            this.$router.$avueRouter.closeTag();
-            this.$router.push({path: `/approveData/index`});
+            if (this.routerTag !== '') {
+              this.$router.$avueRouter.closeTag(this.routerTag);
+            }
+            this.$router.$avueRouter.closeTag('/approveData/index');
+            this.$router.push({
+              path: `/approveData/index`,
+              query: {
+                check: 'refresh'
+              },
+            });
+          }).finally(() => {
+            this.buttonLoading = false;
           })
         }
       })

+ 1 - 1
src/views/businessManagement/purchaseOrder/index.vue

@@ -70,7 +70,7 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row,scope.index)"
-            :disabled="scope.row.item.length == 0 || scope.row.createFreight == 1"
+            :disabled="(scope.row.itemsList && scope.row.itemsList.length == 0) || scope.row.createFreight == 1"
           >删除
           </el-button>
         </template>

+ 3 - 0
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -790,6 +790,7 @@
       @closeDialog="closeChangeApprove"
       :auditId="detailData.auditId"
       url="/api/blade-check/auditproecess/changeAuditUser"
+      :routerTag="routerTag"
     />
   </div>
 </template>
@@ -1657,6 +1658,7 @@ export default {
       shopQualityDisable: false, //质量胎切换禁用
       index: 0,
       policyIndex: 0,
+      routerTag: '',
     }
   },
   mounted() {
@@ -1665,6 +1667,7 @@ export default {
       window.onresize = () => {
         this.rowHeight = (window.innerHeight - 130) + 'px'
       }
+      this.routerTag = window.location.hash.slice(1);
     })
   },
   filters: {