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/material.php

24 lines
1.3 KiB

5 years ago
<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($materials as $material): ?>
<tr>
<td class="td_bg" align="center"><input type="checkbox">[<a href="javascript:void(0)" onclick="opList($(this),<?= $material->store_room_id ?>,<?= $fix_id ?>,0)">领取</a>]</td>
<td class="td_bg" align="center"><?= $material->storeRoom->name ?></td>
<td class="td_bg" align="center"><?= $material->storeRoom->price ?></td>
<td class="td_bg" align="center"><input class="num" type="number" size="1" 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>