<view class="table" hidden="{{!list.length}}">
	<view class="label">
		<text class="text" />
		最新订单
	</view>

	<view class="list" wx:for="{{list}}" wx:key="sonum">
		<view class="title">
			{{item.agentnum}}
		</view>
		<view class="title">
			{{item.sonum}}
		</view>
		<view class="row">
			单据日期：{{item.billdate}}
		</view>
		<view class="row bor">
			共计{{item.qty}}件商品
		</view>

		<view class="status" style="background-color: {{set.color(item.status)}};">
			{{item.status}}
		</view>
		<view class="sum">
			合计:{{item.amount}}元
		</view>
	</view>
</view>

<wxs module="set">
	module.exports = {
		color: function (statu) {
			var color = '#999999';
			switch (statu) {
				case "审核":
					color = '#FA8C16';
					break;
				case "提交":
					color = '#52C41A';
					break;
				case "新建":
					color = '#333333';
					break;
			};
			return color;
		}
	}
</wxs>