Fix Tool manager Siemens

This commit is contained in:
Nicola Carminati
2019-01-22 13:00:00 +01:00
parent e52e9128e8
commit dbbbecd2e5
9 changed files with 52 additions and 14 deletions
+1 -5
View File
@@ -20,11 +20,7 @@ namespace Client.Utils
public static String CEF_LOCALES_PATH = BASE_PATH + "CEF\\Resources\\locales";
public static String CEF_EXCEPTIONLOG_PATH = BASE_PATH + "ExceptionLog";
public static String errorPageFile = BASE_PATH + "error.pg";
<<<<<<< HEAD
public static String JOB_OPENING_PATH = "C:\\CMS\\ACTIVE\\TMP\\clientTmpJob\\";
=======
public static String JOB_OPENING_PATH = "C:\\CMS\\Active\\TMP\\clientTmpJob\\";
>>>>>>> feature/Scada
public static String JOB_OPENING_PATH = "C:\\CMS\\ACTIVE\\TMP\\clientTmpJob\\";
//Config Names
public const string CONFIG_KEY = "Config";
+4 -1
View File
@@ -43,7 +43,10 @@ namespace Step.Config
}
catch (Exception ex)
{
ExceptionManager.Manage(ERROR_LEVEL.FATAL, ex.Message);
var message = ex.Message;
if (ex.InnerException != null)
message += "\n"+ex.InnerException.Message;
ExceptionManager.Manage(ERROR_LEVEL.FATAL, message);
}
}
+1
View File
@@ -211,6 +211,7 @@
<modal_add_offset_tool_id>Id Offset</modal_add_offset_tool_id>
<modal_add_offset_tool_abbreviation>Offset %d</modal_add_offset_tool_abbreviation>
<tooling_families_label_add>Crea una nuova famiglia</tooling_families_label_add>
<load_depot_error_fit>Spazio troppo piccolo per caricare questo utensile</load_depot_error_fit>
<!-- Tool Manager - Modals Labels -->
<depot_action_loading_header>Caricamento Utensile</depot_action_loading_header>
+1
View File
@@ -210,6 +210,7 @@
<modal_add_offset_tool_id>Offset Id</modal_add_offset_tool_id>
<modal_add_offset_tool_abbreviation>Offset %d</modal_add_offset_tool_abbreviation>
<tooling_families_label_add>Create new Family</tooling_families_label_add>
<load_depot_error_fit>The space to load this tools is not enough</load_depot_error_fit>
<!-- Tool Manager - Modals Labels -->
<depot_action_loading_header>Loading Tool</depot_action_loading_header>
@@ -894,6 +894,12 @@
color: @color-cyan-blue;
margin-top: 20px;
flex-flow: column;
.error{
margin-top: 74px;
color: #a10518;
font-size: 22px;
font-weight: bold;
}
.load-depot-box-select {
margin-top: 15px;
}
+6
View File
@@ -845,6 +845,12 @@
margin-top: 20px;
flex-flow: column;
}
.modal.load-depot .load-depot-box .error {
margin-top: 74px;
color: #a10518;
font-size: 22px;
font-weight: bold;
}
.modal.load-depot .load-depot-box .load-depot-box-select {
margin-top: 15px;
}
@@ -3,6 +3,8 @@ import { ModalHelper, Modal } from "src/components/modals"
import { DepotService } from 'src/services/depotService';
import { Factory, MessageService } from 'src/_base';
import { inputBox } from "src/modules/base-components/cards";
import { store, AppModel } from "src/store";
import { ToolingGetters,toolingActions } from "src/store/tooling.store";
export default {
@@ -12,7 +14,9 @@ export default {
return {
toolSelected: {},
positionId: null,
magazineId: null
magazineId: null,
magInfo: null,
fitInPosition: true
}
},
computed: {
@@ -32,8 +36,13 @@ export default {
new DepotService().GetToolAvailable();
else
new DepotService().GetNcToolAvailable();
})
this.magazineId = ModalHelper.loadDepotModal.magazineId;
this.positionId = ModalHelper.loadDepotModal.positionId;
if(this.magazineId)
this.magInfo = (this.$store.state as AppModel).tooling.magazines.find(d => d.id == this.magazineId);
},
methods: {
close() {
@@ -50,10 +59,13 @@ export default {
this.magazineId = ModalHelper.loadDepotModal.magazineId;
this.positionId = ModalHelper.loadDepotModal.positionId;
new DepotService().AddToolToDepot(this.magazineId, this.positionId, { toolId: this.toolSelected.id }).then(response => {
Factory.Get(MessageService).deleteChannel("esc_pressed");
Factory.Get(MessageService).deleteChannel("esc_pressed");
if(this.magInfo)
toolingActions.updateBusyStatusPositions(store,this.magInfo.type,(this.$store.state as AppModel).depot.depot);
ModalHelper.HideModal();
});
console.log(this.toolSelected);
},
calcItemName(shank) {
if (shank.childsTools && shank.childsTools.length > 1)
@@ -73,5 +85,13 @@ export default {
else
return this.familyNameFromId(id);
}
},
watch: {
toolSelected: function (val) {
if(this.toolSelected && this.positionId){
toolingActions.setCanLoadTool(store, this.toolSelected.rightSize,this.toolSelected.leftSize,this.magInfo.type,(this.$store.state as AppModel).depot.depot);
this.fitInPosition = (this.$store.state as AppModel).tooling.magPosDepot[this.positionId -1].canLoadTool;
}
}
}
};
@@ -5,9 +5,11 @@
<label>{{'load_depot_lbl_select' | localize("Seleziona l'utensile da aggiungere")}}</label>
<div class="load-depot-box-select">
<input-box type="select" :title="'load_depot_select_title' | localize('Utensile')" v-model="toolSelected">
<option v-if="isSiemens()" v-for="s in availableMultiTools" :key="s.id" :value="s">{{s.name}} - {{'tooling_shank_abbreviation' | localize('S%d',s.id)}}</option>
<option v-if="isSiemens()" v-for="s in availableMultiTools" :key="s.id" :value="s">
{{s.name}} - {{'tooling_shank_abbreviation' | localize('S%d',s.id)}}
</option>
<option v-if="isSiemens() && isPositionCompatible(s)" v-for="s in availableTools" :key="s.id" :value="s">
{{s.familyName}} - {{'tooling_tool_abbreviation' | localize('T%d',s.id)}}
{{s.familyName}} - {{'tooling_tool_abbreviation' | localize('DP%d',s.childId)}}
</option>
<option v-if="!isSiemens() && isPositionCompatible(s)" v-for="s in availableTools" :key="s.id" :value="s">
@@ -17,11 +19,14 @@
<!-- <select>
</select> -->
</div>
<div v-if="toolSelected && !fitInPosition" class="error">
{{'load_depot_error_fit' | localize('Spazio troppo piccolo per caricare questo utensile')}}
</div>
</div>
<footer>
<div class="pull-right">
<button class="btn" @click="close()">{{'load_depot_btn_cancel' | localize("Annulla")}}</button>
<button class="btn btn-success" @click="save()" :disabled="!toolSelected.id">{{'load_depot_btn_confirm' | localize("Conferma")}}</button>
<button class="btn btn-success" @click="save()" :disabled="!toolSelected.id || !fitInPosition">{{'load_depot_btn_confirm' | localize("Conferma")}}</button>
</div>
</footer>
</modal>
@@ -9,7 +9,7 @@
<div class="title" :class="{'disabled':disabled}" v-if="physicalType==4"><img src="assets/icons/MagPos/Loader-Spindle.png" /></div>
<div class="title" :class="{'disabled':disabled}" v-if="physicalType==5"><img src="assets/icons/MagPos/Transfer.png" /></div>
<div class="title" :class="{'disabled':disabled}" v-if="physicalType==7"><img src="assets/icons/MagPos/Loader-User.png" /></div>
<button v-if="editable" :disabled="magposOccupied" class="btn" @click="onClick()"><i class="fa fa-plus"></i></button>
<button v-if="editable" :disabled="magposOccupied || disabled" class="btn" @click="onClick()"><i class="fa fa-plus"></i></button>
</header>
<section :class="{'disabled':disabled}">
<slot></slot>