|
@@ -377,9 +377,16 @@
|
|
window.onload = async function () {
|
|
window.onload = async function () {
|
|
ThumbArr = [];
|
|
ThumbArr = [];
|
|
make_dynamic_table_css('.sales-table', make_dynamic_table_px(formB['ListVars']['Size']))
|
|
make_dynamic_table_css('.sales-table', make_dynamic_table_px(formB['ListVars']['Size']))
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+
|
|
|
|
+ $('#sales-date').val(date_to_sting(new Date()))
|
|
|
|
+ $('#stock-date').val(date_to_sting(new Date()))
|
|
|
|
+ var test = Btype.get_storage_name_and_branch_name()
|
|
|
|
+=======
|
|
$('#sales-date').val(date_to_sting(new Date()))
|
|
$('#sales-date').val(date_to_sting(new Date()))
|
|
$('#stock-date').val(date_to_sting(new Date()))
|
|
$('#stock-date').val(date_to_sting(new Date()))
|
|
Btype.get_storage_name_and_branch_name()
|
|
Btype.get_storage_name_and_branch_name()
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
let sgroup_pick = await get_api_data('sgroup-pick', { Page: [ { Id: parseInt(window.User['SgroupId']) } ] });
|
|
let sgroup_pick = await get_api_data('sgroup-pick', { Page: [ { Id: parseInt(window.User['SgroupId']) } ] });
|
|
window.User['SgroupName'] = sgroup_pick['data']['Page'][0]['SgroupName'];
|
|
window.User['SgroupName'] = sgroup_pick['data']['Page'][0]['SgroupName'];
|
|
|
|
|
|
@@ -492,6 +499,28 @@
|
|
$('#up-btn').prop('disabled', false);
|
|
$('#up-btn').prop('disabled', false);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+
|
|
|
|
+ function save_data_when_entering_text() {
|
|
|
|
+ let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
|
|
+ let index = $(tr).prevAll().length
|
|
|
|
+ // bd_page[index].ConfirmDate = $(tr).children('td:eq(12)').find('input').val()
|
|
|
|
+ // bd_page[index].DeliDate = $(tr).children('td:eq(13)').find('input').val()
|
|
|
|
+ bd_page[index].Ref1 = $(tr).children('td:eq(14)').find('input').val()
|
|
|
|
+ bd_page[index].Ref2 = $(tr).children('td:eq(15)').find('input').val()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+ // start body act btn
|
|
|
|
+ function override_btn_bd_act_multi_update() {
|
|
|
|
+ Btype.btn_bd_act_multi_update('.sales-table')
|
|
|
|
+ }
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
|
|
|
|
function save_data_when_entering_text() {
|
|
function save_data_when_entering_text() {
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
@@ -502,6 +531,7 @@
|
|
bd_page[index].Ref2 = $(tr).children('td:eq(15)').find('input').val()
|
|
bd_page[index].Ref2 = $(tr).children('td:eq(15)').find('input').val()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
async function btn_bd_act_add() {
|
|
async function btn_bd_act_add() {
|
|
Btype.btn_act_save('#sales-form #frm', async function () {
|
|
Btype.btn_act_save('#sales-form #frm', async function () {
|
|
if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0) {
|
|
if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0) {
|
|
@@ -515,12 +545,15 @@
|
|
add_tr();
|
|
add_tr();
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+<<<<<<< HEAD
|
|
}
|
|
}
|
|
|
|
|
|
// 수주번호 찾기 -> 수주번호 입력
|
|
// 수주번호 찾기 -> 수주번호 입력
|
|
function get_sorder_no(id){
|
|
function get_sorder_no(id){
|
|
$('#sorder-no-txt').val(id)
|
|
$('#sorder-no-txt').val(id)
|
|
$('#modal-slip').modal('hide');
|
|
$('#modal-slip').modal('hide');
|
|
|
|
+=======
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
}
|
|
}
|
|
|
|
|
|
function btn_bd_act_body_copy(parameter_name) {
|
|
function btn_bd_act_body_copy(parameter_name) {
|
|
@@ -548,10 +581,31 @@
|
|
}
|
|
}
|
|
|
|
|
|
function btn_act_new() {
|
|
function btn_act_new() {
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
data_init()
|
|
data_init()
|
|
if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
|
|
if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
|
|
get_last_slip_no()
|
|
get_last_slip_no()
|
|
}
|
|
}
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+ console.log('btn_act_new');
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+ data_init()
|
|
|
|
+ if (formB['SlipCommonSetup']['IsNewRecAutoSlipNo']) {
|
|
|
|
+ get_last_slip_no()
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ }
|
|
|
|
+=======
|
|
|
|
+ // }
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
}
|
|
}
|
|
|
|
|
|
function btn_act_copy_to_another(parameter_name) {
|
|
function btn_act_copy_to_another(parameter_name) {
|
|
@@ -610,6 +664,12 @@
|
|
first_thumb = first_sales['TurboThumb']
|
|
first_thumb = first_sales['TurboThumb']
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
const itmtot_amt = bd_page.reduce((accumulator, bd) => {
|
|
const itmtot_amt = bd_page.reduce((accumulator, bd) => {
|
|
return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
|
|
return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
|
|
}, 0)
|
|
}, 0)
|
|
@@ -617,6 +677,26 @@
|
|
const total_qty = bd_page.reduce((accumulator, bd) => {
|
|
const total_qty = bd_page.reduce((accumulator, bd) => {
|
|
return accumulator + parseFloat(bd.SalesQty)
|
|
return accumulator + parseFloat(bd.SalesQty)
|
|
}, 0)
|
|
}, 0)
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+ // console.log('first_sales : ', bd_page[0]);
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+ const itmtot_amt = bd_page.reduce((accumulator, bd) => {
|
|
|
|
+ return accumulator + parseFloat(bd.SalesSupply) + parseFloat(bd.SalesVat) // 합계금액 (공급가액 + 세액)
|
|
|
|
+ }, 0)
|
|
|
|
+
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ const total_qty = bd_page.reduce((accumulator, bd) => {
|
|
|
|
+ return accumulator + parseFloat(bd.SalesQty)
|
|
|
|
+ }, 0)
|
|
|
|
+=======
|
|
|
|
+ // const total_qty = bd_page.reduce((accumulator, bd) => {
|
|
|
|
+ // return accumulator + parseFloat(bd.PorderQty)
|
|
|
|
+ // }, 0)
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
let id = parseInt($(`#frm`).find(`input[name="Id"]`).val());
|
|
let id = parseInt($(`#frm`).find(`input[name="Id"]`).val());
|
|
let parameter = {
|
|
let parameter = {
|
|
Id: id,
|
|
Id: id,
|
|
@@ -650,6 +730,13 @@
|
|
VatRate: vat_rate,
|
|
VatRate: vat_rate,
|
|
VatName: vat_name,
|
|
VatName: vat_name,
|
|
SgroupName: window.User['SgroupName'],
|
|
SgroupName: window.User['SgroupName'],
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
// FirstThumb : first_thumb,
|
|
// FirstThumb : first_thumb,
|
|
TotalQty : String(Number(total_qty) - 0)
|
|
TotalQty : String(Number(total_qty) - 0)
|
|
}
|
|
}
|
|
@@ -658,6 +745,16 @@
|
|
|
|
|
|
if (typeof first_thumb !== 'undefined') {
|
|
if (typeof first_thumb !== 'undefined') {
|
|
parameter.FirstThumb = first_thumb;
|
|
parameter.FirstThumb = first_thumb;
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+ //TotalQty : String(Number(total_qty) - 0),
|
|
|
|
+ FirstThumb : first_thumb
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
}
|
|
}
|
|
if (id < 0) {
|
|
if (id < 0) {
|
|
parameter = { Id: id }
|
|
parameter = { Id: id }
|
|
@@ -666,6 +763,18 @@
|
|
} else {
|
|
} else {
|
|
delete parameter.UpdatedOn;
|
|
delete parameter.UpdatedOn;
|
|
}
|
|
}
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+
|
|
|
|
+ console.log('save : ', parameter);
|
|
|
|
+
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
return parameter;
|
|
return parameter;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -737,6 +846,23 @@
|
|
// $('#our-contact-select').html(our_contact);
|
|
// $('#our-contact-select').html(our_contact);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+ // function set_vat_type_rate($this, msg = true) {
|
|
|
|
+ // let vate_rate = $($this).find('option:selected').data('viewvatrate');
|
|
|
|
+ // console.log('vate_rate : ', vate_rate);
|
|
|
|
+ // $('#vat-type-rate-text').val(vate_rate + '%')
|
|
|
|
+
|
|
|
|
+ // if (parseInt($(`#frm`).find(`input[name="Id"]`).val()) == 0 || ! msg) return;
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
function set_vat_type_rate($this, msg = true) {
|
|
function set_vat_type_rate($this, msg = true) {
|
|
let vate_rate = $($this).find('option:selected').data('viewvatrate');
|
|
let vate_rate = $($this).find('option:selected').data('viewvatrate');
|
|
$('#vat-type-rate-text').val(vate_rate + '%')
|
|
$('#vat-type-rate-text').val(vate_rate + '%')
|
|
@@ -768,6 +894,13 @@
|
|
SalesSupply: String(bd.SalesSupply),
|
|
SalesSupply: String(bd.SalesSupply),
|
|
SalesVat: String(bd.SalesVat),
|
|
SalesVat: String(bd.SalesVat),
|
|
SalesSum: String(bd.SalesSum),
|
|
SalesSum: String(bd.SalesSum),
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
// ConfirmDate: isEmpty(bd.ConfirmDate) ? '' : moment(bd.ConfirmDate).format('YYYYMMDD'),
|
|
// ConfirmDate: isEmpty(bd.ConfirmDate) ? '' : moment(bd.ConfirmDate).format('YYYYMMDD'),
|
|
// DeliDate: isEmpty(bd.DeliDate) ? '' : moment(bd.DeliDate).format('YYYYMMDD'),
|
|
// DeliDate: isEmpty(bd.DeliDate) ? '' : moment(bd.DeliDate).format('YYYYMMDD'),
|
|
// DiscountRate: String(discount_rate),
|
|
// DiscountRate: String(discount_rate),
|
|
@@ -777,6 +910,17 @@
|
|
Ref2: bd.Ref2,
|
|
Ref2: bd.Ref2,
|
|
SorderMemo: bd.SorderMemo,
|
|
SorderMemo: bd.SorderMemo,
|
|
Ip: window.User['Ip']
|
|
Ip: window.User['Ip']
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+ CostPrc: String(bd.CostPrc),
|
|
|
|
+ Ip: window.User['Ip'],
|
|
|
|
+ FirstThumb: bd.TurboThumb
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
}
|
|
}
|
|
|
|
|
|
if (id < 0) {
|
|
if (id < 0) {
|
|
@@ -809,6 +953,13 @@
|
|
Btype.btn_act_save('#sales-form #frm', async function () {
|
|
Btype.btn_act_save('#sales-form #frm', async function () {
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
let index = $(tr).prevAll().length
|
|
let index = $(tr).prevAll().length
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
// if (bd_page[index].SorderBdId == 0) {
|
|
// if (bd_page[index].SorderBdId == 0) {
|
|
// console.log('bd_page[index] : ', bd_page[index]);
|
|
// console.log('bd_page[index] : ', bd_page[index]);
|
|
// iziToast.error({
|
|
// iziToast.error({
|
|
@@ -817,6 +968,22 @@
|
|
// });
|
|
// });
|
|
// return;
|
|
// return;
|
|
// };
|
|
// };
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+
|
|
|
|
+ // 필수텍스트가 안비어있으고 focus out == 다음 tr 추가
|
|
|
|
+ if (bd_page[index].ItemId != 0 && ! dom_required_check($(tr).find(`input`))) {
|
|
|
|
+ if ($($this).data('last')) {
|
|
|
|
+ let seq_no = await Btype.get_last_seq_no('sales', $('#auto-slip-no-txt').val())
|
|
|
|
+ bd_page[index].SeqNo = seq_no;
|
|
|
|
+ }
|
|
|
|
+ Btype.call_bd_act_api([ get_bd_parameter(bd_page[index]) ], function (page) {
|
|
|
|
+ bd_page[index].Id = page[0].Id;
|
|
|
|
+
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
|
|
// 필수텍스트가 안비어있으고 focus out == 다음 tr 추가
|
|
// 필수텍스트가 안비어있으고 focus out == 다음 tr 추가
|
|
if (bd_page[index].ItemId != 0 && ! dom_required_check($(tr).find(`input`))) {
|
|
if (bd_page[index].ItemId != 0 && ! dom_required_check($(tr).find(`input`))) {
|
|
@@ -827,6 +994,8 @@
|
|
Btype.call_bd_act_api([ get_bd_parameter(bd_page[index]) ], function (page) {
|
|
Btype.call_bd_act_api([ get_bd_parameter(bd_page[index]) ], function (page) {
|
|
bd_page[index].Id = page[0].Id;
|
|
bd_page[index].Id = page[0].Id;
|
|
|
|
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
body_act_success_callback($this, tr);
|
|
body_act_success_callback($this, tr);
|
|
Btype.check_the_checkbox_when_changing($this, false)
|
|
Btype.check_the_checkbox_when_changing($this, false)
|
|
});
|
|
});
|
|
@@ -955,6 +1124,16 @@
|
|
class="text-${formB.ListVars['Align'].SorderPrc}" ${formB.ListVars['Hidden'].SorderPrc}
|
|
class="text-${formB.ListVars['Align'].SorderPrc}" ${formB.ListVars['Hidden'].SorderPrc}
|
|
>
|
|
>
|
|
<input type="text" class="text-${formB.ListVars['Align'].SorderPrc} border-0 bg-white" value="${format_conver_for(bd.CostPrc, formB.ListVars['Format'].SorderPrc)}" readonly
|
|
<input type="text" class="text-${formB.ListVars['Align'].SorderPrc} border-0 bg-white" value="${format_conver_for(bd.CostPrc, formB.ListVars['Format'].SorderPrc)}" readonly
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ <input type="text" class="text-${formB.ListVars['Align'].SorderPrc} border-0 bg-white" value="${format_conver_for(bd.CostPrc, formB.ListVars['Format'].SorderPrc)}" readonly
|
|
|
|
+=======
|
|
|
|
+ <input type="text" class="text-${formB.ListVars['Align'].SorderPrc} border-0 bg-white" value="${format_conver_for(bd.SorderPrc, formB.ListVars['Format'].SorderPrc)}" readonly
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
onfocusout="override_amt_calc_txt_is_changed()"
|
|
onfocusout="override_amt_calc_txt_is_changed()"
|
|
require>
|
|
require>
|
|
@@ -979,6 +1158,16 @@
|
|
class="text-${formB.ListVars['Align'].SumAmt}" ${formB.ListVars['Hidden'].SumAmt}
|
|
class="text-${formB.ListVars['Align'].SumAmt}" ${formB.ListVars['Hidden'].SumAmt}
|
|
>
|
|
>
|
|
<input type="text" class="text-${formB.ListVars['Align'].SumAmt} border-0 bg-white" value="${format_conver_for(bd.SalesSum, formB.ListVars['Format'].SumAmt)}" readonly
|
|
<input type="text" class="text-${formB.ListVars['Align'].SumAmt} border-0 bg-white" value="${format_conver_for(bd.SalesSum, formB.ListVars['Format'].SumAmt)}" readonly
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ <input type="text" class="text-${formB.ListVars['Align'].SumAmt} border-0 bg-white" value="${format_conver_for(bd.SalesSum, formB.ListVars['Format'].SumAmt)}" readonly
|
|
|
|
+=======
|
|
|
|
+ <input type="text" class="text-${formB.ListVars['Align'].SumAmt} border-0 bg-white" value="${format_conver_for(bd.SorderSum, formB.ListVars['Format'].SumAmt)}" readonly
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
onfocusout="override_custom_sum_amt()"
|
|
onfocusout="override_custom_sum_amt()"
|
|
required>
|
|
required>
|
|
@@ -986,6 +1175,24 @@
|
|
<td
|
|
<td
|
|
class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>${format_conver_for(bd.StdSalesPrc, formB.ListVars['Format'].StdSalesPrc)}
|
|
class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>${format_conver_for(bd.StdSalesPrc, formB.ListVars['Format'].StdSalesPrc)}
|
|
</td>
|
|
</td>
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+
|
|
|
|
+ <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
|
|
+ class="text-${formB.ListVars['Align'].DeliDate}" ${formB.ListVars['Hidden'].DeliDate}
|
|
|
|
+ >
|
|
|
|
+ <input type="date" class="text-${formB.ListVars['Align'].DeliDate} border-0 bg-white" value="${isEmpty(bd.DeliDate) ? '' : moment(bd.DeliDate).format('YYYY-MM-DD')}" readonly
|
|
|
|
+ onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
|
|
+ onfocusout="save_data_when_entering_text()"
|
|
|
|
+ required>
|
|
|
|
+ </td>
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
<td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
<td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
|
|
class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
|
|
>
|
|
>
|
|
@@ -1002,7 +1209,19 @@
|
|
onfocusout="save_data_when_entering_text()">
|
|
onfocusout="save_data_when_entering_text()">
|
|
</td>
|
|
</td>
|
|
<td
|
|
<td
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ class="text-${formB.ListVars['Align'].SalesMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
|
|
class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SorderMemo}>
|
|
|
|
+=======
|
|
|
|
+ class="text-${formB.ListVars['Align'].SorderMemo}" ${formB.ListVars['Hidden'].SordderMemo}>
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
<textarea style="max-height: 30px;" class="rounded w-100 bg-white memo-textarea" id="memo-textarea-${bd.Id}"
|
|
<textarea style="max-height: 30px;" class="rounded w-100 bg-white memo-textarea" id="memo-textarea-${bd.Id}"
|
|
ondblclick="Btype.dblclick_memo_textarea(this, ${bd.Id})" role="button" readonly>${bd.SorderMemo}</textarea>
|
|
ondblclick="Btype.dblclick_memo_textarea(this, ${bd.Id})" role="button" readonly>${bd.SorderMemo}</textarea>
|
|
</td>
|
|
</td>
|
|
@@ -1097,6 +1316,25 @@
|
|
<td
|
|
<td
|
|
class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>
|
|
class="text-${formB.ListVars['Align'].StdSalesPrc}" ${formB.ListVars['Hidden'].StdSalesPrc}>
|
|
</td>
|
|
</td>
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+ <td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
|
|
+ class="text-${formB.ListVars['Align'].DeliDate}" ${formB.ListVars['Hidden'].DeliDate}
|
|
|
|
+ >
|
|
|
|
+ <input type="date" class="text-${formB.ListVars['Align'].DeliDate} border-0 bg-white" readonly
|
|
|
|
+ value="${moment().format('YYYY-MM-DD')}"
|
|
|
|
+ onchange="Btype.check_the_checkbox_when_changing(this)"
|
|
|
|
+ onfocusout="save_data_when_entering_text()"
|
|
|
|
+ required>
|
|
|
|
+ </td>
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
<td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
<td onkeydown="Btype.handleEnterPressedinTabCell(event)"
|
|
class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
|
|
class="text-${formB.ListVars['Align'].Ref1}" ${formB.ListVars['Hidden'].Ref1}
|
|
>
|
|
>
|
|
@@ -1152,6 +1390,12 @@
|
|
}
|
|
}
|
|
|
|
|
|
function set_item_data_to_textbox(item) {
|
|
function set_item_data_to_textbox(item) {
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
$(tr).children('td:eq(2)').find('input').val(item.ItemCode)
|
|
$(tr).children('td:eq(2)').find('input').val(item.ItemCode)
|
|
$(tr).children('td:eq(3)').find('input').val(item.ItemName)
|
|
$(tr).children('td:eq(3)').find('input').val(item.ItemName)
|
|
@@ -1184,7 +1428,51 @@
|
|
// if (bd_page[index].Id === 0) {
|
|
// if (bd_page[index].Id === 0) {
|
|
// $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
|
|
// $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
|
|
// bd_page[index].SalesMemo = item.ItemMemo
|
|
// bd_page[index].SalesMemo = item.ItemMemo
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+ console.log('item : ', item);
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+ let tr = $(`input[name='bd-cursor-state']:checked`).closest('tr')
|
|
|
|
+ $(tr).children('td:eq(2)').find('input').val(item.ItemCode)
|
|
|
|
+ $(tr).children('td:eq(3)').find('input').val(item.ItemName)
|
|
|
|
+ $(tr).children('td:eq(4)').text(item.SubName)
|
|
|
|
+ $(tr).children('td:eq(5)').text(item.CountUnit)
|
|
|
|
+ $(tr).children('td:eq(6)').find('input').val()
|
|
|
|
+ $(tr).children('td:eq(7)').find('input').val(parseFloat(item.PurchPrc).toFixed(window.User['PurchPrcPoint']))
|
|
|
|
+ $(tr).children('td:eq(11)').text(parseFloat(item.SalesPrc).toFixed(window.User['PurchPrcPoint']))
|
|
|
|
+ let index = $(tr).prevAll().length;
|
|
|
|
+ bd_page[index].ItemId = item.Id
|
|
|
|
+ bd_page[index].ItemCode = item.ItemCode
|
|
|
|
+ bd_page[index].ItemName = item.ItemName
|
|
|
|
+ bd_page[index].SubName = item.SubName
|
|
|
|
+ bd_page[index].CountUnit = item.CountUnit
|
|
|
|
+ bd_page[index].SorderPrc = item.SalesPrc
|
|
|
|
+ bd_page[index].CurrPurchPrc = item.SalesPrc
|
|
|
|
+ bd_page[index].CurrSalesPrc = item.PurchPrc// override_amt_calc_txt_is_changed();
|
|
|
|
+
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+ if (!ThumbArr) { // item 받아왔을 때만 bd_page에 TurboThumb 저장
|
|
|
|
+ bd_page[index].TurboThumb = item.TurboThumb
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (bd_page[index].Id === 0) {
|
|
|
|
+ $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
|
|
|
|
+ bd_page[index].SorderMemo = item.ItemMemo
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (bd_page[index].Id === 0) {
|
|
|
|
+ $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
|
|
|
|
+ bd_page[index].SalesMemo = item.ItemMemo
|
|
|
|
+ }
|
|
|
|
+=======
|
|
|
|
+ // if (bd_page[index].Id === 0) {
|
|
|
|
+ // $(tr).children('td:eq(16)').find('textarea').val(item.ItemMemo)
|
|
|
|
+ // bd_page[index].PorderMemo = item.ItemMemo
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
// }
|
|
// }
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
|
|
return $(tr).children('td:eq(6)').find('input')
|
|
return $(tr).children('td:eq(6)').find('input')
|
|
}
|
|
}
|
|
@@ -1199,12 +1487,28 @@
|
|
|
|
|
|
let hd_page = response.data.HdPage[0]
|
|
let hd_page = response.data.HdPage[0]
|
|
bd_page = response.data.BdPage ?? []
|
|
bd_page = response.data.BdPage ?? []
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
let thumb = response.data.HdPage[0]['FirstThumb']
|
|
let thumb = response.data.HdPage[0]['FirstThumb']
|
|
|
|
|
|
if(!thumb){
|
|
if(!thumb){
|
|
ThumbArr = thumb;
|
|
ThumbArr = thumb;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+<<<<<<< HEAD
|
|
|
|
+=======
|
|
|
|
+=======
|
|
|
|
+ console.log('response : ', response);
|
|
|
|
+>>>>>>> 79e2e07b19fcabaccbe8bd7b4812a3a803613323
|
|
|
|
+>>>>>>> 34d34dd987216b37bfdf5b9f01963501a217140c
|
|
|
|
+>>>>>>> ce722376f5bce912f655f431d3049b9d7a0e3dc5
|
|
$('#Id').val(hd_page.Id)
|
|
$('#Id').val(hd_page.Id)
|
|
$('#auto-slip-no-txt').val(hd_page.SalesNo)
|
|
$('#auto-slip-no-txt').val(hd_page.SalesNo)
|
|
$('#sales-date').val(moment(to_date(hd_page.SalesDate)).format('YYYY-MM-DD'))
|
|
$('#sales-date').val(moment(to_date(hd_page.SalesDate)).format('YYYY-MM-DD'))
|