Pārlūkot izejas kodu

fix: loading 判断错了

zh 2 gadi atpakaļ
vecāks
revīzija
93250ca2bd

+ 2 - 1
src/views/supply/engin/components/commerce_form.vue

@@ -1035,7 +1035,6 @@ export default {
 
     // 保存 / 提交审核
     clickSubmitForm(type) {
-      this.btnLoading = true
       this.$refs.mainForm.validate(valid => {
         if (valid) {
           if (this.goodsList.length < 1) {
@@ -1104,6 +1103,8 @@ export default {
             isPlanOrder: this.isPlanOrder,
             items: goodsList
           }
+          this.btnLoading = true
+
           if (type === 1) {
             if (this.listItem) {
               editCom(params).then(res => {

+ 1 - 1
src/views/supply/policy/components/retail_form.vue

@@ -1896,7 +1896,6 @@ export default {
     },
     // 保存
     clickSubmitForm() {
-      this.btnLoading = true
       this.$refs.mainForm.validate(valid => {
         if (valid) {
           // let mainName =
@@ -1934,6 +1933,7 @@ export default {
             fileNo: this.mainForm.fileNum
           }
           console.log(params, this.policyConditionId)
+          this.btnLoading = true
           if (this.listItem) {
             params.id = this.listItem.id
             editData(params).then(res => {

+ 2 - 1
src/views/supply/retail/components/retail_form.vue

@@ -1090,7 +1090,6 @@ export default {
 
     // 保存
     clickSubmitForm() {
-      this.btnLoading = true
       this.$refs.mainForm.validate(valid => {
         if (valid) {
           for (let i = 0; i < this.goodsList.length; i++) {
@@ -1134,6 +1133,8 @@ export default {
             type: 1, // 1:普通零售单,2:政策零售单
             retailOrderItemList: goodsList
           }
+          this.btnLoading = true
+
           if (this.listItem) {
             params.id = this.listItem.id
             editData(params).then(res => {