<!--pages/orderinfo/orderinfo.wxml-->

<view class="swiper-tab">
  <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" data-current="0" bindtap="swichNav">基本信息</view>
  <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" data-current="1" bindtap="swichNav">订单明细</view>
</view>

<swiper current="{{currentTab}}" class="swiper-box" duration="300" style="height:{{winHeight - 55}}px" bindchange="bindChange">
  <!-- 基本信息 -->
  <swiper-item class="swiper-items1">
    <scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
      <view class='main-body'>
        <view class='baseitem'>
          <text class='baseitem_key'>购货客户</text>
          <view class='baseitem_value' data-x='购货客户'>
            {{dmo.Customer_Name}}
          </view>
        </view>
        <view class='horizontallineView'></view>


        <!-- <view class='baseitem'>
          <text class='baseitem_key'>发货时间</text>
          <picker class='baseitem_value' mode="multiSelector" value="{{dmo.LoadTime}}" bindchange="changeDateTime1" range="{{dateTimeArray1}}">
            <view class="tui-picker-detail">
              {{dateTimeArray1[0][dateTime1[0]]}}-{{dateTimeArray1[1][dateTime1[1]]}}-{{dateTimeArray1[2][dateTime1[2]]}} {{dateTimeArray1[3][dateTime1[3]]}}:{{dateTimeArray1[4][dateTime1[4]]}}
            </view>
          </picker>
        </view>
        <view class='horizontallineView'></view> -->

        <!-- <view class='baseitem'>
          <text class='baseitem_key'>会计单位</text>
          <view class='baseitem_value'>
            {{dmo.AccountingUnit_Name}}
          </view>
        </view>
        <view class='horizontallineView'></view> -->

        <!-- <view class='baseitem'>
          <text class='baseitem_key'>销售部门</text>
          <view class='baseitem_value' >
            {{dmo.Department_Name}}
          </view>
        </view>
        <view class='horizontallineView'></view> -->

        <!-- <view class='baseitem'>
          <text class='baseitem_key'>业务员</text>
          <view class='baseitem_value' >
            {{dmo.Employee_Name}}
          </view>
        </view>
        <view class='horizontallineView'></view> -->

        <!-- <view class='baseitem'>
          <text class='baseitem_key'>仓库</text>
          <view class='baseitem_value' >
            {{dmo.Store_Name}}
          </view>
        </view>
        <view class='horizontallineView'></view> -->

        <!-- <view class='baseitem'>
          <text class='baseitem_key'>销售类型</text>
          <view class='baseitem_value' >
            {{dmo.SaleKind_Name}}
          </view>
        </view>
        <view class='horizontallineView'></view> -->

        <view class='baseitem'>
          <text class='baseitem_key'>配送方式</text>
          <view class='baseitem_value' bindtap="powerDrawer" data-x='配送方式'>
            {{dmo.TakeGoods_Type?dmo.TakeGoods_Type:"请选择配送方式"}}
          </view>
        </view>
        <view class='horizontallineView'></view>


        <view class='baseitem'>
          <text class='baseitem_key'>送货地址</text>
          <input class='baseitem_value' bindinput='getAddrs' placeholder='请输入送货地址' placeholder-style='color:rgb(202, 202, 202)' value="{{dmo.DeliverAddress}}"></input>
        </view>
        <view class='horizontallineView'></view>

        <view class='baseitem'>
          <text class='baseitem_key'>摘要</text>
          <input class='baseitem_value' bindinput='getRemark' placeholder='请输入摘要信息' value="{{dmo.Remark}}"></input>
        </view>
        <view class='horizontallineView'></view>
      </view>
    </scroll-view>
  </swiper-item>

  <!-- 订单详细 -->
  <swiper-item class="swiper-items2">
    <scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
      <block wx:for="{{dmo.Details}}" wx:key="item" wx:for-index="idx">
        <view class='itemView'>
          <view class='baseitem'>
            <text class='baseitem_key'>存货名称</text>
            <view class='baseitem_value'>
              {{item.Goods_Name}}
            </view>
          </view>
          <view class='horizontallineView'></view>

          <view class='baseitem'>
            <text class='baseitem_key'>报货数量</text>
            <input class='baseitem_value' bindinput='getGoodsNum' placeholder='请输入报货数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{item.UnitNum}}'></input>
          </view>
          <view class='horizontallineView'></view>


          <view class='baseitem'>
            <text class='baseitem_key' space='ensp'>辅 数 量</text>
            <input class='baseitem_value' bindinput='getSecondNum' placeholder='请输入辅数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{item.SecondNumber}}'></input>
          </view>
          <view class='horizontallineView'></view>

          <view class='baseitem'>
            <text class='baseitem_key' space='emsp'>单  价</text>
            <input class='baseitem_value' type='digit' bindinput='getPrice' placeholder='请输入单价' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{item.Price}}'></input>
          </view>
          <view class='horizontallineView'></view>

          <view class='baseitem'>
            <text class='baseitem_key'>政策单价</text>
            <text class='baseitem_value' data-idx='{{idx}}'>{{item.PolicyPrice}}</text>
          </view>
          <view class='horizontallineView'></view>

        </view>
        <view class='delete' catchtap='deleteItem' data-idx='{{idx}}'>删除</view>

      </block>
      <!-- <view class='add' catchtap='add'>
        <image class="ico" src="/imgs/tianjia.png"></image>
      </view> -->

      <view class='imageView' catchtap='add'>
        <image class='currentImage' src="/imgs/longWhiteBtn.png">
          <view class='btnTextView'>
            <text class='blueAddText'>添加存货</text>
          </view>
        </image>
      </view>

      <view class='bottomGroupView'>
        <view class='imageViewNoMargin' catchtap='moreBtnClick'>
          <image class='currentImage' src="/imgs/blueBtn.png">
            <view class='btnTextView'>
              <text class='btnText'>更多</text>
            </view>
          </image>
        </view>
        <view class='imageViewNoMargin' catchtap='submitForm'>
          <image class='currentImage' src="/imgs/blueBtn.png">
            <view class='btnTextView'>
              <text class='btnText'>保存</text>
            </view>
          </image>
        </view>
      </view>

      <!-- <button class='submit' catchtap='submitForm' wx:if="{{dmo.BillState=='未审核'}}">保存</button> -->
    </scroll-view>
  </swiper-item>
</swiper>

<view class="drawer_screen" catchtap="dialogClose" wx:if="{{showModalStatus}}"></view>
<view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus}}">
  <view class='top'>
    <input class="sousuo" bindinput="select" placeholder='请输入搜索'>
    </input>
  </view>
  <view class="drawer_content">
    <block wx:for="{{currency}}" wx:key="item" wx:for-index="idx">
      <view class="grid1" catchtap='itemclick' data-item='{{item}}'>
        <text class='text3'>{{item.Name}}</text>
      </view>
    </block>
  </view>
  <view class="btn_ok" catchtap="dialogClose">取消</view>
</view>