|
|
|
@ -95,16 +95,17 @@
|
|
|
|
|
<el-table :data="formData.matItemDOList" class="hl-table">
|
|
|
|
|
<el-table-column prop="cid" label="序号" min-width="80" align="center" fixed />
|
|
|
|
|
<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="remoteMatCodeSearch" v-bind:disabled="ctrView || ctrSave" remote-show-suffix remote clearable reserve-keyword filterable :loading="matSelectLoading" @change="(val) => handleMatCode(scope, val)" class="!w-180px">
|
|
|
|
|
<!-- <el-select v-model="scope.row.matId" placeholder="物料编码/名称" :remote-method="remoteMatCodeSearch" v-bind:disabled="ctrView || ctrSave" 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>
|
|
|
|
|
</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="matName" label="物料名称" min-width="120" align="center" />
|
|
|
|
|
<!-- <el-table-column prop="matName" label="物料名称" min-width="120" align="center" /> -->
|
|
|
|
|
<el-table-column prop="matType" label="物料类型" align="center" min-width="120">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_TYPE" :value="scope.row.matType" v-if="scope.row.matType ? true : false" />
|
|
|
|
@ -281,7 +282,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'
|
|
|
|
|
import * as RgApi from '@/api/heli/rg'
|
|
|
|
@ -768,6 +769,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 {
|
|
|
|
|