<!--pages/payee/add/add.wxml-->
<view class="ns" style="height:{{isIPX?'88px':'64px'}};">
  <image src="/image/apply/back.png" style="top:{{isIPX?'54px':'30px'}};" mode="widthFix" bindtap="back"></image>
  <text style="top:{{isIPX?'54px':'30px'}};">{{id?"查看":"新增"}}工程项目</text>
</view>
<view class="main-box table-box" style="margin-top:{{isIPX?'100px':'75px'}};">

    <van-field label="项目名称" value="{{ form.projectName }}" placeholder="项目名称" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.projectName"/>
    <van-field label="合同承建方" value="{{ form.projectContractor }}" placeholder="合同承建方" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.projectContractor"/>

    <van-field readonly label="开工日期" value="{{ form.startTime }}" placeholder="开工日期" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction	="down" bindtap="openBox" data-name="showStartTime"/>
    <van-calendar show="{{ showStartTime }}" bind:close="closeBox"  data-name="showStartTime" bind:confirm="onConfirmTime" data-value="form.startTime" show-confirm="{{ false }}" />

    <van-field label="竣工日期" value="{{ form.endTime }}" placeholder="竣工日期" border="{{ false }}" bind:change="onChange" input-align="right" required is-link arrow-direction	="down"  bindtap="openBox" data-name="showEndTime" />
    <van-calendar show="{{ showEndTime }}" bind:close="closeBox"  data-name="showEndTime" bind:confirm="onConfirmTime" data-value="form.endTime" show-confirm="{{ false }}" />

    <van-field label="合共价款（元）" value="{{ form.projectAmount }}" placeholder="合共价款（元）" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.projectAmount"/>


    <van-popup show="{{showYnProjcetStatus}}" round position="bottom"  bind:close="closeBox" data-name="showYnProjcetStatus">
      <van-picker
        columns="{{ynProjcetStatusOptions}}"
        show-toolbar
        value-key="dictLabel"
        bind:cancel="closeBox"
        bind:confirm="onConfirmYn"
        data-name="showYnProjcetStatus"
        data-value="form.ynProjcetStatus"
      />
    </van-popup>
    <van-field label="工程状态" value="{{ form.ynProjcetStatusText }}" placeholder="工程状态" border="{{ false }}" bind:change="onChange" input-align="right" required data-value="form.ynProjcetStatus" is-link arrow-direction	="down" bindtap="openBox" data-name="showYnProjcetStatus"/>

    <van-field label="备注" value="{{ form.remark }}" placeholder="备注" border="{{ false }}" bind:change="onChange" input-align="right"  data-value="form.remark"/>
  </view>
  <view class="bottom">
    <view class="btn2" bindtap="goSubmit">保存</view>
  </view>