This commit is contained in:
@@ -123,9 +123,7 @@ todo: server boot up message should show the port it's listening on if possible
|
|||||||
|
|
||||||
|
|
||||||
CURRENTLY DOING: INVENTORY
|
CURRENTLY DOING: INVENTORY
|
||||||
PartAssembly - shouldn't this have a quantity for each part and default to 1?
|
|
||||||
Yes, definitely, always default to 1 to save entry as well
|
|
||||||
Part - remove trackserialnumber everywhere, it's just not a thing anymore
|
|
||||||
PartSerial - see case 3845
|
PartSerial - see case 3845
|
||||||
do the object, it's very light, like a partassembly in nature
|
do the object, it's very light, like a partassembly in nature
|
||||||
once done, on part form add partserial editor where can open a form to add / remove partserials for a part
|
once done, on part form add partserial editor where can open a form to add / remove partserials for a part
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
@input="fieldValueChanged('name')"
|
@input="fieldValueChanged('name')"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
{{ sortedList }}
|
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<gz-pick-list
|
<gz-pick-list
|
||||||
v-if="!formState.readOnly"
|
v-if="!formState.readOnly"
|
||||||
@@ -41,9 +41,13 @@
|
|||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<!-- margin only if > xs and hide underline in qty field and onchange in qty if less than 1 make 1 -->
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in sortedList" :key="item.partId">
|
<!-- Note the use of partid which is unique plus quantity, without that quantity Vue doesn't update the display of quantity if it's changed by the quanittyChanged method -->
|
||||||
|
<tr
|
||||||
|
v-for="item in sortedList()"
|
||||||
|
:key="item.partId.toString() + item.quantity.toString()"
|
||||||
|
>
|
||||||
<td>
|
<td>
|
||||||
{{ item.partDisplay }}
|
{{ item.partDisplay }}
|
||||||
<template v-if="$vuetify.breakpoint.xs">
|
<template v-if="$vuetify.breakpoint.xs">
|
||||||
@@ -287,7 +291,8 @@ export default {
|
|||||||
deep: true
|
deep: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
|
methods: {
|
||||||
sortedList: function() {
|
sortedList: function() {
|
||||||
function compare(a, b) {
|
function compare(a, b) {
|
||||||
if (a.partDisplay < b.partDisplay) return -1;
|
if (a.partDisplay < b.partDisplay) return -1;
|
||||||
@@ -296,9 +301,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return this.obj.items.slice().sort(compare);
|
return this.obj.items.slice().sort(compare);
|
||||||
}
|
},
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
addItem: function() {
|
addItem: function() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
let selected = vm.$refs.partId.getFullSelectionValue();
|
let selected = vm.$refs.partId.getFullSelectionValue();
|
||||||
@@ -346,6 +349,8 @@ export default {
|
|||||||
}
|
}
|
||||||
item.quantity = 1;
|
item.quantity = 1;
|
||||||
|
|
||||||
|
//vm.obj.name = vm.obj.name + "X";
|
||||||
|
|
||||||
//vm.$set(vm.obj.items, index, item);
|
//vm.$set(vm.obj.items, index, item);
|
||||||
//vm.obj.items.splice(index, 1, item);
|
//vm.obj.items.splice(index, 1, item);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,21 +103,6 @@
|
|||||||
@input="fieldValueChanged('uPC')"
|
@input="fieldValueChanged('uPC')"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
</v-col>
|
</v-col>
|
||||||
<!-- //MIGRATE_OUTSTANDING - track serial needs to handle (or maybe doesn't for flexibility) scenario where there is inventory and user flips it
|
|
||||||
//also biz rule at server, maybe best handled as just the biz rule to save a trip to the server to check inventory?
|
|
||||||
//I guess if it just fixed the inventory if they decide to de-serialize it or something?
|
|
||||||
//must look at cases -->
|
|
||||||
<v-col cols="12" sm="6" lg="4" xl="3">
|
|
||||||
<v-checkbox
|
|
||||||
v-model="obj.trackSerialNumber"
|
|
||||||
:readonly="formState.readOnly"
|
|
||||||
:label="$ay.t('PartTrackSerialNumber')"
|
|
||||||
ref="trackSerialNumber"
|
|
||||||
data-cy="trackSerialNumber"
|
|
||||||
:error-messages="form().serverErrors(this, 'trackSerialNumber')"
|
|
||||||
@change="fieldValueChanged('trackSerialNumber')"
|
|
||||||
></v-checkbox>
|
|
||||||
</v-col>
|
|
||||||
|
|
||||||
<v-col
|
<v-col
|
||||||
v-if="form().showMe(this, 'PartManufacturerID')"
|
v-if="form().showMe(this, 'PartManufacturerID')"
|
||||||
@@ -388,36 +373,6 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||||
/*
|
|
||||||
{
|
|
||||||
"data": {
|
|
||||||
"id": 16,
|
|
||||||
"concurrency": 4659549,
|
|
||||||
"name": null,
|
|
||||||
"active": true,
|
|
||||||
"notes": "Culpa voluptas ut et.",
|
|
||||||
"wiki": null,
|
|
||||||
"customFields": null,
|
|
||||||
"tags": [
|
|
||||||
"quince",
|
|
||||||
"yellow",
|
|
||||||
"zone5"
|
|
||||||
],
|
|
||||||
"partNumber": "015587",
|
|
||||||
"manufacturerId": 8,
|
|
||||||
"manufacturerNumber": "man-015587",
|
|
||||||
"wholeSalerId": 17,
|
|
||||||
"wholeSalerNumber": "ws-015587",
|
|
||||||
"alternativeWholeSalerId": null,
|
|
||||||
"alternativeWholeSalerNumber": null,
|
|
||||||
"cost": 15.9554,
|
|
||||||
"retail": 19.1465,
|
|
||||||
"unitOfMeasure": "each",
|
|
||||||
"upc": "7997628113263",
|
|
||||||
"trackSerialNumber": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
obj:
|
obj:
|
||||||
//IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record
|
//IMPORTANT NOTE: Fields that are NON NULLABLE in the schema for the table but *are* hideable **MUST** have a default value set here or else there will be no way to save the record
|
||||||
//I.E. Serial, usertype fields, ACTIVE
|
//I.E. Serial, usertype fields, ACTIVE
|
||||||
@@ -441,8 +396,7 @@ export default {
|
|||||||
cost: 0,
|
cost: 0,
|
||||||
retail: 0,
|
retail: 0,
|
||||||
unitOfMeasure: null,
|
unitOfMeasure: null,
|
||||||
upc: null,
|
upc: null
|
||||||
trackSerialNumber: false
|
|
||||||
},
|
},
|
||||||
formState: {
|
formState: {
|
||||||
ready: false,
|
ready: false,
|
||||||
@@ -878,7 +832,6 @@ async function fetchTranslatedText(vm) {
|
|||||||
"PartPartNumber",
|
"PartPartNumber",
|
||||||
"PartCost",
|
"PartCost",
|
||||||
"PartRetail",
|
"PartRetail",
|
||||||
"PartTrackSerialNumber",
|
|
||||||
"PartManufacturerID",
|
"PartManufacturerID",
|
||||||
"PartManufacturerNumber",
|
"PartManufacturerNumber",
|
||||||
"PartWholesalerID",
|
"PartWholesalerID",
|
||||||
@@ -905,42 +858,4 @@ async function fetchTranslatedText(vm) {
|
|||||||
"PartCustom16"
|
"PartCustom16"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
[Required]
|
|
||||||
public string PartNumber { get; set; }
|
|
||||||
public long? ManufacturerId { get; set; }
|
|
||||||
public string ManufacturerNumber { get; set; }
|
|
||||||
public long? WholeSalerId { get; set; }
|
|
||||||
public string WholeSalerNumber { get; set; }
|
|
||||||
public long? AlternativeWholeSalerId { get; set; }
|
|
||||||
public string AlternativeWholeSalerNumber { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal Cost { get; set; }
|
|
||||||
[Required]
|
|
||||||
public decimal Retail { get; set; }
|
|
||||||
public string UnitOfMeasure { get; set; }
|
|
||||||
public string UPC { get; set; }
|
|
||||||
[Required]
|
|
||||||
public bool TrackSerialNumber { get; set; }
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartName", FieldKey = "PartName" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartNotes", FieldKey = "Notes" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });
|
|
||||||
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartPartNumber", FieldKey = "PartPartNumber", Hideable = false });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartCost", FieldKey = "PartCost", Hideable = false });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartRetail", FieldKey = "PartRetail", Hideable = false });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartTrackSerialNumber", FieldKey = "PartTrackSerialNumber", Hideable = false });
|
|
||||||
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerID", FieldKey = "PartManufacturerID" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartManufacturerNumber", FieldKey = "PartManufacturerNumber" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartWholesalerID", FieldKey = "PartWholesalerID" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartWholesalerNumber", FieldKey = "PartWholesalerNumber" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartAlternativeWholesalerID", FieldKey = "PartAlternativeWholesalerID" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartAlternativeWholesalerNumber", FieldKey = "PartAlternativeWholesalerNumber" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "UnitOfMeasure", FieldKey = "UnitOfMeasure" });
|
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "PartUPC", FieldKey = "PartUPC" });
|
|
||||||
*/
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user