|
@@ -80,7 +80,7 @@
|
|
|
maxlength="{{ $formB['FormVars']['MaxLength']['ToCustomer'] }}"
|
|
|
{{ $formB['FormVars']['Required']['ToCustomer'] }}>
|
|
|
<button type="button"
|
|
|
- class="btn-dark rounded btn-open-modal border-0 radius-l0 col-3 customer-modal-btn"
|
|
|
+ class="btn-dark rounded btn-open-modal border-0 radius-l0 col-3 form-customer-modal-btn"
|
|
|
data-target="company"
|
|
|
data-clicked="get_override_to_customer_id"
|
|
|
data-variable="customerModal">
|
|
@@ -95,7 +95,7 @@
|
|
|
maxlength="{{ $formB['FormVars']['MaxLength']['FormCustomer'] }}"
|
|
|
{{ $formB['FormVars']['Required']['FormCustomer'] }}>
|
|
|
<button type="button"
|
|
|
- class="btn-dark rounded btn-open-modal border-0 radius-l0 col-3"
|
|
|
+ class="btn-dark rounded btn-open-modal border-0 radius-l0 col-3 to-customer-modal-btn"
|
|
|
data-target="company"
|
|
|
data-clicked="get_override_form_customer_id"
|
|
|
data-variable="customerModal">
|
|
@@ -370,9 +370,11 @@
|
|
|
$('.coupon-reward').find('.form-customer-group').addClass('d-none');
|
|
|
|
|
|
$('#to-customer-txt').prop('readonly', false);
|
|
|
- $('.customer-modal-btn').prop('disabled', false);
|
|
|
- $('.reward-act.save-button').prop('disabled', false)
|
|
|
+ $('#form-customer-txt').prop('readonly', false);
|
|
|
+ $('.to-customer-modal-btn').prop('disabled', false);
|
|
|
+ $('.form-customer-modal-btn').prop('disabled', false);
|
|
|
|
|
|
+ $('.reward-act.save-button').prop('disabled', false)
|
|
|
Btype.set_slip_no_btn_abled()
|
|
|
$('#reward-date').val(date_to_sting(new Date()))
|
|
|
|
|
@@ -474,6 +476,7 @@
|
|
|
function create_bd_page() {
|
|
|
let html = []
|
|
|
let sum_total = 0;
|
|
|
+ const reward_amt =
|
|
|
bd_page.forEach(bd => {
|
|
|
sum_total += parseFloat(bd.CreditAmt);
|
|
|
|
|
@@ -485,6 +488,9 @@
|
|
|
class="text-${formB.ListVars['Align'].$Radio}"
|
|
|
onclick="Btype.bd_cursor_click(this)">
|
|
|
</td>
|
|
|
+ <td class="text-${formB.ListVars['Align'].CompanyNo}" ${formB.ListVars['Hidden'].CompanyNo}>
|
|
|
+ ${format_conver_for(bd.CompanyNo, formB.ListVars['Format'].CompanyNo)}
|
|
|
+ </td>
|
|
|
<td class="text-${formB.ListVars['Align'].Customer}" ${formB.ListVars['Hidden'].Customer}>
|
|
|
${format_conver_for(bd.CompanyName, formB.ListVars['Format'].Customer)}
|
|
|
</td>
|
|
@@ -515,7 +521,7 @@
|
|
|
}
|
|
|
|
|
|
function update_hd_ui(response) {
|
|
|
- console.log('update_hd_ui : ', response);
|
|
|
+ console.log(response);
|
|
|
if (isEmpty(response.data) || response.data.apiStatus) {
|
|
|
$('#modal-slip').modal('hide');
|
|
|
return;
|
|
@@ -523,7 +529,16 @@
|
|
|
|
|
|
let hd_page = response.data.HdPage[0]
|
|
|
bd_page = response.data.BdPage ?? []
|
|
|
+ // console.log('bd_page : ', bd_page);
|
|
|
+ // console.log('hd_page.id : ', hd_page.Id);
|
|
|
|
|
|
+ bd_page.forEach(bd => {
|
|
|
+ if (hd_page.FromBuyerId === bd.BuyerId) {
|
|
|
+ bd.RewardAmt = -Math.abs(bd.RewardAmt);
|
|
|
+ console.log('받는 사람', bd);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('.save-button').prop('disabled', true);
|
|
|
$('#Id').val(hd_page.Id)
|
|
|
$('#auto-slip-no-txt').val(hd_page.RewardNo)
|
|
|
$('#reward-date').val(moment(to_date(hd_page.RewardDate)).format('YYYY-MM-DD'))
|
|
@@ -539,7 +554,9 @@
|
|
|
$('#form-customer-txt').data('id', hd_page.FromBuyerId)
|
|
|
// 저장된 데이터 불러올 경우 고객업체 비활성화
|
|
|
$('#to-customer-txt').prop('readonly', hd_page.ToCompanyName != "")
|
|
|
- $('.customer-modal-btn').prop('disabled', hd_page.ToCompanyName != "")
|
|
|
+ $('#form-customer-txt').prop('readonly', hd_page.FromCompanyName != "")
|
|
|
+ $('.to-customer-modal-btn').prop('disabled', hd_page.ToCompanyName != "")
|
|
|
+ $('.form-customer-modal-btn').prop('disabled', hd_page.FromCompanyName != "")
|
|
|
|
|
|
$('#remarks-txt-area').val(remove_tag(hd_page.Remarks))
|
|
|
$('#remarks-preview').html(hd_page.Remarks)
|