fix crm_vue
This commit is contained in:
parent
581cadbd22
commit
0f273bb9d4
@ -121,8 +121,14 @@ var ac = new Vue({
|
|||||||
cottage: 'Коттедж',
|
cottage: 'Коттедж',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
closesStep: function(newVal, oldVal) {
|
||||||
|
console.log('[CloseStage] closesStep ИЗМЕНЁН:', oldVal, '->', newVal, new Error().stack);
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closedStep: function(id, clientId) {
|
closedStep: function(id, clientId) {
|
||||||
|
console.log('[CloseStage] closedStep вызван. closesStep:', ac.closesStep, 'step:', ac.step?.name, 'clientId:', ac.clientId, 'reqId:', ac.reqId);
|
||||||
ac.errorText = '';
|
ac.errorText = '';
|
||||||
ac.errorMes = false;
|
ac.errorMes = false;
|
||||||
if(ac.no_close_step){
|
if(ac.no_close_step){
|
||||||
@ -264,8 +270,7 @@ var ac = new Vue({
|
|||||||
selected_room_name: ac.selectedRoom.name
|
selected_room_name: ac.selectedRoom.name
|
||||||
})
|
})
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
|
console.log('[CloseStage] Этап закрыт (AJAX success). closesStep:', ac.closesStep, 'step:', ac.step?.name, 'response:', response.data);
|
||||||
console.log(response.data);
|
|
||||||
|
|
||||||
if(response.data.adjacent_id > 0){
|
if(response.data.adjacent_id > 0){
|
||||||
var req_id = response.data.req_id;
|
var req_id = response.data.req_id;
|
||||||
@ -286,7 +291,7 @@ var ac = new Vue({
|
|||||||
get_count_clients();
|
get_count_clients();
|
||||||
}
|
}
|
||||||
$.post('/ajax/getStageBar.php', { client_id: ac.clientId, funnel_id: ac.step.funnel_id }, function(result) {
|
$.post('/ajax/getStageBar.php', { client_id: ac.clientId, funnel_id: ac.step.funnel_id }, function(result) {
|
||||||
|
console.log('[CloseStage] getStageBar загружен. closesStep=false. step:', ac.step?.name);
|
||||||
$('#editClientStagebar').html(result);
|
$('#editClientStagebar').html(result);
|
||||||
ac.closesStep = false;
|
ac.closesStep = false;
|
||||||
ac.is_looad = false;
|
ac.is_looad = false;
|
||||||
@ -492,6 +497,11 @@ var ac = new Vue({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
openStep: function(id, clientId) {
|
openStep: function(id, clientId) {
|
||||||
|
console.log('[CloseStage] openStep вызван. closesStep:', ac.closesStep, 'step:', ac.step?.name, 'id:', ac.step?.id);
|
||||||
|
var $modalBg = $('#app_step .full_modal-bg');
|
||||||
|
if ($modalBg.length && $modalBg.is(':hidden')) {
|
||||||
|
$modalBg.show();
|
||||||
|
}
|
||||||
this.open_step_load = true;
|
this.open_step_load = true;
|
||||||
ac.pole_dop_close_step = [];
|
ac.pole_dop_close_step = [];
|
||||||
this.is_looad = false;
|
this.is_looad = false;
|
||||||
@ -1047,6 +1057,7 @@ var ac = new Vue({
|
|||||||
},
|
},
|
||||||
//Закрытие окна "открыть этап"
|
//Закрытие окна "открыть этап"
|
||||||
formCloseStep: function() {
|
formCloseStep: function() {
|
||||||
|
console.log('[CloseStage] formCloseStep (крестик). closesStep:', ac.closesStep);
|
||||||
if ($('#client-history__bg').css('display') == 'block') {
|
if ($('#client-history__bg').css('display') == 'block') {
|
||||||
$('#client-history__bg').css('zIndex', '99998');
|
$('#client-history__bg').css('zIndex', '99998');
|
||||||
}
|
}
|
||||||
@ -1371,7 +1382,25 @@ var ac = new Vue({
|
|||||||
this.complexBus = this.$refs.complexForFunnel?.contentWindow?.complexBus
|
this.complexBus = this.$refs.complexForFunnel?.contentWindow?.complexBus
|
||||||
}
|
}
|
||||||
}, 200)
|
}, 200)
|
||||||
}
|
},
|
||||||
|
initCreateDeal(reqId) {
|
||||||
|
console.log('reqId', reqId);
|
||||||
|
console.log('window', window);
|
||||||
|
if (window.createDeal) {
|
||||||
|
window.createDeal(reqId);
|
||||||
|
const modalBg = document.querySelector('#app_step .full_modal-bg');
|
||||||
|
if (modalBg) {
|
||||||
|
console.log('modalBg', modalBg)
|
||||||
|
modalBg.style.opacity = '0';
|
||||||
|
modalBg.style.transition = 'opacity 0.2s ease';
|
||||||
|
setTimeout(() => {
|
||||||
|
modalBg.style.display = 'none';
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.error('createDeal function not found');
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user