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
7c2feb6d
Commit
7c2feb6d
authored
Aug 25, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
供外出库调整占用
parent
5146bee6
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
349 additions
and
73 deletions
+349
-73
util.js
applications/architecture-dee/src/utils/util.js
+17
-1
index.vue
...ts/components/AddOutStorageMaterialDetailDialog/index.vue
+13
-13
index.vue
...rc/privateComponents/components/JobNumberSelect/index.vue
+2
-2
index.vue
...ents/components/OutStorageAdjustOccupyReqAmount/index.vue
+52
-0
index.vue
...mponents/components/OutStorageOfferAdjustOccupy/index.vue
+45
-0
outStorageOfferAdjustOccupy.vue
...ageOfferDetail/components/outStorageOfferAdjustOccupy.vue
+118
-0
index.vue
...vateComponents/components/OutStorageOfferDetail/index.vue
+99
-54
index.vue
...-mes/src/privateComponents/components/Warehouse/index.vue
+1
-1
index.vue
...c/privateComponents/components/getSortiesSelect/index.vue
+2
-2
No files found.
applications/architecture-dee/src/utils/util.js
View file @
7c2feb6d
...
...
@@ -1549,6 +1549,21 @@ export function fileByIdDownload(objName, objId, linkId) {
this.downLoadFile(res)
})
}
/**
* @Description: 查找DeeForm
* @author xioln
*/
export function findForm(elem = this) {
// 检查当前元素是否是 el-form
if (elem.$el && elem.$el.classList.contains('el-form')) {
return elem // 找到了 el-form,返回当前
}
// 检查是否存在父组件
if (elem.$parent) {
return findForm(elem.$parent) // 递归调用父组件
}
return null // 没有找到 el-form,返回 null
}
export default {
treeFindBackArray,
...
...
@@ -1631,5 +1646,6 @@ export default {
groupBy,
filterParams,
deepClone,
fileByIdDownload
fileByIdDownload,
findForm
}
applications/dee-mes/src/privateComponents/components/AddOutStorageMaterialDetailDialog/index.vue
View file @
7c2feb6d
...
...
@@ -7,14 +7,14 @@
<div
class=
"AddOutStorageMaterialDetailDialog-diloag"
>
<dee-as-com
ref=
"materielSearch"
:lay-config=
"
{ typeName: 'Inventory', layKey: 'search_sanqichukuwuliaomingxi'}"
:lay-config=
"
{ typeName: 'Inventory', layKey: 'search_sanqichukuwuliaomingxi'
}"
:basic-data="defaultData"
@searchEvent="searchEvent"
/>
<dee-as-com
ref=
"materielTable"
class=
"list-table"
:lay-config=
"
{ typeName: 'Inventory', layKey: 'table_sanqichukuwuliaomingxi'}"
:lay-config=
"
{ typeName: 'Inventory', layKey: 'table_sanqichukuwuliaomingxi'
}"
@selectionChange="selectionChange"
/>
<div
slot=
"footer"
class=
"foot-btn-box"
>
...
...
@@ -32,7 +32,7 @@ export default {
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
default
:
()
=>
{
}
}
},
data
()
{
...
...
@@ -126,16 +126,16 @@ export default {
}
</
script
>
<
style
lang=
'scss'
>
.AddOutStorageMaterialDetailDialog-diloag
{
.list-table
{
height
:
510px
!
important
;
.AddOutStorageMaterialDetailDialog-diloag
{
.list-table
{
height
:
510px
!
important
;
}
.foot-btn-box
{
display
:
flex
;
margin-top
:
10px
;
justify-content
:
center
;
align-content
:
center
;
}
}
.foot-btn-box
{
display
:
flex
;
margin-top
:
10px
;
justify-content
:
center
;
align-content
:
center
;
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/JobNumberSelect/index.vue
View file @
7c2feb6d
...
...
@@ -51,8 +51,8 @@ export default {
'form.sorties'
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
)
{
handler
(
val
,
oldVal
)
{
if
(
val
!==
oldVal
)
{
const
params
=
{
searchItems
:
{
items
:
[
...
...
applications/dee-mes/src/privateComponents/components/OutStorageAdjustOccupyReqAmount/index.vue
0 → 100644
View file @
7c2feb6d
/**
* @Description: 供外出库调整占用申领数量
* @author xioln
* @date 2023-08-02
*/
<
template
>
<div
class=
"outStorageAdjustOccupy-reqAmount"
>
<el-input-number
v-model=
"reqAmount"
:min=
"0"
:max=
"maxNum"
@
change=
"handleChange"
/>
</div>
</
template
>
<
script
>
export
default
{
componentName
:
'供外出库调整占用申领数量'
,
name
:
'OutStorageCallBackReqAmount'
,
components
:
{},
props
:
{
form
:
{
type
:
Object
,
default
:
()
=>
{}
},
value
:
{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
reqAmount
:
0
,
maxNum
:
0
}
},
computed
:
{},
created
()
{
// 初始化数据
if
(
this
.
value
!==
'0'
)
{
this
.
reqAmount
=
Number
(
this
.
value
)
}
if
(
this
.
form
.
reqAmount
)
{
this
.
maxNum
=
this
.
form
.
reqAmount
}
else
{
this
.
maxNum
=
10
}
},
methods
:
{
handleChange
()
{
this
.
$emit
(
'input'
,
this
.
reqAmount
)
}
}
}
</
script
>
<
style
lang=
'scss'
>
</
style
>
applications/dee-mes/src/privateComponents/components/OutStorageOfferAdjustOccupy/index.vue
0 → 100644
View file @
7c2feb6d
/**
* @Description: 供外出库调整占用
* @author xioln
* @date 2023-08-23
* @FilePath: applications/dee-mes/src/privateComponents/components/OutStorageOfferAdjustOccupy/index.vue
*/
<
template
>
<div
class=
"OutStorageOfferAdjustOccupy"
>
<DeeAsCom
ref=
"adjustOccupyInfo"
:basic-data=
"basicData"
:lay-config=
"
{
typeName: 'OutStorageOutItem',
layKey: 'adjustOccupyTable'
}"
/>
<DeeAsCom
ref=
"adjustOccupyInventory"
:basic-data=
"basicData"
:lay-config=
"
{
typeName: 'JobResponseOutStorageOut',
layKey: 'table'
}"
/>
</div>
</
template
>
<
script
>
export
default
{
componentName
:
'供外出库调整占用'
,
name
:
'OutStorageOfferAdjustOccupy'
,
// name写在组件的最前方,自定义组件为必填
components
:
{},
data
()
{
return
{
}
},
computed
:
{},
created
()
{
// 初始化数据
},
methods
:
{
}
}
</
script
>
<
style
lang=
'scss'
>
</
style
>
applications/dee-mes/src/privateComponents/components/OutStorageOfferDetail/components/outStorageOfferAdjustOccupy.vue
0 → 100644
View file @
7c2feb6d
/**
* @Description: 供外出库调整占用
* @author xioln
* @date 2023-08-23
*/
<
template
>
<div
class=
"outStorageOffer-adjustOccupy"
>
<DeeAsCom
ref=
"adjustOccupyInfo"
:basic-data=
"selectDatas[0]"
:form=
"form"
:lay-config=
"
{
typeName: 'Inventory',
layKey: 'adjustOccupyTable'
}"
@selectionChange="infoSelectionChange"
/>
<div
style=
"height: 80px; text-align: center;display: flex;justify-content: center;align-items: center;"
>
<el-button
type=
"primary"
size=
"medium"
round
icon=
"el-icon-caret-top"
@
click=
"relieve"
>
解除
</el-button>
<el-button
type=
"primary"
round
icon=
"el-icon-caret-bottom"
@
click=
"occupy"
>
占用
</el-button>
</div>
<DeeAsCom
ref=
"adjustOccupyjobResponse"
:basic-data=
"selectDatas[0]"
:lay-config=
"
{
typeName: 'JobResponseOutStorageOut',
layKey: 'table',
}"
@selectionChange="jobResponseSelectionChange"
/>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'供外出库调整占用'
,
name
:
'OutStorageOfferAdjustOccupy'
,
// name写在组件的最前方,自定义组件为必填
components
:
{},
props
:
{
// basicData: {
// type: Object,
// default: () => { }
// },
selectDatas
:
{
type
:
Array
,
default
:
()
=>
{}
},
form
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
infoSelection
:
[],
jobResponseSelection
:
[]
}
},
computed
:
{},
created
()
{
// 初始化数据
},
methods
:
{
infoSelectionChange
(
v
)
{
this
.
infoSelection
=
v
},
jobResponseSelectionChange
(
v
)
{
this
.
jobResponseSelection
=
v
},
// 解除占用
relieve
()
{
if
(
this
.
jobResponseSelection
.
length
===
0
)
{
return
this
.
$utils
.
showMessageWarning
(
'请选择响应数据!'
)
}
const
ids
=
this
.
jobResponseSelection
.
map
(
item
=>
item
.
id
).
join
(
','
)
post
(
'InStorageRequestItem/adjust/cancelTake?jobResponseIds='
+
ids
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'解除占用成功!'
)
this
.
refeach
()
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
// 手动占用
occupy
()
{
const
param
=
this
.
infoSelection
.
map
(
item
=>
{
if
(
item
.
allocatedAmount
===
0
||
!
item
.
hasOwnProperty
(
'allocatedAmount'
))
{
return
this
.
$utils
.
showMessageWarning
(
'请输入分配数量!'
)
}
else
{
return
{
inventoryId
:
item
.
id
,
allocatedAmount
:
item
.
allocatedAmount
}
}
})
console
.
log
(
'param'
,
param
)
if
(
!
param
.
includes
(
undefined
))
{
post
(
'InStorageRequestItem/adjust/reTake?itemId='
+
this
.
selectDatas
[
0
].
id
,
param
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'占用成功!'
)
this
.
refeach
()
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
},
refeach
()
{
this
.
$refs
.
adjustOccupyInfo
.
$refs
.
asCom
.
getData
()
this
.
$refs
.
adjustOccupyjobResponse
.
$refs
.
asCom
.
getData
()
}
}
}
</
script
>
<
style
lang=
'scss'
>
.outStorageOffer-adjustOccupy
{
}
</
style
>
applications/dee-mes/src/privateComponents/components/OutStorageOfferDetail/index.vue
View file @
7c2feb6d
...
...
@@ -15,23 +15,31 @@
>
<dee-tools
slot=
"header"
:tools=
"tools"
mode=
"normal"
:collapse=
"false"
/>
</dee-table>
<dee-dialog
width=
"70%"
title=
"添加供外出库申请明细"
:visible=
"dialogVisible"
>
<addOutStorageOfferDetailDialog
ref=
"addOffer"
:basic-data=
"form"
@
submitEvent=
"addData"
@
cancel=
"cancel"
/>
<dee-dialog
width=
"70%"
title=
"添加供外出库申请明细"
:visible
.
sync=
"dialogVisible"
@
on-cancel=
"cancel"
>
<addOutStorageOfferDetailDialog
ref=
"addOffer"
:basic-data=
"form"
@
submitEvent=
"addData"
/>
</dee-dialog>
<dee-dialog
width=
"70%"
title=
"调整占用"
:visible
.
sync=
"aoDialogVisible"
@
on-cancel=
"aoCancel"
>
<OutStorageOfferAdjustOccupy
ref=
"adjustOffer"
:select-datas=
"selectTableData"
:form=
"form"
@
submitEvent=
"addData"
/>
</dee-dialog>
</div>
</
template
>
<
script
>
import
AddOutStorageOfferDetailDialog
from
'./components/addOutStorageOfferDetailDialog'
import
OutStorageOfferAdjustOccupy
from
'./components/outStorageOfferAdjustOccupy'
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'供外出库申请明细'
,
name
:
'OutStorageOfferDetail'
,
components
:
{
AddOutStorageOfferDetailDialog
},
components
:
{
AddOutStorageOfferDetailDialog
,
OutStorageOfferAdjustOccupy
},
props
:
{
form
:
{
type
:
Object
,
required
:
true
},
basicData
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
...
...
@@ -44,7 +52,7 @@ export default {
{
title
:
'规格'
,
key
:
'extMaterial.spec'
,
align
:
'center'
},
{
title
:
'单位名称'
,
key
:
'extMaterial.extUnit.unitName'
,
align
:
'center'
},
{
title
:
'申领数量'
,
key
:
'reqAmount'
,
align
:
'center'
,
minWidth
:
'1
20
'
,
title
:
'申领数量'
,
key
:
'reqAmount'
,
align
:
'center'
,
minWidth
:
'1
60'
,
fixed
:
'right
'
,
component
:
{
show
:
true
,
render
:
(
h
,
data
,
column
,
index
)
=>
{
...
...
@@ -71,11 +79,17 @@ export default {
icon
:
'/icons/c-add.png'
,
handler
:
{
click
:
()
=>
{
if
(
!
this
.
form
.
extWorkCenterId
)
{
this
.
$utils
.
showMessageWarning
(
'请先选择库房!'
)
return
}
this
.
dialogVisible
=
true
this
.
$utils
.
findForm
(
this
).
validate
((
isok
)
=>
{
if
(
isok
)
{
if
(
!
this
.
form
.
extWorkCenterId
)
{
this
.
$utils
.
showMessageWarning
(
'请先选择库房!'
)
return
}
this
.
dialogVisible
=
true
}
else
{
this
.
$utils
.
showMessageWarning
(
'请填写基本信息!'
)
}
})
}
}
},
...
...
@@ -84,7 +98,33 @@ export default {
icon
:
'/icons/c-creatBook.png'
,
handler
:
{
click
:
()
=>
{
this
.
occupy
()
this
.
$utils
.
findForm
(
this
).
validate
((
isok
)
=>
{
if
(
isok
)
{
// 校验通过
this
.
occupy
()
}
else
{
this
.
$utils
.
showMessageWarning
(
'请填写基本信息!'
)
}
})
}
}
},
{
name
:
'调整占用'
,
icon
:
'/icons/c-newchangeapp.png'
,
handler
:
{
click
:
()
=>
{
if
(
this
.
selectTableData
.
length
===
1
)
{
if
(
this
.
selectTableData
[
0
].
hasOwnProperty
(
'id'
))
{
this
.
aoDialogVisible
=
true
}
else
{
this
.
$utils
.
showMessageWarning
(
'请先保存占用!'
)
}
}
else
if
(
this
.
selectTableData
.
length
>
1
)
{
this
.
$utils
.
showMessageWarning
(
'只能勾选一条明细!'
)
}
else
{
this
.
$utils
.
showMessageWarning
(
'请先选择要调整的明细!'
)
}
}
}
},
...
...
@@ -97,7 +137,9 @@ export default {
}
}
}],
param
:
{}
param
:
{},
aoDialogVisible
:
false
,
selectTableData
:
[]
}
},
computed
:
{
...
...
@@ -115,8 +157,8 @@ export default {
// 初始化数据
},
mounted
()
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
getEditData
(
this
.
$route
.
query
.
id
)
if
(
this
.
basicData
.
id
)
{
this
.
getEditData
()
}
},
methods
:
{
...
...
@@ -131,11 +173,13 @@ export default {
cancel
()
{
this
.
dialogVisible
=
false
},
aoCancel
()
{
this
.
aoDialogVisible
=
false
},
occupy
()
{
const
form
=
{
...
this
.
form
}
form
.
aircraftType
=
form
.
aircraftType
.
split
(
'+'
)[
1
]
form
.
sorties
=
form
.
sorties
.
split
(
'+'
)[
1
]
const
param
=
{
...
form
,
inStorageRequestItems
:
this
.
tableData
,
...
...
@@ -143,7 +187,7 @@ export default {
operator
:
'ADD'
}
post
(
'OutStorageRequest/outStorageOut/saveAndTake'
,
param
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
this
.
$utils
.
showMessageSuccess
(
'占用成功!'
)
const
data
=
res
.
items
.
inStorageRequestItems
const
tableData
=
[...
this
.
tableData
]
data
.
forEach
(
item
=>
{
...
...
@@ -183,45 +227,46 @@ export default {
})
})
},
getEditData
(
id
)
{
const
param
=
{
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'subTypeName'
,
'operator'
:
'EQ'
,
'value'
:
'OutStorageOut'
},
{
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
id
}
]
},
openProps
:
[{
'name'
:
'inStorageRequestItems'
,
'openProps'
:
[{
'name'
:
'extMaterial'
,
'openProps'
:
[{
'name'
:
'resType2'
},
{
'name'
:
'extUnit'
}]
},
{
'name'
:
'extDxSipplier'
},
{
'name'
:
'creator'
},
{
'name'
:
'storageZone'
},
{
'name'
:
'inventoryJobResponses'
}]
}]
}
post
(
'OutStorageRequest/search'
,
param
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
const
data
=
res
.
items
.
content
[
0
].
inStorageRequestItems
data
.
forEach
(
item
=>
{
item
.
allocatedAmount
=
this
.
sumArray
(
item
.
inventoryJobResponses
,
'allocatedAmount'
)
})
this
.
tableData
=
data
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
getEditData
()
{
this
.
tableData
.
push
(...
this
.
basicData
.
inStorageRequestItems
)
// const param = {
// 'searchItems': {
// 'items': [
// { 'fieldName': 'subTypeName', 'operator': 'EQ', 'value': 'OutStorageOut' },
// { 'fieldName': 'id', 'operator': 'EQ', 'value': id }
// ]
// },
// openProps: [{
// 'name': 'inStorageRequestItems',
// 'openProps': [{
// 'name': 'extMaterial',
// 'openProps': [{
// 'name': 'resType2'
// }, {
// 'name': 'extUnit'
// }]
// }, {
// 'name': 'extDxSipplier'
// }, {
// 'name': 'creator'
// }, {
// 'name': 'storageZone'
// },
// {
// 'name': 'inventoryJobResponses'
// }]
// }]
// }
// post('OutStorageRequest/search', param).then(res => {
// console.log('res', res)
// const data = res.items.content[0].inStorageRequestItems
// data.forEach(item => {
// item.allocatedAmount = this.sumArray(item.inventoryJobResponses, 'allocatedAmount')
// })
// this.tableData = data
// }).catch((err) => {
// console.log(err)
// })
},
sumArray
(
array
,
key
)
{
let
sum
=
0
...
...
applications/dee-mes/src/privateComponents/components/Warehouse/index.vue
View file @
7c2feb6d
...
...
@@ -62,7 +62,7 @@ export default {
}
}
},
form
:
{
'form.extProductAreaId'
:
{
immediate
:
true
,
deep
:
true
,
handler
()
{
...
...
applications/dee-mes/src/privateComponents/components/getSortiesSelect/index.vue
View file @
7c2feb6d
...
...
@@ -52,8 +52,8 @@ export default {
'form.aircraftType'
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
)
{
handler
(
val
,
oldVal
)
{
if
(
val
!==
oldVal
)
{
const
params
=
{
searchItems
:
{
items
:
[{
'fieldName'
:
'aircraftTypeId'
,
operator
:
'EQ'
,
value
:
val
.
split
(
'+'
)[
0
]
}],
...
...
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