This commit is contained in:
@@ -175,7 +175,8 @@ todo: lots of stuff, but next maybe is the most fundamental stuff like child col
|
|||||||
|
|
||||||
|
|
||||||
PO UI for items:
|
PO UI for items:
|
||||||
|
NEW ITEM button in po list header
|
||||||
|
NEW ITEM button in po item edit form (so can just keep entering)
|
||||||
|
|
||||||
Edit mode ideally will not navigate but will open an edit dialog in place which will act on things from within the same form
|
Edit mode ideally will not navigate but will open an edit dialog in place which will act on things from within the same form
|
||||||
Receive all PO form menu item if applicable that just receives the entire PO as is for a shortcut
|
Receive all PO form menu item if applicable that just receives the entire PO as is for a shortcut
|
||||||
@@ -191,11 +192,14 @@ todo: test default tax codes are set
|
|||||||
todo: test form customization hide child collection items
|
todo: test form customization hide child collection items
|
||||||
todo: test required rule and server errors display correctly / clear in both poitems table row and in edit form for poitem when opened
|
todo: test required rule and server errors display correctly / clear in both poitems table row and in edit form for poitem when opened
|
||||||
make up fake rules if necessary just to confirm the new child collection error handling works
|
make up fake rules if necessary just to confirm the new child collection error handling works
|
||||||
|
todo: test new from scratch po
|
||||||
|
todo: test read only form of PO
|
||||||
|
todo: test reports, tagging etc
|
||||||
todo: can edit po number but if I set an existing po number 4 to 23 for example and the last autogenerated is 22 it will happily make another 23 so there are now two
|
todo: can edit po number but if I set an existing po number 4 to 23 for example and the last autogenerated is 22 it will happily make another 23 so there are now two
|
||||||
what I want to happen is it skips existing numbers
|
what I want to happen is it skips existing numbers
|
||||||
not many serialized objects, maybe a utility to do wahtever, renumbering with them could be done for just that purpose entirely
|
not many serialized objects, maybe a utility to do wahtever, renumbering with them could be done for just that purpose entirely
|
||||||
(along with resetting the autoid number)
|
(along with resetting the autoid number)
|
||||||
|
Does this require a special role?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ async function dealWithError(msg, vm) {
|
|||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error(errMsg);
|
console.error(errMsg);
|
||||||
|
|
||||||
//debugger;
|
debugger;
|
||||||
}
|
}
|
||||||
|
|
||||||
//If a form instance was provided (vue instance)
|
//If a form instance was provided (vue instance)
|
||||||
|
|||||||
@@ -246,7 +246,7 @@
|
|||||||
|
|
||||||
<template v-slot:top>
|
<template v-slot:top>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-menu offset-y v-if="rights.change && obj.hasUnreceived">
|
<v-menu offset-y v-if="rights.change">
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<span class="text-h6">
|
<span class="text-h6">
|
||||||
{{ $ay.t("PurchaseOrderItemList") }}</span
|
{{ $ay.t("PurchaseOrderItemList") }}</span
|
||||||
@@ -255,7 +255,19 @@
|
|||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<v-list>
|
<v-list>
|
||||||
<v-list-item @click="receiveAll">
|
<v-list-item @click="newPOItem">
|
||||||
|
<v-list-item-icon>
|
||||||
|
<v-icon>$ayiPlus</v-icon>
|
||||||
|
</v-list-item-icon>
|
||||||
|
<v-list-item-title>{{
|
||||||
|
$ay.t("New")
|
||||||
|
}}</v-list-item-title>
|
||||||
|
</v-list-item>
|
||||||
|
<v-divider></v-divider>
|
||||||
|
<v-list-item
|
||||||
|
@click="receiveAll"
|
||||||
|
:disabled="!obj.hasUnreceived"
|
||||||
|
>
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon>$ayiBoxOpen</v-icon>
|
<v-icon>$ayiBoxOpen</v-icon>
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
@@ -450,6 +462,10 @@
|
|||||||
form().decimalValid(this, 'Items.ReceivedCost'),
|
form().decimalValid(this, 'Items.ReceivedCost'),
|
||||||
form().required(this, 'Items.ReceivedCost')
|
form().required(this, 'Items.ReceivedCost')
|
||||||
]"
|
]"
|
||||||
|
:error-messages="
|
||||||
|
form().serverErrors(this, 'Items.ReceivedCost')
|
||||||
|
"
|
||||||
|
@input="fieldValueChanged('Items.ReceivedCost')"
|
||||||
></gz-currency>
|
></gz-currency>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
@@ -801,36 +817,6 @@ export default {
|
|||||||
},
|
},
|
||||||
itemList: function() {
|
itemList: function() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
/*
|
|
||||||
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"id": 1,
|
|
||||||
"concurrency": 7281388,
|
|
||||||
"purchaseOrderId": 1,
|
|
||||||
"partId": 18,
|
|
||||||
"partWarehouseId": 2,
|
|
||||||
"quantityOrdered": 28,
|
|
||||||
"quantityReceived": 28,
|
|
||||||
"purchaseOrderCost": 10.8204,
|
|
||||||
"receivedCost": 10,
|
|
||||||
"receivedDate": "2021-01-16T13:49:59.346006Z",
|
|
||||||
"partRequestedById": null,
|
|
||||||
"workorderItemPartRequestId": null,
|
|
||||||
"purchaseTaxCodeId": 3,
|
|
||||||
"vendorPartNumber": null,
|
|
||||||
"displayPartNumber": "733980",
|
|
||||||
"displayWarehouse": "WHS- Carlotta Hollow",
|
|
||||||
"displayRequestUser": null,
|
|
||||||
"displayRequestWorkorder": null,
|
|
||||||
"displayTaxCode": "Sales & Goods",
|
|
||||||
"displayNetTotal": 302.9712,
|
|
||||||
"displayTaxA": 21.207984,
|
|
||||||
"displayTaxB": 21.207984,
|
|
||||||
"displayLineTotal": 345.387168
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
|
|
||||||
return vm.obj.items.map((x, i) => {
|
return vm.obj.items.map((x, i) => {
|
||||||
return {
|
return {
|
||||||
index: i,
|
index: i,
|
||||||
@@ -902,11 +888,34 @@ export default {
|
|||||||
receiveAll: function() {
|
receiveAll: function() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
this.obj.items.forEach(item => receiveItem(item, vm));
|
this.obj.items.forEach(item => receiveItem(item, vm));
|
||||||
|
//set status to all received fwiw
|
||||||
|
this.obj.status = 5;
|
||||||
},
|
},
|
||||||
editItem: function(item) {
|
editItem: function(item) {
|
||||||
this.editPoItemIndex = item.index;
|
this.editPoItemIndex = item.index;
|
||||||
this.editPoItemDialog = true;
|
this.editPoItemDialog = true;
|
||||||
},
|
},
|
||||||
|
newPOItem: function() {
|
||||||
|
this.obj.items.push({
|
||||||
|
id: 0,
|
||||||
|
purchaseOrderId: 0,
|
||||||
|
partId: null,
|
||||||
|
partWarehouseId: 1,
|
||||||
|
quantityOrdered: 1,
|
||||||
|
quantityReceived: 0,
|
||||||
|
purchaseOrderCost: 0,
|
||||||
|
receivedCost: 0.0,
|
||||||
|
receivedDate: null,
|
||||||
|
partRequestedById: null,
|
||||||
|
workorderItemPartRequestId: null,
|
||||||
|
purchaseTaxCodeId:
|
||||||
|
window.$gz.store.state.globalSettings.defaultTaxPartPurchaseId,
|
||||||
|
vendorPartNumber: null
|
||||||
|
});
|
||||||
|
|
||||||
|
this.editPoItemIndex = this.obj.items.length - 1;
|
||||||
|
this.editPoItemDialog = true;
|
||||||
|
},
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
},
|
},
|
||||||
@@ -1344,4 +1353,58 @@ async function fetchTranslatedText(vm) {
|
|||||||
"PurchaseOrderCustom16"
|
"PurchaseOrderCustom16"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
/* {
|
||||||
|
data: {
|
||||||
|
id: 4,
|
||||||
|
concurrency: 7343586,
|
||||||
|
serial: 4,
|
||||||
|
notes: "Eius tenetur magnam nostrum qui doloribus velit.",
|
||||||
|
wiki: null,
|
||||||
|
customFields: null,
|
||||||
|
tags: ["black", "green", "zebra", "zone0"],
|
||||||
|
vendorMemo: "Et quis eaque repellat.",
|
||||||
|
dropShipToCustomerId: null,
|
||||||
|
referenceNumber: "578929",
|
||||||
|
vendorId: 2,
|
||||||
|
orderedDate: "2020-05-03T07:57:42.014786Z",
|
||||||
|
expectedReceiveDate: "2020-05-08T07:57:42.014786Z",
|
||||||
|
status: 2,
|
||||||
|
projectId: null,
|
||||||
|
text1: "Natus pariatur.",
|
||||||
|
text2: "Provident repudiandae nobis et.",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
id: 15,
|
||||||
|
concurrency: 7343586,
|
||||||
|
purchaseOrderId: 4,
|
||||||
|
partId: 13,
|
||||||
|
partWarehouseId: 2,
|
||||||
|
quantityOrdered: 65.0,
|
||||||
|
quantityReceived: 0.0,
|
||||||
|
purchaseOrderCost: 15.6812,
|
||||||
|
receivedCost: 0.0,
|
||||||
|
receivedDate: null,
|
||||||
|
partRequestedById: null,
|
||||||
|
workorderItemPartRequestId: null,
|
||||||
|
purchaseTaxCodeId: 3,
|
||||||
|
vendorPartNumber: "man-695831",
|
||||||
|
displayPartNumber: "695831",
|
||||||
|
displayWarehouse: "WHS- Lera Brook",
|
||||||
|
displayRequestUser: null,
|
||||||
|
displayRequestWorkorder: null,
|
||||||
|
displayTaxCode: "Sales & Goods",
|
||||||
|
displayNetTotal: 1019.278,
|
||||||
|
displayTaxA: 71.34946,
|
||||||
|
displayTaxB: 71.34946,
|
||||||
|
displayLineTotal: 1161.97692
|
||||||
|
}
|
||||||
|
],
|
||||||
|
hasSelectableWarehouses: true,
|
||||||
|
hasPartRequest: false,
|
||||||
|
hasTaxes: true,
|
||||||
|
hasReceipt: false,
|
||||||
|
hasVendorNumber: true,
|
||||||
|
hasUnreceived: true
|
||||||
|
}
|
||||||
|
};*/
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user