<!-- include 'header' -->
<link rel=stylesheet href="<?= WEB_SITE_GLOBAL ?>css/jquery.validator.css"> 
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/jquery.validator.min.js"></script>
<script type="text/javascript" src="<?= WEB_SITE_GLOBAL ?>js/zh-CN.js"></script>
<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.validator.js"></script>
<body>
	<div class="mainLayout">
		<div class="mainMenu">
			<div class="menuItem">
				<a href="#" class="mLogo">CLD</a>
				<ul>
					<!-- include 'menuReceipt' -->
				</ul>
			</div>
			
		</div>
		<div class="warpContent">
			<div class="subMenu fL">
				<div class="menuItem">
					<ul>
						<!-- include 'invoiceMenu' -->
					</ul>
				</div>
			</div>
			<div class="adminContent autoHeight">
				<legend>
					填写申请开票
				</legend>
				<div class="borad-news">
					<div class="saeaList">
					<form action="/invoiceStoreEditDo" method="post" id="invoice">
						<input type="hidden" name="storeKey" value="{{invoiceDetail.storeKey}}">
						<input type="hidden" name="trainKey" value="{{invoiceDetail.trainKey}}">
						
						<table class="table table-bordered table-condensed">
							<tbody>
							<tr>
								<th class="taC" width="150">所在办事处</th>
								<td>
									<select name="cid">
									<!-- loop invoiceDetail.category -->
									<option <!-- if {{category' value.cid}}=={{invoiceDetail.cid}} --> selected <!-- endif --> value="{{category' value.cid}}:{{category' value.title}}">{{category' value.title}}</option>
									<!-- endloop -->
									</select>
								</td>
								<th class="taC" width="150"><span class="colRed">*</span>开票内容</th><td><select name="invoiceElement" >
								<!-- include 'invoiceElement' -->
							</select></td>
							</tr>
							
							<tr>
									<th class="taC"><span class="colRed">*</span>数量</th>
									<td>
										<input style="width:60px" name="invoiceQuantity" id="invoiceQuantity" value="{{invoiceDetail.invoiceQuantity}}" placeholder="输入数量" pattern="[0-9]" type="number" min="1" step="1">
									</td>
									<th class="taC"><span class="colRed">*</span>单价</th>
									<td><input style="width:100px" name="invoiceUnitPrice" id="invoiceUnitPrice" value="{{invoiceDetail.invoiceUnitPrice}}"  placeholder="输入单价" pattern="[0-9]" type="number" min="1" step="100"></td>
								</tr>
							
							<tr>
								<th class="taC"><span class="colRed">*</span>开票金额</th>
								
								<td colspan="3">
									
										<p class="colGray">数量*单价=开票金额</p>
										<b class="colOrange" id="tp" style="font-size:18px">￥{{invoiceDetail.invoicePrice}}</b>
									
									<input value="{{invoiceDetail.invoicePrice}}"  placeholder="输入开票金额" pattern="[0-9]" name="invoicePrice-del" id="invoicePrice" type="hidden" min="0" step="0.01">
									</td>
								
							</tr>
							
							<tr>
									<th class="taC">发票备注</th><td colspan="3"><textarea placeholder="用于发票右下角备注栏内容，如项目名称、项目地点" name="remark" style="width:550px">{{invoiceDetail.remark}}</textarea>
									</td>
								</tr>
							
							<tr>
								<th class="taC"><span class="colRed">*</span>发票类型</th><td colspan="3">
								<label class="radio inline"><input name="invoiceType" id="invoicePlain" onclick="invoiceShow()"  value="0" <!-- if {{invoiceDetail.invoiceType}}==0 --> checked <!-- endif --> type="radio">增值税普通发票</label>
								<label class="radio inline"><input name="invoiceType" id="invoiceSpecial" onclick="invoiceShow()"  value="1" <!-- if {{invoiceDetail.invoiceType}}==1 --> checked <!-- endif --> type="radio">增值税专用发票</label>
							</td>
							</tr>
							</tbody>
						</table>
						<table id="plainInvoice_box" class="table table-bordered table-condensed" <!-- if {{invoiceDetail.invoiceType}}==1 --> style="display:none" <!-- endif --> >
							<tbody>
							<tr>
								<th colspan="4" class="taC">增值税普通发票</th>
							</tr>
							<tr>
								<th class="taC" width="150"><span class="colRed">*</span>发票抬头</th>
								<td ><input name="invoiceTitle" id="invoiceTitle" value="{{invoiceDetail.invoiceTitle}}" type="text" ></td>
						<th class="taC" width="150"><span class="colRed"></span>纳税人识别码</th>
									<td><input name="TINT" id="TINT" value="{{invoiceDetail.TIN}}" type="text"></td>
							</tr>
							
							<tr>
									<th class="taC"><span class="colRed"></span>注册地址</th>
									<td><input type="text" name="addressT" id="addressT" value="{{invoiceDetail.address}}"></td>
									<th class="taC"><span class="colRed"></span>注册电话</th>
									<td><input type="text" name="phoneT" id="phoneT" value="{{invoiceDetail.phone}}"></td>
								</tr>
								<tr>
									<th class="taC"><span class="colRed"></span>开户银行</th>
									<td><input type="text" name="bankT" id="bankT" value="{{invoiceDetail.bank}}"></td>
									<th class="taC"><span class="colRed"></span>银行账号</th>
									<td><input type="text" name="bankAccountT" id="bankAccountT" value="{{invoiceDetail.bankAccount}}"></td>
								</tr>
							
							
							</tbody>
						</table>
						<table id="specialInvoice_box" class="table table-bordered table-condensed" <!-- if {{invoiceDetail.invoiceType}}==0 --> style="display:none" <!-- endif --> >
							<tbody>
							<tr>
								<th colspan="4" class="taC">增值税专用发票</th>
							</tr>
							<tr>
								<th class="taC" width="150"><span class="colRed">*</span>单位名称</th>
								<td>
								<input name="invoiceCompany" id="invoiceCompany" value="{{invoiceDetail.invoiceCompany}}" type="text">
								</td>
								<th class="taC" width="150"><span class="colRed">*</span>纳税人识别码</th>
								<td><input name="TIN" id="TIN" value="{{invoiceDetail.TIN}}" type="text"></td>

							</tr>
							</tr>
							<tr>
								<th class="taC"><span class="colRed">*</span>注册地址</th>
								<td><input type="text" value="{{invoiceDetail.address}}" name="address" id="address"></td>
								<th class="taC"><span class="colRed">*</span>注册电话</th>
								<td><input type="text" value="{{invoiceDetail.phone}}" name="phone" id="phone"></td>
							</tr>
							<tr>
								<th class="taC"><span class="colRed">*</span>开户银行</th>
								<td><input type="text" name="bank" id="bank" value="{{invoiceDetail.bank}}"></td>
								<th class="taC"><span class="colRed">*</span>银行账号</th>
								<td><input type="text" name="bankAccount" id="bankAccount" value="{{invoiceDetail.bankAccount}}"></td>
							</tr>
							</tbody>
						</table>
						<table class="table table-bordered table-condensed">
							
							<tr>
								<th colspan="4" class="taC">邮寄信息</th>
							</tr>
							<tr>
								<th class="taC" width="150"><span class="colRed">*</span>是否邮寄</th><td colspan="3">
								<label class="radio inline">
								<input type="radio" onclick="mailShow()" id="isMail" name="doPost" value="1" <!-- if {{invoiceDetail.doPost}}==1 --> checked <!-- endif -->  >是</label>
								<label class="radio inline"><input type="radio" onclick="mailShow()" name="doPost" value="0" <!-- if {{invoiceDetail.doPost}}==0 --> checked <!-- endif --> >否</label>
							</td>
							</tr>
							<tbody id="mail_box" <!-- if {{invoiceDetail.doPost}}==0 --> style="display:none" <!-- endif --> >
							<tr>
								<th class="taC" width="150"><span class="colRed">*</span>收件人</th>
								<td><input type="text"  name="recipients" id="recipients" value="{{invoiceDetail.recipients}}" ></td>
								<th class="taC" width="150"><span class="colRed">*</span>收件人手机/电话</th>
								<td><input type="text" name="recipientsPhone" id="recipientsPhone" value="{{invoiceDetail.recipientsPhone}}" ></td>
							</tr>
							<tr>
								<th class="taC" width="150"><span class="colRed">*</span>收件地址</th>
								<td colspan="3"><input type="text" class="span6" name="recipientsAddress" id="recipientsAddress" value="{{invoiceDetail.recipientsAddress}}" ></td>
							</tr>
							<tr>
								<th class="taC" width="150">邮寄物品</th>
								<td colspan="3">
								
								
								<div class="checkbox">
									  <label>
									    <input <!-- if !empty({{invoiceDetail.mailItemsJson.softLock}}) --> checked <!-- endif --> type="checkbox" name="softLock" value="1">
									    软件锁 <br><input type="number" name="softLockNum" class="span1" placeholder="数量" value="{{invoiceDetail.mailItemsJson.softLock}}">
									  </label>
									</div>
									<div class="checkbox">
									  <label>
									    <input type="checkbox" checked disabled value="1">
									    发票 <br>1
									  </label>
									</div>
									<div class="checkbox">
									  <label>
									    <input <!-- if !empty({{invoiceDetail.mailItemsJson.contract}}) --> checked <!-- endif --> type="checkbox" name="contract" value="1">
									    合同 <br><input type="number" name="contractNum" class="span1" placeholder="数量" value="{{invoiceDetail.mailItemsJson.contract}}">
									  </label>
									</div>
									<div class="checkbox">
									  <label>
									    <input <!-- if !empty({{invoiceDetail.mailItemsJson.instructions}}) --> checked <!-- endif --> type="checkbox" name="instructions" value="1">
									    说明书 <br><input type="number" name="instructionsNum" class="span1" placeholder="数量" value="{{invoiceDetail.mailItemsJson.instructions}}">
									  </label>
									</div>
									<div class="checkbox">
									  <label>
									    <input <!-- if !empty({{invoiceDetail.mailItemsJson.remittance}}) --> checked <!-- endif --> type="checkbox" name="remittance" value="1">
									    汇款账号单
									  </label>
									</div>
									<div class="checkbox">
									  <label>
									    <input type="checkbox" checked="" disabled="">
									    备注<br><input type="text" class="span4" name="mailItems" value="{{invoiceDetail.mailItemsJson.mailItems}}" placeholder="备注信息或其他需要邮寄物品请填写在这，写明数量。">
									  </label>
									</div>
								
								
								
								
								
								</td>
							</tr>
							</tbody>
						</table>
						
						<p class="taR"><button type="submit" class="button" href="#confirm" data-toggle="modal">保存</button></p>
					</p>
					</form>
					
					
					
				</div>
			</div>
		</div>
	</div>
 	
<script type="text/javascript">autoFlashHeight();</script>	
</body>