瀏覽代碼

[Administration] Distributions > Commandes : possibilité d'envoyer les bons de livraison directement depuis la ligne de la commande

feature/rotating_product
Guillaume Bourgeois 7 月之前
父節點
當前提交
7a271a0e64
共有 5 個文件被更改,包括 88 次插入42 次删除
  1. +15
    -0
      backend/controllers/DistributionController.php
  2. +13
    -5
      backend/views/distribution/index.php
  3. +42
    -37
      backend/web/css/screen.css
  4. +13
    -0
      backend/web/js/vuejs/distribution-index.js
  5. +5
    -0
      backend/web/sass/_adminlte.scss

+ 15
- 0
backend/controllers/DistributionController.php 查看文件

@@ -405,6 +405,7 @@ class DistributionController extends BackendController
'isCreditFunctioningMandatory' => $orderModule->isOrderCreditFunctioningMandatory($order),
'isCreditFunctioningUser' => $orderModule->isOrderCreditFunctioningUser($order),
'debitCredit' => false,
'deliveryNote' => $order->deliveryNote ? $order->deliveryNote->getAttributes() : null
]);
}
}
@@ -748,6 +749,20 @@ class DistributionController extends BackendController
return Ajax::responseSuccess('Bon de livraison généré');
}

public function actionAjaxSendDeliveryNote(int $idOrder)
{
$orderModule = $this->getOrderModule();
$documentModule = $this->getDocumentModule();
$order = $orderModule->getRepository()->findOneOrderById($idOrder);

if($order->deliveryNote) {
$documentModule->getManager()->sendDocument($order->deliveryNote);
return Ajax::responseSuccess('Bon de livraison envoyé');
}

return Ajax::responseSuccess('Une erreur est survenue lors de l\'envoi du bon de livraison.');
}

