|
|
|
@ -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()
|
|
|
|
|