|
|
|
@ -12,14 +12,14 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item prop="name" label="入库单号" required>
|
|
|
|
|
<el-form-item prop="name" label="入库单号" >
|
|
|
|
|
<el-input v-model="formData.stockNo" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item prop="stockInType" label="入库类型" required>
|
|
|
|
|
<el-form-item prop="stockInType" label="入库类型" >
|
|
|
|
|
<el-select v-model="formData.stockInType" clearable style="width: 100%">
|
|
|
|
|
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_IN_TYPE)" :key="dict.value"
|
|
|
|
|
:label="dict.label" :value="dict.value" />
|
|
|
|
@ -32,7 +32,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item prop="name" label="单号日期" required>
|
|
|
|
|
<el-form-item prop="name" label="单号日期" >
|
|
|
|
|
<el-input v-model="formData.name" disabled />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -59,7 +59,7 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item prop="level" label="入库仓库">
|
|
|
|
|
<el-form-item prop="whId" label="入库仓库" required>
|
|
|
|
|
<el-select v-model="formData.whId" placeholder="下拉选择" clearable class="!w-400px" @change="handleWh">
|
|
|
|
|
<el-option v-for="dict in warehouseList" :key="dict.id" :label="dict.whName" :value="dict.id" />
|
|
|
|
|
</el-select>
|
|
|
|
@ -95,7 +95,7 @@
|
|
|
|
|
<el-table-column prop="matCode" label="物料编码" required>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-select v-model="scope.row.matCode" placeholder="物料编码" :remote-method="remoteMatCodeSearch"
|
|
|
|
|
remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading" @change="handleMatCode(scope)"
|
|
|
|
|
remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading" @change="(val) => handleMatCode(scope,val)"
|
|
|
|
|
class="!w-180px">
|
|
|
|
|
<el-option v-for="item in matList" :key="item.id" :label="item.code" :value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
@ -136,7 +136,7 @@
|
|
|
|
|
<el-table-column prop="pnid" width="140" label="入库库位" required>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-select v-model="scope.row.pnid" placeholder="" style="width: 100%">
|
|
|
|
|
<el-option v-for="dict in pnList" :key="dict.id" :label="dict.pnName" :value="dict.id" />
|
|
|
|
|
<el-option v-for="dict in scope.row.pnlist" :key="dict.id" :label="dict.pnName" :value="dict.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -196,7 +196,7 @@
|
|
|
|
|
<el-table-column prop="name" label="文件名称" align="center">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<!-- <div></div> -->
|
|
|
|
|
<a :href="scope.row.url" style="color: #409eff">{{ scope.row.name }} </a>
|
|
|
|
|
<a :href="scope.row.url" target="_blank" style="color: #409eff">{{ scope.row.name }} </a>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
@ -207,7 +207,7 @@
|
|
|
|
|
<el-button link type="danger" size="small" @click="handleDelete(scope.$index)">
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button link type="primary" size="small"> 下载 </el-button>
|
|
|
|
|
<el-button link type="primary" size="small" @click="downloadAttachment(scope.row.name,scope.row.url)"> 下载 </el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -278,7 +278,8 @@ 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 { ITEM_RENDER_EVT } from 'element-plus/es/components/virtual-list/src/defaults'
|
|
|
|
|
import {deleteFile, downloadFile} from "@/api/infra/file";
|
|
|
|
|
import download from "@/utils/download";
|
|
|
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
@ -309,8 +310,10 @@ const formData = ref({
|
|
|
|
|
productBomItemDOList: []
|
|
|
|
|
})
|
|
|
|
|
const formRules = reactive({
|
|
|
|
|
name: [{ required: true, message: '模具类型不能为空', trigger: 'blur' }],
|
|
|
|
|
status: [{ required: true, message: '启用状态不能为空', trigger: 'blur' }]
|
|
|
|
|
// name: [{ required: true, message: '模具类型不能为空', trigger: 'blur' }],
|
|
|
|
|
status: [{ required: true, message: '启用状态不能为空', trigger: 'blur' }],
|
|
|
|
|
stockInType :[{ required: true, message: '入库类型不能为空', trigger: 'blur' }],
|
|
|
|
|
whId :[{ required: true, message: '入库仓库不能为空', trigger: 'blur' }]
|
|
|
|
|
})
|
|
|
|
|
const formRef = ref() // 表单 Ref
|
|
|
|
|
|
|
|
|
@ -455,7 +458,7 @@ const handleDelete2 = (index: number) => {
|
|
|
|
|
const fileList = ref([
|
|
|
|
|
{
|
|
|
|
|
name: 'element-plus-logo.svg',
|
|
|
|
|
url: 'https://element-plus.org/images/element-plus-logo.svg',
|
|
|
|
|
url: 'http://127.0.0.1:8080/admin-api/infra/file/5/get/d229467d4ad143582725cc39d16dd04c660034b71e3ddcfe930901639bbccee5.png',
|
|
|
|
|
uploadTimestamp: '2024-1-12 16:06'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -481,6 +484,12 @@ const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
|
|
|
|
|
console.log('333')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 下载文件
|
|
|
|
|
const downloadAttachment = async (name, url) => {
|
|
|
|
|
const data = await downloadFile(url)
|
|
|
|
|
download.any(data, name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let uploadTimestamp: any = null
|
|
|
|
|
const handleBeforeUpload = (file: File) => {
|
|
|
|
|
uploadTimestamp = new Date().toISOString() // 获取并保存当前时间戳
|
|
|
|
@ -532,7 +541,7 @@ const handleWh = (async (wid) => {
|
|
|
|
|
formData.value.productBomItemDOList.forEach( item =>{
|
|
|
|
|
item.rgid = ''
|
|
|
|
|
item.pnid = ''
|
|
|
|
|
item.pnlist = []
|
|
|
|
|
item.pnlist.value = []
|
|
|
|
|
})
|
|
|
|
|
//-------------------
|
|
|
|
|
})
|
|
|
|
@ -545,8 +554,7 @@ const handleRg = (async (scope) => {
|
|
|
|
|
pnStatus: 1
|
|
|
|
|
})
|
|
|
|
|
const dataPn = await PnApi.getPnPage(queryParamsRPn)
|
|
|
|
|
pnList.value = []
|
|
|
|
|
pnList.value = dataPn.list
|
|
|
|
|
scope.row.pnid = ''
|
|
|
|
|
scope.row.pnlist = dataPn.list
|
|
|
|
|
//-------------------
|
|
|
|
|
})
|
|
|
|
@ -585,15 +593,22 @@ const remoteMatCodeSearch = async (query) => {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handleMatCode = async (scope) =>{
|
|
|
|
|
const handleMatCode = async (scope,matid) =>{
|
|
|
|
|
|
|
|
|
|
if(scope.row.matCode){
|
|
|
|
|
if(matid){
|
|
|
|
|
const matVo = await MaterialApi.getMaterial(scope.row.matCode)
|
|
|
|
|
scope.row.matId = matVo.id
|
|
|
|
|
scope.row.matName = matVo.name
|
|
|
|
|
scope.row.matSpec = matVo.spec
|
|
|
|
|
scope.row.matType = matVo.materialType
|
|
|
|
|
scope.row.matUnit = matVo.unit
|
|
|
|
|
}else{
|
|
|
|
|
scope.row.matId = ''
|
|
|
|
|
scope.row.matCode = ''
|
|
|
|
|
scope.row.matName = ''
|
|
|
|
|
scope.row.matSpec = ''
|
|
|
|
|
scope.row.matType = ''
|
|
|
|
|
scope.row.matUnit = ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|