瀏覽代碼

销售线索跟进调整

qymljy 6 月之前
父節點
當前提交
33700ae15a
共有 1 個文件被更改,包括 19 次插入10 次删除
  1. 19 10
      src/SManagement/orderclue_detail/components/editFollow.vue

+ 19 - 10
src/SManagement/orderclue_detail/components/editFollow.vue

@@ -158,6 +158,7 @@ export default {
     followAction () {
       this.$refs.ruleForm.validate(async val => {
         if (!val) return
+        this.loading = true
         this.param.sat_orderclueid = this.detailInfo.sat_orderclueid
         this.param.createdate = this.timer
         this.param.createdate = `${this.timer.getFullYear()}-${this.timer.getMonth() + 1}-${this.timer.getDate()} ${this.timer.getHours()}:${this.timer.getMinutes()}:${this.timer.getSeconds()}`
@@ -165,17 +166,25 @@ export default {
           "id":20221208100602,
           "content": this.param
         })
-        this.bindData = {
-          "ownertable": 'sat_ordercluefollowuplog',
-          "ownerid": res.data.sat_ordercluefollowuplogid,
-          "usetype": 'default',
-        }
-        this.loading = true
-        this.$refs['upload'].toUpload(() => {
+        if (res.code == 0){
           this.loading = false
-          this.$emit('onSuccess')
-          this.dialogVisible = false
-        })
+          this.tool.showMessage(res,()=>{})
+        }else {
+          this.tool.showMessage(res,()=>{
+            this.bindData = {
+              "ownertable": 'sat_ordercluefollowuplog',
+              "ownerid": res.data.sat_ordercluefollowuplogid,
+              "usetype": 'default',
+            }
+            this.loading = false
+            this.$refs['upload'].toUpload(() => {
+              this.loading = false
+              this.$emit('onSuccess')
+              this.dialogVisible = false
+            })
+          })
+        }
+
       })
     },
     onSuccess () {