This commit is contained in:
2021-07-02 21:09:22 +00:00
parent 7198e94187
commit acb5964362
3 changed files with 58 additions and 72 deletions

View File

@@ -420,24 +420,9 @@ todo: many biz objects are not using new PUT methodology
CURRENTLY DOING: serials on wo
CURRENTLY DOING:
issue: serials probably shouldn't be a free-form text box or stored or handled that way but instead as a list like tags are at the back end
and in a list control at the front end
UI:
entry mode
table below a single entry box
click on a row to edit in the entry box
click on a delete button to remove an entry
display mode
shows as a table
maybe don't need modes, can just use the same ui to view and edit and just remove the edit bits if readonly
todo: make sure serials are de-duped at the server anywhere it accepts raw serial data from client
todo: picking from existing serial numbers for parts on workorder
see work order item parts for notes and what to do
close 3839 when done
todo: as part of duplication above, REMOVE TEMPLATES ENTIRELY??
If can duplicate this way at client and can easily change customer etc do we even need the wo templates anymore?
@@ -1286,6 +1271,8 @@ Build 111
- WorkorderItemPart
PartAssembly implemented - can now choose part assembly to populate work order item parts list from menu item in workorderitemparts vertical dots menu
Serials implemented - can now choose and append from existing serials for part using icon beside serial entry text area in addition to just typing or pasting them in
case 3899 Fixed issue where cost and listprice were not preserved on any update to woitempart record
https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3899
- User / Custom contact on create / duplicate now allows entry of new user options before first User save rather than previous behaviour of having to save new record first then edit and save user options

View File

@@ -85,61 +85,6 @@
}}<v-icon right large>$ayiTrashRestoreAlt</v-icon></v-btn
>
<v-col
v-if="form().showMe(this, 'WorkOrderItemPartQuantity')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-decimal
v-model="
value.items[activeWoItemIndex].parts[activeItemIndex].quantity
"
:readonly="formState.readOnly || isDeleted"
:disabled="isDeleted"
:label="$ay.t('WorkOrderItemPartQuantity')"
:ref="
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
"
data-cy="partQuantity"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
)
"
:rules="[
form().decimalValid(
this,
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
),
form().required(
this,
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
)
]"
@input="
fieldValueChanged(
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
)
"
></gz-decimal>
<template
v-if="
value.items[activeWoItemIndex].parts[activeItemIndex]
.requestAmountViz != null
"
>
<v-btn color="secondary" text @click="doRequest()">
<v-icon left>
$ayiParachuteBox
</v-icon>
{{ requestMore }}
</v-btn>
</template>
</v-col>
<v-col
v-if="form().showMe(this, 'WorkOrderItemPartPartID')"
cols="12"
@@ -219,6 +164,60 @@
@update:name="warehouseChange"
></gz-pick-list>
</v-col>
<v-col
v-if="form().showMe(this, 'WorkOrderItemPartQuantity')"
cols="12"
sm="6"
lg="4"
xl="3"
>
<gz-decimal
v-model="
value.items[activeWoItemIndex].parts[activeItemIndex].quantity
"
:readonly="formState.readOnly || isDeleted"
:disabled="isDeleted"
:label="$ay.t('WorkOrderItemPartQuantity')"
:ref="
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
"
data-cy="partQuantity"
:error-messages="
form().serverErrors(
this,
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
)
"
:rules="[
form().decimalValid(
this,
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
),
form().required(
this,
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
)
]"
@input="
fieldValueChanged(
`Items[${activeWoItemIndex}].parts[${activeItemIndex}].quantity`
)
"
></gz-decimal>
<template
v-if="
value.items[activeWoItemIndex].parts[activeItemIndex]
.requestAmountViz != null
"
>
<v-btn color="secondary" text @click="doRequest()">
<v-icon left>
$ayiParachuteBox
</v-icon>
{{ requestMore }}
</v-btn>
</template>
</v-col>
<v-col
v-if="form().showMe(this, 'WorkOrderItemPartDescription')"

View File

@@ -1200,7 +1200,7 @@ async function saveParts(vm, woItemIndex) {
//clone and skip viz and other fields
const o = window.$gz.util.deepCopySkip(
vm.obj.items[woItemIndex].parts[i],
["uid", "cost", "listPrice", "isDirty"]
["uid", "isDirty"]
);
const res = await window.$gz.api.upsert(`${API_BASE_URL}items/parts`, o);