<view class='tab-box'>
    <view class="left">
        <view class="user line-1">
            {{language[content.dateType]||content.dateType}}-{{language[content.username]||content.username}}_{{language[content.where.isleave?(content.where.isleave==1?'在职':'离职'):"全部"]||content.where.isleave?(content.where.isleave==1?'在职':'离职'):"全部"}}
        </view>
        <view class="type" bind:tap="openTypeShow"><text
                class="iconfont icon-xiangxixinxi1" />{{language[content.where.type]||content.where.type ||'订单类型'}}
        </view>
        <view class="type" bind:tap="openTradefieldShow"><text
                class="iconfont icon-lingyu" />{{language[content.where.tradefield]||content.where.tradefield ||'领域'}}
        </view>
    </view>
    <view class="right">
        <view class="search-box" hover-class="navigator-hover" bindtap="changeSearchShow">
            <text class="iconfont icon-a-sousuolansousuo" />
        </view>
    </view>
</view>
<view wx-if="{{searchShow}}">
    <van-transition show="{{ searchShow }}" name='fade' duration='300'>
        <view>
            <van-search focus="{{focus}}" value="{{searchValue}}" placeholder="{{language['请输入关键字']||'请输入关键字'}}"
                bind:search="onSearch" bind:clear="onClear" bind:change="onChange" />
        </view>
    </van-transition>
