<%@ Page CodeFileBaseClass="AliCMS.Lib.AdminPageBase" %>
<section data-page="purchase_add" data-title="添加采购单">
	<div class="path1"><span>您的位置：</span>添加采购单</div>
	<form action="" class="post">
		<div class="post-body">
			<table class="post-table">
				<tr>
					<th width="140">采购单号：</th>
					<td><input type="text" name="No" value="<%=DateTime.Now.ToString("yyyyMMddhhmmss")%>" size="40" maxlength="150" class="ali-input ali-input-required"></td>
				</tr>
				<tr>
					<th>供应商：</th>
					<td><input type="text" name="SupplierName" size="40" maxlength="50" readonly class="ali-input ali-input-required <%=ContentLang%>Font"><input type="hidden" name="SupplierID"> <a class="ali-button" data-operation="SelectSupplier">选择</a></td>
				</tr>
				<tr>
					<th>合同：</th>
					<td><input type="text" name="ContractName" size="40" maxlength="50" disabled class="ali-input ali-input-required <%=ContentLang%>Font"><input type="hidden" name="ContractID"> <a class="ali-button" data-operation="SelectContract">选择</a></td>
				</tr>
				<tr>
					<th>仓库：</th>
					<td><input type="text" name="WarehouseName" size="40" maxlength="50" readonly class="ali-input ali-input-required <%=ContentLang%>Font"><input type="hidden" name="WarehouseID"> <a class="ali-button" data-operation="SelectWarehouse">选择</a></td>
				</tr>
				<tr>
					<th>补货单：</th>
					<td><input type="text" name="ReplenishmentNo" size="40" maxlength="50" disabled class="ali-input <%=ContentLang%>Font"><input type="hidden" name="ReplenishmentID"> <a class="ali-button" data-operation="SelectReplenishment">选择</a>注：暂时没实现</td>
				</tr>
				<tr>
					<th>流程类型：</th>
					<td>
						<label><input type="radio" name="IsOnline" value="true" checked>线上流程</label>
						<label><input type="radio" name="IsOnline" value="false">线下流程</label>
					</td>
				</tr>
			</table>

			<div class="ali-panel margin3" data-height-style="content">
				<div class="ali-panel-header">采购单</div>
				<div class="ali-panel-body">
					<table class="purchase-bill">
						<tr>
							<th>供应商：</th><td colspan="5" data-col="SupplierName"></td>
						</tr>
						<tr>
							<td colspan="6">
								<a class="ali-button" data-operation="SelectGoods">选择商品</a>
								<table data-ali-widget="grid" class="grid1">
									<thead>
										<tr>
											<th data-name="GoodsName">商品名称</th>
											<th data-name="GoodsSpec">商品规格</th>
											<th data-name="Price" width="60">价格</th>
											<th data-name="Amount" width="60">数量</th>
											<th data-name="Memo" width="120">备注</th>
											<th data-name="Operation" width="80">删除</th>
										</tr>
									</thead>
									<tbody>
									</tbody>
								</table>
							</td>
						</tr>
						<tr>
							<th width="11%">是否开发票：</th><td width="22%"><label><input type="radio" name="NeedInvoice" value="true">是</label> <label><input type="radio" name="NeedInvoice" value="false" checked>否</label></td>
							<th width="11%">税率：</th><td width="22%"><input type="text" name="TaxRate" value="0" size="8" disabled class="ali-input ali-input-required">%</td>
							<th width="11%">发票抬头：</th><td width="23%"><input type="text" name="InvoiceRise" size="40" disabled class="ali-input"></td>
						</tr>
						<tr>
							<td colspan="6">
								<table width="100%">
									<tr>
										<th width="15%">收货人名称：</th><td width="35%"><input type="text" name="ReceiverName" size="40" class="ali-input ali-input-required"></td>
										<th width="15%">收货人地址：</th><td width="35%"><input type="text" name="ReceiverAddress" size="40" class="ali-input ali-input-required"></td>
									</tr>
									<tr>
										<th>收货人电话：</th><td><input type="text" name="ReceiverPhone" size="40" maxlength="50" class="ali-input ali-input-required"></td>
										<th>邮政编码：</th><td><input type="text" name="ReceiverZip" size="10" maxlength="10" class="ali-input ali-input-required"></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<th>运费支付类型：</th>
							<td colspan="2">
								<label><input type="radio" name="FreightType" value="Seller" checked>卖家承担</label>
								<label><input type="radio" name="FreightType" value="Collect">运费到付</label>
								<label><input type="radio" name="FreightType" value="Prepaid">运费预付</label>
							</td>
							<th>运费：</th>
							<td colspan="2"><input type="text" name="Freight" value="0.00" size="8" disabled class="ali-input ali-input-required">元</td>
						</tr>
						<tr>
							<th>合计：</th><td data-col="PriceWithFreight">0.00</td>
							<th>折扣或涨价：</th><td><input type="text" name="PriceAdjustment" value="0.00" size="8" class="ali-input ali-input-required">元</td>
							<th>订单总价：</th><td><input type="text" name="Sum" value="0.00" size="8" readonly></td>
						</tr>
						<tr>
							<th>备注：</th>
							<td colspan="5">
								<textarea name="Memo" rows="5" cols="80" class="ali-input"></textarea>
							</td>
						</tr>
						<tr>
							<td colspan="6">
								<table width="100%">
									<tr>
										<th width="11%">填单时间：</th><td width="22%"><%=DateTime.Now.ToString("yyyy-MM-dd")%></td>
										<th width="11%">填单人：</th><td width="22%"><%=User["Name"]%></td>
										<th width="11%">审核人：</th><td width="23%"></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		<div class="post-footer"><button type="submit" class="ali-button">添 加</button></div>
	</form>
</section>