StoreMessage.wxml 4.34 KB
<!--packageCustomer/components/StoreMessage/StoreMessage.wxml-->
<view class="store-message" wx:if="{{showPage}}">
    <!-- 盈亏情况 -->
  <view class="cell-title">
    <view class="title-text">盈亏情况</view>
    <view class="status">
      <image wx:if="{{infoData.profitAndLoss}}" src="{{IMG_URL}}customer/{{infoData.profitAndLoss == 1 ? 'success-icon' : 'warning-icon'}}.png" mode=""/>
      <text class="status-text mar-r20">{{ infoData.profitAndLoss == 1 ? '盈利' : infoData.profitAndLoss == 2 ? '亏损' : '-' }}</text>
    </view>
  </view>
  <view class="section">
    <view class="collapse-title" bindtap="toggleBusiness" data-has="{{infoData.displaySituationWarningList.length}}">
      <view class="title-text">展业情况</view>
      <view class="status">
        <image src="{{IMG_URL}}customer/{{infoData.displaySituation == 1 ? 'success-icon' : 'warning-icon'}}.png" mode=""/>
        <text class="status-text {{!infoData.displaySituationWarningList.length ? 'mar-r20' : ''}}" wx:if="{{!infoData.displaySituationWarningCount}}">{{ infoData.displaySituation == 1 ? '正常' : '预警' }}</text>
        <text class="status-text {{!infoData.displaySituationWarningList.length ? 'mar-r20' : ''}}" wx:if="{{infoData.displaySituationWarningCount}}">{{infoData.displaySituationWarningCount}}项预警</text>
        <image wx:if="{{infoData.displaySituationWarningList.length}}" src="{{IMG_URL}}customer/show-icon.png" class="arrow-icon {{showBusiness ? 'open' : ''}}" mode=""/>
      </view>
    </view>
    <!-- 动画容器:使用小程序animation属性 -->
    <view wx:if="{{infoData.displaySituationWarningList.length}}" class="collapsible-panel" animation="{{businessAnimation}}">
      <view class="summary-card business-content">
        <block wx:for="{{infoData.displaySituationWarningList}}" wx:key="index">
          <view class="summary-title">{{item.rule}}</view>
          <view class="summary-row">
            <text class="label">周期指标:</text>
            <text class="value red">{{ item.cycleIndicator }}</text>
            <text class="label ml">兜底要求:</text>
            <text class="value">{{ item.fallbackIndicator }}</text>
          </view>
        </block>
      </view>
    </view>
  </view>
  <view class="section">
    <view class="collapse-title" bindtap="toggleBottom" data-has="{{infoData.safetyIndexWarningList.length}}">
      <view class="title-text">兜底指标预警</view>
      <view class="status">
        <image src="{{IMG_URL}}customer/{{infoData.safetyIndexWarning == 1 ? 'success-icon' : 'warning-icon'}}.png" mode=""/>
        <text class="status-text {{!infoData.safetyIndexWarningList.length ? 'mar-r20' : ''}}" wx:if="{{!infoData.safetyIndexWarningCount}}">{{ infoData.safetyIndexWarning == 1 ? '正常' : '预警' }}</text>
        <text class="status-text {{!infoData.safetyIndexWarningList.length ? 'mar-r20' : ''}}" wx:if="{{infoData.safetyIndexWarningCount}}">{{infoData.safetyIndexWarningCount}}项预警</text>
        <image wx:if="{{infoData.safetyIndexWarningList.length}}" src="{{IMG_URL}}customer/show-icon.png" class="arrow-icon {{showBottom ? 'open' : ''}}" mode=""/>
      </view>
    </view>
    <view wx:if="{{infoData.safetyIndexWarningList.length}}" class="collapsible-panel" animation="{{bottomAnimation}}">
      <view class="summary-card bottom-content">
        <block wx:for="{{infoData.safetyIndexWarningList}}" wx:key="index">
          <view class="summary-title">{{item.rule}}</view>
          <view class="summary-row">
            <text class="label">周期指标:</text>
            <text class="value red">{{ item.cycleIndicator }}</text>
            <text class="label ml">兜底要求:</text>
            <text class="value">{{ item.fallbackIndicator }}</text>
          </view>
        </block>
      </view>
    </view>
  </view>

  <!-- 驻店人员 -->
  <view class="person-cell">
    <view class="title-text">驻店人员</view>
    <view class="status" wx:if="{{!infoData.storePersonnel.length}}">
      <text class="status-text">无</text>
    </view>
    <view wx:if="{{infoData.storePersonnel.length}}" class="item-box">
      <block wx:for="{{infoData.storePersonnel}}" wx:key="index">
        <view class="resident-item">
          <text class="name">{{item.personnelName}}</text>
          <text class="phone">{{item.personnelMobile}}</text>
        </view>
      </block>
    </view>
  </view>
  
</view>