</view>
<view style="height: 20rpx;" />
<Yl_ListBox id='ListBox' bind:getlist='getList'>
    <block wx:if="{{content.datatype == 1}}">
        <view class="global-card" wx:for="{{list}}" wx:key="sa_orderitemsid">
            <view class="title">
                <text class="tag" style="background-color: #3874F6;">{{language[item.type]||item.type}}</text>
                <text class="tag"
                    style="background-color: #67C23A;">{{language[item.tradefield]||item.tradefield}}</text>
                {{item.sonum}}
            </view>
            <view class="row">erp{{language['单号']||'单号'}}：{{item.erpbillno ||' --'}}</view>
            <view class="row">{{language['企业名称']||'企业名称'}}：{{item.enterprisename ||' --'}}</view>
            <view class="row">{{language['项目名称']||'项目名称'}}：{{item.projectname ||' --'}}</view>
            <view class="row">{{language['业务员']||'业务员'}}：{{item.salername ||' --'}}</view>

            <view class="row" wx:if="{{item.expanded}}">{{language['行号']||'行号'}}：{{item.rowno ||' --'}}</view>
            <view class="row">{{language['产品名称']||'产品名称'}}：{{item.itemname ||' --'}}</view>
            <view class="row">{{language['产品编号']||'产品编号'}}：{{item.itemno ||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">
                {{language['型号']||'型号'}}：{{language[item.model]||item.model||' --'}}
            </view>
            <view class="row" wx:if="{{siteid!='HY' && item.expanded}}">
                {{language['规格']||'规格'}}：{{language[item.spec]||item.spec||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称通径']||'公称通径'}}：{{item.caliber||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称压力']||'公称压力'}}：{{item.nominalpressureStr||' --'}}
            </view>
            <view class="row" wx:if="{{item.expanded}}">{{language['需求日期']||'需求日期'}}：{{item.needdate||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['回复交期']||'回复交期'}}：{{item.deliverydate||' --'}}</view>
            <view class="row">{{language['数量']||'数量'}}：{{item.qty||' --'}}</view>
            <view class="row">{{language['牌价']||'牌价'}}：<text style="color: #3874F6;">{{item.marketprice||' --'}}</text>
            </view>
            <view class="row">{{language['订单单价']||'订单单价'}}：<text style="color: #3874F6;">{{item.price||' --'}}</text>
            </view>
            <view class="row">{{language['订单金额']||'订单金额'}}：<text style="color: #3874F6;">{{item.amount||' --'}}</text>
            </view>
            <view wx:if="{{item.expanded}}">
                <view class="row">
                    {{language['未出货数量']||'未出货数量'}}：<text style="color: #3874F6;">{{item.unlogisticsqty||' --'}}</text>
                </view>
                <view class="row">
                    {{language['已开票金额']||'已开票金额'}}：<text style="color: #3874F6;">{{item.invoiceamount||' --'}}</text>
                </view>
                <view class="row">
                    {{language['已核销金额']||'已核销金额'}}：<text style="color: #3874F6;">{{item.writeoffamount||' --'}}</text>
                </view>
                <view class="row">{{language['退货数量']||'退货数量'}}：{{item.returngty||' --'}}</view>
                <view class="row">{{language['退款金额']||'退款金额'}}：<text
                        style="color: #3874F6;">{{item.returnamount||' --'}}</text></view>
                <view class="row">
                    {{language['材质']||'材质'}}：{{language[item.material]||item.material||' --'}}
                </view>
                <block wx:if="{{siteid=='HY'}}">
                    <view class="row">
                        {{language['产线']||'产线'}}：{{language[item.prodline]||item.prodline||' --'}}
                    </view>
                    <view class="row">
                        {{language['装置']||'装置'}}：{{language[item.device]||item.device||' --'}}
                    </view>
                    <view class="row">
                        {{language['备注']||'备注'}}：{{language[item.specalnote]||item.specalnote||' --'}}
                    </view>
                </block>
            </view>
            <view class="{{item.expanded?'expanded up':'expanded'}}" data-index="{{index}}" bind:tap="changeExpanded">
                {{item.expanded?'简略信息':'详情信息'}}
                <text class="iconfont icon-dianjizhankai" />
            </view>
        </view>
    </block>

    <block wx:elif="{{content.datatype == 2}}">
        <view class="global-card" wx:for="{{list}}" wx:key="sa_orderitemsid">
            <view class="title">
                <text class="tag" style="background-color: #3874F6;">{{language[item.type]||item.type}}</text>
                <text class="tag"
                    style="background-color: #67C23A;">{{language[item.tradefield]||item.tradefield}}</text>
                {{item.sonum}}
            </view>
            <view class="row">erp{{language['单号']||'单号'}}：{{item.erpbillno ||' --'}}</view>
            <view class="row">{{language['企业名称']||'企业名称'}}：{{item.enterprisename ||' --'}}</view>
            <view class="row">{{language['项目名称']||'项目名称'}}：{{item.projectname ||' --'}}</view>
            <view class="row">{{language['业务员']||'业务员'}}：{{item.salername ||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['行号']||'行号'}}：{{item.rowno ||' --'}}</view>
            <view class="row">{{language['产品名称']||'产品名称'}}：{{item.itemname ||' --'}}</view>
            <view class="row">{{language['产品编号']||'产品编号'}}：{{item.itemno ||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">
                {{language['型号']||'型号'}}：{{language[item.model]||item.model||' --'}}
            </view>
            <view class="row" wx:if="{{siteid!='HY' && item.expanded}}">
                {{language['规格']||'规格'}}：{{language[item.spec]||item.spec||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称通径']||'公称通径'}}：{{item.caliber||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称压力']||'公称压力'}}：{{item.nominalpressureStr||' --'}}
            </view>
            <view class="row" wx:if="{{item.expanded}}">{{language['需求日期']||'需求日期'}}：{{item.needdate||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['回复交期']||'回复交期'}}：{{item.deliverydate||' --'}}</view>
            <view class="row">{{language['数量']||'数量'}}：{{item.qty||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['牌价']||'牌价'}}：<text
                    style="color: #3874F6;">{{item.marketprice||' --'}}</text></view>
            <view class="row" wx:if="{{item.expanded}}">{{language['订单单价']||'订单单价'}}：<text
                    style="color: #3874F6;">{{item.price||' --'}}</text></view>
            <view class="row">{{language['订单金额']||'订单金额'}}：<text style="color: #3874F6;">{{item.amount||' --'}}</text>
            </view>
            <view class="row">
                {{language['出货数量']||'出货数量'}}：{{item.logisticsqty||' --'}}
            </view>
            <view class="row">
                {{language['出货金额']||'出货金额'}}：<text style="color: #3874F6;">{{item.logisticsamount||' --'}}</text>
            </view>
            <view class="row" wx:if="{{item.expanded}}">{{language['审核时间']||'审核时间'}}：{{item.checkdate||' --'}}</view>
            <view class="{{item.expanded?'expanded up':'expanded'}}" data-index="{{index}}" bind:tap="changeExpanded">
                {{item.expanded?'简略信息':'详情信息'}}
                <text class="iconfont icon-dianjizhankai" />
            </view>
        </view>
    </block>

    <block wx:elif="{{content.datatype == 3}}">
        <view class="global-card" wx:for="{{list}}" wx:key="sa_orderitemsid">
            <view class="title">
                <text class="tag" style="background-color: #3874F6;">{{language[item.type]||item.type}}</text>
                <text class="tag"
                    style="background-color: #67C23A;">{{language[item.tradefield]||item.tradefield}}</text>
                {{item.sonum}}
            </view>
            <view class="row">erp{{language['单号']||'单号'}}：{{item.erpbillno ||' --'}}</view>
            <view class="row">{{language['企业名称']||'企业名称'}}：{{item.enterprisename ||' --'}}</view>
            <view class="row">{{language['项目名称']||'项目名称'}}：{{item.projectname ||' --'}}</view>
            <view class="row">{{language['业务员']||'业务员'}}：{{item.salername ||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['行号']||'行号'}}：{{item.rowno ||' --'}}</view>
            <view class="row">{{language['产品名称']||'产品名称'}}：{{item.itemname ||' --'}}</view>
            <view class="row">{{language['产品编号']||'产品编号'}}：{{item.itemno ||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">
                {{language['型号']||'型号'}}：{{language[item.model]||item.model||' --'}}
            </view>
            <view class="row" wx:if="{{siteid!='HY' && item.expanded}}">
                {{language['规格']||'规格'}}：{{language[item.spec]||item.spec||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称通径']||'公称通径'}}：{{item.caliber||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称压力']||'公称压力'}}：{{item.nominalpressureStr||' --'}}
            </view>
            <view class="row" wx:if="{{item.expanded}}">{{language['需求日期']||'需求日期'}}：{{item.needdate||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['回复交期']||'回复交期'}}：{{item.deliverydate||' --'}}</view>
            <view class="row">{{language['数量']||'数量'}}：{{item.qty||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['牌价']||'牌价'}}：<text
                    style="color: #3874F6;">{{item.marketprice||' --'}}</text></view>
            <view class="row" wx:if="{{item.expanded}}">{{language['订单单价']||'订单单价'}}：<text
                    style="color: #3874F6;">{{item.price||' --'}}</text></view>
            <view class="row">{{language['订单金额']||'订单金额'}}：<text style="color: #3874F6;">{{item.amount||' --'}}</text>
            </view>
            <view class="row">
                {{language['本次开票数量']||'本次开票数量'}}：{{item.invoiceaqty||' --'}}
            </view>
            <view class="row">
                {{language['本次开票金额']||'本次开票金额'}}：<text style="color: #3874F6;">{{item.invoiceamount||' --'}}</text>
            </view>
            <view class="row" wx:if="{{item.expanded}}">{{language['可开票金额']||'可开票金额'}}：<text
                    style="color: #3874F6;">{{item.uninvoiceamount||' --'}}</text></view>
            <view class="row" wx:if="{{item.expanded}}">{{language['备注']||'备注'}}：{{item.remarks||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['审核时间']||'审核时间'}}：{{item.checkdate||' --'}}</view>
            <view class="{{item.expanded?'expanded up':'expanded'}}" data-index="{{index}}" bind:tap="changeExpanded">
                {{item.expanded?'简略信息':'详情信息'}}
                <text class="iconfont icon-dianjizhankai" />
            </view>
        </view>
    </block>

    <block wx:elif="{{content.datatype == 4}}">
        <view class="global-card" wx:for="{{list}}" wx:key="sa_orderitemsid">
            <view class="title">
                <text class="tag" style="background-color: #3874F6;">{{language[item.type]||item.type}}</text>
                <text class="tag"
                    style="background-color: #67C23A;">{{language[item.tradefield]||item.tradefield}}</text>
                {{item.sonum}}
            </view>
            <view class="row">erp{{language['单号']||'单号'}}：{{item.erpbillno ||' --'}}</view>
            <view class="row">{{language['企业名称']||'企业名称'}}：{{item.enterprisename ||' --'}}</view>
            <view class="row">{{language['项目名称']||'项目名称'}}：{{item.projectname ||' --'}}</view>
            <view class="row">{{language['业务员']||'业务员'}}：{{item.salername ||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['行号']||'行号'}}：{{item.rowno ||' --'}}</view>
            <view class="row">{{language['产品名称']||'产品名称'}}：{{item.itemname ||' --'}}</view>
            <view class="row">{{language['产品编号']||'产品编号'}}：{{item.itemno ||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">
                {{language['型号']||'型号'}}：{{language[item.model]||item.model||' --'}}
            </view>
            <view class="row" wx:if="{{siteid!='HY' && item.expanded}}">
                {{language['规格']||'规格'}}：{{language[item.spec]||item.spec||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称通径']||'公称通径'}}：{{item.caliber||' --'}}
            </view>
            <view class="row" wx:if="{{siteid=='HY' && item.expanded}}">
                {{language['公称压力']||'公称压力'}}：{{item.nominalpressureStr||' --'}}
            </view>
            <view class="row" wx:if="{{item.expanded}}">{{language['需求日期']||'需求日期'}}：{{item.needdate||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['回复交期']||'回复交期'}}：{{item.deliverydate||' --'}}</view>
            <view class="row">{{language['数量']||'数量'}}：{{item.qty||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['牌价']||'牌价'}}：<text
                    style="color: #3874F6;">{{item.marketprice||' --'}}</text></view>
            <view class="row" wx:if="{{item.expanded}}">{{language['订单单价']||'订单单价'}}：<text
                    style="color: #3874F6;">{{item.price||' --'}}</text></view>
            <view class="row">{{language['订单金额']||'订单金额'}}：<text style="color: #3874F6;">{{item.amount||' --'}}</text>
            </view>

            <view class="row">
                {{language['本次核销金额']||'本次核销金额'}}：<text style="color: #3874F6;">{{item.writeoffamount||' --'}}</text>
            </view>
            <view class="row">{{language['未核销金额']||'未核销金额'}}：<text
                    style="color: #3874F6;">{{item.unwriteoffamount||' --'}}</text></view>
            <view class="row" wx:if="{{item.expanded}}">{{language['备注']||'备注'}}：{{item.remarks||' --'}}</view>
            <view class="row" wx:if="{{item.expanded}}">{{language['审核时间']||'审核时间'}}：{{item.checkdate||' --'}}</view>
            <view class="{{item.expanded?'expanded up':'expanded'}}" data-index="{{index}}" bind:tap="changeExpanded">
                {{item.expanded?'简略信息':'详情信息'}}
                <text class="iconfont icon-dianjizhankai" />
            </view>
        </view>
    </block>

    <My_empty wx:if="{{list.length==0}}" />
</Yl_ListBox>

<van-action-sheet show="{{  typeShow }}" actions="{{ types }}" bind:select='onSelect' bind:cancel='onCancel'
    bind:click-overlay='onCancel' cancel-text="{{language['取消']||'取消'}}" />
<van-action-sheet show="{{  tradefieldShow }}" actions="{{ tradefields }}" bind:select='onSelect1'
    bind:cancel='onCancel' bind:click-overlay='onCancel' cancel-text="{{language['取消']||'取消'}}" />