QAQ 陈 4 months ago
parent
commit
38c2223744

+ 1 - 0
app.js

@@ -105,6 +105,7 @@ App({
       feedback: baseIp+  '/wechat/registration/feedback',//投诉建议
       mineRepair: baseIp+  '/wechat/mine/repair',//报修登记
       mineFeedback: baseIp+  '/wechat/mine/feedback',//投诉建议
+      paymentList: baseIp+  '/wechat/payment/record',//缴费记录信息
     },
     // 微信静态文件预览方式 使用二开服务的使用次方法
     weChatImgPreviewUrl: "http://192.168.0.215:8020/wechat/",

+ 3 - 1
app.json

@@ -15,7 +15,9 @@
     "pages/tousujianyiSuccess/tousujianyiSuccess",
     "pages/mine/mine",
     "pages/tousujianyiList/tousujianyiList",
-    "pages/baoxiuList/baoxiuList"
+    "pages/baoxiuList/baoxiuList",
+    "pages/jiaofeiList/jiaofeiList",
+    "pages/jiaofeixiangqing/jiaofeixiangqing"
   ],
   "tabBar": {
     "color": "rgba(182, 189, 205, 1)",

+ 49 - 14
pages/baoxiuList/baoxiuList.js

@@ -31,6 +31,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
+    // 刷新用户信息后再获取列表
+    this.refreshUserAndGetList();
   },
 
   /**
@@ -86,26 +88,43 @@ Page({
         '!SAAS_LOGIN_TOKEN_!': app.globalData.currentAccountInfo.dsKey
       },
       success(res) {
+        debugger
         wx.hideLoading();
         let apiReturnData = res.data;
-        let listData=apiReturnData.data;
-        listData.forEach(data=>{
-          data.createdate =data.createdate.slice(0,10);
-          let imgs=data.images.split(',').map(img=>{
-            return app.globalData.weChatImgPreviewUrl+'REPAIR/'+img;
-          });
-          data.hasAttachment=imgs.length>0;
-          data.attachments=imgs;
-          data.isReplied=data.iscompleted=='1';
-          if((data.recoverydate||"")!=''){
-            data.recoverydate=data.recoverydate.slice(0,10);
+        let listData = apiReturnData.data;
+        
+        listData.forEach(data => {
+          // 处理创建日期
+          data.createdate = data.createdate ? data.createdate.slice(0, 10) : '';
+          
+          // 处理图片数据
+          let imgs = [];
+          if (data.images && typeof data.images === 'string' && data.images.trim() !== '') {
+            imgs = data.images.split(',').filter(img => img).map(img => {
+              return app.globalData.weChatImgPreviewUrl + 'REPAIR/' + img;
+            });
           }
-         
-        })
-        app.globalData.mineRepairList=listData;
+          
+          // 设置附件相关属性
+          data.hasAttachment = imgs.length > 0;
+          data.attachments = imgs;
+          
+          // 处理回复状态
+          data.isReplied = data.iscompleted === '1';
+          
+          // 处理恢复日期
+          if (data.recoverydate) {
+            data.recoverydate = data.recoverydate.slice(0, 10);
+          } else {
+            data.recoverydate = '';
+          }
+        });
+        
+        app.globalData.mineRepairList = listData;
         _this.setData({
           noticeList: listData,
         })
+        debugger
       },
       fail(error) {
         wx.hideLoading()
@@ -182,4 +201,20 @@ Page({
   goBack() {
     wx.navigateBack()
   },
+
+  // 添加刷新用户信息并获取列表的方法
+  refreshUserAndGetList() {
+    const _this = this;
+    // 调用全局的获取用户信息方法
+    app.getUserInfo().then(() => {
+      // 用户信息更新后,获取列表数据
+      _this.getNoticeList();
+    }).catch(err => {
+      console.error('获取用户信息失败:', err);
+      wx.showToast({
+        title: '获取用户信息失败',
+        icon: 'none'
+      });
+    });
+  },
 })

+ 1 - 0
pages/baoxiuList/baoxiuList.wxml

@@ -10,6 +10,7 @@
       <view class="notice-item" bindtap="goToDetail" data-id="{{item.id}}">
         <view class="notice-content">
           <view class="notice-title">{{item.faultdescription}}</view>
+          <view class="notice-address">{{item.address}}</view>
           <view class="notice-info">
             <text>{{item.contact}}/{{item.contactnumber}}</text>
             <text>{{item.createdate}}</text>

+ 14 - 2
pages/baoxiuList/baoxiuList.wxss

@@ -62,9 +62,7 @@
 .notice-title {
   font-size: 34rpx;
   font-weight: 90%;
-  margin-bottom: 16rpx;
   color: #333;
-  height: 96rpx;
   line-height: 48rpx;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -73,6 +71,20 @@
   -webkit-box-orient: vertical;
 }
 
+.notice-address {
+left: 32rpx;
+width: 400rpx;
+opacity: 1;
+/** 文本1 */
+font-size: 28rpx;
+font-weight: 400;
+letter-spacing: 0px;
+line-height: 48rpx;
+color: rgba(104, 108, 128, 1);
+text-align: left;
+vertical-align: top;
+
+}
 .notice-info {
   display: flex;
   justify-content: space-between;

+ 8 - 1
pages/baoxiudj/baoxiudj.js

@@ -325,6 +325,7 @@ Page({
       success(res) {
         wx.hideLoading();
         if(res.data.code=='200'){
+          debugger 
             wx.navigateTo({
               url: '/pages/baoxiuSuccess/baoxiuSuccess',
             });
@@ -335,5 +336,11 @@ Page({
         utils.simleInfo('登记失败,请稍后再试')
       }
     })
-  }
+  },
+
+  inputAddress: function(e) {
+    this.setData({
+      address: e.detail.value
+    });
+  },
 }); 

+ 2 - 1
pages/baoxiudj/baoxiudj.wxml

@@ -11,7 +11,8 @@
   <view class="bill-card first-card">
     <view class="bill-row">
       <text>地址</text>
-      <textarea auto-height='true' class="bill-row-address" value="{{address}}">
+      <textarea auto-height='true' class="bill-row-address" value="{{address}}" 
+               bindinput="inputAddress" data-field="address" disabled="{{isPreviewMode}}">
       </textarea>
     </view>
     <view class="divider"></view>

+ 14 - 0
pages/baoxiudj/baoxiudj.wxss

@@ -66,6 +66,7 @@
 }
 
 .bill-row-address {
+  text-align: right;
   color: rgba(104, 108, 128, 1);
 }
 
@@ -201,6 +202,19 @@
   font-size: 24rpx;
 }
 
+.submit-btn {
+  width: 90%;
+  height: 45px;
+  background-color: #0080ff;
+  color: white;
+  border-radius: 22.5px;
+  font-size: 16px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 30px auto;
+}
+
 .submit-btn.disabled {
   opacity: 0.7;
 }

+ 35 - 12
pages/homepage/homepage.js

