diff --git a/src/pages/outLocation/addForm.vue b/src/pages/outLocation/addForm.vue index 7a62800..bc2e518 100644 --- a/src/pages/outLocation/addForm.vue +++ b/src/pages/outLocation/addForm.vue @@ -266,7 +266,11 @@ function open() { applyQty: '', receiveQty: '', stockQty: '', - qty: '' + totalReception: '', + qty: '', + moveCode: '', + areaNumber: '', + isInAccount: '' } isPopupShow.value = true isShow.value = false @@ -342,7 +346,7 @@ function getLocation() { id: form.value.id, itemNumbers }) - .then((res) => { + .then(async (res) => { if (!res.data) { msg.value = res.msg form1.value.areaNumber = '' @@ -365,8 +369,8 @@ function getLocation() { form1.value.totalReception = res.data.totalReception || 0 form1.value.isInAccount = res.data.isInAccount isInAccount.value = res.data.isInAccount || '' - // this.itemNumber = res.data.itemNumber || '' + await getSparePartsList(); }) .catch((error) => { msg.value = error.msg @@ -435,7 +439,7 @@ async function getSparePartsList(warehouseArea) { if (warehouseArea) { param.moveCode = warehouseArea } else { - param.ccAccount = form.value.costCenter + param.department = form.value.costCenter param.warehouseArea = form1.value.areaNumber } await costCenterMappingApi @@ -444,6 +448,9 @@ async function getSparePartsList(warehouseArea) { sparePartsList.value = res.data singleColumnList.value = sparePartsList.value costCenterRef.value.singleColumnList = sparePartsList.value + if (singleColumnList.value.length > 0) { + sure(singleColumnList.value[0]) + } proxy.$modal.closeLoading() }) .catch(() => {