zhaoxiaohai hace 3 años
padre
commit
4f78c2be5c

+ 1 - 1
pages/submission/details.js

@@ -6,7 +6,7 @@ Page({
      */
     data: {
         detailsData: {}, //详情数据
-        butText: false, //底部按钮文本
+        butText: "", //底部按钮文本
         content: "", //提交内容
         loading: false, //按钮加载状态
         recordL: {}, //记录

+ 2 - 1
pages/submission/details.json

@@ -1,6 +1,7 @@
 {
     "navigationBarTitleText": "提报详情",
     "usingComponents": {
-        "My_accessory":"/components/My_accessory/index"
+        "My_accessory": "/components/My_accessory/index",
+        "My_upload": "/components/My_upload/index"
     }
 }

+ 17 - 0
pages/submission/details.scss

@@ -87,4 +87,21 @@
         font-weight: bold;
         color: #FFFFFF;
     }
+}
+
+/* 上传按钮样式 */
+.uploadStyle {
+    width: 690rpx;
+    height: 90rpx;
+    line-height: 90rpx;
+    text-align: center;
+    color: var(--assist);
+    background-color: #ffffff;
+    margin-top: 30rpx;
+    font-size: 24rpx;
+    font-family: PingFang SC-Regular, PingFang SC;
+
+    .iconfont {
+        margin-right: 5rpx;
+    }
 }

+ 8 - 6
pages/submission/details.wxml

@@ -5,7 +5,6 @@
     <view class="title" style="margin-top: 30rpx;">附件下载</view>
     <My_accessory />
 </view>
-
 <!-- 提报记录 -->
 <block wx:if="{{butText=='开始提报'}}">
     <view class="box" style="background: none;">
@@ -20,17 +19,21 @@
     </view>
     <My_empty wx:if="{{!detailsData.submitedit.length}}" />
 </block>
-
 <!-- 开始提报 -->
 <view class="box" wx:elif="{{butText=='保存'}}" style="background: none;">
     <view class="title multi-line">提报内容</view>
     <textarea class="textarea" placeholder="请输入提报内容" bindinput="textareaInput" />
     <view class="title multi-line">提报附件<text>已上传2个</text></view>
-    <My_accessory />
+    <My_accessory butType="删除" />
+    <My_upload>
+        <navigator class="uploadStyle" url="#">
+            <text class="iconfont icon-a-tuiguangsucaishangchuan1" />
+            上传附件
+        </navigator>
+    </My_upload>
 </view>
-
 <!-- 提报详情 -->
-<view class="box" wx:else style="background: none;">
+<view class="box" wx:elif="{{butText=='false'}}" style="background: none;">
     <view class="title multi-line">提报内容</view>
     <view class="history" style="margin-bottom: 30rpx;">
         {{recordL.content}}
@@ -38,7 +41,6 @@
     <view class="title multi-line">提报附件<text>已上传2个</text></view>
     <My_accessory />
 </view>
-
 <view class="footer" wx:if="{{butText!='false'}}">
     <van-button round custom-class='button' loading='{{loading}}' disabled="{{butText=='保存'&&content==''||loading}}" bindtap="toDetails">{{butText}}</van-button>
 </view>

+ 9 - 4
pages/submission/index.js

@@ -104,15 +104,20 @@ Page({
         detail
     }) {
         this.setData({
-            value1: detail,
-            timeRangeShow: detail == "查看范围" ? true : false
+            value1: detail
         })
     },
+    Dateclick(e) {
+        setTimeout(() => {
+            if (this.data.value1 == '查看范围') this.setData({
+                timeRangeShow: true
+            })
+        }, 100)
+    },
     /* 排序 */
     dropdownChange2({
         detail
     }) {
-        console.log(detail)
         this.setData({
             value2: detail
         })
@@ -169,7 +174,7 @@ Page({
         item.oneToOne = this.data.activeIndex === 0;
         wx.navigateTo({
             url: './details?type=开始提报&item=' + JSON.stringify(item),
-        })/* 开始提报 */
+        }) /* 开始提报 */
     },
     /**
      * 生命周期函数--监听页面初次渲染完成

+ 1 - 1
pages/submission/index.wxml

@@ -4,7 +4,7 @@
     <!-- <van-tab title="提报管理" /> -->
 </van-tabs>
 <van-dropdown-menu active-color='var(--assist)' class="dropdown">
-    <van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bindchange='dropdownChange1' />
+    <van-dropdown-item value="{{ value1 }}" options="{{ option1 }}" bindchange='dropdownChange1' bindtap="Dateclick" />
     <van-dropdown-item value="{{ value2 }}" options="{{ option2 }}" bindchange='dropdownChange2' />
 </van-dropdown-menu>
 <My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>