|
|
@@ -56,38 +56,62 @@
|
|
|
}
|
|
|
$weights = $remarks['weight'] ?? ($remarks['weights'] ?? []);
|
|
|
$payTypes = (int)($v->pay_types ?? 0);
|
|
|
+ $payRate = config('pay.' . ($v->config_key ?? '') . '.pay_rate', []);
|
|
|
+ $rateText = function ($method) use ($payRate) {
|
|
|
+ $methodRate = $payRate[$method] ?? null;
|
|
|
+ if (is_array($methodRate) && count($methodRate) >= 2) {
|
|
|
+ return $methodRate[0] . '%+' . $methodRate[1];
|
|
|
+ }
|
|
|
+ return '-';
|
|
|
+ };
|
|
|
@endphp
|
|
|
<tr data-status="{{ (int)$v->status }}">
|
|
|
<td>{{ $v->id }}</td>
|
|
|
<td>{{ $v->name }}</td>
|
|
|
<input type="hidden" name="config[{{$v->id}}][sort]" value="{{$v->sort}}">
|
|
|
<td>
|
|
|
- <input class="form-control form-control-sm" type="number" min="0"
|
|
|
- name="config[{{$v->id}}][weight][1]"
|
|
|
- value="{{ $weights['type_1'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 1) === 1) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 1) === 1) ? '' : 'disabled' }}>
|
|
|
+ <div style="display:flex; align-items:center; gap:6px;">
|
|
|
+ <input class="form-control form-control-sm" type="number" min="0"
|
|
|
+ style="width:72px;"
|
|
|
+ name="config[{{$v->id}}][weight][1]"
|
|
|
+ value="{{ $weights['type_1'] ?? '' }}"
|
|
|
+ placeholder="{{ (($payTypes & 1) === 1) ? '0' : 'N/A' }}"
|
|
|
+ {{ (($payTypes & 1) === 1) ? '' : 'disabled' }}>
|
|
|
+ <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(1) }}</small>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input class="form-control form-control-sm" type="number" min="0"
|
|
|
- name="config[{{$v->id}}][weight][2]"
|
|
|
- value="{{ $weights['type_2'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 2) === 2) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 2) === 2) ? '' : 'disabled' }}>
|
|
|
+ <div style="display:flex; align-items:center; gap:6px;">
|
|
|
+ <input class="form-control form-control-sm" type="number" min="0"
|
|
|
+ style="width:72px;"
|
|
|
+ name="config[{{$v->id}}][weight][2]"
|
|
|
+ value="{{ $weights['type_2'] ?? '' }}"
|
|
|
+ placeholder="{{ (($payTypes & 2) === 2) ? '0' : 'N/A' }}"
|
|
|
+ {{ (($payTypes & 2) === 2) ? '' : 'disabled' }}>
|
|
|
+ <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(2) }}</small>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input class="form-control form-control-sm" type="number" min="0"
|
|
|
- name="config[{{$v->id}}][weight][4]"
|
|
|
- value="{{ $weights['type_4'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 4) === 4) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 4) === 4) ? '' : 'disabled' }}>
|
|
|
+ <div style="display:flex; align-items:center; gap:6px;">
|
|
|
+ <input class="form-control form-control-sm" type="number" min="0"
|
|
|
+ style="width:72px;"
|
|
|
+ name="config[{{$v->id}}][weight][4]"
|
|
|
+ value="{{ $weights['type_4'] ?? '' }}"
|
|
|
+ placeholder="{{ (($payTypes & 4) === 4) ? '0' : 'N/A' }}"
|
|
|
+ {{ (($payTypes & 4) === 4) ? '' : 'disabled' }}>
|
|
|
+ <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(4) }}</small>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td>
|
|
|
- <input class="form-control form-control-sm" type="number" min="0"
|
|
|
- name="config[{{$v->id}}][weight][8]"
|
|
|
- value="{{ $weights['type_8'] ?? '' }}"
|
|
|
- placeholder="{{ (($payTypes & 8) === 8) ? '0' : 'N/A' }}"
|
|
|
- {{ (($payTypes & 8) === 8) ? '' : 'disabled' }}>
|
|
|
+ <div style="display:flex; align-items:center; gap:6px;">
|
|
|
+ <input class="form-control form-control-sm" type="number" min="0"
|
|
|
+ style="width:72px;"
|
|
|
+ name="config[{{$v->id}}][weight][8]"
|
|
|
+ value="{{ $weights['type_8'] ?? '' }}"
|
|
|
+ placeholder="{{ (($payTypes & 8) === 8) ? '0' : 'N/A' }}"
|
|
|
+ {{ (($payTypes & 8) === 8) ? '' : 'disabled' }}>
|
|
|
+ <small style="white-space:nowrap; color:#495057; font-size:13px;">{{ $rateText(8) }}</small>
|
|
|
+ </div>
|
|
|
</td>
|
|
|
<td>
|
|
|
@component('components.select', [
|