浏览代码

物资列表

menc 2 年之前
父节点
当前提交
8742bc9286

+ 2 - 2
app.json

@@ -21,9 +21,9 @@
     "pages/xunjian/xunjian",
     "pages/xunjiancz/xunjiancz",
     "pages/qianming/qianming",
-    "pages/xunjianmore/xunjianmore"
+    "pages/xunjianmore/xunjianmore",
+    "pages/material/material"
   ],
-
   "requiredPrivateInfos": [
     "getLocation"
   ],

+ 29 - 2
pages/details/details.js

@@ -7,9 +7,11 @@ Page({
 
   onLoad(e) {
     this.data.busEnterpriseId = e.busEnterpriseId
+  },
+  onShow(){
+    console.log("TAG","onShow")
     this.getEnterpriseDetails()
   },
-
   data: {
     host: app.globalData.host,
     busEnterpriseId: null,
@@ -107,5 +109,30 @@ Page({
       url: '../qiyexqtable/qiyexqtable?busEnterpriseId='+this.data.busEnterpriseId,
     })
     },
-
+    bindViewQiYeDelete(){
+        wx.showModal({
+          title: '提示',
+          content: '确认删除企业?',
+          complete: (res) => {
+            if (res.cancel) {
+              
+            }else {
+              this.deleteEnterprise()
+            }
+          }
+        })
+    },
+    deleteEnterprise() {
+      let obj = new Object();
+      obj.busEnterpriseId = this.data.busEnterpriseId
+      http.post("/system/AppEnterpriseController/deleteEnterprise", obj, this.deleteEnterpriseSuccess)
+    },
+    deleteEnterpriseSuccess(res) {
+      wx.showToast({
+        title: res.msg,
+      })
+      if(res.code == 200){
+        wx.navigateBack()
+      }
+    },
 })

+ 5 - 1
pages/details/details.wxml

@@ -1,8 +1,12 @@
+<!-- 企业详情页面 -->
 <view class="container">
   <view class="map">
     <map longitude="{{enterpriseDetails.longitude}}" latitude="{{enterpriseDetails.latitude}}" scale="17" markers="{{markers}}" bindmarkertap="navRoad" data-marker="{{markers[0]}}" show-location />
 
-    <view class="map_btn"><text class="iconfont icon-wenjianguanli" bindtap="bindViewXunChaJiLu"></text><text class="iconfont icon-icon-test" bindtap="bindViewQiYeXiangQingTable"></text>
+    <view class="map_btn">
+    <text class="iconfont icon-wenjianguanli" bindtap="bindViewXunChaJiLu"></text>
+    <text class="iconfont icon-icon-test" bindtap="bindViewQiYeXiangQingTable"></text>
+    <text class="iconfont icon-pinleishanchu" bindtap="bindViewQiYeDelete"></text>
     </view>
 
 

+ 6 - 6
pages/index/index.js

