This commit is contained in:
@@ -373,6 +373,19 @@
|
|||||||
ref="selectedPartAssembly"
|
ref="selectedPartAssembly"
|
||||||
data-cy="selectedPartAssembly"
|
data-cy="selectedPartAssembly"
|
||||||
></gz-pick-list>
|
></gz-pick-list>
|
||||||
|
|
||||||
|
<gz-pick-list
|
||||||
|
v-if="
|
||||||
|
pvm.useInventory &&
|
||||||
|
form().showMe(this, 'WorkOrderItemPartPartWarehouseID')
|
||||||
|
"
|
||||||
|
:aya-type="$ay.ayt().PartWarehouse"
|
||||||
|
:show-edit-icon="true"
|
||||||
|
v-model="selectedPartWarehouse"
|
||||||
|
:label="$ay.t('WorkOrderItemPartPartWarehouseID')"
|
||||||
|
ref="selectedPartWarehouse"
|
||||||
|
data-cy="selectedPartWarehouse"
|
||||||
|
></gz-pick-list>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-btn text @click="partAssemblyDialog = false" color="primary">{{
|
<v-btn text @click="partAssemblyDialog = false" color="primary">{{
|
||||||
@@ -408,7 +421,8 @@ export default {
|
|||||||
activeItemIndex: null,
|
activeItemIndex: null,
|
||||||
selectedRow: [],
|
selectedRow: [],
|
||||||
partAssemblyDialog: false,
|
partAssemblyDialog: false,
|
||||||
selectedPartAssembly: null
|
selectedPartAssembly: null,
|
||||||
|
selectedPartWarehouse: 1
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -456,27 +470,32 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async addPartAssembly() {
|
async addPartAssembly() {
|
||||||
let res = await window.$gz.api.get(
|
let res = await window.$gz.api.get(
|
||||||
`task-group/${this.selectedTaskGroup}`
|
`part-assembly/${this.selectedPartAssembly}`
|
||||||
);
|
);
|
||||||
if (res.data && res.data.items) {
|
if (res.data && res.data.items) {
|
||||||
let newIndex = this.value.items[this.activeWoItemIndex].parts.length;
|
let newIndex = this.value.items[this.activeWoItemIndex].parts.length;
|
||||||
|
|
||||||
res.data.items.forEach(z => {
|
res.data.items.forEach(z => {
|
||||||
newIndex++;
|
newIndex++;
|
||||||
|
|
||||||
this.value.items[this.activeWoItemIndex].parts.push({
|
this.value.items[this.activeWoItemIndex].parts.push({
|
||||||
id: 0,
|
id: 0,
|
||||||
concurrency: 0,
|
concurrency: 0,
|
||||||
sequence: newIndex,
|
userId: null,
|
||||||
task: z.task,
|
description: null,
|
||||||
status: 1, //incomplete==1
|
serials: null,
|
||||||
statusViz: incompleteViz,
|
partId: z.partId,
|
||||||
completedByUserId: null,
|
partWarehouseId: this.selectedPartWarehouse,
|
||||||
completedDate: null,
|
quantity: z.quantity,
|
||||||
|
taxPartSaleId: null,
|
||||||
|
price: 0,
|
||||||
|
priceOverride: null,
|
||||||
|
cost: 0,
|
||||||
|
listPrice: 0,
|
||||||
isDirty: true,
|
isDirty: true,
|
||||||
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
||||||
uid: Date.now(),
|
uid: Date.now(),
|
||||||
completedByUserViz: null
|
partWarehouseViz: null,
|
||||||
|
partViz: z.partViz,
|
||||||
|
taxCodeViz: null
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$emit("change");
|
this.$emit("change");
|
||||||
@@ -484,7 +503,7 @@ export default {
|
|||||||
this.activeItemIndex = newIndex;
|
this.activeItemIndex = newIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.taskGroupDialog = false;
|
this.partAssemblyDialog = false;
|
||||||
},
|
},
|
||||||
doRequest() {
|
doRequest() {
|
||||||
const requestQuantity = this.value.items[this.activeWoItemIndex].parts[
|
const requestQuantity = this.value.items[this.activeWoItemIndex].parts[
|
||||||
|
|||||||
Reference in New Issue
Block a user