Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
9f623d86
Commit
9f623d86
authored
Aug 25, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领用出库申请开发
parent
5146bee6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
218 additions
and
34 deletions
+218
-34
index.vue
...rivateComponents/components/AddOutStorageUseCom/index.vue
+9
-31
index.vue
...ponents/components/AddOutStorageUseDetailDialog/index.vue
+7
-3
index.vue
...teComponents/components/AddOutStorageUseDetails/index.vue
+202
-0
No files found.
applications/dee-mes/src/privateComponents/components/AddOutStorageUseCom/index.vue
View file @
9f623d86
...
...
@@ -17,14 +17,13 @@
/>
</el-select>
</div>
<
DeeStaticCmp
<
dee-as-com
v-if=
"typeName"
style=
"border:none;"
model-name=
"OutStorageUse"
:
cmp-options
=
"cmpOptions"
:
default-data=
"defaultData
"
:
lay-config
=
"cmpOptions"
:
basic-data=
"
{useRequestType:typeName}
"
:on-form-event-hander="formEventHander"
@
refreshForm=
"dataChangeHandler"
/>
</div>
</
template
>
...
...
@@ -52,15 +51,14 @@ export default {
showCmp
:
true
,
cmpOptions
:
{
typeName
:
'OutStorageUse'
,
value
:
'outStorageUseApply_add_instruct'
layKey
:
'outStorageUseApply_add_instruct'
},
formEventHander
:
{
'on-submit'
:
()
=>
{
console
.
log
(
this
.
formData
,
'this.formData'
)
if
(
!
this
.
formData
||
!
this
.
formData
.
subTypeName
)
{
return
this
.
$message
.
error
(
'请选择一种管理方式'
)
if
(
!
this
.
formData
||
!
this
.
formData
.
typeName
)
{
return
this
.
$message
.
error
(
'请选择一种领用类型'
)
}
this
.
$emit
(
'on-submit'
)
this
.
$emit
(
'on-submit'
,
this
.
formData
)
},
'on-cancel'
:
()
=>
{
this
.
$emit
(
'on-cancel'
)
...
...
@@ -73,8 +71,8 @@ export default {
typeName
:
{
immediate
:
true
,
handler
(
val
)
{
this
.
changeModelCode
()
// this.cmpOptions.typeName = val
//
this.changeModelCode()
this
.
$set
(
this
.
cmpOptions
,
'layKey'
,
`outStorageUseApply_add_
${
val
}
`
)
// this.formData.subTypeName = this.typeName
}
}
...
...
@@ -87,9 +85,6 @@ export default {
methods
:
{
async
getUseRequestTypes
()
{
this
.
options
=
await
this
.
$utils
.
getDicListByCode
(
'UseRequestType'
)
// this.$utils.getDicListByCode('UseRequestType').then(res => {
// this.options = res || []
// })
},
changeVal
(
val
)
{
console
.
log
(
'🚀 file: index.vue:40 val:'
,
val
)
...
...
@@ -99,26 +94,9 @@ export default {
console
.
log
(
'🚀 file: index.vue:99 val:'
,
val
)
this
.
formData
=
Object
.
assign
({},
val
)
this
.
formData
.
typeName
=
this
.
typeName
this
.
formData
.
sorties
=
this
.
formData
.
sorties
.
split
(
'+'
)[
0
]
// if (val.managedBy && val.managedBy.id) {
// getUserByUserId(val.managedBy.id).then(res => {
// if (Array.isArray(res.items) && res.items.length > 0) {
// const userObj = res.items[0].user
// val.managedOrg = userObj.organizations
// }
// })
// }
}
},
changeModelCode
()
{
// const currentCategory = this.formData.projectCategory || this.defaultData.projectCategory
// if (currentCategory && this.typeName === 'CommonPlan') {
// this.$set(this.formData, 'modelCode', currentCategory.name)
// const id = currentCategory.parentId
// if (id) {
// this.getModelType(id)
// }
// }
}
}
}
...
...
applications/dee-mes/src/privateComponents/components/AddOutStorageUseDetailDialog/index.vue
View file @
9f623d86
...
...
@@ -33,6 +33,10 @@ export default {
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
},
parentTableData
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
...
...
@@ -72,15 +76,15 @@ export default {
'subTypeName'
:
'OutStorageUseItem'
,
'extMaterial'
:
this
.
selection
.
extMaterial
,
'extMaterialId'
:
this
.
selection
.
extMaterialId
,
'extSupportingItemId'
:
this
.
selection
.
id
,
'extSupportingItemIdType'
:
this
.
selection
.
subTypeName
,
//
'extSupportingItemId': this.selection.id,
//
'extSupportingItemIdType': this.selection.subTypeName,
'takeAmount'
:
this
.
selection
.
takeAmount
,
'unableAmount'
:
this
.
selection
.
unableAmount
,
'reqAmount'
:
this
.
applyForm
.
reqAmount
}]
this
.
$emit
(
'submitEvent'
,
{
formData
:
data
})
}
else
{
this
.
$utils
.
showMessageWarning
(
'申领数量必填!'
)
this
.
$utils
.
showMessageWarning
(
'
至少选择一条物料并且
申领数量必填!'
)
return
false
}
})
...
...
applications/dee-mes/src/privateComponents/components/AddOutStorageUseDetails/index.vue
0 → 100644
View file @
9f623d86
<!--
* @Author: gjn
* @Date: 2023-08-25 11:07:44
* @Description:领用出库明细
-->
<
template
>
<div
:style=
"layoutStyle"
class=
"addOutStorageUseDetail"
>
<dee-as-com
ref=
"table"
:im-show-table-data=
"imShowTableData"
:basic-data=
"
{...form,...basicData}"
:lay-config="{
typeName: 'OutStorageUseItem',
layKey: 'add_outStorageUseItem_instruct'
}"
table-height="auto"
:dis-business="true"
:result-data="tableData"
@tableToolHandler="tableToolHandler"
@selectionChange="selectionChange"
/>
<dee-dialog
title=
"添加出库物料"
width=
"1000px"
:dialog-visible=
"dialogShow"
@
handleClose=
"dialogShow = false"
>
<AddOutStorageUseDetailDialog
v-if=
"dialogShow"
:basic-data=
"
{...form,...basicData}"
:component-prop="componentProp"
@submitEvent="submitEvent"
@cancel="dialogShow = false"
/>
</dee-dialog>
</div>
</
template
>
<
script
>
import
AddOutStorageUseDetailDialog
from
'../AddOutStorageUseDetailDialog'
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'领用出库明细'
,
name
:
'AddOutStorageUseDetail'
,
components
:
{
AddOutStorageUseDetailDialog
},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
},
itemId
:
{
type
:
String
,
default
:
()
=>
''
},
form
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
},
imShowTableData
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
},
typeName
:
{
type
:
String
,
default
:
()
=>
''
},
typeKey
:
{
type
:
String
,
default
:
()
=>
''
},
buttonFilter
:
{
type
:
String
,
default
:
()
=>
''
},
layoutStyle
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
},
showBtn
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
componentProp
:
{
showSubType
:
true
},
dialogShow
:
false
,
selectionRows
:
[],
tableData
:
[]
}
},
computed
:
{
},
watch
:
{
tableData
:
{
immediate
:
true
,
deep
:
true
,
handler
(
data
)
{
this
.
$emit
(
'input'
,
data
)
}
}
},
methods
:
{
tableToolHandler
(
val
)
{
const
btnValue
=
val
.
key
.
btnValue
switch
(
btnValue
)
{
case
'add'
:
this
.
dialogShow
=
true
break
case
'occupy'
:
this
.
occupy
()
break
case
'remove'
:
this
.
remove
()
break
default
:
break
}
},
selectionChange
(
val
)
{
this
.
selectionRows
=
val
},
occupy
()
{
const
form
=
Object
.
assign
({},
this
.
form
)
form
.
aircraftType
=
form
.
aircraftType
.
split
(
'+'
)[
1
]
form
.
sorties
=
form
.
sorties
.
split
(
'+'
)[
1
]
const
param
=
{
...
form
,
typeName
:
this
.
basicData
.
useRequestType
,
// 领用类型
inStorageRequestItems
:
this
.
selectionRows
,
subTypeName
:
'OutStorageUse'
,
operator
:
'ADD'
}
post
(
'/OutStorageRequest/outStorageUse/saveAndTake'
,
param
).
then
(
res
=>
{
this
.
form
.
id
=
res
.
items
.
id
const
data
=
res
.
items
.
inStorageRequestItems
const
tableData
=
[...
this
.
tableData
]
data
.
forEach
(
item
=>
{
tableData
.
forEach
(
v
=>
{
if
(
v
.
extMaterialId
===
item
.
extMaterialId
)
{
v
.
id
=
item
.
id
v
.
operator
=
'MODIFY'
v
.
outStorageOutId
=
res
.
items
.
id
v
.
allocatedAmount
=
this
.
sumArray
(
item
.
inventoryJobResponses
,
'allocatedAmount'
)
}
})
})
this
.
tableData
=
tableData
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
remove
()
{
this
.
$confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
post
(
`InStorageRequestItem/outStorageOutItem/delete?requestItemIds=
${
this
.
selectionRows
.
map
(
item
=>
item
.
id
).
join
(
','
)}
`
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
this
.
tableData
=
this
.
tableData
.
filter
(
item
=>
!
this
.
selectionRows
.
map
(
item
=>
item
.
extMaterialId
).
includes
(
item
.
extMaterialId
))
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
},
sumArray
(
array
,
key
)
{
let
sum
=
0
for
(
let
i
=
0
;
i
<
array
.
length
;
i
++
)
{
sum
+=
Number
(
array
[
i
][
key
])
}
return
sum
},
submitEvent
({
formData
})
{
this
.
tableData
.
push
(...
formData
)
this
.
dialogShow
=
false
}
}
}
</
script
>
<
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment