|
@@ -36,7 +36,7 @@
|
|
|
<tbody style="display: block;padding-top: 47px;">
|
|
|
<?php if(!empty($output['providers'])){?>
|
|
|
<?php foreach ($output['providers'] as $provider){?>
|
|
|
- <tr class="trFlex">
|
|
|
+ <tr class="trFlex" data-color="<?php echo $provider['card_type'];?>">
|
|
|
<td class="w180"><?php echo $provider['name'];?></td>
|
|
|
<td class="w50 align-center">
|
|
|
<input type="checkbox" class="w50 checkAll">
|
|
@@ -80,14 +80,41 @@
|
|
|
$('#submitBtn').click(function () {
|
|
|
$("#merchant_name_form").submit();
|
|
|
});
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 表格hover时背景
|
|
|
$('.trFlex').each(function () {
|
|
|
+ let color = $(this).attr('data-color')
|
|
|
+ if (color == 4 || color == 1) {
|
|
|
+ $(this).css('background', '#f1dde6')
|
|
|
+ } else if (color == 5 || color == 2) {
|
|
|
+ $(this).css('background', '#c8c6f3')
|
|
|
+ } else if (color == 6) {
|
|
|
+ $(this).css('background', '#f2f3c6')
|
|
|
+ } else {
|
|
|
+ $(this).css('background', '#fff')
|
|
|
+ }
|
|
|
$(this).hover(function () {
|
|
|
$(this)[0].style.backgroundColor = '#cbe9f3'
|
|
|
},function() {
|
|
|
- $(this)[0].style.backgroundColor = '#fff'
|
|
|
+ if (color == 4 || color == 1) {
|
|
|
+ $(this).css('background', '#f1dde6')
|
|
|
+ } else if (color == 5 || color == 2) {
|
|
|
+ $(this).css('background', '#c8c6f3')
|
|
|
+
|
|
|
+ } else if (color == 6) {
|
|
|
+ $(this).css('background', '#f2f3c6')
|
|
|
+
|
|
|
+ } else {
|
|
|
+ $(this).css('background', '#fff')
|
|
|
+
|
|
|
+ }
|
|
|
})
|
|
|
+
|
|
|
})
|
|
|
+
|
|
|
// 清空
|
|
|
$('#emptyBtn').click(function () {
|
|
|
$('input[type="checkbox"]').each(function () {
|