@@ -59,9 +59,9 @@ Page({
 
   // 待办跳转
   bindViewDaiBan() {
-    wx.navigateTo({
-      url: '../daiban/daiban'
-    })
+    // wx.navigateTo({
+      // url: '../daiban/daiban'
+    // })
   },
   // 企业跳转
   bindViewQiYe() {
@@ -89,9 +89,9 @@ Page({
   },
   //巡检跳转
   bindViewXunJian() {
-    wx.navigateTo({
-      url: '../xunjian/xunjian',
-    })
+    // wx.navigateTo({
+      // url: '../xunjian/xunjian',
+    // })
   },
   // 使用攻略跳转
   bindViewIntroduction() {

+ 66 - 0
pages/material/material.js

@@ -0,0 +1,66 @@
+// pages/material/material.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    dataList:[],
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+    getDataList();
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 11 - 0
pages/material/material.json

@@ -0,0 +1,11 @@
+{
+  "component": true, 
+  "usingComponents": {
+  },
+
+
+  "navigationBarBackgroundColor": "#f94b0e",
+  "navigationBarTextStyle": "white",
+  "navigationBarTitleText": "物资"
+
+}

+ 24 - 0
pages/material/material.wxml

@@ -0,0 +1,24 @@
+<!--pages/material/material.wxml-->
+<!-- 物资列表页面 -->
+<view class="container">
+  <!-- 搜索 -->
+  <view class="search-container">
+    <view class="search-left">
+      <input type="text" bindtap="bindViewSearchEnd" placeholder="搜索" />
+    </view>
+    <button bindtap="bindViewSearchEnd" class="search-right">
+      <text class="iconfont icon-sousuo"></text>
+    </button>
+  </view>
+  <!-- 列表 -->
+  <view class="list_vi">
+    <view class="list_li" bindtap="bindViewDetails" wx:for="{{enterpriseList}}" wx:key="index" data-enterpriseid="{{item.busEnterpriseId}}">
+      <i class="list_icon iconfont icon-queding" wx:if="{{item.riskCount == 0}}"></i>
+      <i class="list_icon iconfont icon-yingjipingtai" wx:if="{{item.riskCount > 0}}"></i>
+      <text>{{item.businessName}}</text>
+      <i class="iconfont icon-xiangyou list_right"></i>
+    </view>
+
+  </view>
+    
+</view>

+ 35 - 0
pages/material/material.wxss

@@ -0,0 +1,35 @@
+/* pages/material/material.wxss */.qy_con {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+  text-align: center;
+  margin: 30rpx 30rpx;
+}
+
+.qy_con view {
+  height: 140rpx;
+  color: #fff;
+  display: flex;
+  flex-direction: column;
+  padding: 15rpx 40rpx;
+  position: relative;
+}
+
+.qy_con view image {
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 100%;
+  z-index: -1;
+}
+
+.qy_con view h2 {
+  font-size: 58rpx;
+  font-weight: bolder;
+  padding-top: 10rpx;
+}
+
+.qy_con view p {
+  font-size: 35rpx;
+}

+ 5 - 1
pages/qiye/qiye.js

@@ -6,7 +6,11 @@ Page({
    * 组件的初始数据
    */
   onLoad() {
-    this.initQiyePage()
+  
+  },
+  onShow(){
+    console.log("TAG","onShow");
+  this.initQiyePage()
   },
   data: {
     host: app.globalData.host,

+ 1 - 0
pages/qiye/qiye.wxml

@@ -1,3 +1,4 @@
+<!-- 企业列表页面 -->
 <view class="container">
   <!-- 搜索 -->
   <view class="search-container">

+ 4 - 3
pages/qiyemore/qiyemore.js

@@ -88,9 +88,10 @@ Page({
       icon: "none" 
     })
     if(e.code == 200){
-      wx.navigateTo({
-        url: '../qiye/qiye',
-      })
+      // wx.navigateTo({
+        // url: '../qiye/qiye',
+      // })
+      wx.navigateBack()
     }
   },
 

+ 1 - 0
pages/qiyemore/qiyemore.wxml

@@ -1,4 +1,5 @@
 <!--pages/qiyemore/qiyemore.wxml-->
+<!-- 企业新增页面 -->
 <view class="container">
   <view class="page-section">
     <view class="input_vi">

+ 4 - 3
pages/qiyexqtable/qiyexqtable.js

@@ -96,9 +96,10 @@ Page({
       title: res.msg,
     })
     if(res.code == 200){
-      wx.navigateTo({
-        url: '../details/details?busEnterpriseId=' + this.busEnterpriseId,
-      })
+      wx.navigateBack()
+      // wx.navigateTo({
+        // url: '../details/details?busEnterpriseId=' + this.busEnterpriseId,
+      // })
     }
   },
   deleteEnterprise() {

+ 2 - 1
pages/qiyexqtable/qiyexqtable.wxml

@@ -1,4 +1,5 @@
 <!--pages/qiyexqtable/qiyexqtanle.wxml-->
+<!-- 企业编辑页面 -->
 <view class="container">
   <view class="page-section">
     <view class="input_vi">
@@ -56,7 +57,7 @@
   </view>
 
   <view class="table_btn">
-    <button type="warn" class="sc_btn" bindtap="deleteEnterprise">删除</button>
+    <!-- <button type="warn" class="sc_btn" bindtap="deleteEnterprise">删除</button> -->
 
     <button type="primary" class="tj_btn" bindtap="updateEnterprise">提交</button>
   </view>

+ 3 - 3
pages/search/search.js

@@ -13,9 +13,9 @@ Page({
   },
   // 搜索结果跳页
   bindViewSearchEnd() {
-    wx.navigateTo({
-      url: '../search/search'
-    })
+    // wx.navigateTo({
+      // url: '../search/search'
+    // })
   },
   // 企业详细页
   bindViewDetails(e) {