shish 19 saat önce
ebeveyn
işleme
c4f1c2f82b

+ 2 - 2
ghsApp/src/pagesClient/member/detail.vue

@@ -31,10 +31,10 @@
             </view>
         </view>
         <view class="user-info_data order-wrap" style="margin-top: 30upx; border-top: 1upx solid #f5f7fa; padding-top: 10upx;">
-            <!-- 净 balance 统一标「余额」:负数红色带负号,正数黑色无负号 -->
+            <!-- 净 balance:≥0 标「余额」黑色;&lt;0 标「待结」红色带负号 -->
             <view class="total-blo" style="display: flex; justify-content: space-around; align-items: center; padding: 20upx 0 0upx;">
               <view class="total-list" @click="pageTo({ url: '/admin/custom/balanceChange?customId='+userInfo.id})" style="flex: 1; text-align: center; border-right: 1upx solid #f0f2f5; display: flex; flex-direction: column; align-items: center; justify-content: center;">
-                <view class="app-color-3" style="font-size: 26upx; color: #909399; margin-bottom: 8upx;">余额</view>
+                <view class="app-color-3" style="font-size: 26upx; color: #909399; margin-bottom: 8upx;">{{ Number(userInfo.balance) < 0 ? '待结' : '余额' }}</view>
                 <view class="list-num" :style="Number(userInfo.balance) < 0 ? 'color:#fa3534; font-size: 40upx; font-weight: bold;' : 'color:#303133; font-size: 40upx; font-weight: bold;'">{{ formatAccountBalance(userInfo.balance) }}</view>
               </view>
 

+ 44 - 3
hdApp/src/pagesPurchase/components/gatheringList.vue

@@ -1,3 +1,8 @@
+<!--
+  采购挂账结清列表行
+  用途:展示待结金额、部分结清、当天/隔天售后;对齐 ghs pagesArrears/detailsItem。
+  谁用:pagesPurchase/gathering.vue
+-->
 <template>
   <view class="details-item">
     <view class="details-select" v-if="isEdit">
@@ -5,11 +10,13 @@
       <text class="iconfont iconweixuanzhong" v-else> </text>
     </view>
     <view class="details-main">
+      <!-- 右上角脱离文档流,不挤占价格/售后行 -->
+      <view class="detail-btn" @click.stop="goToDetai(info)">查看明细</view>
       <view class="item-header">
         <text class="name">采购单 {{info.orderSn}} </text>
       </view>
       <view class="item-row">
-        <view class="mark">{{ info.payTime.substr(5,11) }}</view>
+        <view class="mark">{{ info.payTime ? info.payTime.substr(5,11) : '' }}</view>
       </view>
       <view class="item-row">
         <view class="price-block">
@@ -18,8 +25,13 @@
           </view>
           <view v-else class="price">¥{{ parseFloat(info.remainDebtPrice || info.debtPrice) }}</view>
         </view>
-        <view class="price" style="border:1upx solid #67a0f7;border-radius:10upx;font-weight:normal;color:#3385FF;font-size:32upx;width:180upx;height:80upx;justify-content:center;"
-         @click.stop="goToDetai(info)">查看明细</view>
+      </view>
+      <!-- 售后退款单独成行:当天 / 隔天,对齐 pagesArrears/detailsItem -->
+      <view class="item-row" v-if="Number(info.tkPrice) > 0">
+        <view class="refund-tip refund-tip-same">当天售后 ¥{{ parseFloat(info.tkPrice) }}</view>
+      </view>
+      <view class="item-row" v-if="Number(info.nextDayTkPrice) > 0">
+        <view class="refund-tip refund-tip-next">隔天售后 ¥{{ parseFloat(info.nextDayTkPrice) }}</view>
       </view>
       <view v-if="info.showPartialClear" class="item-row">
         <view class="price price--clear-detail">
@@ -76,6 +88,25 @@ export default {
   }
   .details-main {
     flex: 1;
+    position: relative;
+    // 给右上角「查看明细」留空,避免单号被挡住
+    padding-right: 200upx;
+  }
+  .detail-btn {
+    position: absolute;
+    top: 0;
+    right: 0;
+    z-index: 2;
+    width: 180upx;
+    height: 80upx;
+    border: 1upx solid #67a0f7;
+    border-radius: 10upx;
+    font-size: 32upx;
+    font-weight: normal;
+    color: #3385FF;
+    display: flex;
+    align-items: center;
+    justify-content: center;
   }
   .item-header {
     display: flex;
@@ -131,6 +162,16 @@ export default {
       color: #f50e24;
       line-height: 36upx;
     }
+    .refund-tip {
+      font-size: 26upx;
+      font-weight: normal;
+    }
+    .refund-tip-same {
+      color: red;
+    }
+    .refund-tip-next {
+      color: #e67e22;
+    }
   }
 }
 </style>

+ 219 - 25
hdApp/src/pagesPurchase/gathering.vue

