|
|
|
@ -94,16 +94,17 @@
|
|
|
|
|
<el-table :data="formData.matItemDOList" class="hl-table">
|
|
|
|
|
<el-table-column prop="cid" label="序号" :width="80" />
|
|
|
|
|
<el-table-column prop="matId" min-width="140" align="center">
|
|
|
|
|
<template #header> <span class="hl-table_header">*</span>物料名称 </template>
|
|
|
|
|
<template #header> <span class="hl-table_header">*</span>物料编码/名称 </template>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-form-item :prop="`${scope.$index}.matId`" :rules="subFormRules.matId" class="mb-0px!">
|
|
|
|
|
<el-select v-model="scope.row.matId" placeholder="物料名称" :remote-method="remoteMatNameSearch" v-bind:disabled="ctrView || ctrSave" remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading" @change="(val) => handleMatName(scope, val)" class="!w-180px">
|
|
|
|
|
<!-- <el-select v-model="scope.row.matId" placeholder="物料名称" :remote-method="remoteMatNameSearch" v-bind:disabled="ctrView || ctrSave" remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading" @change="(val) => handleMatName(scope, val)" class="!w-180px">
|
|
|
|
|
<el-option v-for="item in matList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-select> -->
|
|
|
|
|
<MaterialSelect v-model="scope.row.matId" @update:newValue="handleSelectedMaterial(scope.$index,$event)" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="matCode" label="物料编码" min-width="120" align="center" />
|
|
|
|
|
<!-- <el-table-column prop="matCode" label="物料编码" min-width="120" align="center" /> -->
|
|
|
|
|
<el-table-column prop="matType" label="物料类型" min-width="120" align="center">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />
|
|
|
|
@ -280,6 +281,7 @@ import * as StorageApi from '@/api/heli/storage'
|
|
|
|
|
import * as StorageMatApi from '@/api/heli/storagemat'
|
|
|
|
|
import { getAccessToken, getTenantId } from '@/utils/auth'
|
|
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
import MaterialSelect from '@/views/heli/hlvuestyle/materialSelect.vue'
|
|
|
|
|
|
|
|
|
|
import * as MaterialApi from '@/api/heli/material'
|
|
|
|
|
import * as WarehouseApi from '@/api/heli/warehouse'
|
|
|
|
@ -439,7 +441,7 @@ const openerror = () => {
|
|
|
|
|
`文件名为:${failedAttachmentsName.value.join(' / ')}上传失败`,
|
|
|
|
|
`文件格式不正确或网络问题 请您稍后再试`,
|
|
|
|
|
{
|
|
|
|
|
dangerouslyUseHTMLString: false,
|
|
|
|
|
dangerouslyUseHTMLString: false,
|
|
|
|
|
confirmButtonText: '知道了',
|
|
|
|
|
center: true
|
|
|
|
|
}
|
|
|
|
@ -866,6 +868,17 @@ onMounted(async () => {
|
|
|
|
|
//用户信息,用于底部数据展示
|
|
|
|
|
userList.value = await UserApi.getSimpleUserList()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//接收物料传递的数据
|
|
|
|
|
const handleSelectedMaterial = (currentIndex: number, newValue: any) => {
|
|
|
|
|
// console.log(currentIndex,'接收物料对应的数据:', newValue)
|
|
|
|
|
formData.value.matItemDOList[currentIndex].matId = newValue?.id
|
|
|
|
|
formData.value.matItemDOList[currentIndex].matName = newValue?.name
|
|
|
|
|
formData.value.matItemDOList[currentIndex].matCode = newValue?.code
|
|
|
|
|
formData.value.matItemDOList[currentIndex].matSpec = newValue?.spec
|
|
|
|
|
formData.value.matItemDOList[currentIndex].matType = newValue?.materialType
|
|
|
|
|
formData.value.matItemDOList[currentIndex].matUnit = newValue?.unit
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style>
|
|
|
|
|
a {
|
|
|
|
|