Browse Source

fix: 新增提交事件

zhangyuhan 3 years ago
parent
commit
9ad537bc14

+ 6 - 1
src/web/staticres/common-module/pc-dialog/js/leave-info-dialog.js

@@ -445,6 +445,7 @@ var vm = new Vue({
           var result = checkRequiredKeys(checkKeys, res.info)
           if (result) {
             callback && callback()
+            _this.formAjax(_this.source, res.info)
           } else if (res.data) {
             _this.isForce = res.data.fource
             if (res.data.retainedCapital) {
@@ -488,7 +489,7 @@ var vm = new Vue({
       });
     },
     // 表单提交请求
-    formAjax: function(source) {
+    formAjax: function(source, info) {
       var params = {
         source: source,
         name: this.form.name,
@@ -500,6 +501,10 @@ var vm = new Vue({
         agree: true, // 原来留资模块的同意协议字段,,,默认传一个true 方便后端处理
         branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 || !this.form.job ? '' : this.form.branch
       }
+      if (info) {
+        params = info
+        params.source = source
+      }
       var _this = this
       $.ajax({
         type:'POST',

+ 6 - 1
src/web/staticres/frontRouter/pc/solution/js/pc-collect-solution-info.js

@@ -337,6 +337,7 @@ var vmSolution = new Vue({
           var result = checkRequiredKeys(checkKeys, res.info)
           if (result) {
             callback && callback()
+            _this.formAjax(_this.source, res.info)
           } else if (res.data) {
             _this.isForce = res.data.fource
             window.isRetained = res.data.retainedCapital
@@ -379,7 +380,7 @@ var vmSolution = new Vue({
       });
     },
     // 表单提交请求
-    formAjax: function(source) {
+    formAjax: function(source, info) {
       var params = {
         source: source,
         name: this.form.name,
@@ -389,6 +390,10 @@ var vmSolution = new Vue({
         position: this.form.job == '其他' ? ('其他/' + this.form.otherJob) : this.form.job,
         branch: this.form.branch.indexOf('总裁') > -1 || this.form.branch.indexOf('总经理') > -1 || !this.form.job?  '' : this.form.branch
       }
+      if (info) {
+        params = info
+        params.source = source
+      }
       var _this = this
       $.ajax({
         type:'POST',

+ 7 - 1
src/web/staticres/js/pc-collect-partner-info.js

@@ -267,6 +267,7 @@ var vmPartner = new Vue({
           var result = checkRequiredKeys(checkKeys, res.info)
           if (result) {
             callback && callback()
+            _this.formAjax(_this.source, res.info)
           } else if (res.data) {
             _this.isForce = res.data.fource
             window.isRetained = res.data.retainedCapital
@@ -310,7 +311,7 @@ var vmPartner = new Vue({
       });
     },
     // 表单提交请求
-    formAjax: function(source) {
+    formAjax: function(source, info) {
       var params = {
         source: source,
         name: this.form.name,
@@ -318,6 +319,11 @@ var vmPartner = new Vue({
         company: this.form.companyName, // 公司名称
         platform: "pc",
       }
+      if (info) {
+        params = info
+        params.platform = 'pc'
+        params.source = source
+      }
       var _this = this
       $.ajax({
         type:'POST',