@@ -1,6 +1,9 @@
+<!--
+  采购结清页:按供货商查看未结清挂账,支持勾选结清与自定义金额付款。
+  顶部「自定义金额」与 board 同款时间区间筛选并排,避免浮层挡住列表操作。
+-->
 <template>
 <view class="app-content">
-  <button class="admin-button-com blue custom-amount-btn" @click="goCustomPay">自定义金额</button>
   <view class="order-page">
     <view class="top-view">
       <view class="top-row">
@@ -8,7 +11,18 @@
           <image class="logo" :src="ghsInfo.avatar" />
           <text class="name">{{ ghsInfo.name}}</text>
         </view>
-        <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
+        <view class="top-actions">
+          <!-- 自定义金额:加高便于点按,与日历触发器并排 -->
+          <button class="admin-button-com blue custom-amount-btn" @click="goCustomPay">自定义金额付款</button>
+          <!-- 时间筛选:与生日板 board 同款触发器样式 -->
+          <view class="date-filter-trigger" @click="openDateRangeModal">
+            <view class="date-filter-icon">
+              <view class="date-filter-icon-line"></view>
+            </view>
+            <text class="date-filter-text">{{ dateFilterLabel }}</text>
+            <view class="date-filter-arrow"></view>
+          </view>
+        </view>
       </view>
     </view>
     <view scroll-y class="shop-list">
@@ -55,6 +69,33 @@
         </view>
       </view>
     </view>
+
+    <!-- 时间区间弹窗:确认后仍走原 selectDateFn 同款 searchTime=custom 参数 -->
+    <modal-module
+      :show="showDateRangeModal"
+      :maskClosable="true"
+      title="时间区间"
+      padding="30rpx"
+      width="86%"
+      @click="dateRangeModalClick"
+    >
+      <template v-slot:content>
+        <view class="date-range-form">
+          <view class="date-range-row">
+            <text class="date-range-label">开始日期</text>
+            <picker mode="date" :value="draftStartDate || todayDate" @change="onDraftStartDateChange" class="date-range-picker">
+              <view :class="['date-range-value', draftStartDate ? '' : 'placeholder']">{{ draftStartDate || '请选择' }}</view>
+            </picker>
+          </view>
+          <view class="date-range-row">
+            <text class="date-range-label">结束日期</text>
+            <picker mode="date" :value="draftEndDate || todayDate" @change="onDraftEndDateChange" class="date-range-picker">
+              <view :class="['date-range-value', draftEndDate ? '' : 'placeholder']">{{ draftEndDate || '请选择' }}</view>
+            </picker>
+          </view>
+        </view>
+      </template>
+    </modal-module>
   </view>
 </view>
 </template>
@@ -63,10 +104,10 @@ import gatheringList from './components/gatheringList'
 import DebtListPager from '@/components/module/debt-list-pager'
 import { purchaseDebtList, ghsDetail, purchaseClearCreateOrder } from "@/api/purchase/index";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
