$(function(){
$("#btnAdd").click(function(){
$("#tbl_p").append("<tr id='p_"+index+"'>"+
"<td class='date_table' align='left'>"+
"<input type='hidden' name='cdItem.order'/>"+
"<input type='text' name='cdItem.sendbill' id='deliverscatbill"+index+"' title='委托单号' readonly='readonly'/>"+
" <img src='<%=request.getContextPath()%>/images/assistant.gif' title='点 击选择数据' width='21' height='21' align='absmiddle' onClick='deliverscatHDialog("+index+");'>"+
" <span style='color:red' id='vd_deliverscatbill"+index+"'>*</span>"+
"</td>"+
"<td class='date_table' align='left'>"+
"<select name='cdItem.loadid' id='ladingId"+index+"' title='装货地' style='width:130px;'></select>"+
? ? ? ?" <span style='color:red' id='vd_lading"+index+"'>*</span>"+
"</td>"+
"<td class='date_table' align='left'>"+
"<select name='cdItem.recieveid' id='recieveId"+index+"' title='收货地' style='width:130px;'></select>"+
? ? ? ?" <span style='color:red' id='vd_recieve"+index+"'>*</span>"+
"</td>"+
"<td class='date_table' align='left'>"+
"<input type='hidden' name='cdItem.vehicle' id='vehicleId"+index+"' title='车号'/>"+
"<input type='text' name='vehicle' id='vehicle"+index+"' disabled/>"+
" <img src='<%=request.getContextPath()%>/images/assistant.gif' width='21' height='21' align='absmiddle' title='点击选择数据' onClick='open_vehicle_dialog("+index+");'>"+
" <span style='color:red' id='vd_vehicleId"+index+"'>*</span>"+
"</td>"+
"<td class='date_table' align='left'>"+
"<input type='hidden' name='cdItem.driverid' id='driverId"+index+"' title='驾驶证号'/>"+
"<input type='text' name='driver' id='driver"+index+"' disabled/>"+
" <img src='<%=request.getContextPath()%>/images/assistant.gif' width='21' height='21' align='absmiddle' title='点击选择数据' onClick='open_driver_dialog("+index+");'>"+
"<span style='color:red' id='vd_driverId"+index+"'>*</span>"+
"</td>"+
"<td class='date_table' align='right'>"+
"<input type='button' onclick='delRow("+index+")' value='删除'/>"+
" <input type='button' id='detailRow"+index+"' onclick='detailRow("+index+")' value='详细'/>"+
"</td>"+
"</tr>"+
"<tr style='display:none' id='d_"+index+"'>"+
"<td colspan='7' align='center' class='date_table'>"+
"<table width='77%' border='0' align='center' cellpadding='0' cellspacing='3' bordercolor='#CCCCCC' class='table1'>"+
"<tr>"+
? ? ? ? ? ? ? ? ? ? ? "<td align='right' width='11%'>启运日期:</td>"+
? ? ? ? ? ? ? ? ? ? "<td align='left' width='16%'>"+
? ? ? ? ? ? ? ? ? ? ? "<input class='input' type='text' name='cdItem.startdate' id='startdate"+index+"' onfocus='WdatePicker({isShowOthers:true,dateFmt:"+'"yyyy-MM-dd"'+"})' style='background:#ffffff url(<%=request.getContextPath()%>/js/My97DatePicker/skin/datePicker.gif) no- repeat right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_startdate"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right' width='11%'>回单收回日期:</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left' width='16%'>"+
? ? ? ? ? ? ? ? ? ? ?"<input class='input' type='text' name='cdItem.backdate' id='backdate"+index+"' onfocus='WdatePicker({isShowOthers:true,dateFmt:"+'"yyyy-MM-dd"'+"})' style='background:#ffffff url(<%=request.getContextPath()%>/js/My97DatePicker/skin/datePicker.gif) no- repeat right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_backdate"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+
? ? ? ? ? ? ?"</tr>"+
? ? ? ? ? ? ?"<tr>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>货物总值(元):</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? ? ? ? ? "<input type='text' name='cdItem.totalvalue' id='totalvalue"+index+"' value='0.0' style='text-align:right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_totalvalue"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>货物总总重(公斤):</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? ? ? ? ? "<input type='text' name='cdItem.totalweight' id='totalweight"+index+"' value='0.0' style='text-align:right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_totalweight"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+ ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ?"</tr>"+
? ? ? ? ? ? ?"<tr>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>货物总积(立方米):</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? ? ? ? ? "<input type='text' name='cdItem.totalvol' id='totalvol"+index+"' value='0.0' style='text-align:right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_totalvol"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>运费计算方式):</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? "<select name='cdItem.computeway' id='feeway"+index+"' title='运费计算方式' style='width:130px;'></select>"+
" <span style='color:red' id='vd_feeway"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+ ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ?"</tr>"+
? ? ? ? ? ? ?"<tr>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>计费标准:</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? ? ? ? ? "<input type='text' name='cdItem.prise' id='prise"+index+"' value='0.0' style='text-align:right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_prise"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>应付运费:</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? ? ? ? ? "<input type='text' name='cdItem.mustpay' id='mustpay"+index+"' value='0.0' style='text-align:right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_mustpay"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+ ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ?"</tr>"+
? ? ? ? ? ? ?"<tr>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>运输协议号:</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? ? ? ? ?"<input type='text' name='cdItem.runbill' id='runbill"+index+"'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_runbill"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='right'>收货方支付司机运费:</td>"+
? ? ? ? ? ? ? ? ? ? ?"<td align='left'>"+
? ? ? ? ? ? ? ? ? ? ? "<input type='text' name='cdItem.paydriver' id='paydriver"+index+"' value='0.0' style='text-align:right;'/>"+
? ? ? ? ? ? ? ? ? ? ?" <span style='color:red' id='vd_paydriver"+index+"'>*</span>"+
? ? ? ? ? ? ? ? ? ? ?"</td>"+ ? ? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ?"</table>"+
"</td>"+
"</tr>");
});
});