<!--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>
          <!-- <picker class='baseitem_value' mode='selector' bindchange='choseCustomer' value='{{customerIndex}}' range-key="name" range='{{customer}}'>
          <text>{{customer[customerIndex].name}}</text>
        </picker> -->
          <view class='baseitem_value' data-x='购货客户' data-item='{{which}}'>
            {{customer[customerIndex].Name}}
          </view>
        </view>
        <view class='horizontallineView'></view>


        <view class='baseitem'>
          <text class='baseitem_key'>发货时间</text>
          <picker class='baseitem_value' mode="multiSelector" value="{{dateTime1}}" 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>
          <!-- <picker class='baseitem_value' mode='selector' bindchange='choseUnit' value='{{isUnit}}' range-key="Name" range='{{unit}}'>
          <text>{{unit[isUnit].Name}}</text>
        </picker> -->
          <view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='会计部门' data-item='{{which}}'>
            {{unit[isUnit].Name}}
          </view>
        </view>
        <view class='horizontallineView'></view>

        <view class='baseitem'>
          <text class='baseitem_key'>销售部门</text>
          <!-- <picker class='baseitem_value' mode='selector' bindchange='choseDepartment' value='{{departmentIndex}}' range-key="name" range='{{department}}'>
          <text>{{department[departmentIndex].name}}</text>
        </picker> -->
          <view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='部门' data-item='{{which}}'>
            {{department[departmentIndex].Name}}
          </view>
        </view>
        <view class='horizontallineView'></view>

         <view class='baseitem'>
          <text class='baseitem_key'>业务员</text>
          <!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
          <text>{{saletype[saletypeIndex].name}}</text>
        </picker> -->
          <view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='业务员' data-item='{{which}}'>
            {{employee[empIndex].Name}}
          </view>
        </view>
        <view class='horizontallineView'></view>

          <view class='baseitem'>
          <text class='baseitem_key'>仓库</text>
          <!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
          <text>{{saletype[saletypeIndex].name}}</text>
        </picker> -->
          <view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='仓库' data-item='{{which}}'>
            {{store[storeIndex].Name}}
          </view>
        </view>
        <view class='horizontallineView'></view>

        <view class='baseitem'>
          <text class='baseitem_key'>销售类型</text>
          <!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
          <text>{{saletype[saletypeIndex].name}}</text>
        </picker> -->
          <view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='销售类型' data-item='{{which}}'>
            {{saletype[saletypeIndex].Name}}
          </view>
        </view>
        <view class='horizontallineView'></view>

         <view class='baseitem'>
          <text class='baseitem_key'>配送方式</text>
          <!-- <picker class='baseitem_value' mode='selector' bindchange='choseSaletype' value='{{saletypeIndex}}' range-key="name" range='{{saletype}}'>
          <text>{{saletype[saletypeIndex].name}}</text>
        </picker> -->
          <view class='baseitem_value' bindtap="powerDrawer" data-statu="open" data-x='配送方式' data-item='{{which}}'>
            {{takeGoodsType[takeGoodsTypeIndex].Name}}
          </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="{{addrs}}"></input>
        </view>
        <view class='horizontallineView'></view>
        
        <view class='baseitem'>
          <text class='baseitem_key'>摘要</text>
          <input class='baseitem_value' bindinput='getRemark' value="{{remark}}"></input>
        </view>
        <view class='horizontallineView'></view>

        <!-- <button class='submit' catchtap='submitForm'>保存</button> -->

        <!-- <view class='baseitem'>
        <text class='baseitem_key' space="emsp">摘  要</text>
        <input class='baseitem_value' bindinput='getRemark' placeholder='请输入摘要' placeholder-style='color:rgb(202, 202, 202)'></input>
      </view> -->
      </view>
    </scroll-view>
    <view class="drawer_screen" bindtap="powerDrawer" data-item='{{which}}' data-statu="close" wx:if="{{showModalStatus}}"></view>
    <!--content-->
    <!--使用animation属性指定需要执行的动画-->
    <view animation="{{animationData}}" data-item='{{which}}' class="drawer_box" wx:if="{{showModalStatus}}">
      <!--drawer content-->
      <view class='top' data-item='{{which}}'>
        <input data-item='{{which}}' 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" data-item='{{which}}' catchtap='itemclick' data-idx='{{idx}}' data-ID="{{item.ID}}" data-Name='{{item.Name}}'>
            <text class='text3'>{{item.Name}}</text>
          </view>
        </block>
      </view>
      <view class="btn_ok" bindtap="powerDrawer" data-statu="close">取消</view>
    </view>
  </swiper-item>
  <!-- 订单详细 -->
  <swiper-item class="swiper-items2">
    <scroll-view scroll-x="false" scroll-y="true" class='scroll-views'>
      <!-- <view class='main-body'> -->
        <block wx:for="{{obj}}" wx:key="item" wx:for-index="idx">
          <!-- <template is="fodder" data="{{...item}}"></template> -->
          <view class='itemView'>
            <view class='baseitem'>
              <text class='baseitem_key2'>存货名称</text>
              <view class='baseitem_value2' bindtap="powerDrawer1" data-statu="open" data-idx='{{idx}}'>
                {{obj[idx].Goods_Name}}
              </view>
            </view>
            <view class='horizontallineView'></view>

            <view class='baseitem'>
              <text class='baseitem_key1'>报货数量</text>
              <input class='baseitem_value1' bindinput='getGoodsNum' placeholder='请输入报货数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].goodsNum}}'></input>
            </view>
            <view class='horizontallineView'></view>


            <view class='baseitem'>
              <text class='baseitem_key1' space='ensp'>辅 数 量</text>
              <input class='baseitem_value1' bindinput='getSecondNum' placeholder='请输入辅数量' type='digit' placeholder-style='color:rgb(202, 202, 202)' data-idx='{{idx}}' value='{{obj[idx].goodsSecondNum}}'></input>
            </view>
            <view class='horizontallineView'></view>

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

            <view class='baseitem'>
              <text class='baseitem_key1'>政策单价</text>
              <text class='baseitem_value1' data-idx='{{idx}}'>{{obj[idx].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> -->

      <!-- <template name='fodder'>
        
      </template> -->
      <button class='submit' catchtap='submitForm'>保存</button>
    </scroll-view>

    <view class="drawer_screen" bindtap="powerDrawer1" data-statu="close" wx:if="{{showModalStatus1}}"></view>
    <!--content-->
    <!--使用animation属性指定需要执行的动画-->
    <view animation="{{animationData}}" class="drawer_box" wx:if="{{showModalStatus1}}">
      <!--drawer content-->
      <view class='top'>
        <input input class="sousuo" bindinput="select1" placeholder='请输入搜索'>
        </input>
      </view>
      <view class="drawer_content">
        <block wx:for="{{goods}}" wx:key="item">
          <view class="grid1" catchtap='itemclick1' data-idx='{{idx}}' data-Name='{{item.Goods_Name}}' data-policyprice='{{item.PolicyPrice}}' data-data='{{item}}'>
            <text class='text3'>{{item.Goods_Name}}</text>
          </view>
        </block>
      </view>
      <view class="btn_ok" bindtap="powerDrawer1" data-statu="close">取消</view>
    </view>
  </swiper-item>
</swiper>