2708 - Extra community changes
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
2a948ddc33
commit
56925be41f
|
@ -172,8 +172,8 @@ module.exports = Self => {
|
|||
e.notes,
|
||||
CAST(SUM(i.density * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as loadedkg,
|
||||
CAST(SUM(167.5 * b.stickers * IF(pkg.volume, pkg.volume, pkg.width * pkg.depth * pkg.height) / 1000000 ) as DECIMAL(10,0)) as volumeKg
|
||||
FROM entry e
|
||||
JOIN tmp.travel tr ON tr.id = e.travelFk
|
||||
FROM tmp.travel tr
|
||||
JOIN entry e ON e.travelFk = tr.id
|
||||
JOIN buy b ON b.entryFk = e.id
|
||||
JOIN packaging pkg ON pkg.id = b.packageFk
|
||||
JOIN item i ON i.id = b.itemFk
|
||||
|
|
|
@ -37,6 +37,9 @@
|
|||
"m3": {
|
||||
"type": "Number"
|
||||
},
|
||||
"kg": {
|
||||
"type": "Number"
|
||||
},
|
||||
"cargoSupplierFk": {
|
||||
"type": "Number"
|
||||
},
|
||||
|
|
|
@ -39,24 +39,28 @@
|
|||
<vn-date-picker
|
||||
vn-one
|
||||
label="Shipped from"
|
||||
ng-model="filter.shippedFrom">
|
||||
ng-model="filter.shippedFrom"
|
||||
on-change="$ctrl.shippedFrom = value">
|
||||
</vn-date-picker>
|
||||
<vn-date-picker
|
||||
vn-one
|
||||
label="Shipped to"
|
||||
ng-model="filter.shippedTo">
|
||||
ng-model="filter.shippedTo"
|
||||
on-change="$ctrl.shippedTo = value">
|
||||
</vn-date-picker>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-date-picker
|
||||
vn-one
|
||||
label="Landed from"
|
||||
ng-model="filter.landedFrom">
|
||||
ng-model="filter.landedFrom"
|
||||
on-change="$ctrl.landedFrom = value">
|
||||
</vn-date-picker>
|
||||
<vn-date-picker
|
||||
vn-one
|
||||
label="Landed to"
|
||||
ng-model="filter.landedTo">
|
||||
ng-model="filter.landedTo"
|
||||
on-change="$ctrl.landedTo = value">
|
||||
</vn-date-picker>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -1,7 +1,59 @@
|
|||
import ngModule from '../module';
|
||||
import SearchPanel from 'core/components/searchbar/search-panel';
|
||||
|
||||
class Controller extends SearchPanel {
|
||||
constructor($, $element) {
|
||||
super($, $element);
|
||||
|
||||
this.filter = this.$.filter;
|
||||
}
|
||||
|
||||
get shippedFrom() {
|
||||
return this._shippedFrom;
|
||||
}
|
||||
|
||||
set shippedFrom(value) {
|
||||
this._shippedFrom = value;
|
||||
|
||||
if (!this.filter.shippedTo)
|
||||
this.filter.shippedTo = value;
|
||||
}
|
||||
|
||||
get shippedTo() {
|
||||
return this._shippedTo;
|
||||
}
|
||||
|
||||
set shippedTo(value) {
|
||||
this._shippedTo = value;
|
||||
|
||||
if (!this.filter.shippedFrom)
|
||||
this.filter.shippedFrom = value;
|
||||
}
|
||||
|
||||
get landedFrom() {
|
||||
return this._landedFrom;
|
||||
}
|
||||
|
||||
set landedFrom(value) {
|
||||
this._landedFrom = value;
|
||||
|
||||
if (!this.filter.landedTo)
|
||||
this.filter.landedTo = value;
|
||||
}
|
||||
|
||||
get landedTo() {
|
||||
return this._landedTo;
|
||||
}
|
||||
|
||||
set landedTo(value) {
|
||||
this._landedTo = value;
|
||||
|
||||
if (!this.filter.landedFrom)
|
||||
this.filter.landedFrom = value;
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnExtraCommunitySearchPanel', {
|
||||
template: require('./index.html'),
|
||||
controller: SearchPanel
|
||||
controller: Controller
|
||||
});
|
||||
|
|
|
@ -17,11 +17,11 @@
|
|||
</vn-searchbar>
|
||||
</vn-portal>
|
||||
<vn-data-viewer model="model" class="travel-list">
|
||||
<vn-card ng-repeat="travel in travels" class="vn-mb-md">
|
||||
<vn-card>
|
||||
<section class="vn-pa-md">
|
||||
<vn-table vn-droppable="$ctrl.onDrop($event)" ng-attr-id="{{::travel.id}}">
|
||||
<vn-table>
|
||||
<vn-thead>
|
||||
<vn-tr ng-if="$index == 0">
|
||||
<vn-tr>
|
||||
<vn-th shrink>Id</vn-th>
|
||||
<vn-th expand>Supplier</vn-th>
|
||||
<vn-th expand>Freighter</vn-th>
|
||||
|
@ -30,17 +30,17 @@
|
|||
<vn-th number>Bl. KG</vn-th>
|
||||
<vn-th number>Phy. KG</vn-th>
|
||||
<vn-th number>Vol. KG</vn-th>
|
||||
<vn-th expand translate-attr="{title: 'Warehouse Out'}">
|
||||
Wh. Out
|
||||
</vn-th>
|
||||
<vn-th expand>Shipped</vn-th>
|
||||
<vn-th expand translate-attr="{title: 'Warehouse In'}">
|
||||
Wh. In
|
||||
</vn-th>
|
||||
<vn-th expand>Landed</vn-th>
|
||||
<vn-th expand>W. Shipped</vn-th>
|
||||
<vn-th expand translate-attr="{title: 'Warehouse Out'}">
|
||||
Wh. Out
|
||||
</vn-th>
|
||||
<vn-th expand>W. Landed</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tbody ng-repeat="travel in travels" class="vn-mb-md" vn-droppable="$ctrl.onDrop($event)" ng-attr-id="{{::travel.id}}">
|
||||
<vn-tr class="header">
|
||||
<vn-td>
|
||||
<span class="link"
|
||||
|
@ -55,17 +55,26 @@
|
|||
<field>
|
||||
<vn-textfield class="dense" vn-focus
|
||||
ng-model="travel.ref"
|
||||
on-change="$ctrl.changeReference(travel)">
|
||||
on-change="$ctrl.save(travel.id, {ref: value})">
|
||||
</vn-textfield>
|
||||
</field>
|
||||
</vn-td-editable>
|
||||
<vn-td number>{{::travel.stickers}}</vn-td>
|
||||
<vn-td number>{{::travel.kg}}</vn-td>
|
||||
<vn-td-editable expand style="text-align: right">
|
||||
<text number>{{travel.kg}}</text>
|
||||
<field>
|
||||
<vn-input-number class="dense" vn-focus
|
||||
ng-model="travel.kg"
|
||||
on-change="$ctrl.save(travel.id, {kg: value})"
|
||||
min="0">
|
||||
</vn-input-number>
|
||||
</field>
|
||||
</vn-td-editable>
|
||||
<vn-td number>{{::travel.loadedKg}}</vn-td>
|
||||
<vn-td number>{{::travel.volumeKg}}</vn-td>
|
||||
<vn-td expand>{{::travel.warehouseOutName}}</vn-td>
|
||||
<vn-td expand>{{::travel.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td expand>{{::travel.warehouseInName}}</vn-td>
|
||||
<vn-td expand>{{::travel.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td expand>{{::travel.warehouseOutName}}</vn-td>
|
||||
<vn-td expand>{{::travel.landed | date: 'dd/MM/yyyy'}}</vn-td>
|
||||
</vn-tr>
|
||||
<a href="#" ng-repeat="entry in travel.entries" class="vn-tr" draggable
|
||||
|
@ -80,7 +89,7 @@
|
|||
<vn-td>{{::entry.supplierName}}</vn-td>
|
||||
<vn-td></vn-td>
|
||||
<vn-td expand>{{::entry.ref}}</vn-td>
|
||||
<vn-th number>{{::entry.stickers}}</vn-th>
|
||||
<vn-th number>{{::entry.stickers}} 1123</vn-th>
|
||||
<vn-td number></vn-td>
|
||||
<vn-td number>{{::entry.loadedkg}}</vn-td>
|
||||
<vn-td number>{{::entry.volumeKg}}</vn-td>
|
||||
|
|
|
@ -83,6 +83,12 @@ class Controller extends Section {
|
|||
this.$http.patch(endpoint, params)
|
||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
||||
}
|
||||
|
||||
save(id, data) {
|
||||
const endpoint = `Travels/${id}`;
|
||||
this.$http.patch(endpoint, data)
|
||||
.then(() => this.vnApp.showSuccess(this.$t('Data saved!')));
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnTravelExtraCommunity', {
|
||||
|
|
|
@ -5,4 +5,6 @@ Bl. KG: KG Bloq.
|
|||
Phy. KG: KG físico
|
||||
Vol. KG: KG Vol.
|
||||
Search by travel id or reference: Buscar por id travel o referencia
|
||||
Continent Out: Continente salida
|
||||
Continent Out: Continente salida
|
||||
W. Shipped: F. envío
|
||||
W. Landed: F. llegada
|
|
@ -26,11 +26,11 @@ vn-travel-extra-community {
|
|||
color: $color-active
|
||||
}
|
||||
|
||||
vn-td-editable text:after {
|
||||
vn-td-editable:hover text:after {
|
||||
font-family: 'Material Icons';
|
||||
content: 'edit';
|
||||
position: absolute;
|
||||
margin-left: 5px;
|
||||
right: -15px;
|
||||
color: $color-spacer
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue