This commit is contained in:
@@ -174,10 +174,7 @@ CURRENTLY DOING: PurchaseOrder
|
|||||||
|
|
||||||
|
|
||||||
PO todo
|
PO todo
|
||||||
todo: area to enter received serials and have them inserted into serials table
|
|
||||||
when serials are added needs to save them at server adn also needs to be able to reverse them at server
|
|
||||||
maybe a db field needs to be added for this to po item? Otherwise how to reverse? Just a long text field maybe?
|
|
||||||
todo: receive all / receive item not setting received date?
|
|
||||||
todo: button to set part price from received cost
|
todo: button to set part price from received cost
|
||||||
todo: restock required feature
|
todo: restock required feature
|
||||||
dialog? See notes case 3849
|
dialog? See notes case 3849
|
||||||
|
|||||||
@@ -13,11 +13,13 @@
|
|||||||
:label="label"
|
:label="label"
|
||||||
:rules="rules"
|
:rules="rules"
|
||||||
:error-messages="errorMessages"
|
:error-messages="errorMessages"
|
||||||
|
:append-outer-icon="appendOuterIcon"
|
||||||
|
@click:append-outer="$emit('gz-append-outer')"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/* Xeslint-disable */
|
/* Xeslint-disable //@click:append-outer="appendOuter"*/
|
||||||
//https://dm4t2.github.io/vue-currency-input/guide/#introduction :value="formattedValue"
|
//https://dm4t2.github.io/vue-currency-input/guide/#introduction :value="formattedValue"
|
||||||
//https://codesandbox.io/s/vue-template-kd7d1?fontsize=14&module=%2Fsrc%2FApp.vue
|
//https://codesandbox.io/s/vue-template-kd7d1?fontsize=14&module=%2Fsrc%2FApp.vue
|
||||||
//https://github.com/dm4t2/vue-currency-input
|
//https://github.com/dm4t2/vue-currency-input
|
||||||
@@ -36,7 +38,8 @@ export default {
|
|||||||
value: { type: Number, default: null },
|
value: { type: Number, default: null },
|
||||||
readonly: { type: Boolean, default: false },
|
readonly: { type: Boolean, default: false },
|
||||||
disabled: { type: Boolean, default: false },
|
disabled: { type: Boolean, default: false },
|
||||||
errorMessages: { type: Array, default: null }
|
errorMessages: { type: Array, default: null },
|
||||||
|
appendOuterIcon: { type: String, default: null }
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
currencyValue() {
|
currencyValue() {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ import {
|
|||||||
faLink,
|
faLink,
|
||||||
faListOl,
|
faListOl,
|
||||||
faListUl,
|
faListUl,
|
||||||
//faMagic,
|
faMagic,
|
||||||
faMapMarkerAlt,
|
faMapMarkerAlt,
|
||||||
faMapMarkedAlt,
|
faMapMarkedAlt,
|
||||||
faMinus,
|
faMinus,
|
||||||
@@ -287,7 +287,7 @@ library.add(
|
|||||||
faLink,
|
faLink,
|
||||||
faListOl,
|
faListOl,
|
||||||
faListUl,
|
faListUl,
|
||||||
//faMagic,
|
faMagic,
|
||||||
faMapMarkerAlt,
|
faMapMarkerAlt,
|
||||||
faMapMarkedAlt,
|
faMapMarkedAlt,
|
||||||
faMinus,
|
faMinus,
|
||||||
@@ -892,12 +892,12 @@ const CUSTOM_ICONS = {
|
|||||||
icon: ["fas", "list-ul"]
|
icon: ["fas", "list-ul"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// ayiMagic: {
|
ayiMagic: {
|
||||||
// component: FontAwesomeIcon,
|
component: FontAwesomeIcon,
|
||||||
// props: {
|
props: {
|
||||||
// icon: ["fas", "magic"]
|
icon: ["fas", "magic"]
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
ayiMapMarker: {
|
ayiMapMarker: {
|
||||||
component: FontAwesomeIcon,
|
component: FontAwesomeIcon,
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -502,6 +502,12 @@
|
|||||||
v-model="obj.items[editPoItemIndex].receivedCost"
|
v-model="obj.items[editPoItemIndex].receivedCost"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
:label="$ay.t('PurchaseOrderReceiptItemReceiptCost')"
|
:label="$ay.t('PurchaseOrderReceiptItemReceiptCost')"
|
||||||
|
:append-outer-icon="
|
||||||
|
updatePartCostIcon(obj.items[editPoItemIndex])
|
||||||
|
"
|
||||||
|
@gz-append-outer="
|
||||||
|
updatePartCost(obj.items[editPoItemIndex])
|
||||||
|
"
|
||||||
ref="Items.ReceivedCost"
|
ref="Items.ReceivedCost"
|
||||||
data-cy="Items.ReceivedCost"
|
data-cy="Items.ReceivedCost"
|
||||||
:rules="[
|
:rules="[
|
||||||
@@ -581,7 +587,7 @@
|
|||||||
v-model="obj.items[editPoItemIndex].serials"
|
v-model="obj.items[editPoItemIndex].serials"
|
||||||
:readonly="formState.readOnly"
|
:readonly="formState.readOnly"
|
||||||
:label="$ay.t('PurchaseOrderItemSerialNumbers')"
|
:label="$ay.t('PurchaseOrderItemSerialNumbers')"
|
||||||
:rows="$vuetify.breakpoint.xs ? 3 : 10"
|
:rows="$vuetify.breakpoint.xs ? 3 : 5"
|
||||||
ref="Items.Serials"
|
ref="Items.Serials"
|
||||||
data-cy="Items.Serials"
|
data-cy="Items.Serials"
|
||||||
:error-messages="
|
:error-messages="
|
||||||
@@ -1082,6 +1088,15 @@ export default {
|
|||||||
this.editPoItemIndex = 0;
|
this.editPoItemIndex = 0;
|
||||||
this.formState.dirty = true;
|
this.formState.dirty = true;
|
||||||
},
|
},
|
||||||
|
updatePartCostIcon(item) {
|
||||||
|
if (item.receivedCost && item.purchaseOrderCost != item.receivedCost) {
|
||||||
|
return "$ayiMagic";
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
updatePartCost(item) {
|
||||||
|
console.log("STUB: UPDATE PART COST", item);
|
||||||
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user