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