xiaohaizhao 2 лет назад
Родитель
Сommit
2d43b2675c

+ 11 - 0
packageA/project/addAndEdit.js

@@ -431,6 +431,17 @@ Page({
         data.county = data.region[2] || "";
         data.tradefields = [data.tradefields];
         data.sa_brandid = data.sa_brandid ? data.sa_brandid[1][0] : 0;
+
+        if (data.scale.length != 0 && data.scale == 0) {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: '项目规模不可为0',
+                icon: "none"
+            })
+            return;
+        }
         delete(data.region);
         _Http.basic({
             "id": 20221020144202,

+ 10 - 1
packageA/publicClue/addClue.js

@@ -333,7 +333,16 @@ Page({
             ...this.data.content,
             ...this.selectComponent("#Form").submit()
         };
-        console.log(content)
+        if (content.scale.length != 0 && content.scale == 0) {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: '项目规模不可为0',
+                icon: "none"
+            })
+            return;
+        }
         content.sat_campaignid = content.campaign_name ? content.campaign_name[1][0] : 0;
         content.city = content.region[1] || "";
         content.county = content.region[2] || "";

+ 10 - 0
packageA/saleAdmin/insert.js

@@ -566,6 +566,16 @@ Page({
         content.province = content.region[0] || "";
         delete(content.region)
         delete(content.campaign_name)
+        if (content.scale.length != 0 && content.scale == 0) {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: '项目规模不可为0',
+                icon: "none"
+            })
+            return;
+        }
         _Http.basic({
             "id": "20221205162402",
             content

+ 12 - 0
packageA/saleClue/addClue.js

@@ -312,6 +312,18 @@ Page({
             ...this.data.content,
             ...this.selectComponent("#Form").submit()
         };
+
+        if (content.scale.length != 0 && content.scale == 0) {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: '项目规模不可为0',
+                icon: "none"
+            })
+            return;
+        }
+
         content.sat_campaignid = content.campaign_name ? content.campaign_name[1][0] : 0;
         content.city = content.region[1] || "";
         content.county = content.region[2] || "";

+ 11 - 0
packageA/saleClue/change.js

@@ -267,6 +267,17 @@ Page({
         content.city = content.region[1] || "";
         content.county = content.region[2] || "";
         content.province = content.region[0] || "";
+
+        if (content.scale.length != 0 && content.scale == 0) {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: '项目规模不可为0',
+                icon: "none"
+            })
+            return;
+        }
         _Http.basic({
             "id": "20221124154902",
             content