-import DateSelect from "@/components/module/dateSelect";
+import ModalModule from '@/components/plugin/modal';
 import debtListPage from '@/mixins/debtListPage'
 export default {
-  components: { gatheringList, AppWrapperEmpty, DateSelect, DebtListPager },
+  components: { gatheringList, AppWrapperEmpty, ModalModule, DebtListPager },
   mixins: [debtListPage],
   data () {
     return {
@@ -81,10 +122,16 @@ export default {
 			endTime:'',
       ghsId:0,
       justLoaded: false,
-      salt: ''
+      salt: '',
+      // board 同款时间区间弹窗状态
+      showDateRangeModal: false,
+      draftStartDate: '',
+      draftEndDate: '',
+      todayDate: ''
     }
   },
   onLoad() {
+    this.todayDate = this.formatDate(new Date())
     this.initData()
   },
   onShow () {
@@ -106,6 +153,10 @@ export default {
     })
   },
   computed: {
+    // 触发器文案:未选显示「时间」,已选显示「已选」,与 board 一致
+    dateFilterLabel() {
+      return this.searchTime === 'custom' && this.startTime && this.endTime ? '已选' : '时间'
+    },
     selectList () {
       let list = [];
       if (this.detailsList) {
@@ -166,6 +217,45 @@ export default {
 				uni.stopPullDownRefresh()
 			})
 		},
+    // 打开区间弹窗:草稿回填已生效条件
+    openDateRangeModal() {
+      this.draftStartDate = this.startTime || ''
+      this.draftEndDate = this.endTime || ''
+      this.showDateRangeModal = true
+    },
+    onDraftStartDateChange(e) {
+      this.draftStartDate = e.detail.value
+    },
+    onDraftEndDateChange(e) {
+      this.draftEndDate = e.detail.value
+    },
+    formatDate(date) {
+      const y = date.getFullYear()
+      const m = `${date.getMonth() + 1}`.padStart(2, '0')
+      const d = `${date.getDate()}`.padStart(2, '0')
+      return `${y}-${m}-${d}`
+    },
+    // 弹窗确定:与 board 一致,index 0 取消;通过原 selectDateFn 刷新列表
+    dateRangeModalClick(e) {
+      if (e.index === 0) {
+        this.showDateRangeModal = false
+        return
+      }
+      if (!this.draftStartDate || !this.draftEndDate) {
+        this.$msg('请选择开始日期和结束日期')
+        return
+      }
+      if (this.draftStartDate > this.draftEndDate) {
+        this.$msg('开始日期不能晚于结束日期')
+        return
+      }
+      this.showDateRangeModal = false
+      this.selectDateFn({
+        searchTime: 'custom',
+        startTime: this.draftStartDate,
+        endTime: this.draftEndDate
+      })
+    },
     reloadDebtListPage() {
       return this.initData()
     },
@@ -279,20 +369,6 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-.custom-amount-btn {
-  position: fixed;
-  top: 112upx;
-  right: 24upx;
-  z-index: 110;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  width: 200upx;
-  height: 80upx;
-  font-size: 30upx;
-  box-shadow: 0upx 4upx 12upx 0upx rgba(9, 197, 103, 0.35);
-  box-sizing: border-box;
-}
 .order-page {
   height: 100%;
   display: flex;
@@ -321,16 +397,22 @@ export default {
       .info-item {
         display: flex;
         align-items: center;
+        flex: 1;
+        min-width: 0;
         .logo {
-          margin-right: 10upx;
-          width: 35upx;
-          height: 35upx;
-          border-radius: 50%;
+          margin-right: 16upx;
+          width: 72upx;
+          height: 72upx;
+          border-radius: 8upx;
+          flex-shrink: 0;
         }
         .name {
-          font-size: 28upx;
+          font-size: 34upx;
           font-weight: 600;
           color: #333333;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
         }
       }
       .price-item {
@@ -338,10 +420,92 @@ export default {
         font-weight: 600;
         color: #333333;
       }
+      .top-actions {
+        display: flex;
+        align-items: center;
+        flex-shrink: 0;
+        margin-left: 12upx;
+      }
+      /* 自定义金额:长方形按钮,与头像高度更协调 */
+      .custom-amount-btn {
+        margin: 0;
+        margin-right: 28upx;
+        height: 64upx;
+        line-height: 64upx;
+        padding: 0 20upx;
+        font-size: 26upx;
+        border-radius: 8upx;
+      }
+      /* 时间筛选触发器:长方形,对齐自定义金额按钮 */
+      .date-filter-trigger {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        justify-content: center;
+        height: 64upx;
+        padding: 0 14upx;
+        box-sizing: border-box;
+        background: #f0fbf5;
+        border: 1upx solid #08b955;
+        border-radius: 8upx;
+        box-shadow: 0 4upx 12upx rgba(8, 185, 85, 0.12);
+      }
+      .date-filter-icon {
+        flex-shrink: 0;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 28upx;
+        height: 28upx;
+        margin-right: 8upx;
+        border: 2upx solid #08b955;
+        border-radius: 5upx;
+        box-sizing: border-box;
+        position: relative;
+      }
+      .date-filter-icon::before,
+      .date-filter-icon::after {
+        content: '';
+        position: absolute;
+        top: -6upx;
+        width: 4upx;
+        height: 8upx;
+        background: #08b955;
+        border-radius: 2upx;
+      }
+      .date-filter-icon::before {
+        left: 4upx;
+      }
+      .date-filter-icon::after {
+        right: 4upx;
+      }
+      .date-filter-icon-line {
+        width: 14upx;
+        height: 2upx;
+        margin-top: 4upx;
+        background: #08b955;
+      }
+      .date-filter-text {
+        flex-shrink: 0;
+        line-height: 26upx;
+        font-size: 26upx;
+        color: #08b955;
+        font-weight: 500;
+      }
+      .date-filter-arrow {
+        flex-shrink: 0;
+        align-self: center;
+        width: 12upx;
+        height: 12upx;
+        margin-left: 6upx;
+        border-top: 2upx solid #08b955;
+        border-right: 2upx solid #08b955;
+        transform: rotate(45deg) translateY(-1upx);
+      }
     }
   }
   .shop-list {
-		margin-top:80upx;
+		margin-top:120upx;
     padding: 20upx 0;
     flex: 1;
     /* 给底部固定层(分页器 + 操作栏 + 刘海安全区)留出滚动空间,避免最后几笔被挡住 */
@@ -422,4 +586,34 @@ export default {
     color: $mainColor !important;
   }
 }
+.date-range-form {
+  width: 100%;
+}
+.date-range-row {
+  display: flex;
+  align-items: center;
+  height: 84upx;
+  border-bottom: 1upx solid #eee;
+}
+.date-range-row:last-child {
+  border-bottom: 0;
+}
+.date-range-label {
+  flex: 0 0 150upx;
+  font-size: 28upx;
+  color: #333;
+}
+.date-range-picker {
+  flex: 1;
+}
+.date-range-value {
+  height: 84upx;
+  line-height: 84upx;
+  text-align: right;
+  font-size: 28upx;
+  color: #333;
+}
+.date-range-value.placeholder {
+  color: #999;
+}
 </style>