入出库编辑页面

入出库编辑页面
pull/1/head
siontion 9 months ago
parent a11a73e542
commit 6b41b3dadc

@ -50,7 +50,11 @@ public class StorageMatController {
@PreAuthorize("@ss.hasPermission('heli:storage-mat:create')") @PreAuthorize("@ss.hasPermission('heli:storage-mat:create')")
public CommonResult<Long> createStorageMat(@Valid @RequestBody List<StorageMatSaveReqVO> createReqVO) { public CommonResult<Long> createStorageMat(@Valid @RequestBody List<StorageMatSaveReqVO> createReqVO) {
for (StorageMatSaveReqVO item :createReqVO){ for (StorageMatSaveReqVO item :createReqVO){
storageMatService.createStorageMat(item); if(item.getId() != null && item.getId()>0){
storageMatService.deleteStorageMat(item.getId());
item.setId(null);
}
storageMatService.createStorageMat(item);
}; };
return success(1L); return success(1L);
} }

@ -399,17 +399,17 @@ const submitForm = async () => {
commonResult = 'common.createSuccess' commonResult = 'common.createSuccess'
} else { } else {
storageid.value = await StorageApi.getStorage(router.query.id) storageid.value = data.id
await StorageApi.updateStorage(data) await StorageApi.updateStorage(data)
commonResult = 'common.updateSuccess' commonResult = 'common.updateSuccess'
} }
// //
formData.value.productBomItemDOList.forEach(item => { formData.value.productBomItemDOList.forEach(item => {
item.stockId = storageid.value.id item.stockId = storageid.value
item.whId = formData.value.whId item.whId = formData.value.whId
}) })
const dataMats = formData.value.productBomItemDOList as unknown as StorageMatApi.StorageMatVO[] const dataMats = formData.value.productBomItemDOList as unknown as StorageMatApi.StorageMatVO[]
//await StorageMatApi.createStorageMatBatch(dataMats) await StorageMatApi.createStorageMatBatch(dataMats)
// //
matUploadFiles.value = { 'businessType': 'STORAGE', 'businessId': storageid, 'businessFileType': '' } matUploadFiles.value = { 'businessType': 'STORAGE', 'businessId': storageid, 'businessFileType': '' }
@ -420,7 +420,7 @@ const submitForm = async () => {
// //
reload(); reload();
router.query.id = storageid.value.id; //router.query.id = storageid.value.id;
} finally { } finally {
formLoading.value = false formLoading.value = false
} }
@ -487,8 +487,6 @@ const handleDelete2 = (index: number) => {
formData.value.productBomItemDOList.splice(index, 1) formData.value.productBomItemDOList.splice(index, 1)
} }
// //
const warehouseList = ref([]) const warehouseList = ref([])
// //
@ -529,7 +527,6 @@ const handleRg = (async (scope) => {
//------------------- //-------------------
}) })
const matList = ref<MaterialApi.MaterialVO[]>([]) // const matList = ref<MaterialApi.MaterialVO[]>([]) //
const matSelectLoading = ref(false); const matSelectLoading = ref(false);
const remoteMatCodeSearch = async (query) => { const remoteMatCodeSearch = async (query) => {

Loading…
Cancel
Save