231 lines
16 KiB
PHP
231 lines
16 KiB
PHP
<!-- Заявки -->
|
||
<div class="full_modal-bg hidden" style="z-index: 99987" id="room_requisitions" v-if="isShow">
|
||
<span class="pseudo-link closer">
|
||
<i @click="closeForm" class="ti-close"></i>
|
||
</span>
|
||
<div class="full_modal edit-modal new-client__modal">
|
||
|
||
<div class="modal-inner" style="max-height: 75vh; overflow-y: auto;">
|
||
|
||
<h2 class="modal-title">Заявки по ({{apartmentTitle}})</h2>
|
||
<div class="tabs__content">
|
||
<div class="form-block">
|
||
|
||
<div>
|
||
<template v-if="inProgress">
|
||
<div style="text-align:center; margin-top: 25px;">
|
||
<img src="../images/rocket-spinner.svg" width="96px">
|
||
</div>
|
||
</template>
|
||
|
||
<div v-else-if="requisitions" class="clients">
|
||
|
||
|
||
<div v-for="(item, index) in requisitions" :key="`requisitions_${item.id}`">
|
||
<div class="client" :id="`requisitions__${item.id}`">
|
||
<div class="client-inner">
|
||
<div class="additional-info">
|
||
<div class="date">{{ item.date_add }}</div>
|
||
<div class="type" v-html="item.name_type"></div>
|
||
<div class="stagebar">
|
||
<div v-if="item.funnel_id == 0" class="crm__small-stagebar" style="height: 8px; overflow: hidden; width: 220px;">
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<td v-for="(step, id) in item.steps.bar" :key="`requisition_steps_bar_${id}`" class="stage" :class="[{ active: step.id <= item.steps.stageId }, step.classF]" :title="step.title">
|
||
<div :data-stage="step.id" :data-req="item.id" class="crm__small-stage"></div>
|
||
<span class="next-stage" v-html="step.name"></span>
|
||
</td>
|
||
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div v-else-if="item.funnel_id > 0" class="crm__small-stagebar" style="height: 8px; overflow: hidden; width: 220px;">
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<td v-for="(step, id) in item.steps.bar" :key="`requisition_steps_bar_${id}`" :class="'stage stage-funnel'+step.classF+' stageFunnel__'+step.id"
|
||
:title="step.name">
|
||
<div :data-stage="step.id"
|
||
:data-req="item.id"
|
||
:data-main="step.main"
|
||
class="crm__small-step">
|
||
</div>
|
||
<span class="next-stage">{{ step.name }}</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td :colspan="item.steps.bar.length">
|
||
<span class="stepError" :id="'step_funnel_error'+index"></span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<?php
|
||
if (isset($_POST['funnel']) && $_POST['funnel'] == 'all') {
|
||
if ($client['funnel_id'] == 0) {
|
||
$name_funnel = "Обычные";
|
||
} else {
|
||
|
||
$sql_fun = "SELECT name FROM funnel WHERE id = " . $client['funnel_id'];
|
||
$name_funnel = mysql_fetch_assoc(mysql_query($sql_fun))['name'];
|
||
}
|
||
?>
|
||
<div style="padding-left: 5px;" class="client-added">
|
||
<div class="client-added__work"> <?= $name_funnel ?></div>
|
||
</div>
|
||
<?php
|
||
}
|
||
?>
|
||
</div>
|
||
|
||
<div v-if="item.deleted == 1" class="stagebar-title" v-html="item.steps.stage+' (закрыт)'"></div>
|
||
<div v-else class="stagebar-title" v-html="item.steps.stage"></div>
|
||
|
||
|
||
<div class="type"></div>
|
||
<div v-show="item.can_edit==1" class="actions">
|
||
<a href="javascript:{};" @click="getReq(index)" class="no-border" title="Редактировать">
|
||
<span class="simple-button settings"><i class="jw-action-icon-settings"></i></span>
|
||
</a>
|
||
<a v-if="item.deleted==0" href="javascript:{}" :data-req="item.id" class="delClientAgent no-border" title="Закрыть">
|
||
<span class="simple-button settings"><i class="ti-close"></i></span>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
<div class="client-name">
|
||
<h2><a class="toggleClient" @click=toggleClient(index) href="javascript:{}">{{ item.name }}</a></h2>
|
||
<div v-if="item.priority>0" class="client-priority" title="Категория клиента">
|
||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_2" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="24px" height="24px" class="">
|
||
<ellipse cx="256" cy="256" rx="144" ry="144" :class="'priority'+item.priority" />
|
||
</svg>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="main-info" :class="{hidden: !item.isMainInfo}">
|
||
<div v-if="!isEmpty(item.complex_room_id)" class="col client-object">
|
||
<p class="small">Объект</p>
|
||
<p>
|
||
<b class="big">
|
||
<a :href="`/complexes/#/apartments/${item.complex_room_id}`" target="_blank" v-html="item.complex_room_number"></a>
|
||
</b>
|
||
</p>
|
||
</div>
|
||
<div v-if="!isEmpty(item.client)" class="col client-object">
|
||
<p class="small">Клиент</p>
|
||
<p>
|
||
<b class="big" v-if="item.can_edit>0">
|
||
<a href="javascript:{};" :data-id="item.client.value" @click="showClient" title="Подробно">
|
||
<span v-html="item.client.fio"></span>
|
||
</a>
|
||
</b>
|
||
<b class="big" v-else>
|
||
|
||
<span v-html="item.client.fio"></span>
|
||
|
||
</b>
|
||
</p>
|
||
</div>
|
||
<div v-if="item.can_edit==1" class="col">
|
||
<div class="jw__action-button">
|
||
<div class="jw__g-button req-events-new" :data-id="item.id">История и задачи</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="clear"></div>
|
||
</div>
|
||
<div class="client-added">
|
||
<div class="client-added__by" v-html="'ID: '+item.id"></div>
|
||
<div class="client-added__by" v-html="'Добавил '+item.manager"></div>
|
||
|
||
<div class="client-added__work" v-if="item.confirm==0 && item.who_work > 0" v-html="'Должен принять в работу '+item.master_work"></div>
|
||
|
||
<template v-else-if="item.confirm>0 && item.who_work && item.deleted == 1">
|
||
<div class="client-added__work" v-html="'Был в работе у '+item.master_work"></div>
|
||
<div class="client-added__work" v-html="'Закрыл '+item.master_delete"></div>
|
||
</template>
|
||
|
||
<div v-else class="client-added__work" v-html="'В работе у '+item.master_work"></div>
|
||
<div v-if="!isEmpty(item.doer_yes)" class="client-added__work">Совместная работа:
|
||
<template v-for="(doer_fio, index) in item.doer_yes">
|
||
<span v-html="doer_fio" :key="`requisition_doer_yes_${index}`"></span><br>
|
||
</template>
|
||
|
||
</div>
|
||
|
||
<div v-if="!isEmpty(item.doer_no)" class="client-added__work">Приглашен к совместной работе:
|
||
<template v-for="(doer_fio, index) in item.doer_no">
|
||
<span v-html="doer_fio" :key="`requisition_doer_no_${index}`"></span><br>
|
||
</template>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<div v-if="!isEmpty(item.description)" class="client_row row_line" :class="{hidden: !item.isMainInfo}">
|
||
<p class="small">Описание</p>
|
||
<p class="desc" v-html="item.description"></p>
|
||
</div>
|
||
|
||
<div v-if="item.deleted > 0" class="client_row row_line" :class="{hidden: !item.isMainInfo}">
|
||
<p class="small">Причина закрытия</p>
|
||
<p class="desc" v-html="item.reason"></p>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div class="clear"></div>
|
||
|
||
|
||
<div v-show="all_pages > 1" class="f-system_pagination" style="float: left;">
|
||
<center>
|
||
<ul class="pagination" style="display: inline-flex;">
|
||
<template v-if="page==1">
|
||
<li class=active><a href='javascript:{}'>1</a></li>
|
||
</template>
|
||
<template v-else>
|
||
<li><a href="javascript:{}" @click="pagin(prevPage)" :data-page="prevPage">«</a></li>
|
||
<li><a href="javascript:{}" @click="pagin(1)" data-page="1">1</a></li>
|
||
</template>
|
||
<template v-if="all_pages > 8 && page > 4">
|
||
<li><a href="javascript:{}">...</a></li>
|
||
</template>
|
||
<template v-for="pp in pagePagin">
|
||
<li :class="{active:pp==page}"><a href="javascript:{}" @click="pagin(pp)" :data-page="pp">{{pp}}</a></li>
|
||
</template>
|
||
<template v-if="all_pages > 8 && page < all_pages - 4">
|
||
<li><a href="javascript:{}">...</a></li>
|
||
</template>
|
||
<template v-if="page == all_pages">
|
||
<li class="active"><a href="javascript:{}" @click="pagin(all_pages)" :data-page="all_pages">{{all_pages}}</a></li>
|
||
</template>
|
||
<template v-else>
|
||
<li><a href="javascript:{}" @click="pagin(all_pages)" :data-page="all_pages">{{all_pages}}</a></li>
|
||
<li><a href="javascript:{}" @click="pagin(page+1)" data-page="page+1">»</a></li>
|
||
</template>
|
||
</ul>
|
||
<span style="padding-left: 15px; float: none; border: none; height: 40px;" class="control-group kol_find">перейти на <input style="float:unset;" id="requisitionClientPageNumberInputForManualGoToPage" type="number" maxlength="6" class="number text small-input no-mrg-left" placeholder="№ стр." @keypress="goToRequisitionsPage($event)" /></span>
|
||
</center>
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
|
||
<div v-else class="empty-block">
|
||
<h1><i class="ti-na"></i></h1>
|
||
<h2>Заявок не найдено</h2>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
<div class="clear"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|