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
|
||||
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
|
||||
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
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
@input="fieldValueChanged('name')"
|
||||
></v-text-field>
|
||||
</v-col>
|
||||
{{ sortedList }}
|
||||
|
||||
<v-col cols="12">
|
||||
<gz-pick-list
|
||||
v-if="!formState.readOnly"
|
||||
@@ -41,9 +41,13 @@
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- margin only if > xs and hide underline in qty field and onchange in qty if less than 1 make 1 -->
|
||||
|
||||
<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>
|
||||
{{ item.partDisplay }}
|
||||
<template v-if="$vuetify.breakpoint.xs">
|
||||
@@ -287,7 +291,8 @@ export default {
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
methods: {
|
||||
sortedList: function() {
|
||||
function compare(a, b) {
|
||||
if (a.partDisplay < b.partDisplay) return -1;
|
||||
@@ -296,9 +301,7 @@ export default {
|
||||
}
|
||||
|
||||
return this.obj.items.slice().sort(compare);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
addItem: function() {
|
||||
let vm = this;
|
||||
let selected = vm.$refs.partId.getFullSelectionValue();
|
||||
@@ -346,6 +349,8 @@ export default {
|
||||
}
|
||||
item.quantity = 1;
|
||||
|
||||
//vm.obj.name = vm.obj.name + "X";
|
||||
|
||||
//vm.$set(vm.obj.items, index, item);
|
||||
//vm.obj.items.splice(index, 1, item);
|
||||
}
|
||||
|
||||
@@ -103,21 +103,6 @@
|
||||
@input="fieldValueChanged('uPC')"
|
||||
></v-text-field>
|
||||
</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-if="form().showMe(this, 'PartManufacturerID')"
|
||||
@@ -388,36 +373,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
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:
|
||||
//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
|
||||
@@ -441,8 +396,7 @@ export default {
|
||||
cost: 0,
|
||||
retail: 0,
|
||||
unitOfMeasure: null,
|
||||
upc: null,
|
||||
trackSerialNumber: false
|
||||
upc: null
|
||||
},
|
||||
formState: {
|
||||
ready: false,
|
||||
@@ -878,7 +832,6 @@ async function fetchTranslatedText(vm) {
|
||||
"PartPartNumber",
|
||||
"PartCost",
|
||||
"PartRetail",
|
||||
"PartTrackSerialNumber",
|
||||
"PartManufacturerID",
|
||||
"PartManufacturerNumber",
|
||||
"PartWholesalerID",
|
||||
@@ -905,42 +858,4 @@ async function fetchTranslatedText(vm) {
|
||||
"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>
|
||||
|
||||
Reference in New Issue
Block a user