出入库 编辑页面初始化

出入库 编辑页面初始化
pull/1/head
siontion 9 months ago
parent 5c4c864597
commit 020f7292c0

@ -89,10 +89,9 @@
<el-col>
<el-button class="hl-addbutton" type="primary" size="large" @click="onAddItem"></el-button>
</el-col>
<el-table :data="formData.productBomItemDOList" class="hl-table" @cell-click="handleCellClick"
@cell-blur="handleCellBlur">
<el-table :data="formData.productBomItemDOList" class="hl-table">
<el-table-column prop="cid" label="序号" :width="80" />
<el-table-column prop="matId" label="物料编码" required>
<el-table-column prop="matId" label="物料编码">
<template #default="scope">
<el-select v-model="scope.row.matId" placeholder="物料编码" :remote-method="remoteMatCodeSearch"
remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading"
@ -267,7 +266,7 @@
</el-card>
</el-form>
<div class="text-center hl-footer">
<el-button @click="goback" size="large"> </el-button>
<el-button @click="() => router.back()" size="large"> </el-button>
<el-button @click="submitForm" type="success" :disabled="formLoading" size="large"> </el-button>
<el-button @click="submitForm" v-if="isShow" type="primary" :disabled="formLoading" size="large"> </el-button>
<el-button @click="submitForm" v-if="isShow" type="danger" :disabled="formLoading" size="large"> </el-button>
@ -288,7 +287,7 @@ import * as MaterialApi from '@/api/heli/material'
import * as WarehouseApi from '@/api/heli/warehouse'
import * as RgApi from '@/api/heli/rg'
import * as PnApi from '@/api/heli/pn'
import { deleteFile, downloadFile ,getFilePage} from "@/api/infra/file"
import { deleteFile, downloadFile, getFilePage } from "@/api/infra/file"
import download from "@/utils/download"
import * as UserApi from "@/api/system/user";
@ -380,23 +379,7 @@ const downloadAttachment = async (name, url) => {
download.any(data, name);
}
// ==================== =======================================
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await StorageApi.getStorage(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
const storageid = ref()
var commonResult = ''
@ -442,9 +425,6 @@ const submitForm = async () => {
formLoading.value = false
}
}
const goback = () => {
}
var matCount = 1
const onAddItem = () => {
@ -590,6 +570,16 @@ const handleMatCode = async (scope, matid) => {
/** 初始化 **/
onMounted(async () => {
//
let matParams = {
pageNo: 1,
pageSize: 99,
status: "1"
}
const dataMat = await MaterialApi.getMaterialPage(matParams)
matList.value = []
matList.value = dataMat.list
dialogTitle.value = t('action.' + router.query.type)
@ -603,6 +593,25 @@ onMounted(async () => {
//
formData.value = await StorageApi.getStorage(router.query.id)
//
const queryParamsRg = reactive({
pageNo: 1,
pageSize: 99
})
const dataRg = await RgApi.getRgPage(queryParamsRg)
rgList.value = []
rgList.value = dataRg.list
//
const queryParamsPn = reactive({
pageNo: 1,
pageSize: 99
})
const dataPn = await PnApi.getPnPage(queryParamsPn)
pnList.value = []
pnList.value = dataPn.list
//
const queryParamsMat = reactive({
pageNo: 1,
@ -627,19 +636,20 @@ onMounted(async () => {
item.matSpec = matVos.list.find((record) => record.id === item.matId)?.spec
item.matType = matVos.list.find((record) => record.id === item.matId)?.materialType
item.matUnit = matVos.list.find((record) => record.id === item.matId)?.unit
item.pnlist = pnList.value.filter((pn) => pn.rgId === item.rgId)
})
//
//
let attParams = {
pageNo: 1,
pageSize: 99,
businessId: router.query.id,
businessType: 'STORAGE'
}
formData.value.attachments = (await getFilePage(attParams)).list;
//
let attParams = {
pageNo: 1,
pageSize: 99,
businessId: router.query.id,
businessType: 'STORAGE'
}
formData.value.attachments = (await getFilePage(attParams)).list;
}
userList.value = await UserApi.getSimpleUserList()

Loading…
Cancel
Save