<!-- pages/Calculation/Calculation.wxml -->
<view class="page-body">
  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">土壤有机质(g/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="0~30" 
        value="{{OM}}" 
        bindinput="onOMChange" 
        inputmode="decimal"
      />
    </view>
  </view>
</view>

<view class="page-body">
  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">土壤粘粒(g/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="50~400" 
        value="{{CL}}" 
        bindinput="onCLChange" 
        inputmode="decimal"
      />
    </view>
  </view>
</view>

<view class="page-body">
  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">阳离子交换量(cmol/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="0~15" 
        value="{{CEC}}" 
        bindinput="onCECChange" 
        inputmode="decimal"
      />
    </view>
  </view>
</view>

<view class="page-body">
  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">交换性氢(cmol/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="0~1" 
        value="{{H_plus}}" 
        bindinput="onH_plusChange" 
        inputmode="decimal"
      />
    </view>
  </view>
</view>

<view class="page-body">
  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">水解氮(g/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="0~0.2" 
        value="{{N}}" 
        bindinput="onNChange" 
        inputmode="decimal"
      />
    </view>
  </view>
</view>

<view class="page-body">
  <view class="white-box">
    <view class="input-row">
      <view class="page-section-title">交换性铝(cmol/kg)：</view>
      <input 
        class="input-field" 
        type="text" 
        placeholder="0~6" 
        value="{{Al3_plus}}" 
        bindinput="onAl3_plusChange" 
        inputmode="decimal"
      />
    </view>
  </view>
</view>


<!-- 弹窗部分 -->
  <view wx:if="{{showResultPopup}}" class="modal-overlay">
    <view class="modal">
      <view class="modal-header">
        <text>ΔPH值</text>
        <button class="close-btn" bindtap="closePopup">×</button>
      </view>
      <view class="modal-body">
        <text>{{result}}</text>
      </view>
    </view>
  </view>

<view class="green-btn">
  <button class="btn" bindtap="calculate">计算</button>
</view>