You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
simple-yewu/frontend/views/business-order/part.php

24 lines
1.2 KiB

<table width="80%" border="0" align="center" cellpadding="3" cellspacing="1" class="table" style="margin-right: 50px;">
<tr>
<td class="bg_tr" align="center"><input type="checkbox">[<a href="javascript:void(0)">全选</a>]</td>
<td class="bg_tr" align="center">配件名</td>
<td class="bg_tr" align="center">单价</td>
<td class="bg_tr" align="center">数量</td>
</tr>
<?php foreach($parts as $part): ?>
<tr>
<td class="td_bg" align="center"><input type="checkbox">[<a href="javascript:void(0)" onclick="opList($(this),<?= $part->fk_id ?>,<?= $fix_id ?>,<?= $part->id ?>)">领取</a>]</td>
<td class="td_bg" align="center"><?= $part->name ?></td>
<td class="td_bg" align="center"><?= $part->price ?>元</td>
<td class="td_bg" align="center"><input class="num" size="1" type="number" value="1" min="1" max="100"></td>
</tr>
<?php endforeach; ?>
</table>
<script>
function opList(obj,fk_id,fix_id,item_id){
var num = obj.parents('tr').find('.num').val();
$.post('/fix-car-item/ajax-get-item',{num:num,fk_id:fk_id,item_id:item_id,fix_id:fix_id,type:1},function(data){
alert(data.msg);
},'json');
}
</script>