@ -28,7 +28,7 @@
< el -row >
< el -col :span ="24" >
< el -form -item prop = "stockInType" label = "出库类型" >
< el -select v-model ="formData.stockInType" clearable style="width: 100%" @change="handleStockType" v-bind:disabled=" btnView || btn Save">
< el -select v-model ="formData.stockInType" clearable style="width: 100%" @change="handleStockType" v-bind:disabled=" ctrView || ctr Save">
< el -option v -for = " dict in getIntDictOptions ( DICT_TYPE.HELI_STORAGE_OUT_TYPE ) " :key ="dict.value"
: label = "dict.label" : value = "dict.value" / >
< / e l - s e l e c t >
@ -50,7 +50,7 @@
< el -row >
< el -col :span ="24" >
< el -form -item prop = "headerNo" label = "上游单号" >
< el -input v -model = " formData.headerNo " class = "!w-700px" v -bind : disabled = " btnView || btn Save || enableHeadNo"/ >
< el -input v -model = " formData.headerNo " class = "!w-700px" v -bind : disabled = " ctrView || ctr Save || enableHeadNo"/ >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -68,8 +68,8 @@
< el -col :span ="24" >
< el -form -item prop = "whId" label = "出库仓库" required >
< el -select v -model = " formData.whId " placeholder = "下拉选择" clearable class = "!w-400px" @change ="handleWh"
v - bind : disabled = " btnView || btn Save">
< el -option v -for = " dict in w are house List" :key ="dict.id" :label ="dict.whName" :value ="dict.id" / >
v - bind : disabled = " ctrView || ctr Save">
< el -option v -for = " dict in w hList" :key ="dict.id" :label ="dict.whName" :value ="dict.id" / >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - c o l >
@ -79,7 +79,7 @@
< el -row >
< el -col :span ="24" >
< el -form -item label = "备注" prop = "description" >
< el -input type = "textarea" v -model = " formData.description " show -word -limit maxlength = "200" class = "!w-2080px" v -bind : disabled = " btnView || btn Save"/ >
< el -input type = "textarea" v -model = " formData.description " show -word -limit maxlength = "200" class = "!w-2080px" v -bind : disabled = " ctrView || ctr Save"/ >
< / e l - f o r m - i t e m >
< / e l - c o l >
< / e l - r o w >
@ -93,7 +93,7 @@
< el -col >
< el -card class = "hl-incard" >
< el -col >
< el -button class = "hl-addbutton" type = "primary" size = "large" v -bind : disabled = " btnView || btn Save" @click ="onAddItem" > 新 增 < / el -button >
< el -button class = "hl-addbutton" type = "primary" size = "large" v -bind : disabled = " ctrView || ctr Save" @click ="onAddItem" > 新 增 < / el -button >
< / e l - c o l >
< el -form ref = "matSubFormRef" :model ="formData.matItemDOList" :rules ="subFormRules"
v - loading = "subFormLoading" label - width = "0" >
@ -103,7 +103,7 @@
< 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 = " btnView || btn Save"
< el -select v -model = " scope.row.matId " placeholder = "物料名称" :remote-method ="remoteMatCodeSearch" v -bind : disabled = " ctrView || ctr Save"
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.name" :value ="item.id" / >
@ -130,9 +130,9 @@
< template # header > < span class = "hl-table_header" > * < / span > 出库库区 < / template >
< template # default = "scope" >
< el -form -item :prop ="`${scope.$index}.rgId`" :rules ="subFormRules.rgId" class = "mb-0px!" >
< el -select v -model = " scope.row.rgId " placeholder = "" style = "width: 100%" @change ="handleRg(scope)"
v - bind : disabled = " btnView || btnSav e">
< el -option v -for = " dict in rgList " :key ="dict.id" :label ="dict.rg N ame" :value ="dict.id" / >
< el -select v -model = " scope.row.rgId " placeholder = "" style = "width: 100%"
v - bind : disabled = " tru e">
< el -option v -for = " dict in rgList " :key ="dict.id" :label ="dict.rg _n ame" :value ="dict.id" / >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / template >
@ -141,8 +141,8 @@
< template # header > < span class = "hl-table_header" > * < / span > 出库库位 < / template >
< template # default = "scope" >
< el -form -item :prop ="`${scope.$index}.pnId`" :rules ="subFormRules.pnId" class = "mb-0px!" >
< el -select v-model ="scope.row.pnId" placeholder="" style="width: 100%" v-bind:disabled=" btnView || btn Save" @change="handlePn(scope)">
< el -option v -for = " dict in scope.row.pnlist" :key ="dict.id" :label ="dict.pnN ame"
< el -select v-model ="scope.row.pnId" placeholder="" style="width: 100%" v-bind:disabled=" ctrView || ctr Save" @change="handlePn(scope)">
< el -option v -for = " dict in pnList" :key ="dict.id" :label ="dict.pn_n ame"
: value = "dict.id" / >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
@ -154,14 +154,14 @@
< template # default = "scope" >
< el -form -item :prop ="`${scope.$index}.storageOkQty`" :rules ="subFormRules.storageOkQty"
class = "mb-0px!" >
< el -input v -model = " scope.row.storageOkQty " v -bind : disabled = " btnView || btn Save"/ >
< el -input v -model = " scope.row.storageOkQty " v -bind : disabled = " ctrView || ctr Save"/ >
< / e l - f o r m - i t e m >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column prop = "lotNo" min -width = " 120 " label = "批次号" align = "center" v -if = " false " / >
< el -table -column prop = "description" min -width = " 180 " label = "备注" align = "center" >
< template # default = "scope" >
< el -input v -model = " scope.row.description " v -bind : disabled = " btnView || btn Save"/ >
< el -input v -model = " scope.row.description " v -bind : disabled = " ctrView || ctr Save"/ >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column label = "操作" align = "center" width = "240" >
@ -176,7 +176,7 @@
< el -button link type = "primary" @ click = "handlefuke(scope.$index, scope.row)" > 复制 < / e l - b u t t o n > - - >
< el -button link type = "danger" size = "small" @click.prevent ="handleDelete2(scope.$index)"
v - bind : disabled = " btnView || btn Delete">
v - bind : disabled = " ctrView || ctr Delete">
删除
< / e l - b u t t o n >
< / template >
@ -202,7 +202,7 @@
'tenant-id' : getTenantId ( )
} " name=" files " :show-file-list=" false " :auto-upload=" false " :data=" matUploadData "
: on - change = "matUploadChange" class = "upload-file-uploader" >
< el -button type = "primary" v -bind : disabled = " btnView || btn Save">
< el -button type = "primary" v -bind : disabled = " ctrView || ctr Save">
< Icon icon = "ep:upload-filled" / > 上传
< / e l - b u t t o n >
< / e l - u p l o a d >
@ -218,11 +218,11 @@
< el -table -column label = "操作" align = "center" >
< template # default = "scope" >
< el -button link type = "danger" size = "small" v -bind : disabled = " btnView || btn Delete"
< el -button link type = "danger" size = "small" v -bind : disabled = " ctrView || ctr Delete"
@ click = "handleDeleteAttachment(scope.$index, scope.row.businessFileType)" >
删除
< / e l - b u t t o n >
< el -button link type = "primary" size = "small" v -bind : disabled = " btnView || btn Delete"
< el -button link type = "primary" size = "small" v -bind : disabled = " ctrView || ctr Delete"
@ click = "downloadAttachment(scope.row.name, scope.row.url)" >
下载
< / e l - b u t t o n >
@ -279,11 +279,11 @@
< / e l - f o r m >
< div class = "text-center hl-footer" >
< el -button @ click = "() => router.go(-1)" size = "large" > 取 消 < / e l - b u t t o n >
< el -button @click ="submitForm" type = "success" : disabled = " btnView || btn Save" size = "large" > 保
< el -button @click ="submitForm" type = "success" : disabled = " ctrView || ctr Save" size = "large" > 保
存 < / e l - b u t t o n >
< el -button @click ="handleStatus(2)" type = "primary" : disabled = " btnView || btn Save" size = "large" > 提
< el -button @click ="handleStatus(2)" type = "primary" : disabled = " ctrView || ctr Save" size = "large" > 提
交 < / e l - b u t t o n >
< el -button @click ="handleStatus(3)" type = "danger" : disabled = " btnView || btn Cancel" size = "large" > 报
< el -button @click ="handleStatus(3)" type = "danger" : disabled = " ctrView || ctr Cancel" size = "large" > 报
废 < / e l - b u t t o n >
< / div >
< / e l - c a r d >
@ -355,6 +355,8 @@ const subFormRules = reactive({
pnId : [ { required : true , message : '库位不能为空' , trigger : 'blur' } ] ,
storageOkQty : [ { required : true , message : '出库数量不能为空' , trigger : 'blur' } ]
} )
/ / 根 据 出 库 类 型 显 示 上 游 单 号
const enableHeadNo = ref ( false )
const handleStockType = async ( typeid ) => {
formData . value . headerNo = ''
@ -379,6 +381,28 @@ const handleStatus = async (num) => {
} catch ( e ) {
return
}
/ / 获 取 最 新 库 存 信 息
const matCurrentData = await StorageMatApi . getStorageMatList ( 0 )
var hasRestNum = true
formData . value . matItemDOList . forEach ( ( rest ) => {
if (
matCurrentData . find (
( mat ) =>
mat . matId == rest . matId &&
mat . pnId == rest . pnId &&
mat . matRest < Number ( rest . storageOkQty )
) !== undefined || rest . storageOkQty . length == 0
) {
hasRestNum = false
}
} )
if ( ! hasRestNum ) {
message . alertWarning ( '物料库存不足' )
return
}
/ / 提 示 用 户 是 否 保 存 出 库 信 息
await message . confirm ( '确认' + ( num == 2 ? '提交' : '报废' ) + '出库信息?' )
/ / 保 存 表 单 数 据
await saveFormData ( )
@ -398,7 +422,7 @@ const handleStatus = async (num) => {
query . type = 'update'
reload ( )
}
const userList = ref < UserApi .UserVO [ ] > ( [ ] ) / / 用 户 列 表
/ / = = = = = = = = = = = = = = = = = = = = 附 件 信 息 开 始 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
const uploadUrl = ref ( import . meta . env . VITE _UPLOAD _BATCH _URL )
@ -459,26 +483,6 @@ var commonResult = ''
const emit = defineEmits ( [ 'success' ] ) / / 定 义 s u c c e s s 事 件 , 用 于 操 作 成 功 后 的 回 调
const saveFormData = async ( ) => {
/ / 获 取 最 新 库 存 信 息
const matCurrentData = await StorageMatApi . getStorageMatList ( )
var hasRestNum = true
formData . value . matItemDOList . forEach ( ( rest ) => {
if (
matCurrentData . find (
( mat ) =>
mat . matId == rest . matId &&
mat . pnId == rest . pnId &&
mat . matRest < Number ( rest . storageOkQty )
)
) {
hasRestNum = false
}
} )
if ( ! hasRestNum ) {
message . alertWarning ( '物料库存不足' )
return
}
/ / 提 交 请 求
formLoading . value = true
try {
@ -524,8 +528,33 @@ const submitForm = async () => {
} catch ( e ) {
return
}
/ / 获 取 最 新 库 存 信 息
const matCurrentData = await StorageMatApi . getStorageMatList ( 0 )
var hasRestNum = true
formData . value . matItemDOList . forEach ( ( rest ) => {
if (
matCurrentData . find (
( mat ) =>
mat . matId == rest . matId &&
mat . pnId == rest . pnId &&
mat . matRest < Number ( rest . storageOkQty )
) !== undefined || rest . storageOkQty . length == 0
) {
hasRestNum = false
}
} )
if ( ! hasRestNum ) {
message . alertWarning ( '物料库存不足' )
return
}
/ / 提 示 用 户 是 否 保 存 出 库 信 息
await message . confirm ( '确认保存出库信息?' )
/ / 保 存 表 单 数 据
await saveFormData ( )
/ / 成 功 后 刷 新
query . id = formData . value . id
query . type = 'update'
@ -568,78 +597,41 @@ const handleDelete2 = (index: number) => {
}
/ / 仓 库 全 数 据
const w are house List = ref ( [ ] )
const w hList = ref ( [ ] )
/ / 库 区 全 数 据
var rgList = ref ( [ ] )
const rgList = ref ( [ ] )
/ / 库 位 全 数 据
var pnList = ref ( [ ] )
const pnList = ref ( [ ] )
const handleWh = async ( wid ) => {
/ / - - - - - - - - - - - - - - - - - - - 库 区 全 数 据
const queryParamsRg = reactive ( {
pageNo : 1 ,
pageSize : 99 ,
whId : wid
} )
const dataRg = await RgApi . getRgPage ( queryParamsRg )
rgList . value = [ ]
pnList . value = [ ]
rgList . value = dataRg . list
matCount = 1
formData . value . matItemDOList = [ ]
const matLastRemoteData = await StorageMatApi . getStorageMatList ( )
formData . value . rgId = ''
/ / 获 得 库 区 列 表
rgList . value = ( await RgApi . getSimpList ( ) ) . filter ( rg => rg . wh _id == wid )
let matParams = {
pageNo : 1 ,
pageSize : 99 ,
status : '1'
}
const dataMat = await MaterialApi . getMaterialPage ( matParams )
matList . value = [ ]
matList . value = dataMat . list . filter (
( item ) =>
matLastRemoteData . find ( ( fish ) => fish . matId === item . id && fish . whId == wid ) !== undefined
)
formData . value . matItemDOList = [ ]
/ / f o r m D a t a . v a l u e . m a t I t e m D O L i s t . f o r E a c h ( i t e m = > {
/ / i t e m . r g I d = ' '
/ / i t e m . p n I d = ' '
/ / i t e m . p n l i s t . v a l u e = [ ]
/ / } )
/ / - - - - - - - - - - - - - - - - - - -
}
const handleRg = async ( scope ) => {
/ / - - - - - - - - - - - - - - - - - - - 库 位 全 数 据
const queryParamsRPn = reactive ( {
pageNo : 1 ,
pageSize : 99 ,
rgId : scope . row . rgId ,
pnStatus : 1
} )
const dataPn = await PnApi . getPnPage ( queryParamsRPn )
scope . row . pnid = ''
scope . row . pnlist = dataPn . list
/ / - - - - - - - - - - - - - - - - - - -
/ / 获 得 库 位 列 表
pnList . value = ( await PnApi . getSimpList ( ) ) . filter ( pn => pn . wh _id == wid )
}
const handlePn = async ( scope ) => {
if ( matLastData . value . find ( ( item ) => item . matId === scope . row . matId && item . whId == formData . value . whId && item . rgId == scope . row . rgId && item . pnId == scope . row . pnId ) ) {
const matVo = matLastData . value . find ( ( item ) => item . matId === scope . row . matId && item . whId == formData . value . whId && item . rgId == scope . row . rgId && item . pnId == scope . row . pnId )
scope . row . matId = matVo . matI d
scope . row . matName = matVo . matNam e
scope . row . matCode = matVo . matCod e
scope . row . matSpec = matVo . matSpe c
scope . row . matType = matVo . materialTyp e
scope . row . matUnit = matVo . matUni t
if ( matLastData . value . find ( ( item ) => item . matId === scope . row . matId && item . whId == formData . value . whId && item . pnId == scope . row . pnId ) ) {
const matVo = matLastData . value . find ( ( item ) => item . matId === scope . row . matId && item . whId == formData . value . whId && item . pnId == scope . row . pnId )
/ / s c o p e . r o w . m a t I d = m a t V o . m a t I d
/ / s c o p e . r o w . m a t N a m e = m a t V o . m a t N a m e
/ / s c o p e . r o w . m a t C o d e = m a t V o . m a t C o d e
/ / s c o p e . r o w . m a t S p e c = m a t V o . m a t S p e c
/ / s c o p e . r o w . m a t T y p e = m a t V o . m a t e r i a l T y p e
/ / s c o p e . r o w . m a t U n i t = m a t V o . m a t U n i t
scope . row . rgId = matVo . rgId
scope . row . pnId = matVo . pnId
scope . row . matRest = matVo . matRest
scope . row . storageOkQty = matVo . storageOkQt y
scope . row . lotNo = matVo . lotN o
scope . row . description = matVo . descriptio n
/ / s c o p e . r o w . s t o r a g e O k Q t y = m a t V o . s t o r a g e O k Q t y
/ / s c o p e . r o w . l o t N o = m a t V o . l o t N o
/ / s c o p e . r o w . d e s c r i p t i o n = m a t V o . d e s c r i p t i o n
} else {
scope . row . rgId = ''
scope . row . matRest = ''
}
}
@ -656,7 +648,7 @@ const remoteMatCodeSearch = async (name) => {
status : '1'
}
const matLastRemoteData = await StorageMatApi . getStorageMatList ( )
const matLastRemoteData = await StorageMatApi . getStorageMatList ( 0 )
const dataMat = await MaterialApi . getMaterialPage ( matParams )
matList . value = [ ]
@ -678,21 +670,14 @@ const handleMatCode = async (scope, matid) => {
scope . row . matSpec = matVo . matSpec
scope . row . matType = matVo . materialType
scope . row . matUnit = matVo . matUnit
scope . row . rgId = matVo . rgId
scope . row . pnId = matVo . pnId
scope . row . matRest = matVo . matRest
scope . row . storageOkQty = matVo . storageOkQty
scope . row . lotNo = matVo . lotNo
scope . row . description = matVo . description
const queryParamsRPn = reactive ( {
pageNo : 1 ,
pageSize : 99 ,
rgId : scope . row . rgId ,
pnStatus : 1
} )
const dataPn = await PnApi . getPnPage ( queryParamsRPn )
scope . row . pnlist = dataPn . list
/ / s c o p e . r o w . r g I d = m a t V o . r g I d
/ / s c o p e . r o w . p n I d = m a t V o . p n I d
/ / s c o p e . r o w . m a t R e s t = m a t V o . m a t R e s t
/ / s c o p e . r o w . s t o r a g e O k Q t y = m a t V o . s t o r a g e O k Q t y
/ / s c o p e . r o w . l o t N o = m a t V o . l o t N o
/ / s c o p e . r o w . d e s c r i p t i o n = m a t V o . d e s c r i p t i o n
scope . row . pnlist = pnList . value
} else {
scope . row . matId = ''
scope . row . matName = ''
@ -710,93 +695,80 @@ const handleMatCode = async (scope, matid) => {
}
}
const matLastData = ref ( [ ] )
/ / 按 钮 控 制
const btn View = ref ( false )
const btn Save = ref ( false )
const btn Cancel = ref ( true )
const btn Delete = ref ( false )
const ctr View = ref ( false )
const ctr Save = ref ( false )
const ctr Cancel = ref ( true )
const ctr Delete = ref ( false )
/ / 根 据 页 面 动 作 和 数 据 状 态 控 制 按 钮 输 入 框 信 息
const initStatus = async ( status ) => {
switch ( status ) {
case 1 :
btn View. value = false
btn Save. value = false
btn Cancel. value = true
btn Delete. value = false
ctr View. value = false
ctr Save. value = false
ctr Cancel. value = true
ctr Delete. value = false
break
case 2 :
btn View. value = false
btn Save. value = true
btn Cancel. value = false
btn Delete. value = true
ctr View. value = false
ctr Save. value = true
ctr Cancel. value = false
ctr Delete. value = true
break
case 3 :
btn View. value = true
btn Save. value = true
btn Cancel. value = true
btn Delete. value = true
ctr View. value = true
ctr Save. value = true
ctr Cancel. value = true
ctr Delete. value = true
break
default :
break
}
/ / 查 看 页 面 时 可 操 作 控 件 禁 用
if ( query . type === 'review' ) {
btn View. value = true
btn Save. value = true
btn Cancel. value = true
btn Delete. value = true
ctr View. value = true
ctr Save. value = true
ctr Cancel. value = true
ctr Delete. value = true
}
}
const userList = ref < UserApi .UserVO [ ] > ( [ ] ) / / 用 户 列 表
const matSimpList = ref ( [ ] ) / / 物 料 基 本 信 息 列 表
/** 初始化 **/
onMounted ( async ( ) => {
matLastData . value = await StorageMatApi . getStorageMatList ( )
/ / 获 取 当 前 最 新 库 存 信 息
matLastData . value = await StorageMatApi . getStorageMatList ( 0 )
/ / 页 面 标 题 展 示
dialogTitle . value = query . type === 'review' ? '查看' : t ( 'action.' + query . type )
/ / 获 得 物 料 列 表
let matParams = {
pageNo : 1 ,
pageSize : 99 ,
status : '1'
}
const dataMat = await MaterialApi . getMaterialPage ( matParams )
matList . value = [ ]
matList . value = dataMat . list
/ / - 获 取 仓 库 全 数 据
whList . value = await WarehouseApi . getWarehouseSimpList ( )
dialogTitle . value = t ( 'action.' + query . type )
dialogTitle. value = query . type === 'review' ? '查看' : dialogTitle . value
/ / 获 取 原 始 物 料 信 息
matSimpList . value = await MaterialApi . getSimpList ( )
/ / - - - - - - - - - - - - - - - - - - - 仓 库 全 数 据
const data = await WarehouseApi . getWarehouseSimpList ( )
warehouseList . value = data
/ / - - - - - - - - - - - - - - - - - - -
/ / 编 辑 时 获 取 入 库 单 据 信 息 , 包 括 基 础 信 息 、 物 料 信 息 、 附 件 信 息
if ( query . id ) {
matList . value = matSimpList . value
/ / 获 取 库 存 信 息
formData . value = await StorageApi . getStorage ( query . id )
/ / 页 面 控 件 可 视 初 始 化
await initStatus ( formData . value . status )
/ / 获 得 库 区 列 表
const queryParamsRg = reactive ( {
pageNo : 1 ,
pageSize : 99 ,
status : 1 ,
whId : formData . value . whId
} )
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 )
const dataRgList = await RgApi . getSimpList ( )
rgList . value = dataRgList . filter ( rg => rg . wh _id == formData . value . whId )
pnList . value = [ ]
pnList . value = dataPn . list
/ / 获 得 库 区 列 表
const dataPnList = await PnApi . getSimpList ( )
pnList . value = dataPnList . filter ( pn => pn . wh _id == formData . value . whId )
/ / 获 取 库 存 物 料 列 表 信 息
const queryParamsMat = reactive ( {
@ -805,35 +777,18 @@ onMounted(async () => {
stockId : query . id
} )
const dataMats = await StorageMatApi . getStorageMatPage ( queryParamsMat )
formData . value . matItemDOList = dataMats . list
/ / 获 取 原 始 物 料 信 息
const queryParamsMat2 = reactive ( {
pageNo : 1 ,
pageSize : 99 ,
status : 1
} )
const matVos = await MaterialApi . getMaterialPage ( queryParamsMat2 )
formData . value . matItemDOList = dataMats
/ / 填 充 物 料 原 始 信 息
formData . value . matItemDOList . forEach ( ( item ) => {
item . cid = matCount
item . matId = matVos . list . find ( ( record ) => record . id === item . matId ) ? . id
/ / i t e m . m a t C o d e = m a t V o s . l i s t . f i n d ( ( r e c o r d ) = > r e c o r d . i d = = = i t e m . m a t I d ) ? . i d
item . matCode = matVos . list . find ( ( record ) => record . id == item . matId ) ? . code
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 )
item . matRest = matLastData . value . find (
( rest ) => rest . rgId == item . rgId && rest . pnId == item . pnId
) ? . matRest
item . matRest = item . matRest == undefined ? 0 : item . matRest
item . matId = matSimpList . value . find ( ( record ) => record . id === item . matId ) ? . id
item . matCode = matSimpList . value . find ( ( record ) => record . id === item . matId ) ? . code
item . matName = matSimpList . value . find ( ( record ) => record . id === item . matId ) ? . name
item . matSpec = matSimpList . value . find ( ( record ) => record . id === item . matId ) ? . spec
item . matType = matSimpList . value . find ( ( record ) => record . id === item . matId ) ? . material _type
item . matUnit = matSimpList . value . find ( ( record ) => record . id === item . matId ) ? . unit
item . pnlist = pnList . value . filter ( ( pn ) => pn . rg _id === item . rgId )
matCount = matCount + 1
/ / i t e m = m a t L a s t D a t a . v a l u e . f i n d ( ( r e s t ) = > r e s t . r g I d = = = i t e m . r g I d & & r e s t . p n I d = = = i t e m . p n I d )
/ / i t e m . p n l i s t = p n L i s t . v a l u e . f i l t e r ( ( p n ) = > p n . r g I d = = = i t e m . r g I d )
/ / i t e m . c i d = m a t C o u n t
/ / m a t C o u n t = m a t C o u n t + 1
} )
/ / 附 件 信 息
@ -846,7 +801,7 @@ onMounted(async () => {
formData . value . attachments = ( await getFilePage ( attParams ) ) . list
}
/ / 用 户 信 息
/ / 用 户 信 息 , 用 于 底 部 数 据 展 示
userList . value = await UserApi . getSimpleUserList ( )
} )
< / script >