public function actionAjaxGenerateDeliveryNoteEachUser(string $idOrders)
{
if (strlen($idOrders)) {

+ 13
- 5
backend/views/distribution/index.php 查看文件

@@ -483,23 +483,31 @@ $this->setPageTitle('Distributions') ;
</button>
<ul class="dropdown-menu">
<li v-if="!order.id_delivery_note">
<a href="javascript:void(0);" class="" :data-id-order="order.id" @click="generateDeliveryNote">
<a href="javascript:void(0);" :data-id-order="order.id" @click="generateDeliveryNote">
<span class="glyphicon glyphicon-plus"></span> Générer un bon de livraison
</a>
</li>
<li v-if="order.id_quotation">
<a :href="UrlManager.getBaseUrl()+'quotation/update?id='+order.id_quotation">
<span class="glyphicon glyphicon-file"></span> Devis
<span class="glyphicon glyphicon-file"></span> Modifier le devis
</a>
</li>
<li v-if="order.id_delivery_note">
<li v-if="order.id_delivery_note && order.deliveryNote">
<a :href="UrlManager.getBaseUrl()+'delivery-note/update?id='+order.id_delivery_note">
<span class="glyphicon glyphicon-file"></span> Bon de livraison
<span class="glyphicon glyphicon-file"></span> Modifier le bon de livraison
</a>
<template v-if="order.deliveryNote.status == 'valid'">
<a v-if="!order.deliveryNote.is_sent" href="javascript:void(0);" :data-id-order="order.id" @click="sendDeliveryNote">
<span class="glyphicon glyphicon-send"></span> Envoyer le bon de livraison
</a>
<a v-else class="text-success disable" href="#">
<span class="glyphicon glyphicon-ok"></span> Bon de livraison envoyé
</a>
</template>
</li>
<li v-if="order.id_invoice">
<a :href="UrlManager.getBaseUrl()+'invoice/update?id='+order.id_invoice">
<span class="glyphicon glyphicon-file"></span> Facture
<span class="glyphicon glyphicon-file"></span> Modifier la facture
</a>
</li>
</ul>

+ 42
- 37
backend/web/css/screen.css 查看文件

@@ -1767,33 +1767,38 @@ body.skin-black .content-wrapper .col-no-padding-right {
body.skin-black .content-wrapper a {
color: #e08e0b;
}
/* line 238, ../sass/_adminlte.scss */
/* line 237, ../sass/_adminlte.scss */
body.skin-black .content-wrapper a.disable {
pointer-events: none;
cursor: default;
}
/* line 243, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .label {
padding-top: 4px;
padding-bottom: 1px;
}
/* line 243, ../sass/_adminlte.scss */
/* line 248, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn {
color: white;
}
/* line 247, ../sass/_adminlte.scss */
/* line 252, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-default {
color: #333;
background-color: white;
}
/* line 252, ../sass/_adminlte.scss */
/* line 257, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .btn-primary {
background-color: #F39C12;
color: white;
border-color: #F39C12;
}
/* line 259, ../sass/_adminlte.scss */
/* line 264, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .nav.nav-tabs .badge {
margin-left: 4px;
background-color: #e0e0e0;
color: #444;
}
/* line 266, ../sass/_adminlte.scss */
/* line 271, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .tab-content {
border-left: solid 1px #ddd;
border-bottom: solid 1px #ddd;
@@ -1801,20 +1806,20 @@ body.skin-black .content-wrapper .tab-content {
padding: 30px 15px 15px 15px;
background-color: white;
}
/* line 274, ../sass/_adminlte.scss */
/* line 279, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert {
position: relative;
}
/* line 277, ../sass/_adminlte.scss */
/* line 282, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a {
color: white;
}
/* line 280, ../sass/_adminlte.scss */
/* line 285, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert a.btn {
color: #333;
text-decoration: none;
}
/* line 285, ../sass/_adminlte.scss */
/* line 290, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close {
font-size: 30px;
position: absolute;
@@ -1824,70 +1829,70 @@ body.skin-black .content-wrapper .alert .close {
color: white;
opacity: 0.6;
}
/* line 294, ../sass/_adminlte.scss */
/* line 299, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .alert .close:hover {
opacity: 1;
}
/* line 301, ../sass/_adminlte.scss */
/* line 306, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box h3 {
font-size: 28px;
font-family: 'Source Sans Pro',sans-serif;
}
/* line 306, ../sass/_adminlte.scss */
/* line 311, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .icon {
top: -2px;
}
/* line 310, ../sass/_adminlte.scss */
/* line 315, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .small-box .small-box-footer {
color: white;
padding-top: 6px;
padding-bottom: 2px;
}
/* line 319, ../sass/_adminlte.scss */
/* line 324, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout h4 .fa {
margin-right: 7px;
}
/* line 322, ../sass/_adminlte.scss */
/* line 327, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout a {
color: white;
}
/* line 325, ../sass/_adminlte.scss */
/* line 330, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .callout .btn {
color: #333;
text-decoration: none;
}
/* line 332, ../sass/_adminlte.scss */
/* line 337, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th {
font-size: 13px;
}
/* line 335, ../sass/_adminlte.scss */
/* line 340, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table th.column-actions, body.skin-black .content-wrapper .table td.column-actions {
width: 172px;
text-align: right;
}
/* line 339, ../sass/_adminlte.scss */
/* line 344, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .table td.text-small, body.skin-black .content-wrapper .table th.text-small {
font-size: 12px;
}
/* line 344, ../sass/_adminlte.scss */
/* line 349, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > .active > a, body.skin-black .content-wrapper .pagination > .active > span, body.skin-black .content-wrapper .pagination > .active > a:hover, body.skin-black .content-wrapper .pagination > .active > span:hover, body.skin-black .content-wrapper .pagination > .active > a:focus, body.skin-black .content-wrapper .pagination > .active > span:focus {
background-color: #F39C12;
border: solid 1px #F39C12;
color: white;
}
/* line 350, ../sass/_adminlte.scss */
/* line 355, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a, body.skin-black .content-wrapper .pagination > li > span {
color: #F39C12;
}
/* line 352, ../sass/_adminlte.scss */
/* line 357, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .pagination > li > a:hover, body.skin-black .content-wrapper .pagination > li > span:hover {
color: #c87f0a;
}
/* line 357, ../sass/_adminlte.scss */
/* line 362, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .submenu {
margin-bottom: 25px;
}
/* line 361, ../sass/_adminlte.scss */
/* line 366, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions {
position: fixed;
bottom: 0;
@@ -1901,59 +1906,59 @@ body.skin-black .content-wrapper .form-actions {
z-index: 10;
border-top: solid 1px #e0e0e0;
}
/* line 374, ../sass/_adminlte.scss */
/* line 379, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-actions a, body.skin-black .content-wrapper .form-actions button {
margin-left: 10px;
}
/* line 379, ../sass/_adminlte.scss */
/* line 384, ../sass/_adminlte.scss */
body.skin-black .content-wrapper .form-buttons {
margin-top: 25px;
text-align: right;
}
/* line 386, ../sass/_adminlte.scss */
/* line 391, ../sass/_adminlte.scss */
body.skin-black .main-footer a {
color: #F39C12;
}
/* line 391, ../sass/_adminlte.scss */
/* line 396, ../sass/_adminlte.scss */
body.skin-black .gridview-pagesize {
float: right;
margin-bottom: 8px;
}
/* line 396, ../sass/_adminlte.scss */
/* line 401, ../sass/_adminlte.scss */
body.skin-black #yii-debug-toolbar {
bottom: 64px;
}

/* line 401, ../sass/_adminlte.scss */
/* line 406, ../sass/_adminlte.scss */
body.login-page {
background: none;
background-color: white;
}
/* line 405, ../sass/_adminlte.scss */
/* line 410, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo {
text-align: center;
font-family: 'highvoltageregular';
}
/* line 409, ../sass/_adminlte.scss */
/* line 414, ../sass/_adminlte.scss */
body.login-page .login-box .login-logo img {
width: 50px;
}
/* line 414, ../sass/_adminlte.scss */
/* line 419, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary {
background-color: #F39C12;
border-color: #F39C12;
padding: 5px 10px;
}
/* line 419, ../sass/_adminlte.scss */
/* line 424, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body .btn-primary:active {
background-color: #f4a62a;
border-color: #F39C12;
}
/* line 425, ../sass/_adminlte.scss */
/* line 430, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a {
color: #F39C12;
}
/* line 427, ../sass/_adminlte.scss */
/* line 432, ../sass/_adminlte.scss */
body.login-page .login-box .login-box-body a:hover {
color: #f4a62a;
}

+ 13
- 0
backend/web/js/vuejs/distribution-index.js 查看文件

@@ -792,6 +792,19 @@ var app = new Vue({
app.init(app.idActivePointSale);
});
},
sendDeliveryNote: function (event) {
var app = this;
var idOrder = event.currentTarget.getAttribute('data-id-order');
axios.get(UrlManager.getBaseUrlAbsolute() + "distribution/ajax-send-delivery-note", {
params: {
idOrder: idOrder
}
})
.then(function (response) {
appAlerts.alertResponse(response);
app.init(app.idActivePointSale);
});
},
deliveryNoteExist: function (idPointSale) {
return typeof this.deliveryNotes[this.idActivePointSale] != 'undefined';
},

+ 5
- 0
backend/web/sass/_adminlte.scss 查看文件

@@ -233,6 +233,11 @@ body.skin-black {

a {
color: darken($color1, 5) ;

&.disable {
pointer-events: none;
cursor: default;
}
}

.label {

Loading…
取消
儲存