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
994ccf5e
Commit
994ccf5e
authored
Sep 21, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入库流程-缺少入库操作,缺少库位操作bug修改
parent
ff239f71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
241 additions
and
17 deletions
+241
-17
util.js
applications/architecture-dee/src/utils/util.js
+10
-1
warehouseSelect.vue
...singWarehousingProcess_view/component/warehouseSelect.vue
+148
-0
index.vue
...ts/components/PurchasingWarehousingProcess_view/index.vue
+83
-16
No files found.
applications/architecture-dee/src/utils/util.js
View file @
994ccf5e
...
...
@@ -1584,6 +1584,14 @@ export function subNum(firstArg, ...restArgs) {
}
return sum / baseNum
}
// 获取目标响应数据
export function getTargetJobResponses(item, responseName) {
if (item.inventoryJobResponses && item.inventoryJobResponses.length) {
const targetInventory = item.inventoryJobResponses.find(el => el.subTypeName === responseName)
return targetInventory || null
}
}
export default {
treeFindBackArray,
throttle,
...
...
@@ -1668,5 +1676,6 @@ export default {
fileByIdDownload,
findForm,
sumArray,
subNum
subNum,
getTargetJobResponses
}
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingProcess_view/component/warehouseSelect.vue
0 → 100644
View file @
994ccf5e
/**
* @Description: 库位选择组件
* @author xioln
* @date 2023-07-21
*/
<
template
>
<div
class=
"warehouse-select"
>
<el-select
v-if=
"basicData||scope.row.jobOrder&&scope.row.jobOrder.storageZoneId"
v-model=
"selectVal"
:loading=
"tableColumnSelect"
size=
"small"
placeholder=
"请选择库位"
filterable
:disabled=
"!scope.row.isRoot"
remote
loading-text=
"数据正在加载中..."
:remote-method=
"(query) => remoteMethod(query, storageZoneId)"
@
focus=
"locationList = []"
@
change=
"save"
>
<el-option
v-for=
"item in locationList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</
template
>
<
script
>
export
default
{
// name: 'WarehouseSelect', // name写在组件的最前方,自定义组件为必填
components
:
{},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
null
},
scope
:
{
type
:
Object
,
default
:
()
=>
null
}
},
data
()
{
return
{
storageZoneId
:
''
,
selectVal
:
''
,
tableColumnSelect
:
false
,
locationList
:
[],
// 库位搜索节流
remoteFlag
:
true
}
},
computed
:
{},
watch
:
{
basicData
:
{
immediate
:
true
,
deep
:
true
,
handler
:
function
(
val
)
{
val
&&
(
this
.
storageZoneId
=
val
.
storageZoneId
)
}
},
'scope.row'
:
{
immediate
:
true
,
deep
:
true
,
handler
:
function
(
val
)
{
this
.
selectVal
=
val
.
exWorkUnitName
}
}
},
created
()
{
// 初始化数据
},
methods
:
{
// 搜索库位
remoteMethod
(
query
)
{
if
(
!
this
.
storageZoneId
)
return
if
(
query
.
length
<
3
)
return
if
(
this
.
remoteFlag
)
{
this
.
remoteFlag
=
false
this
.
tableColumnSelect
=
true
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
10
,
'searchItems'
:
{
'children'
:
[
{
'items'
:
[
{
'fieldName'
:
'extCenterId'
,
'operator'
:
'EQ'
,
'value'
:
this
.
storageZoneId
},
{
'fieldName'
:
'extcode'
,
'operator'
:
'LIKE'
,
'value'
:
query
}
],
'operator'
:
'AND'
}
],
'items'
:
[],
'operator'
:
'AND'
},
'openProps'
:
[]
}
this
.
$api
.
searchApi
(
'ExtDxProductWorkUnit'
,
params
).
then
(
res
=>
{
if
(
res
.
items
&&
res
.
items
.
content
.
length
)
{
this
.
locationList
=
res
.
items
.
content
.
map
((
item
)
=>
{
return
{
label
:
item
.
extcode
,
value
:
`
${
item
.
id
}
+
${
item
.
extcode
}
`
}
})
}
else
{
this
.
locationList
=
[]
}
})
.
catch
((
err
)
=>
console
.
log
(
err
))
.
finally
(()
=>
{
this
.
loading
=
false
this
.
remoteFlag
=
true
this
.
tableColumnSelect
=
false
})
}
else
{
this
.
$utils
.
showMessageWarning
(
'上一步请求正在查询中,请稍后'
)
}
},
save
(
v
)
{
if
(
!
this
.
selectVal
)
this
.
$utils
.
showMessageWarning
(
'请选择库位'
)
this
.
$emit
(
'save'
,
{
extWorkUnitId
:
this
.
selectVal
,
currentRow
:
this
.
scope
.
row
})
// 适配验收入库确认批量签审
if
(
this
.
scope
.
row
.
subTypeName
===
'JobResponseInEntry'
)
{
const
resValue
=
this
.
selectVal
.
split
(
'+'
)[
0
]
this
.
$emit
(
'input'
,
resValue
)
this
.
saveExtWorkUnit
(
resValue
)
}
},
saveExtWorkUnit
(
resValue
)
{
if
(
!
resValue
)
return
this
.
$utils
.
showMessageWarning
(
'请选择库位'
)
const
params
=
{
id
:
this
.
scope
.
row
.
id
,
operator
:
'MODIFY'
,
extWorkUnitId
:
resValue
,
extWorkUnitIdType
:
'ExtDxProductWorkUnit'
}
this
.
$api
.
recursion
(
'JobResponseInStorage'
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'保存成功'
)
this
.
$bus
.
$emit
(
'reloadModuleList'
)
})
}
}
}
</
script
>
<
style
lang=
'scss'
></
style
>
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingProcess_view/index.vue
View file @
994ccf5e
...
...
@@ -29,7 +29,7 @@
<
script
>
import
{
post
}
from
'@/utils/http'
import
EditDrawer
from
'./component/editDrawer.vue'
import
WarehouseSelect
from
'./component/warehouseSelect.vue'
export
default
{
// componentName: '验收入库申请流程详情',
name
:
'PurchasingWarehousingProcessView'
,
// name写在组件的最前方,自定义组件为必填
...
...
@@ -43,7 +43,22 @@ export default {
data
()
{
return
{
tableData
:
[],
columns
:
[
optionsTree
:
{
rowKey
:
'id'
,
'tree-props'
:
{
children
:
'children'
}
},
timerId
:
null
,
pagination
:
{
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
pageSizes
:
[
10
,
20
,
50
,
100
]
}
}
},
computed
:
{
columns
()
{
const
tableConlumn
=
[
{
title
:
'序号'
,
key
:
'parentIndex'
,
align
:
'center'
,
headerAlign
:
'center'
},
{
title
:
'操作'
,
key
:
'operate'
,
align
:
'center'
,
component
:
{
show
:
true
,
...
...
@@ -74,6 +89,23 @@ export default {
}
}},
{
title
:
'单据编号'
,
key
:
'inventoryReq.reqNo'
,
width
:
'120'
,
align
:
'center'
,
headerAlign
:
'center'
},
{
title
:
'库位'
,
key
:
'exWorkUnitName'
,
width
:
'150'
,
component
:
{
name
:
WarehouseSelect
,
show
:
true
,
props
:
{
basicData
:
this
.
basicData
},
handler
:
{
save
:
({
extWorkUnitId
,
currentRow
})
=>
{
this
.
setParams
(
extWorkUnitId
,
currentRow
)
}
}
}
},
{
title
:
'所属设备'
,
key
:
'subEquipment'
,
headerAlign
:
'center'
,
align
:
'center'
},
{
title
:
'物料类型'
,
key
:
'typeName'
,
align
:
'center'
,
headerAlign
:
'center'
,
formatter
:
(
row
,
column
,
cellValue
,
index
)
=>
{
...
...
@@ -144,21 +176,14 @@ export default {
return
row
.
createTime
&&
row
.
createTime
.
split
(
' '
)[
0
]
}
}
],
optionsTree
:
{
rowKey
:
'id'
,
'tree-props'
:
{
children
:
'children'
}
},
timerId
:
null
,
pagination
:
{
currentPage
:
1
,
pageSize
:
20
,
total
:
0
,
pageSizes
:
[
10
,
20
,
50
,
100
]
]
if
(
this
.
basicData
.
subTypeName
===
'InStoragePurchaseItem'
&&
this
.
basicData
.
state
===
'In_Confirm'
)
{
return
tableConlumn
}
else
{
return
tableConlumn
.
filter
(
item
=>
item
.
title
!==
'库位'
)
}
}
},
computed
:
{},
watch
:
{
},
created
()
{
...
...
@@ -177,6 +202,30 @@ export default {
})
},
methods
:
{
setParams
(
extWorkUnitId
,
currentRow
)
{
if
(
currentRow
.
inventoryJobResponses
&&
currentRow
.
inventoryJobResponses
.
length
)
{
const
targetInventory
=
this
.
$utils
.
getTargetJobResponses
(
currentRow
,
'JobResponseInEntry'
)
if
(
!
targetInventory
)
return
this
.
$utils
.
showMessageWarning
(
'该数据下不存在入库确认响应!'
)
if
(
!
extWorkUnitId
.
split
(
'+'
)[
0
])
return
this
.
$utils
.
showMessageWarning
(
'请选择库位'
)
const
params
=
{
id
:
targetInventory
.
id
,
operator
:
'MODIFY'
,
extWorkUnitId
:
extWorkUnitId
.
split
(
'+'
)[
0
],
extWorkUnitIdType
:
'ExtDxProductWorkUnit'
}
this
.
saveWorkUnit
(
params
)
if
(
currentRow
.
children
&&
currentRow
.
children
.
length
)
{
currentRow
.
children
.
map
(
child
=>
{
this
.
setParams
(
extWorkUnitId
,
child
)
})
}
}
},
saveWorkUnit
(
params
)
{
this
.
$api
.
recursion
(
'JobResponseInStorage'
,
params
).
then
(
res
=>
{
this
.
searchInStorageRequestItem
()
})
},
// 编辑采购入库明细查询InStorageRequestItem/search
searchInStorageRequestItem
()
{
const
param
=
{
...
...
@@ -204,7 +253,13 @@ export default {
]
},
'openProps'
:
[{
'name'
:
'extMaterial'
,
'openProps'
:
[{
'name'
:
'resType2'
},
{
'name'
:
'extUnit'
}]
},
{
'name'
:
'extDxSipplier'
},
{
'name'
:
'storageZone'
},
{
'name'
:
'inventoryReq'
}],
'openProps'
:
[
{
'name'
:
'inventoryJobResponses'
,
'openProps'
:
[
{
'name'
:
'extWorkUnit'
}
]
},
{
'name'
:
'extMaterial'
,
'openProps'
:
[{
'name'
:
'resType2'
},
{
'name'
:
'extUnit'
}]
},
{
'name'
:
'extDxSipplier'
},
{
'name'
:
'storageZone'
},
{
'name'
:
'inventoryReq'
}],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
...
...
@@ -234,7 +289,11 @@ export default {
{
'name'
:
'extDxSipplier'
},
{
'name'
:
'storageZone'
},
{
'name'
:
'inventoryReq'
},
{
'name'
:
'inventoryJobResponses'
}
{
'name'
:
'inventoryJobResponses'
,
'openProps'
:
[
{
'name'
:
'extWorkUnit'
}
]
}
],
'sortItem'
:
[
{
...
...
@@ -256,9 +315,17 @@ export default {
treeTableNoArrange
(
tableData
)
{
tableData
.
forEach
((
item
,
i
)
=>
{
item
.
parentIndex
=
i
+
1
const
targetInventory
=
this
.
$utils
.
getTargetJobResponses
(
item
,
'JobResponseInEntry'
)
if
(
targetInventory
)
{
item
.
exWorkUnitName
=
targetInventory
.
extWorkUnit
&&
targetInventory
.
extWorkUnit
.
extcode
||
''
}
if
(
item
.
children
)
{
item
.
children
.
forEach
((
child
,
j
)
=>
{
child
.
parentIndex
=
item
.
parentIndex
+
'.'
+
(
j
+
1
)
const
targetInventory
=
this
.
$utils
.
getTargetJobResponses
(
child
,
'JobResponseInEntry'
)
if
(
targetInventory
)
{
child
.
exWorkUnitName
=
targetInventory
.
extWorkUnit
&&
targetInventory
.
extWorkUnit
.
extcode
||
''
}
})
}
})
...
...
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