@@ -20,9 +20,9 @@ Page({
 
     // 账单信息
     billInfo: {
-      totalAmount: 0,  // 总计应缴
-      waterUsage: 0,      // 用水量
-      balance: 0       // 账户余额
+      totalAmount: "",  // 总计应缴
+      waterUsage: "",      // 用水量
+      balance: ""       // 账户余额
     },
     // 功能按钮配置
     functionList: [
@@ -34,7 +34,7 @@ Page({
       {
         icon: '/static_file/jfjl.png',
         text: '缴费记录',
-        // url: '/pages/feedback/feedback'
+        url: '/pages/jiaofeiList/jiaofeiList'
       },
       {
         icon: '/static_file/yhbx.png',
@@ -64,7 +64,8 @@ Page({
       title: '净水器活动',
       subtitle: '预留入口',
       imageUrl: '/static_file/background.png'
-    }
+    },
+    currentAccountInfo: {}
   },
 
   onLoad() {
@@ -121,6 +122,8 @@ Page({
         }
       })
     }
+    // 加载账户和账单信息
+    this.loadAccountInfo();
   },
   onShow() {
     // 检查是否需要刷新
@@ -235,11 +238,22 @@ Page({
     })
   },
 
-  // 跳转到立即缴费页面
-  goToPayment: function() {
+  // 添加或修改立即缴费按钮点击事件
+  goToPayment: function(e) {
+    // 获取当前账单信息
+    debugger
+    const billInfo = {
+      amount: this.data.billInfo.totalAmount, // 应缴金额
+      amountDue:this.data.billInfo.totalAmount,  // 总计应缴
+      balance: this.data.billInfo.balance   // 账户余额
+    };
+    
+    // 编码账单信息并传递到缴费页面
+    const billInfoStr = encodeURIComponent(JSON.stringify(billInfo));
+    
     wx.navigateTo({
-      url: '/pages/lijijiaofei/lijijiaofei',
-    })
+      url: `/pages/lijijiaofei/lijijiaofei?billInfo=${billInfoStr}`
+    });
   },
 
   // 跳转到通知公告列表页面
@@ -256,7 +270,7 @@ Page({
     const noticeData = encodeURIComponent(JSON.stringify({
       id: currentNotice.id,
       title: currentNotice.title,
-      content: currentNotice.content,
+      content: currentNotice.scrollingcontent,
       date: currentNotice.date,
       type: currentNotice.type,
       source: currentNotice.source
@@ -281,7 +295,8 @@ Page({
    
     const content = data[this.data.currentIndex].scrollingcontent;
     const title = data[this.data.currentIndex].noticetitle;
-    const duration = (title.length + content.length) * 0.3;
+    // 将系数从0.3减小到0.1以加快滚动速度
+    const duration = (title.length + content.length) * 0.2;
 
     this.setData({
       scrollDuration: duration,
@@ -290,7 +305,6 @@ Page({
   },
 
   onScrollComplete: function() {
-    debugger;
     this.setData({
       isScrolling: false
     });
@@ -304,5 +318,14 @@ Page({
         this.startNoticeScroll();
       });
     }, 500);
+  },
+
+  // 加载账户和账单信息
+  loadAccountInfo: function() {
+    const accountInfo = app.globalData.currentAccountInfo || {};
+    
+    this.setData({
+      currentAccountInfo: accountInfo
+    });
   }
 })

+ 250 - 0
pages/jiaofeiList/jiaofeiList.js

@@ -0,0 +1,250 @@
+const app = getApp();
+Page({
+  data: {
+    images: {
+      background: '/static_file/background.png',
+      water: '/static_file/water.png'
+    },
+    userInfo: {
+      name: app.globalData.currentAccountInfo.username,
+      id:  app.globalData.currentAccountInfo.usernumber,
+      address: app.globalData.currentAccountInfo.address
+    },
+    showKeyboard: false,
+    selectedAmount: null,
+    customAmount: '',
+    inputFocus: false,
+    address: '',
+    paymentList: [],
+    showYearPicker: false,
+    years: [],
+    yearPickerValue: [0],
+    selectedYear: '',
+    originalBillList: [], // 存储原始账单数据
+  },
+
+  onLoad: function(options) {
+    // 确保图片资源正确加载
+    this.setData({
+      images: {
+        background: '/static_file/background.png',
+        water: '/static_file/water.png'
+      },
+      isInvoic: app.globalData.waterCompanys.filter(data=>data.id==app.globalData.currentAccountInfo.dsKey)[0].swCompanyInfo.supportonlineinvoice=="1"
+    });
+    // 生成近20年的年份数据
+    this.generateYears();
+    // 获取缴费记录列表
+    this.getBillList().then(data => {
+      this.setData({
+        paymentList: data,
+        originalBillList: data
+      });
+    });
+  },
+
+  // 添加日期格式化函数
+  formatDateTime: function(dateString) {
+    if (!dateString) return '';
+    const date = new Date(dateString);
+    const year = date.getFullYear();
+    const month = (date.getMonth() + 1).toString().padStart(2, '0');
+    const day = date.getDate().toString().padStart(2, '0');
+    const hours = date.getHours().toString().padStart(2, '0');
+    const minutes = date.getMinutes().toString().padStart(2, '0');
+    return `${year}-${month}-${day} ${hours}:${minutes}`;
+  },
+
+  getBillList: function() {
+    const _this = this;
+    return new Promise((resolve, reject) => {
+      wx.showLoading({
+        title: '获取中...',
+        mask: true,
+      });
+      wx.request({
+        url: app.globalData.interfaceUrls.paymentList,
+        method: 'POST',
+        data: {
+          accountNum: app.globalData.currentAccountInfo.usernumber,
+          year: new Date().getFullYear()
+        },
+        header: {
+          'content-type': 'application/json',
+          'token': app.globalData.userWxInfo.token,
+          'source': "wc",
+          '!SAAS_LOGIN_TOKEN_!': app.globalData.currentAccountInfo.dsKey
+        },
+        
+        success(res) {
+          wx.hideLoading();
+          let apiReturnData = res.data;
+          // 格式化日期
+          if (apiReturnData.data && Array.isArray(apiReturnData.data)) {
+            apiReturnData.data = apiReturnData.data.map(item => ({
+              ...item,
+              chargedate: _this.formatDateTime(item.chargedate)
+            }));
+          }
+          _this.setData({
+            paymentList: apiReturnData.data,
+          });
+          resolve(apiReturnData.data);
+        },
+        fail(error) {
+          wx.hideLoading();
+          utils.simleInfo('获取账单失败,请稍后再试');
+          reject(error);
+        }
+      });
+    });
+  },
+
+  // 返回上一页
+  goBack: function() {
+    wx.navigateBack();
+  },
+
+
+  // 切换到首页
+  goToHome: function() {
+    wx.switchTab({
+      url: '/pages/homepage/homepage',
+    });
+  },
+
+  // 切换到我的页面
+  goToMine: function() {
+    wx.switchTab({
+      url: '/pages/mine/mine',
+    });
+  },
+
+  navigateToHome() {
+    wx.switchTab({
+      url: '/pages/index/index'
+    })
+  },
+
+  navigateToMine() {
+    wx.switchTab({
+      url: '/pages/mine/mine'
+    })
+  },
+
+  // 跳转到账单详情页面
+  goToDetail: function(e) {
+    const billDetail = e.currentTarget.dataset.bill || {};
+    // 使用JSON.stringify传递完整账单数据
+    wx.navigateTo({
+      url: `/pages/jiaofeixiangqing/jiaofeixiangqing?billInfo=${encodeURIComponent(JSON.stringify(billDetail))}`
+    });
+  },
+
+  // 生成近20年的年份数据
+  generateYears: function() {
+    const currentYear = new Date().getFullYear();
+    let years = ['全部']; // 添加"全部"选项
+    
+    for (let i = 0; i < 20; i++) {
+      years.push(String(currentYear - i));
+    }
+    
+    this.setData({
+      years: years,
+      yearPickerValue: [0] // 默认选中"全部"
+    });
+  },
+  
+  // 显示年份选择器
+  showYearPicker: function() {
+    this.setData({
+      showYearPicker: true
+    });
+  },
+  
+  // 隐藏年份选择器
+  hideYearPicker: function() {
+    this.setData({
+      showYearPicker: false
+    });
+  },
+  
+  // 防止点击选择器内部时关闭选择器
+  preventBubble: function() {
+    return;
+  },
+  
+  // 年份选择改变
+  onYearChange: function(e) {
+    const index = e.detail.value[0];
+    this.setData({
+      yearPickerValue: [index]
+    });
+  },
+  
+  // 确认年份选择
+  confirmYearSelection: function() {
+    const selectedIndex = this.data.yearPickerValue[0];
+    const selectedYear = this.data.years[selectedIndex];
+    
+    this.setData({
+      selectedYear: selectedYear === '全部' ? '' : selectedYear,
+      showYearPicker: false
+    });
+    
+    // 根据选择的年份筛选账单
+    this.filterBillsByYear();
+  },
+  
+  // 修改年份筛选功能
+  filterBillsByYear: function() {
+    const { selectedYear, originalBillList } = this.data;
+    
+    if (!selectedYear) {
+      // 重新获取所有数据
+      this.getBillList();
+      return;
+    }
+    
+    // 通过接口重新获取指定年份的数据
+    wx.showLoading({
+      title: '获取中...',
+      mask: true,
+    });
+    wx.request({
+      url: app.globalData.interfaceUrls.paymentList,
+      method: 'POST',
+      data: {
+        accountNum: app.globalData.currentAccountInfo.usernumber,
+        year: selectedYear
+      },
+      header: {
+        'content-type': 'application/json',
+        'token': app.globalData.userWxInfo.token,
+        'source': "wc",
+        '!SAAS_LOGIN_TOKEN_!': app.globalData.currentAccountInfo.dsKey
+      },
+      success: (res) => {
+        wx.hideLoading();
+        let apiReturnData = res.data;
+        if (apiReturnData.data && Array.isArray(apiReturnData.data)) {
+          apiReturnData.data = apiReturnData.data.map(item => ({
+            ...item,
+            chargedate: this.formatDateTime(item.chargedate)
+          }));
+        }
+        this.setData({
+          paymentList: apiReturnData.data
+        });
+      },
+      fail: () => {
+        wx.hideLoading();
+        wx.showToast({
+          title: '获取数据失败',
+          icon: 'none'
+        });
+      }
+    });
+  }
+})

+ 4 - 0
pages/jiaofeiList/jiaofeiList.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 83 - 0
pages/jiaofeiList/jiaofeiList.wxml

@@ -0,0 +1,83 @@
+<view class="container">
+  <view class="fixed-back" bindtap="goBack">←</view>
+  
+  <!-- 固定顶部区域 -->
+  <view class="header">
+    <image class="background" src="{{images.background}}" mode="widthFix" />
+  </view>
+
+  <!-- 固定用户信息 -->
+  <view class="user-info-container">
+    <view class="user-info">
+      <view class="user-name">{{userInfo.name}}</view>
+      <view class="user-id">
+        <image src="/static_file/hh.png" class="id-icon"></image>
+        <text>{{userInfo.id}}</text>
+      </view>
+      <view class="user-address">
+        <image src="/static_file/location.png" class="address-icon"></image>
+        <text>{{userInfo.address}}</text>
+      </view>
+    </view>
+  </view>
+  
+  <!-- 添加搜索按钮 -->
+  <view class="search-container">
+    <view class="search-button" bindtap="showYearPicker">
+      <image src="/static_file/search.png" class="search-icon"></image>
+      <text>{{selectedYear || '全部账单'}}</text>
+    </view>
+  </view>
+  
+  <!-- 添加固定高度的外层容器 -->
+  <view class="bill-list-wrapper">
+    <!-- 可滚动的账单列表 -->
+    <scroll-view class="bill-list" scroll-y="true">
+      <block wx:for="{{paymentList}}" wx:key="index">
+        <view class="bill-card" bindtap="goToDetail" data-bill="{{item}}">
+          
+          <view class="bill-info">
+            <!-- 水滴图标区域 -->
+            <view class="bill-icon">
+              <image src="/static_file/water.png" class="water-icon"></image>
+            </view>
+            
+            <!-- 账单信息区域 -->
+            <view class="bill-info-left">
+              <view class="bill-number">缴费编号{{item.billingnumber}}</view>
+              <view class="bill-payment-time">缴费时间: {{item.chargedate}}</view>
+            </view>
+            
+            <!-- 金额和状态区域 -->
+            <view class="bill-info-right">
+              <view class="bill-amount">¥ {{item.actualdue}}</view>
+            </view>
+          </view>
+        </view>
+      </block>
+      
+      <view class="no-more" wx:if="{{paymentList.length > 0}}"> ─────  没有更多了  ─────</view>
+      <view class="no-data" wx:else>暂无账单数据</view>
+    </scroll-view>
+  </view>
+
+  <!-- 年份选择器弹出层 -->
+  <view class="picker-mask" wx:if="{{showYearPicker}}" bindtap="hideYearPicker"></view>
+  <view class="picker-container-modal {{showYearPicker ? 'show' : ''}}">
+    <view class="picker-header">
+      <view class="picker-cancel" bindtap="hideYearPicker">取消</view>
+      <view class="picker-title">选择年份</view>
+      <view class="picker-confirm" bindtap="confirmYearSelection">确定</view>
+    </view>
+    <picker-view 
+      class="year-picker" 
+      indicator-style="height: 100rpx; border-top: 1rpx solid #eee; border-bottom: 1rpx solid #eee;" 
+      value="{{yearPickerValue}}" 
+      bindchange="onYearChange"
+    >
+      <picker-view-column>
+        <view wx:for="{{years}}" wx:key="index" class="picker-item">{{item}}</view>
+      </picker-view-column>
+    </picker-view>
+  </view>
+</view> 

+ 400 - 0
pages/jiaofeiList/jiaofeiList.wxss

@@ -0,0 +1,400 @@
+.container {
+  display: flex;
+  flex-direction: column;
+  background-color: #f5f5f5;
+  min-height: 100vh;
+  padding-bottom: 30rpx;
+  padding: 0;
+  box-sizing: border-box;
+  width: 100%;
+}
+
+.header {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 300rpx;
+  z-index: 5;
+}
+
+.header .background {
+  position: absolute;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: linear-gradient(180deg, rgba(46, 130, 255, 1) 0%, rgba(46, 130, 255, 1) 84.9%, rgba(46, 130, 255, 0) 100%);
+}
+
+/* 固定返回按钮样式 */
+.fixed-back {
+  position: fixed;
+  top: 50rpx;
+  left: 30rpx;
+  z-index: 999;
+  border-radius: 50%;
+  width: 50rpx;
+  height: 200rpx;
+  display: flex;
+  align-items: center;
+  color: rgba(255, 255, 255, 1);
+}
+
+
+.header-title {
+  text-align: center;
+  font-size: 36rpx;
+  margin-bottom: 20rpx;
+}
+
+
+.user-info-container {
+  position: fixed;
+  top: 200rpx;
+  left: 0;
+  width: 100%;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  z-index: 10;
+}
+
+.user-info {
+  background-color: transparent;
+  color: white;
+  padding: 20rpx 20rpx;
+  width: 100%;
+}
+
+.user-name {
+  font-size: 40rpx;
+  font-weight: bold;
+  margin-bottom: 20rpx;
+}
+
+.user-id, .user-address {
+  display: flex;
+  align-items: center;
+  font-size: 28rpx;
+  margin-bottom: 10rpx;
+  color: rgba(255, 255, 255, 0.9);
+}
+
+.id-icon, .address-icon {
+  width: 30rpx;
+  height: 30rpx;
+  margin-right: 10rpx;
+}
+
+.bill-list-container {
+  flex: 1;
+  padding: 20rpx;
+  margin-top: 30rpx;
+}
+
+.bill-date-section {
+  font-size: 32rpx;
+  font-weight: bold;
+  padding: 20rpx 10rpx;
+  color: #333;
+}
+
+.address-info {
+  display: flex;
+  align-items: center;
+  margin-bottom: 30rpx;
+  padding: 20rpx 0;
+}
+
+.address-icon image {
+  width: 40rpx;
+  height: 40rpx;
+  margin-right: 10rpx;
+}
+
+.address-text {
+  font-size: 28rpx;
+  color: #333;
+}
+
+/* 修改搜索容器样式 */
+.search-container {
+  position: fixed;
+  top: 395rpx; /* 调整位置到用户信息下方 */
+  left: 0;
+  width: 37%;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  z-index: 20; /* 确保在背景之上 */
+}
+
+/* 修改搜索按钮样式 */
+.search-button {
+  padding: 15rpx 30rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
+  border-radius: 16rpx;
+  background: rgba(255, 255, 255, 0.3);
+}
+
+.search-button text {
+  font-size: 28rpx;
+  color: rgba(255, 255, 255, 1);
+  margin-left: 12rpx;
+}
+
+.search-icon {
+  width: 30rpx;
+  height: 30rpx;
+}
+
+/* 调整账单列表容器位置 */
+.bill-list-wrapper {
+  position: fixed;
+  top: 480rpx; /* 调整位置,为搜索按钮留出空间 */
+  left: 0;
+  width: 100%;
+  height: calc(100vh - 450rpx);
+  z-index: 15;
+  overflow: hidden;
+}
+
+/* 调整账单列表样式 */
+.bill-list {
+  width: 100%;
+  height: 100%;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  margin-top: 0;
+  padding-bottom: 50rpx;
+}
+
+.bill-card {
+  width: 100%;
+  border-radius: 12rpx;
+  overflow: hidden;
+  margin-bottom: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
+}
+
+.paid-date {
+  background-color: #f5f5f5;
+}
+
+.invoice-btn {
+  color: #1989fa;
+  font-size: 26rpx;
+}
+
+/* 调整账单信息布局 */
+.bill-info {
+  background-color: #fff;
+  padding: 30rpx 30rpx 30rpx 30rpx;
+  display: flex;
+  justify-content: space-between;
+}
+
+/* 水滴图标区域 */
+.bill-icon {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin-right: 15rpx;
+  margin-top: -50rpx;
+}
+
+.water-icon {
+  width: 45rpx;
+  height: 45rpx;
+}
+
+/* 账单信息左侧区域 */
+.bill-info-left {
+  flex: 1;
+}
+
+/* 账单信息右侧区域 */
+.bill-info-right {
+  text-align: right;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+
+/* 移除之前的水滴图标样式 */
+.bill-number {
+  font-size: 32rpx;
+  color: rgba(46, 48, 56, 1);
+  margin-bottom: 10rpx;
+  font-weight: 600;
+}
+
+.bill-amount {
+  font-size: 36rpx;
+  font-weight: bold;
+  color: rgba(46, 48, 56, 1);
+  margin-bottom: 10rpx;
+}
+
+.bill-usage {
+  font-size: 30rpx;
+  color: rgba(100, 108, 128, 1);
+  margin-bottom: 10rpx;
+}
+
+.bill-payment-time {
+  font-size: 26rpx;
+  color: rgba(100, 108, 128, 1);
+  margin-bottom: 10rpx;
+}
+
+.bill-status {
+  font-size: 26rpx;
+  text-align: right;
+}
+
+.paid {
+  color: #07c160;
+}
+
+.unpaid {
+  color: #ff4d4f;
+}
+
+.no-more {
+  text-align: center;
+  color: #999;
+  font-size: 26rpx;
+  padding: 30rpx 0;
+}
+.no-data {
+  text-align: center;
+  color: #999;
+  font-size: 26rpx;
+  padding: 250rpx 0;
+}
+
+.bill-action {
+  margin-top: 20rpx;
+  display: flex;
+  justify-content: flex-end;
+}
+
+.pay-btn {
+  background-color: #ff4d4f;
+  color: white;
+  font-size: 28rpx;
+  padding: 10rpx 40rpx;
+  border-radius: 30rpx;
+  line-height: 1.5;
+}
+
+.detail-btn {
+  background-color: #f0f0f0;
+  color: #333;
+  font-size: 28rpx;
+  padding: 10rpx 40rpx;
+  border-radius: 30rpx;
+  line-height: 1.5;
+}
+
+.list-end {
+  text-align: center;
+  color: #999;
+  font-size: 26rpx;
+  padding: 30rpx 0;
+}
+
+.empty-list {
+  text-align: center;
+  color: #999;
+  font-size: 28rpx;
+  padding: 100rpx 0;
+}
+
+/* 未缴费金额标红 */
+.unpaid-amount {
+  color: #ff4d4f;
+}
+
+/* 删除原有的年份选择器样式,替换为以下样式 */
+.picker-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.5);
+  z-index: 999;
+}
+
+.picker-container-modal {
+  position: fixed;
+  bottom: -100%;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  transition: all 0.3s ease-in-out;
+  z-index: 1000;
+}
+
+.picker-container-modal.show {
+  bottom: 0;
+}
+
+.picker-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 20rpx 30rpx;
+  border-bottom: 1rpx solid #eee;
+}
+
+.picker-cancel, .picker-confirm {
+  font-size: 32rpx;
+  padding: 10rpx;
+}
+
+.picker-cancel {
+  color: #999;
+}
+
+.picker-confirm {
+  color: #2E82FF;
+}
+
+.picker-title {
+  font-size: 32rpx;
+  color: #333;
+}
+
+/* 修改年份选择器样式 */
+.year-picker {
+  width: 100%;
+  height: 400rpx;
+}
+
+.picker-item {
+  line-height: 100rpx;
+  text-align: center;
+  font-size: 36rpx;
+  color: #999;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 100rpx;
+}
+
+/* 修改选中项样式 */
+.picker-view-indicator {
+  height: 100rpx;
+}
+
+/* 添加选中项的样式 */
+.picker-view-column view.picker-item {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}

+ 101 - 0
pages/jiaofeixiangqing/jiaofeixiangqing.js

@@ -0,0 +1,101 @@
+const app = getApp()
+
+Page({
+  data: {
+    billData: {}, // 账单详情数据
+    loading: true,  // 加载状态
+    errorMsg: ''    // 错误信息
+  },
+
+  onLoad: function(options) {
+    try {
+      if (options.billInfo) {
+        // 解析从URL参数传递的JSON字符串获取完整账单数据
+        const billDetail = JSON.parse(decodeURIComponent(options.billInfo));
+        // 设置页面数据
+        this.setData({
+          billData: billDetail,
+          loading: false
+        });
+      } else {
+        throw new Error('未接收到账单数据');
+      }
+    } catch (error) {
+      console.error('解析账单数据失败:', error);
+      this.setData({
+        loading: false,
+        errorMsg: '数据解析失败,请返回重试'
+      });
+      
+      wx.showToast({
+        title: '数据解析失败',
+        icon: 'none',
+        duration: 2000
+      });
+    }
+  },
+
+  // 格式化金额,保留两位小数
+  formatAmount: function(amount) {
+    if (typeof amount !== 'number') {
+      amount = parseFloat(amount) || 0;
+    }
+    return amount.toFixed(2);
+  },
+
+  // 返回上一页
+  goBack: function() {
+    wx.navigateBack();
+  },
+
+  // 如果需要根据billId重新获取详情数据
+  getBillDetailById: function(billId) {
+    wx.showLoading({
+      title: '获取详情...',
+      mask: true
+    });
+    
+    wx.request({
+      url: app.globalData.interfaceUrls.billDetail,
+      method: 'POST',
+      data: {
+        billId: billId
+      },
+      header: {
+        'content-type': 'application/json',
+        'token': app.globalData.userWxInfo.token,
+        'source': "wc",
+        '!SAAS_LOGIN_TOKEN_!': app.globalData.currentAccountInfo.dsKey
+      },
+      success: (res) => {
+        wx.hideLoading();
+        if (res.data && res.data.code === 0) {
+          this.setData({
+            billDetail: res.data.data,
+            loading: false
+          });
+        } else {
+          this.setData({
+            loading: false,
+            errorMsg: res.data.msg || '获取详情失败'
+          });
+          wx.showToast({
+            title: '获取详情失败',
+            icon: 'none'
+          });
+        }
+      },
+      fail: (error) => {
+        wx.hideLoading();
+        this.setData({
+          loading: false,
+          errorMsg: '网络错误,请稍后重试'
+        });
+        wx.showToast({
+          title: '网络错误,请稍后重试',
+          icon: 'none'
+        });
+      }
+    });
+  }
+})

+ 8 - 0
pages/jiaofeixiangqing/jiaofeixiangqing.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "账单详情",
+  "navigationBarBackgroundColor": "#0066FF",
+  "navigationBarTextStyle": "white",
+  "backgroundColor": "#F8F8F8",
+  "usingComponents": {},
+  "navigationStyle": "custom"
+}

+ 107 - 0
pages/jiaofeixiangqing/jiaofeixiangqing.wxml

@@ -0,0 +1,107 @@
+<view class="container4">
+
+  <!-- 返回按钮 -->
+  <view class="custom-nav">
+    <view class="fixed-back" bindtap="goBack">←</view>
+    <view class="nav-title">缴费详情</view>
+  </view>
+
+  <!-- 固定在顶部的部分 -->
+  <view class="fixed-top-section">
+    <!-- 缴费总览卡片 - 美化设计 -->
+    <view class="overview-card">
+      <!-- 账单金额 -->
+      <view class="bill-row">
+        <text class="label">账单金额</text>
+        <text class="value">¥ {{billData.oughttohavepaid}}</text>
+      </view>
+      <!-- 余额抵扣 -->
+      <view class="bill-row">
+        <text class="label">余额抵扣</text>
+        <text class="value">¥ {{billData.balancededuction}}</text>
+      </view>
+
+      <!-- 减免 -->
+      <view class="bill-row">
+        <text class="label">减免</text>
+        <text class="value">¥ {{billData.allfeewaiver}}</text>
+      </view>
+
+
+      <!-- 滞纳金 -->
+      <view class="bill-row">
+        <text class="label">滞纳金</text>
+        <text class="value">¥ {{billData.latefees}}</text>
+      </view>
+
+      <!-- 应缴金额 - 高亮显示 -->
+      <view class="bill-row">
+        <text class="label">应缴金额</text>
+        <text class="value">¥ {{billData.actualdue}}</text>
+      </view>
+
+      <!-- 实缴金额 - 高亮显示 -->
+      <view class="bill-row highlight-row">
+        <text class="label">实缴金额</text>
+        <text class="value highlight">¥ {{billData.actualdue}}</text>
+      </view>
+    </view>
+
+    <!-- 账单明细标题栏 -->
+    <view class="bill-list-header">
+      <view class="bill-list-title">账单明细</view>
+      <view class="bill-count">共{{billData.bills.length}}笔</view>
+    </view>
+  </view>
+
+  <!-- 可滚动内容区域 - 确保第一个卡片完全可见 -->
+  <view class="scrollable-content">
+    <!-- 账单明细列表,可滚动区域 -->
+    <scroll-view scroll-y="true" class="bill-list-container">
+      <block wx:for="{{billData.bills}}" wx:key="billnumber">
+        <view class="bill-card">
+          <view class="bill-header">
+            <view class="meter-reading">
+              <text class="water-icon">💧</text>
+              <text class="bill-number">{{item.billnumber}}</text>
+              <text class="due-date">抄表日 {{item.thismeterreadingdate}}</text>
+            </view>
+            <view class="payment-status-tag {{item.status === '3' ? 'unpaid-tag' : 'paid-tag'}}">
+              {{item.status === '3' ? '未缴费' : '已缴费'}}
+            </view>
+          </view>
+
+          <view class="usage-section">
+            <view class="usage-item">
+              <text class="usage-label">用水量</text>
+              <text class="usage-value">{{item.currentwateruse}} m³</text>
+            </view>
+            <view class="usage-divider"></view>
+            <view class="usage-item">
+              <text class="usage-label">读数</text>
+              <text class="usage-value">{{item.meterReading}}</text>
+            </view>
+          </view>
+
+          <view class="fee-section">
+            <view class="fee-row">
+              <text class="fee-label">减免</text>
+              <text class="fee-value">¥ {{item.feewaiver}}</text>
+            </view>
+            <view class="fee-row">
+              <text class="fee-label">滞纳金</text>
+              <text class="fee-value">¥ {{item.latefees}}</text>
+            </view>
+          </view>
+
+          <view class="bill-footer">
+            <text class="due-label">应付金额</text>
+            <text class="total-amount">¥ {{item.actualdue}}</text>
+          </view>
+        </view>
+      </block>
+      <!-- 底部空白区域,确保最后一个卡片不会贴近屏幕底部 -->
+      <view class="bottom-space"></view>
+    </scroll-view>
+  </view>
+</view>

+ 279 - 0
pages/jiaofeixiangqing/jiaofeixiangqing.wxss

@@ -0,0 +1,279 @@
+.container4 {
+  display: flex;
+  flex-direction: column;
+  height: 100vh;
+  background-color: #f6f7f9;
+  position: relative;
+}
+.custom-nav {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  height: 88rpx; 
+  background-color: rgba(46, 130, 255, 1);
+  display: flex;
+  align-items: center;
+  padding-top: 110rpx; 
+  z-index: 1000;
+}
+
+/* 固定返回按钮样式 */
+.fixed-back {
+  position: fixed;
+  top: 50rpx;
+  left: 30rpx;
+  z-index: 999;
+  border-radius: 50%;
+  width: 50rpx;
+  height: 200rpx;
+  display: flex;
+  align-items: center;
+  color: rgba(255, 255, 255, 1);
+}
+.nav-title {
+  flex: 1;
+  text-align: center;
+  font-size: 34rpx;
+  color: #fff;
+}
+
+/* 创建一个固定的顶部区域容器 */
+.fixed-top-section {
+  position: fixed;
+  top: 198rpx;
+  left: 0;
+  right: 0;
+  z-index: 999;
+  padding: 20rpx;
+  background-color: #f6f7f9;
+}
+
+/* 缴费总览卡片美化 */
+.overview-card {
+  background-color: #fff;
+  border-radius: 16rpx;
+  padding: 24rpx 28rpx;
+  box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
+  margin-bottom: 20rpx;
+}
+
+/* 行样式 */
+.bill-row {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 12rpx 0;
+  position: relative;
+}
+
+/* 添加分隔线 */
+.bill-row:not(:last-child) {
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+/* 金额强调项样式 */
+.bill-row.highlight-row {
+  padding: 10rpx 0;
+  background-color: #fffdfd;
+}
+
+/* 标签文字样式 */
+.label {
+  font-size: 26rpx;
+  color: #666;
+  font-weight: 400;
+}
+
+/* 数值文字样式 */
+.value {
+  font-size: 28rpx;
+  color: #333;
+  font-weight: 500;
+}
+
+/* 高亮值样式 */
+.value.highlight {
+  color: #ff4d4f;
+  font-weight: 600;
+  font-size: 34rpx;
+}
+
+/* 账单明细标题栏优化 */
+.bill-list-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 5rpx 10rpx;
+  margin: 10rpx 0;
+}
+
+.bill-list-title {
+  font-size: 30rpx;
+  font-weight: 500;
+  color: #333;
+}
+
+.bill-count {
+  font-size: 24rpx;
+  color: #666;
+  background-color: #eef2f7;
+  padding: 6rpx 16rpx;
+  border-radius: 20rpx;
+}
+
+/* 创建一个滚动内容区域,但考虑顶部固定区域的高度 */
+.scrollable-content {
+  margin-top: 460rpx;
+  padding: 0 20rpx;
+}
+
+/* 账单列表容器 */
+.bill-list-container {
+  height: calc(100vh - 800rpx);
+  padding-bottom: 60rpx;
+  padding: 300rpx 0rpx 0rpx 0rpx  ;
+}
+
+/* 底部空间 */
+.bottom-space {
+  height: 120rpx;
+}
+
+/* 账单卡片样式改进 */
+.bill-card {
+  background-color: #fff;
+  border-radius: 16rpx;
+  padding: 24rpx;
+  margin-bottom: 20rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+/* 账单卡片头部改进 */
+.bill-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 16rpx;
+}
+
+.meter-reading {
+  display: flex;
+  align-items: center;
+  flex-wrap: wrap;
+}
+
+.water-icon {
+  margin-right: 10rpx;
+  color: #1890ff;
+  font-size: 30rpx;
+}
+
+.bill-number {
+  font-weight: 500;
+  color: #333;
+  font-size: 28rpx;
+}
+
+.due-date {
+  font-size: 24rpx;
+  color: #999;
+  margin-left: 16rpx;
+}
+
+/* 支付状态标签 */
+.payment-status-tag {
+  font-size: 22rpx;
+  padding: 4rpx 16rpx;
+  border-radius: 20rpx;
+}
+
+.unpaid-tag {
+  color: #ff4d4f;
+  background-color: #fff1f0;
+  border: 1rpx solid #ffccc7;
+}
+
+.paid-tag {
+  color: #52c41a;
+  background-color: #f6ffed;
+  border: 1rpx solid #b7eb8f;
+}
+
+/* 用水信息区域 */
+.usage-section {
+  display: flex;
+  justify-content: space-between;
+  background-color: #f9f9f9;
+  border-radius: 12rpx;
+  padding: 16rpx;
+  margin: 16rpx 0;
+}
+
+.usage-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  flex: 1;
+}
+
+.usage-label {
+  font-size: 24rpx;
+  color: #999;
+  margin-bottom: 8rpx;
+}
+
+.usage-value {
+  font-size: 28rpx;
+  color: #333;
+  font-weight: 500;
+}
+
+.usage-divider {
+  width: 1rpx;
+  background-color: #e8e8e8;
+  margin: 0 20rpx;
+}
+
+/* 费用信息区域 */
+.fee-section {
+  padding: 8rpx 0;
+}
+
+.fee-row {
+  display: flex;
+  justify-content: space-between;
+  padding: 8rpx 0;
+}
+
+.fee-label {
+  font-size: 26rpx;
+  color: #666;
+}
+
+.fee-value {
+  font-size: 26rpx;
+  color: #333;
+}
+
+/* 底部金额区域 */
+.bill-footer {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-top: 16rpx;
+  padding-top: 16rpx;
+  border-top: 1rpx solid #f0f0f0;
+}
+
+.due-label {
+  font-size: 28rpx;
+  color: #666;
+}
+
+.total-amount {
+  font-size: 36rpx;
+  font-weight: 600;
+  color: #ff4d4f;
+}
+

+ 18 - 7
pages/lijijiaofei/lijijiaofei.js

@@ -1,3 +1,4 @@
+const app = getApp();
 Page({
   data: {
     images: {
@@ -10,13 +11,11 @@ Page({
       jcsfcjtzd: ""
     },
     userInfo: {
-      name: '王源',
-      phone: '32018545245104',
-      address: '徐州市丰县***楼102室'
+      name: app.globalData.currentAccountInfo.username,
+      id:  app.globalData.currentAccountInfo.usernumber,
+      address: app.globalData.currentAccountInfo.address
     },
-    amount: 73.28, //应缴金额
-    actualAmount: 73.28,
-    balance: 0,   // 余额
+    billInfo: {}, // 存储从首页传递过来的账单信息
     quickAmounts: [10, 30, 50, 100, 200, 500],
     waterUsage: {
       lastReading: 2000,
@@ -29,7 +28,18 @@ Page({
     customAmount: '',
     inputFocus: false,
   },
-  onLoad() {
+  onLoad(options) {
+    // 接收从homepage传递的账单信息
+    if (options.billInfo) {
+      const billInfo = JSON.parse(decodeURIComponent(options.billInfo));
+      debugger
+      this.setData({
+        amount: billInfo.amount, // 默认实缴金额为应缴金额
+        actualAmount: billInfo.amountDue, // 设置应缴金额
+        balance: billInfo.balance   //余额 
+      });
+    }
+
     this.setData({
       images: {
         logo:'/static_file/logo.png',
@@ -45,6 +55,7 @@ Page({
     })
     // 获取状态栏高度
     const systemInfo = wx.getSystemInfoSync();
+    debugger
     this.setData({
       statusBarHeight: systemInfo.statusBarHeight
     });

+ 3 - 3
pages/lijijiaofei/lijijiaofei.wxml

@@ -10,14 +10,14 @@
     <!-- 用户信息 -->
     <view class="user-info-container">
       <view class="user-info">
-        <view class="user-name">王源</view>
+        <view class="user-name">{{userInfo.name}}</view>
         <view class="user-id">
           <image src="/static_file/hh.png" class="id-icon"></image>
-          <text>320185452454104</text>
+          <text>{{userInfo.id}}</text>
         </view>
         <view class="user-address">
           <image src="/static_file/location.png" class="address-icon"></image>
-          <text>徐州市丰县****楼102室</text>
+          <text>{{userInfo.address}}</text>
         </view>
         <!-- <view class="change-btn" bindtap="switchMeter">切换水表</view> -->
       </view>

+ 20 - 5
pages/mine/mine.js

@@ -1,19 +1,34 @@
+const app = getApp();
 Page({
   data: {
     images: {
       background: '/static_file/background.png'
     },
     userInfo: {
-      name: '王源',
-      id: '320185452454104',
-      address: '徐州市丰县****楼102室'
+      name: '',
+      id: '',
+      address: ''
     }
   },
   
   // 页面加载时执行
   onLoad: function(options) {
-    // 可以在这里获取用户信息
-    // this.getUserInfo();
+    this.updateUserInfo();
+  },
+  
+  onShow: function() {
+    this.updateUserInfo();
+  },
+  
+  // 更新用户信息的方法
+  updateUserInfo: function() {
+    this.setData({
+      userInfo: {
+        name: app.globalData.currentAccountInfo.username,
+        id: app.globalData.currentAccountInfo.usernumber,
+        address: app.globalData.currentAccountInfo.address
+      }
+    });
   },
   
   // 导航到指定页面

+ 2 - 2
pages/mine/mine.wxml

@@ -25,14 +25,14 @@
   <view class="function-content">
     <!-- 第一组:缴费记录和账单查询 -->
     <view class="function-group">
-      <view class="function-item" bindtap="navigateTo" data-url="/pages/payment/payment">
+      <view class="function-item" bindtap="navigateTo" data-url="/pages/jiaofeiList/jiaofeiList">
         <text class="function-text">缴费记录</text>
         <image class="arrow-icon" src="/static_file/arrow.png"></image>
       </view>
 
       <view class="divider"></view>
 
-      <view class="function-item" bindtap="navigateTo" data-url="/pages/bill/bill">
+      <view class="function-item" bindtap="navigateTo" data-url="/pages/zhangdanlist/zhangdanlist">
         <text class="function-text">账单查询</text>
         <image class="arrow-icon" src="/static_file/arrow.png"></image>
       </view>

+ 17 - 16
pages/tousujianyi/tousujianyi.js

@@ -15,12 +15,13 @@ Page({
     title: '',
     content: '',
     replyTime: '',
-    replyContent: ''
+    replyContent: '',
+    showReplyInfo: false
   },
 
   onLoad: function(options) {
     this.startCountDown();
-    
+
     // 检查是否是预览模式
     if (options.mode === 'preview') {
       const id = options.id;
@@ -97,7 +98,7 @@ Page({
       });
       return;
     }
-    
+
     wx.chooseMedia({
       count: 10 - that.data.imageList.length,
       mediaType: ['image'],
@@ -106,7 +107,7 @@ Page({
       success: function(res) {
         let tempFiles = res.tempFiles;
         let validFiles = [];
-        
+
         for (let i = 0; i < tempFiles.length; i++) {
           const file = tempFiles[i];
           if (file.size <= 10 * 1024 * 1024) {
@@ -118,7 +119,7 @@ Page({
             });
           }
         }
-        
+
         if (validFiles.length > 0) {
           let newImageList = that.data.imageList.concat(validFiles);
           that.setData({
@@ -150,22 +151,22 @@ Page({
     const { contact, phone, description, category } = this.data;
     // 只检查必填项:联系人、联系电话和内容说明
     const isValid = contact.trim() !== '' && this.validatePhone(phone) && description.trim() !== '';
-    
+
     this.setData({
       isFormValid: isValid
     });
-    
+
     return isValid;
   },
 
   onInputChange: function(e) {
     const { field } = e.currentTarget.dataset;
     const { value } = e.detail;
-    
+
     this.setData({
       [field]: value
     });
-    
+
     this.checkFormValidity();
   },
 
@@ -177,7 +178,7 @@ Page({
   submitForm: function() {
     if (!this.checkFormValidity()) {
       let errorMsg = '';
-      
+
       if (!this.data.contact.trim()) {
         errorMsg = '请填写联系人';
       } else if (!this.validatePhone(this.data.phone)) {
@@ -185,7 +186,7 @@ Page({
       } else if (!this.data.description.trim()) {
         errorMsg = '请填写内容说明';
       }
-      
+
       wx.showToast({
         title: errorMsg,
         icon: 'none'
@@ -207,9 +208,9 @@ Page({
       description: this.data.description,
       images: this.data.imageList
     };
-    
+
     console.log('提交的数据:', submitData);
-    
+
     wx.showLoading({
       title: '提交中...',
     });
@@ -248,10 +249,10 @@ Page({
     // 但为了演示,我们从本地数据中获取
     const pages = getCurrentPages();
     const prevPage = pages[pages.length - 2]; // 获取上一个页面
-    
+
     if (prevPage && prevPage.data.noticeList) {
       const item = prevPage.data.noticeList.find(item => item.id == id);
-      
+
       if (item) {
         this.setData({
           category: item.title.includes('投诉') ? '投诉' : '建议',
@@ -266,4 +267,4 @@ Page({
       }
     }
   }
-}); 
+});

+ 7 - 0
pages/tousujianyi/tousujianyi.wxml

@@ -75,6 +75,13 @@
     <view class="reply-content">{{replyContent}}</view>
   </view>
 
+  <!-- 回复信息区域,根据showReplyInfo控制显示 -->
+  <view class="reply-section" wx:if="{{showReplyInfo}}">
+    <view class="reply-title">回复信息</view>
+    <view class="reply-time">回复时间:{{replyTime}}</view>
+    <view class="reply-content">{{replyContent}}</view>
+  </view>
+
   <!-- 提交按钮,仅在非预览模式下显示 -->
   <button class="submit-btn" bindtap="submitForm" wx:if="{{!isPreviewMode}}">提交</button>
 

+ 61 - 39
pages/tousujianyiList/tousujianyiList.js

@@ -9,7 +9,13 @@ Page({
     imageList: [], // 存储图片路径的数组
     showCustomPreview: false, // 是否显示自定义预览
     currentPreviewImages: [], // 当前预览的图片数组
-    currentPreviewIndex: 0 // 当前预览的图片索引
+    currentPreviewIndex: 0, // 当前预览的图片索引
+    description: '',
+    content: '',
+    contact: '',
+    phone: '',
+    replyTime: '',
+    replyContent: ''
   },
 
   /**
@@ -30,7 +36,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-
+    // 刷新用户信息后再获取列表
+    this.refreshUserAndGetList();
   },
 
   /**
@@ -88,20 +95,23 @@ Page({
       success(res) {
         wx.hideLoading();
         let apiReturnData = res.data;
-        let listData=apiReturnData.data;
-        listData.forEach(data=>{
-          data.createdate =data.createdate.slice(0,10);
-          let imgs=data.file.split(',').map(img=>{
-            return app.globalData.weChatImgPreviewUrl+'FEEDBACK/'+img;
-          });
-          data.hasAttachment=imgs.length>0;
-          data.attachments=imgs;
-          data.isReplied=data.iscompleted=='1';
-          if((data.recoverydate||"")!=''){
-            data.recoverydate=data.recoverydate.slice(0,10);
+        let listData = apiReturnData.data;
+        listData.forEach(data => {
+          data.createdate = data.createdate.slice(0, 10);
+          // 添加对file字段的空值检查
+          let imgs = [];
+          if (data.file) {
+            imgs = data.file.split(',').filter(img => img).map(img => {
+              return app.globalData.weChatImgPreviewUrl + 'FEEDBACK/' + img;
+            });
           }
-         
-        })
+          data.hasAttachment = imgs.length > 0;
+          data.attachments = imgs;
+          data.isReplied = data.iscompleted == '1';
+          if ((data.recoverydate || "") != '') {
+            data.recoverydate = data.recoverydate.slice(0, 10);
+          }
+        });
         app.globalData.mineRepairList=listData;
         _this.setData({
           noticeList: listData,
@@ -165,17 +175,10 @@ Page({
     const id = e.currentTarget.dataset.id
     const item = this.data.noticeList.find(item => item.id === id);
     
-    if (item.isReplied) {
-      // 如果已回复,跳转到预览页面
-      wx.navigateTo({
-        url: `/pages/tousujianyi/tousujianyi?id=${id}&mode=preview`
-      })
-    } else {
-      // 如果未回复,跳转到普通详情页
-      wx.navigateTo({
-        url: `/pages/tousujianyiDetail/tousujianyiDetail?id=${id}`
-      })
-    }
+    // 无论是否回复,都跳转到预览页面,但传递不同的回复状态参数
+    wx.navigateTo({
+      url: `/pages/tousujianyi/tousujianyi?id=${id}&mode=preview&isReplied=${item.isReplied}`
+    })
   },
 
   // 跳转到表单页
@@ -190,18 +193,37 @@ Page({
     wx.navigateBack()
   },
 
-  // 假设您从服务器获取数据的函数
-  getDataFromServer: function() {
-    // 示例:从服务器获取数据
-    wx.request({
-      url: 'your_api_url',
-      success: (res) => {
-        // 假设返回的数据中包含图片数组
-        const images = res.data.images || [];
-        this.setData({
-          imageList: images
-        });
-      }
+  getDataById: function(id) {
+    if (!id) {
+      console.log('未获取到有效的ID');
+      return;
+    }
+    const item = this.data.noticeList.find(item => item.id === id);
+    if (item) {
+      this.setData({
+        description: item.description,
+        content: item.content,
+        contact: item.contact,
+        phone: item.phone,
+        replyTime: item.recoverydate,
+        replyContent: item.replycontent
+      });
+    }
+  },
+
+  // 添加刷新用户信息并获取列表的方法
+  refreshUserAndGetList() {
+    const _this = this;
+    // 调用全局的获取用户信息方法
+    app.getUserInfo().then(() => {
+      // 用户信息更新后,获取列表数据
+      _this.getNoticeList();
+    }).catch(err => {
+      console.error('获取用户信息失败:', err);
+      wx.showToast({
+        title: '获取用户信息失败',
+        icon: 'none'
+      });
     });
   }
-})
+})

+ 6 - 14
pages/tzxq/tzxq.js

@@ -3,30 +3,22 @@ Page({
    * 页面的初始数据
    */
   data: {
-    noticeId: null,
-    noticeDetail: {
-      id: '',
-      title: '',
-      content: '',
-      date: '',
-      source: ''
-    }
+    noticeId: '',
+    noticeDetail: null
   },
 
   onLoad: function (options) {
     if (options.noticeData) {
       try {
-        // 解析传递过来通知数据
+        // 解码并解析传递的数据
         const noticeData = JSON.parse(decodeURIComponent(options.noticeData));
-        // 直接设置通知详情数据
         this.setData({
           noticeId: noticeData.id,
-          noticeDetail:noticeData
+          noticeDetail: noticeData
         });
       } catch (error) {
-        console.error('解析通知数据失败', error);
         wx.showToast({
-          title: '获取通知详情失败',
+          title: '数据解析失败',
           icon: 'none'
         });
       }
@@ -39,4 +31,4 @@ Page({
   goBack: function() {
     wx.navigateBack();
   },
-}) 
+}) 

+ 112 - 18
pages/zhangdanlist/zhangdanlist.js

@@ -18,6 +18,11 @@ Page({
     billList: [],
     // 是否可以开票
     isInvoic:false,
+    showYearPicker: false,
+    years: [],
+    yearPickerValue: [0],
+    selectedYear: '',
+    originalBillList: [], // 存储原始账单数据
   },
 
   onLoad: function(options) {
@@ -29,17 +34,24 @@ Page({
       },
       isInvoic: app.globalData.waterCompanys.filter(data=>data.id==app.globalData.currentAccountInfo.dsKey)[0].swCompanyInfo.supportonlineinvoice=="1"
     });
+    // 生成近20年的年份数据
+    this.generateYears();
     // 获取账单列表
-    this.getBillList();
+    this.getBillList().then(data => {
+      this.setData({
+        billList: data,
+        originalBillList: data
+      });
+    });
   },
 
-  getBillList:function(){
+  getBillList: function() {
     const _this = this;
-    wx.showLoading({
-      title: '获取中...',
-      mask: true,
-    });
-      // debugger;
+    return new Promise((resolve, reject) => {
+      wx.showLoading({
+        title: '获取中...',
+        mask: true,
+      });
       wx.request({
         url: app.globalData.interfaceUrls.billList,
         method: 'POST',
@@ -48,25 +60,28 @@ Page({
           year: new Date().getFullYear()
         },
         header: {
-          'content-type': 'application/json', // 默认值
-          'token':app.globalData.userWxInfo.token,
-          'source':"wc",
-          '!SAAS_LOGIN_TOKEN_!':app.globalData.currentAccountInfo.dsKey
+          'content-type': 'application/json',
+          'token': app.globalData.userWxInfo.token,
+          'source': "wc",
+          '!SAAS_LOGIN_TOKEN_!': app.globalData.currentAccountInfo.dsKey
         },
-        success (res) {
+        success(res) {
           wx.hideLoading();
-          let apiReturnData=res.data;
-          // debugger;
+          let apiReturnData = res.data;
           _this.setData({
-            billList:apiReturnData.data,
-          })
+            billList: apiReturnData.data,
+          });
+          resolve(apiReturnData.data);
         },
         fail(error) {
-          wx.hideLoading()
-          utils.simleInfo('获取账单失败,请稍后再试')
+          wx.hideLoading();
+          utils.simleInfo('获取账单失败,请稍后再试');
+          reject(error);
         }
       });
+    });
   },
+
   // 返回上一页
   goBack: function() {
     wx.navigateBack();
@@ -130,5 +145,84 @@ Page({
     wx.navigateTo({
       url: '/pages/invoice/invoice?billInfo=' + JSON.stringify(bill)
     });
+  },
+
+  // 生成近20年的年份数据
+  generateYears: function() {
+    const currentYear = new Date().getFullYear();
+    let years = ['全部']; // 添加"全部"选项
+    
+    for (let i = 0; i < 20; i++) {
+      years.push(String(currentYear - i));
+    }
+    
+    this.setData({
+      years: years,
+      yearPickerValue: [0] // 默认选中"全部"
+    });
+  },
+  
+  // 显示年份选择器
+  showYearPicker: function() {
+    this.setData({
+      showYearPicker: true
+    });
+  },
+  
+  // 隐藏年份选择器
+  hideYearPicker: function() {
+    this.setData({
+      showYearPicker: false
+    });
+  },
+  
+  // 防止点击选择器内部时关闭选择器
+  preventBubble: function() {
+    return;
+  },
+  
+  // 年份选择改变
+  onYearChange: function(e) {
+    const index = e.detail.value[0];
+    this.setData({
+      yearPickerValue: [index]
+    });
+  },
+  
+  // 确认年份选择
+  confirmYearSelection: function() {
+    const selectedIndex = this.data.yearPickerValue[0];
+    const selectedYear = this.data.years[selectedIndex];
+    
+    this.setData({
+      selectedYear: selectedYear === '全部' ? '' : selectedYear,
+      showYearPicker: false
+    });
+    
+    // 根据选择的年份筛选账单
+    this.filterBillsByYear();
+  },
+  
+  // 根据年份筛选账单
+  filterBillsByYear: function() {
+    const { selectedYear, originalBillList } = this.data;
+    
+    if (!selectedYear) {
+      // 如果选择"全部",显示所有账单
+      this.setData({
+        billList: originalBillList
+      });
+      return;
+    }
+    
+    // 根据年份筛选账单
+    const filteredBills = originalBillList.filter(bill => {
+      // 假设 billDate 格式为 "YYYY/MM/DD" 或 "YYYY-MM-DD"
+      return bill.billDate.startsWith(selectedYear) || bill.billDate.startsWith(selectedYear + '-');
+    });
+    
+    this.setData({
+      billList: filteredBills
+    });
   }
 })

+ 28 - 0
pages/zhangdanlist/zhangdanlist.wxml

@@ -21,6 +21,14 @@
     </view>
   </view>
   
+  <!-- 添加搜索按钮 -->
+  <view class="search-container">
+    <view class="search-button" bindtap="showYearPicker">
+      <image src="/static_file/search.png" class="search-icon"></image>
+      <text>{{selectedYear || '全部账单'}}</text>
+    </view>
+  </view>
+  
   <!-- 添加固定高度的外层容器 -->
   <view class="bill-list-wrapper">
     <!-- 可滚动的账单列表 -->
@@ -58,4 +66,24 @@
       <view class="no-data" wx:else>暂无账单数据</view>
     </scroll-view>
   </view>
+
+  <!-- 年份选择器弹出层 -->
+  <view class="picker-mask" wx:if="{{showYearPicker}}" bindtap="hideYearPicker"></view>
+  <view class="picker-container-modal {{showYearPicker ? 'show' : ''}}">
+    <view class="picker-header">
+      <view class="picker-cancel" bindtap="hideYearPicker">取消</view>
+      <view class="picker-title">选择年份</view>
+      <view class="picker-confirm" bindtap="confirmYearSelection">确定</view>
+    </view>
+    <picker-view 
+      class="year-picker" 
+      indicator-style="height: 100rpx; border-top: 1rpx solid #eee; border-bottom: 1rpx solid #eee;" 
+      value="{{yearPickerValue}}" 
+      bindchange="onYearChange"
+    >
+      <picker-view-column>
+        <view wx:for="{{years}}" wx:key="index" class="picker-item">{{item}}</view>
+      </picker-view-column>
+    </picker-view>
+  </view>
 </view> 

+ 129 - 15
pages/zhangdanlist/zhangdanlist.wxss

@@ -117,14 +117,47 @@
   color: #333;
 }
 
-/* 添加固定高度的外层容器 */
+/* 修改搜索容器样式 */
+.search-container {
+  position: fixed;
+  top: 395rpx; /* 调整位置到用户信息下方 */
+  left: 0;
+  width: 37%;
+  padding: 0 30rpx;
+  box-sizing: border-box;
+  z-index: 20; /* 确保在背景之上 */
+}
+
+/* 修改搜索按钮样式 */
+.search-button {
+  padding: 15rpx 30rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
+  border-radius: 16rpx;
+  background: rgba(255, 255, 255, 0.3);
+}
+
+.search-button text {
+  font-size: 28rpx;
+  color: rgba(255, 255, 255, 1);
+  margin-left: 12rpx;
+}
+
+.search-icon {
+  width: 30rpx;
+  height: 30rpx;
+}
+
+/* 调整账单列表容器位置 */
 .bill-list-wrapper {
   position: fixed;
-  top: 400rpx;
+  top: 480rpx; /* 调整位置,为搜索按钮留出空间 */
   left: 0;
   width: 100%;
-  height: calc(100vh - 400rpx); /* 计算剩余高度 */
-  z-index: 30;
+  height: calc(100vh - 450rpx);
+  z-index: 15;
   overflow: hidden;
 }
 
@@ -134,7 +167,7 @@
   height: 100%;
   padding: 0 30rpx;
   box-sizing: border-box;
-  margin-top: 0; 
+  margin-top: 0;
   padding-bottom: 50rpx;
 }
 
@@ -180,11 +213,12 @@
   align-items: center;
   justify-content: center;
   margin-right: 15rpx;
+  margin-top: -50rpx;
 }
 
 .water-icon {
-  width: 40rpx;
-  height: 40rpx;
+  width: 45rpx;
+  height: 45rpx;
 }
 
 /* 账单信息左侧区域 */
@@ -202,27 +236,27 @@
 
 /* 移除之前的水滴图标样式 */
 .bill-number {
-  font-size: 26rpx;
-  color: #666;
+  font-size: 36rpx;
+  color: rgba(46, 48, 56, 1);
   margin-bottom: 10rpx;
 }
 
 .bill-amount {
-  font-size: 36rpx;
+  font-size: 40rpx;
   font-weight: bold;
   color: #333;
   margin-bottom: 10rpx;
 }
 
 .bill-usage {
-  font-size: 24rpx;
-  color: #999;
+  font-size: 30rpx;
+  color: rgba(100, 108, 128, 1);
   margin-bottom: 10rpx;
 }
 
 .bill-payment-time {
-  font-size: 24rpx;
-  color: #999;
+  font-size: 26rpx;
+  color: rgba(100, 108, 128, 1);
   margin-bottom: 10rpx;
 }
 
@@ -293,4 +327,84 @@
 /* 未缴费金额标红 */
 .unpaid-amount {
   color: #ff4d4f;
-}
+}
+
+/* 删除原有的年份选择器样式,替换为以下样式 */
+.picker-mask {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.5);
+  z-index: 999;
+}
+
+.picker-container-modal {
+  position: fixed;
+  bottom: -100%;
+  left: 0;
+  width: 100%;
+  background: #fff;
+  transition: all 0.3s ease-in-out;
+  z-index: 1000;
+}
+
+.picker-container-modal.show {
+  bottom: 0;
+}
+
+.picker-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 20rpx 30rpx;
+  border-bottom: 1rpx solid #eee;
+}
+
+.picker-cancel, .picker-confirm {
+  font-size: 32rpx;
+  padding: 10rpx;
+}
+
+.picker-cancel {
+  color: #999;
+}
+
+.picker-confirm {
+  color: #2E82FF;
+}
+
+.picker-title {
+  font-size: 32rpx;
+  color: #333;
+}
+
+/* 修改年份选择器样式 */
+.year-picker {
+  width: 100%;
+  height: 400rpx;
+}
+
+.picker-item {
+  line-height: 100rpx;
+  text-align: center;
+  font-size: 36rpx;
+  color: #999;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 100rpx;
+}
+
+/* 修改选中项样式 */
+.picker-view-indicator {
+  height: 100rpx;
+}
+
+/* 添加选中项的样式 */
+.picker-view-column view.picker-item {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}

+ 18 - 18
pages/zhangdanxiangqing/zdxiangqing.wxml

@@ -10,57 +10,57 @@
   <!-- 第一个卡片:本次抄表信息 -->
   <view class="bill-card">
     <view class="bill-row">
-      <text>本次抄表日期</text>
-      <text>{{billDetail.currentDate}}</text>
+      <text class="label">本次抄表日期</text>
+      <text class="value">{{billDetail.currentDate}}</text>
     </view>
     <view class="divider"></view>
     <view class="bill-row">
-      <text>本次抄表数</text>
-      <text>{{billDetail.currentReading}}</text>
+      <text class="label">本次抄表数</text>
+      <text class="value">{{billDetail.currentReading}}</text>
     </view>
   </view>
 
   <!-- 第二个卡片:上次抄表信息 -->
   <view class="bill-card">
     <view class="bill-row">
-      <text>上次抄表日期</text>
-      <text>{{billDetail.lastDate}}</text>
+      <text class="label">上次抄表日期</text>
+      <text class="value">{{billDetail.lastDate}}</text>
     </view>
     <view class="divider"></view>
     <view class="bill-row">
-      <text>上次抄表数</text>
-      <text>{{billDetail.lastReading}}</text>
+      <text class="label">上次抄表数</text>
+      <text class="value">{{billDetail.lastReading}}</text>
     </view>
   </view>
 
   <!-- 第三个卡片:费用明细 -->
   <view class="bill-card">
     <view class="bill-row">
-      <text>用户量</text>
-      <text>{{billDetail.usage}}m³</text>
+      <text class="label">用水量</text>
+      <text class="value">{{billDetail.usage}}m³</text>
     </view>
     <view class="divider"></view>
     <view class="bill-row">
-      <text>总费用</text>
-      <text>{{billDetail.totalAmount}}元</text>
+      <text class="label">总费用</text>
+      <text class="value">{{billDetail.totalAmount}}元</text>
     </view>
     <view class="divider"></view>
     <view class="bill-row">
-      <text>减免费用</text>
-      <text>{{billDetail.discount}}元</text>
+      <text class="label">减免费用</text>
+      <text class="value">{{billDetail.discount}}元</text>
     </view>
     <view class="divider"></view>
     <view class="bill-row">
-      <text>滞纳金</text>
-      <text>{{billDetail.lateFee}}元</text>
+      <text class="label">滞纳金</text>
+      <text class="value">{{billDetail.lateFee}}元</text>
     </view>
   </view>
 
   <!-- 第四个卡片:应缴费用 -->
   <view class="bill-card">
     <view class="bill-row total">
-      <text>应缴费用</text>
-      <text>{{billDetail.amount}}元</text>
+      <text class="label">应缴费用</text>
+      <text class="value"><text class="amount">{{billDetail.amount}}</text>元</text>
     </view>
   </view>
 </view>

+ 19 - 3
pages/zhangdanxiangqing/zdxiangqing.wxss

@@ -80,8 +80,25 @@
 .bill-row {
   display: flex;
   justify-content: space-between;
-  align-items: center;
-  padding: 16rpx 0;
+  padding: 10rpx 0;
+}
+
+/* 列名样式 */
+.bill-row .label {
+  color: rgba(46, 48, 56, 1);
+  font-size: 32rpx;
+}
+
+/* 数据值样式 */
+.bill-row .value {
+  color: rgba(104, 108, 128, 1);
+  font-weight: 500;
+}
+
+
+/* 所有金额数字的样式 */
+.value .amount {
+  color: rgba(239, 93, 93, 1);
 }
 
 .divider {
@@ -91,7 +108,6 @@
 }
 
 .total {
-  font-weight: bold;
   font-size: 32rpx;
 }