浏览代码

修改bug

zhanghongrui 2 年之前
父节点
当前提交
15db48eb02

+ 1 - 1
app.wxss

@@ -71,7 +71,7 @@ page{
   /* 列表 */
   .list_vi{
     margin: 40rpx 30rpx 20rpx 30rpx;
-    /* height:101vh; */
+     height:101vh; 
   }
   .list_vi2{
     margin: 40rpx 30rpx 20rpx 30rpx;

+ 1 - 1
base/httputil.js

@@ -1,6 +1,6 @@
 // let BASE_Server = "http://127.0.0.1:8329"
     //let BASE_Server = "https://192.168.1.100:18080"
-let BASE_Server = "https://sookajs.top:18080"
+let BASE_Server = "https://sookajs.top:28080"
 
 
 

+ 2 - 1
pages/details/details.wxml

@@ -72,11 +72,12 @@
         <i>{{enterpriseDetails.headSecurityPhone}}</i>
       </view>
     
-      <text class="xungengdian" bindtap="xungengList"> 巡更点</text>
+       <text class="xungengdian" bindtap="xungengList"> 巡更点</text> 
      
     </view>
 
     <!-- 巡检悬浮按钮 -->
     <view class="float_btn" bindtap="bindViewXunJian">检</view>
+  
   </view>
 </view>

+ 2 - 0
pages/details/details.wxss

@@ -54,6 +54,7 @@ word-wrap:break-word
   display: none;
 }
 .xungengdian{
+  margin-bottom: 50rpx;
   display: flex;
  
   align-items: center;
@@ -64,3 +65,4 @@ word-wrap:break-word
   color:blue;
 }
 
+

+ 4 - 0
pages/material/material.js

@@ -49,6 +49,10 @@ Page({
           title: '暂无更多数据',
           icon: "none"
         })
+        that.setData({
+          hidden: true,
+          loadingData: false
+        });
       }
       if (this.data.isRefresh) {
         this.setData({

+ 2 - 1
pages/material/material.wxml

@@ -26,10 +26,11 @@
   
       <i class="iconfont icon-xiangyou list_right"></i>
     </view>
-</view>
+
     <view class='data-loading' hidden='{{hidden}}'>
     数据加载中...
   </view>
+</view>
     </view>
 
     

+ 41 - 27
pages/qiyemore/qiyemore.js

@@ -4,7 +4,7 @@ const app = getApp()
 Page({
 
   onLoad() {
-   // console.log("@@","load")
+    // console.log("@@","load")
     //this.getLocation()
   },
 
@@ -19,7 +19,7 @@ Page({
       latitude: Number,
       businessName: '',
       orgCode: '',
-      enterpriseCode:'',
+      enterpriseCode: '',
       officeAddress: '',
       businessAddress: '',
       supervisor: '',
@@ -69,22 +69,22 @@ Page({
   //----------------------------------------------------------------------------
 
 
-  saoyisao(){
+  saoyisao() {
 
     wx.scanCode({
-      onlyFromCamera: true,
+      onlyFromCamera: true,
       success: (res) => {
 
-        console.log("$$$",res);
-       //this.data.form.qrCode=res.result
-       this.setData({
-        ['form.enterpriseCode']:  res.result
-       })
-    
-          
+        console.log("$$$", res);
+        //this.data.form.qrCode=res.result
+        this.setData({
+          ['form.enterpriseCode']: res.result
+        })
+
+
+
+
 
-        
-      
 
       },
 
@@ -92,7 +92,7 @@ Page({
 
         wx.showToast({
           title: '扫描失败请手动输入',
-          icon:'none'
+          icon: 'none'
         })
 
       }
@@ -101,10 +101,24 @@ Page({
   },
 
   addEnterprise(e) {
-   console.log("###1",this.data.form.enterpriseCode)
-   console.log("@@@1",this.data)
+    console.log("###1", this.data.form.enterpriseCode)
+
+    if (isNaN(this.data.form.latitude) || isNaN(this.data.form.longitude)) {
+      wx.showToast({
+        title: '请点击获取当前位置',
+        icon: 'none'
+      })
+      return
+    }
+    if(this.data.form.mainPersonPhone==null||this.data.form.mainPersonPhone==''){
+      wx.showToast({
+        title: '请输入主要负责人电话',
+        icon:'none'
+      })
+      return
+    }
     let obj = new Object()
-    obj.enterpriseCode=this.data.form.enterpriseCode
+    obj.enterpriseCode = this.data.form.enterpriseCode
     obj.latitude = this.data.form.latitude
     obj.longitude = this.data.form.longitude
     obj.businessName = this.data.form.businessName
@@ -117,17 +131,17 @@ Page({
     obj.mainPersonPhone = this.data.form.mainPersonPhone
     obj.headSecurity = this.data.form.headSecurity
     obj.headSecurityPhone = this.data.form.headSecurityPhone
-console.log("@@@@",obj)
-    http.post("/system/AppEnterpriseController/addEnterprise", obj, this.addEnterpriseSuccess)
+    console.log("@@@@", obj)
+     http.post("/system/AppEnterpriseController/addEnterprise", obj, this.addEnterpriseSuccess)
   },
   addEnterpriseSuccess(e) {
     wx.showToast({
       title: e.msg,
-      icon: "none" 
+      icon: "none"
     })
-    if(e.code == 200){
+    if (e.code == 200) {
       // wx.navigateTo({
-        // url: '../qiye/qiye',
+      // url: '../qiye/qiye',
       // })
       wx.navigateBack()
     }
@@ -142,10 +156,10 @@ console.log("@@@@",obj)
       success: function (res) {
         that.setData({
 
-           ['form.longitude']:  res.longitude,
-           ['form.latitude']:  res.latitude
-          
-          
+          ['form.longitude']: res.longitude,
+          ['form.latitude']: res.latitude
+
+
         })
       },
     })
@@ -169,7 +183,7 @@ console.log("@@@@",obj)
    * 生命周期函数--监听页面显示
    */
   onShow() {
-   
+
   },
 
   /**

+ 3 - 3
pages/qiyemore/qiyemore.wxml

@@ -51,15 +51,15 @@
     </view>
     <view class="input_vi">
       <view class="input_title">负责人电话</view>
-      <input bindinput="get_mainPersonPhone" class="inp_txt" placeholder="请输入负责人电话" />
+      <input bindinput="get_mainPersonPhone" type="number" placeholder="请输入负责人电话" maxlength="13"/>
     </view>
     <view class="input_vi">
       <view class="input_title">安全负责人</view>
-      <input bindinput="get_headSecurity" class="inp_txt" placeholder="请输入安全负责人电话" />
+      <input bindinput="get_headSecurity" class="inp_txt" placeholder="请输入安全负责人" />
     </view>
     <view class="input_vi">
       <view class="input_title">负责人电话</view>
-      <input bindinput="headSecurityPhone" class="inp_txt" placeholder="请输入负责人电话" />
+      <input bindinput="headSecurityPhone" type="number" placeholder="请输入安全负责人电话" maxlength="13"/>
     </view>
   </view>
   <button type="primary" class="tj_btn" bindtap="addEnterprise">提交</button>

+ 7 - 0
pages/qiyexqtable/qiyexqtable.js

@@ -78,6 +78,13 @@ Page({
   //------------------------------------------
 
   updateEnterprise() {
+    if(this.data.enterpriseDetails.mainPersonPhone==null||this.data.enterpriseDetails.mainPersonPhone==''){
+      wx.showToast({
+        title: '请输入主要负责人电话',
+        icon:'none'
+      })
+      return
+    }
     let obj = new Object();
     obj.busEnterpriseId = this.data.enterpriseDetails.busEnterpriseId
     obj.businessName = this.data.enterpriseDetails.businessName

+ 2 - 2
pages/qiyexqtable/qiyexqtable.wxml

@@ -44,7 +44,7 @@
     </view>
     <view class="input_vi">
       <view class="input_title">负责人电话</view>
-      <input class="inp_txt" bindinput="get_mainPersonPhone" value="{{enterpriseDetails.mainPersonPhone}}" />
+      <input type="number" maxlength="13" bindinput="get_mainPersonPhone" value="{{enterpriseDetails.mainPersonPhone}}" />
     </view>
     <view class="input_vi">
       <view class="input_title">安全负责人</view>
@@ -52,7 +52,7 @@
     </view>
     <view class="input_vi">
       <view class="input_title">负责人电话</view>
-      <input class="inp_txt" bindinput="headSecurityPhone" value="{{enterpriseDetails.headSecurityPhone}}" />
+      <input type="number" maxlength="13" bindinput="headSecurityPhone" value="{{enterpriseDetails.headSecurityPhone}}" />
     </view>
   </view>
 

+ 1 - 1
pages/search/search.wxml

@@ -2,7 +2,7 @@
   <!-- 搜索 -->
   <view class="search-container">
     <view class="search-left">
-      <input type="text" bindinput="searchEnterprise" placeholder="搜索" value="{{enterpriseCode}}" />
+      <input type="text" bindinput="searchEnterprise" placeholder="请输入企业名称" />
     </view>
     <button bindtap="bindViewSearchCode" class="search-right">
       <text class="iconfont icon-saoyisao1"></text>

+ 5 - 1
pages/teamlist/teamlist.js

@@ -50,7 +50,11 @@ if(res.code==200){
         title: '暂无更多数据',
         icon:"none"
       })
-      wx.hideLoading()
+      that.setData({
+        hidden: true,
+        loadingData: false
+      });
+    
     }
     if (this.data.isRefresh) {
       this.setData({

+ 2 - 1
pages/teamlist/teamlist.wxml

@@ -26,10 +26,11 @@
   
       <i class="iconfont icon-xiangyou list_right"></i>
     </view>
-</view>
+
     <view class='data-loading' hidden='{{hidden}}'>
     数据加载中...
   </view>
+</view>
     </view>
 
 

+ 1 - 1
pages/warehouselist/details/warehouse_details.json

@@ -7,7 +7,7 @@
 
   "navigationBarBackgroundColor": "#f94b0e",
   "navigationBarTextStyle": "white",
-  "navigationBarTitleText": "队伍详情"
+  "navigationBarTitleText": "仓库详情"
 
 }
 

+ 4 - 1
pages/warehouselist/warehouselist.js

@@ -67,7 +67,10 @@ Page({
           title: '暂无更多数据',
           icon: "none"
         })
-        wx.hideLoading()
+        that.setData({
+          hidden: true,
+          loadingData: false
+        });
       }
       if (this.data.isRefresh) {
         this.setData({

+ 2 - 1
pages/warehouselist/warehouselist.wxml

@@ -26,10 +26,11 @@
       </view>
       <i class="iconfont icon-xiangyou list_right"></i>
     </view>
-</view>
+
     <view class='data-loading' hidden='{{hidden}}'>
     数据加载中...
   </view>
+</view>
     </view>
 
     

+ 7 - 0
pages/warehouselist/warehouselist.wxss

@@ -60,3 +60,10 @@ word-wrap:break-word
 .fl_ri{
   margin-left: auto;
 }
+.data-loading {
+  height: 100rpx;
+  line-height: 100rpx;
+  background-color: #fff;
+  text-align: center;
+  font-size: 14px;
+}