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
3e30bb4d
Commit
3e30bb4d
authored
Sep 11, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退库入库界面联调
parent
9397eb74
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
344 additions
and
28 deletions
+344
-28
AddInStorageBackItemDialog.vue
...StorageBackItem/components/AddInStorageBackItemDialog.vue
+139
-0
index.vue
...ivateComponents/components/AddInStorageBackItem/index.vue
+191
-0
index.vue
...teComponents/components/AddOutStorageUseDetails/index.vue
+13
-27
index.vue
.../src/privateComponents/components/EditReqAmount/index.vue
+1
-1
No files found.
applications/dee-mes/src/privateComponents/components/AddInStorageBackItem/components/AddInStorageBackItemDialog.vue
0 → 100644
View file @
3e30bb4d
<
template
>
<div
class=
"addInStorageBackItemDialog"
>
<dee-as-com
v-if=
"basicData.subTypeName==='InStorageMatchBack'"
ref=
"topTable"
:lay-config=
"
{ typeName: 'OutStorageMatchItem', layKey: 'addInStorageBackMatchItem_top' }"
:basic-data="basicData"
table-height="400px"
@row-click="handleRowClickTop"
/>
<dee-as-com
ref=
"bottomTable"
:table-height=
"basicData.subTypeName==='InStorageMatchBack'?'300px':'500px'"
:lay-config=
"cmpOptions"
:basic-data=
"basicData"
@
row-click=
"handleRowClickBottom"
/>
<el-form
ref=
"applyForm"
:rules=
"rules"
:model=
"applyForm"
class=
"applyForm"
>
<el-form-item
:label=
"amountItemLabel"
prop=
"reqAmount"
label-width=
"100px"
>
<el-input-number
v-model=
"applyForm.reqAmount"
:placeholder=
"amountItemLabel"
:min=
"0"
size=
"small"
/>
</el-form-item>
<el-form-item
class=
"foot-btn-box"
>
<el-button
type=
"primary"
@
click=
"submitEvent(true)"
>
添加
</el-button>
<el-button
type=
"primary"
@
click=
"submitEvent(false)"
>
确认
</el-button>
<el-button
@
click=
"cancelEvent"
>
取消
</el-button>
</el-form-item>
</el-form>
</div>
</
template
>
<
script
>
export
default
{
// componentName: '退库入库添加明细',
name
:
'AddInStorageBackItemDialog'
,
components
:
{},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
},
selectDatas
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
selection
:
null
,
defaultData
:
{},
applyForm
:
{},
amountItemLabel
:
'退库数量'
,
rules
:
{
reqAmount
:
[
{
required
:
true
,
message
:
'该项必填'
,
trigger
:
'blur'
}
]
},
cmpOptions
:
{
typeName
:
'JobResponseOutStorageMatch'
,
layKey
:
'add_InStorageBackMatchItem_bottom'
}
}
},
computed
:
{},
watch
:
{
'basicData.subTypeName'
:
{
immediate
:
true
,
handler
(
val
)
{
if
(
val
===
'InStorageMatchBack'
)
{
this
.
$set
(
this
.
cmpOptions
,
'layKey'
,
'add_InStorageBackMatchItem_bottom'
)
}
else
if
(
val
===
'InStorageOutBack'
||
val
===
'InStorageUseBack'
)
{
this
.
$set
(
this
.
cmpOptions
,
'layKey'
,
'add_InStorageBackItem_Use&Out'
)
}
else
{
this
.
$set
(
this
.
cmpOptions
,
'layKey'
,
''
)
}
}
}
},
created
()
{
},
methods
:
{
handleRowClickTop
({
row
})
{
if
(
row
.
id
)
{
this
.
$refs
.
bottomTable
.
$refs
.
asCom
.
getData
(
row
.
id
)
}
},
handleRowClickBottom
(
val
)
{
this
.
selection
=
val
.
row
},
submitEvent
(
addContinue
)
{
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
if
(
valid
&&
this
.
selection
)
{
const
maxAmount
=
this
.
selection
.
outsideAmount
-
this
.
selection
.
backedAmount
-
this
.
selection
.
backAmount
-
this
.
selection
.
scrapCount
if
(
this
.
applyForm
.
reqAmount
>
maxAmount
)
return
this
.
$utils
.
showMessageWarning
(
`当前选中物料的退库数量不足!`
)
const
inventoryData
=
this
.
selection
.
inventory
const
data
=
[{
'subTypeName'
:
`
${
this
.
basicData
.
subTypeName
}
Item`
,
'extMaterial'
:
inventoryData
.
extMaterial
,
'extMaterialId'
:
inventoryData
.
extMaterialId
,
'testNo'
:
inventoryData
.
testNo
,
'suppname'
:
inventoryData
.
suppname
,
'backItemId'
:
this
.
selection
.
id
,
'backItemIdType'
:
this
.
selection
.
subTypeName
,
'backAmount'
:
this
.
selection
.
backAmount
||
0
,
'backedAmount'
:
this
.
selection
.
backedAmount
||
0
,
'scrapCount'
:
this
.
selection
.
scrapCount
||
0
,
'outsideAmount'
:
this
.
selection
.
outsideAmount
||
0
,
'reqAmount'
:
this
.
applyForm
.
reqAmount
}]
this
.
$emit
(
'submitEvent'
,
{
formData
:
data
,
addContinue
})
addContinue
&&
this
.
cleanAddForm
()
}
else
{
this
.
$utils
.
showMessageWarning
(
`至少选择一条物料并且
${
this
.
amountItemLabel
}
必填!`
)
return
false
}
})
},
cleanAddForm
()
{
this
.
$refs
.
bottomTable
.
$refs
.
asCom
.
getData
()
this
.
applyForm
=
{}
},
cancelEvent
()
{
this
.
$emit
(
'cancel'
)
}
}
}
</
script
>
<
style
lang=
'scss'
>
.addInStorageBackItemDialog
{
.applyForm
{
margin-top
:
30px
;
.el-input-number
{
width
:
180px
;
}
}
.foot-btn-box
{
display
:
flex
;
margin-top
:
10px
;
justify-content
:
center
;
align-content
:
center
;
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/AddInStorageBackItem/index.vue
0 → 100644
View file @
3e30bb4d
<!--
* @Author: gjn
* @Date: 2023-09-09 153:07:44
* @Description:退库入库申请明细
-->
<
template
>
<div
v-if=
"form&&form.subTypeName"
:style=
"layoutStyle"
class=
"addInStorageBackItem"
>
<dee-as-com
ref=
"table"
:im-show-table-data=
"imShowTableData"
:basic-data=
"
{...form,...basicData}"
:lay-config="cmpOptions"
table-height="auto"
:dis-business="true"
:result-data="tableData"
@tableToolHandler="tableToolHandler"
@selectionChange="selectionChange"
/>
<dee-dialog
:title=
"dialogTitle"
width=
"70%"
:dialog-visible=
"dialogShow"
@
handleClose=
"dialogShow = false"
>
<component
:is=
"componentName"
:basic-data=
"
{...form,...basicData}"
:select-datas="selectionRows"
:form="form"
@submitEvent="submitEvent"
@cancel="dialogShow = false"
/>
</dee-dialog>
</div>
</
template
>
<
script
>
import
AddInStorageBackItemDialog
from
'./components/AddInStorageBackItemDialog'
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'退库入库添加明细'
,
name
:
'AddInStorageBackItem'
,
components
:
{
AddInStorageBackItemDialog
},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
},
form
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
},
imShowTableData
:
{
type
:
Array
,
default
:
()
=>
{
return
[]
}
},
layoutStyle
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
},
showBtn
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
dialogShow
:
false
,
selectionRows
:
[],
tableData
:
[],
dialogTitle
:
''
,
componentName
:
''
,
cmpOptions
:
{
typeName
:
'InStorageBackItem'
,
layKey
:
'InStorageMatchBack_details'
}
}
},
computed
:
{
},
watch
:
{
tableData
:
{
immediate
:
true
,
deep
:
true
,
handler
(
data
)
{
this
.
$emit
(
'input'
,
data
)
}
},
'form.subTypeName'
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
&&
!
this
.
basicData
.
id
)
{
this
.
tableData
=
[]
}
}
},
basicData
:
{
immediate
:
true
,
deep
:
true
,
handler
(
val
)
{
if
(
val
&&
val
.
id
)
{
if
(
this
.
basicData
.
inStorageRequestItems
)
{
this
.
tableData
=
this
.
basicData
.
inStorageRequestItems
.
map
(
item
=>
{
return
item
})
}
}
}
}
},
created
()
{
},
provide
()
{
return
{
parentType_Inject
:
'退库入库'
}
},
methods
:
{
tableToolHandler
(
val
)
{
const
btnValue
=
val
.
key
.
btnValue
switch
(
btnValue
)
{
case
'add'
:
this
.
addHandle
()
break
case
'remove'
:
this
.
remove
()
break
default
:
break
}
},
selectionChange
(
val
)
{
this
.
selectionRows
=
val
},
addHandle
()
{
this
.
$utils
.
findForm
(
this
).
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
openDialog
(
'添加退库明细'
,
'AddInStorageBackItemDialog'
)
}
else
{
this
.
$utils
.
showMessageWarning
(
'请填写基本信息!'
)
}
})
},
openDialog
(
dialogTitle
,
componentName
)
{
this
.
dialogTitle
=
dialogTitle
this
.
componentName
=
componentName
this
.
dialogShow
=
true
},
remove
()
{
this
.
$confirm
(
'此操作将永久删除该文件, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
post
(
`/InStorageRequestItem/inStorageBackItem/delete?itemIds=
${
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
:
'已取消删除'
})
})
},
submitEvent
({
formData
,
addContinue
})
{
const
extMaterialIds
=
this
.
tableData
.
map
(
item
=>
item
.
extMaterialId
).
includes
(
formData
[
0
].
extMaterialId
)
if
(
extMaterialIds
)
return
this
.
$utils
.
showMessageWarning
(
'相同物料不能重复添加,请重新选择!'
)
this
.
tableData
.
push
(...
formData
)
this
.
dialogShow
=
addContinue
||
false
}
}
}
</
script
>
<
style
>
</
style
>
applications/dee-mes/src/privateComponents/components/AddOutStorageUseDetails/index.vue
View file @
3e30bb4d
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
<component
<component
:is=
"componentName"
:is=
"componentName"
:basic-data=
"
{...form,...basicData}"
:basic-data=
"
{...form,...basicData}"
:component-prop="componentProp"
:select-datas="selectionRows"
:select-datas="selectionRows"
:form="form"
:form="form"
@submitEvent="submitEvent"
@submitEvent="submitEvent"
...
@@ -46,7 +45,7 @@ export default {
...
@@ -46,7 +45,7 @@ export default {
components
:
{
AddOutStorageUseDetailDialog
,
AdjustOccupyCom
},
components
:
{
AddOutStorageUseDetailDialog
,
AdjustOccupyCom
},
provide
()
{
// 用于报废领用申领数量编辑校验
provide
()
{
// 用于报废领用申领数量编辑校验
return
{
return
{
parentType_Inject
:
this
.
basicData
.
useRequestType
parentType_Inject
:
this
.
basicData
&&
this
.
basicData
.
useRequestType
||
''
}
}
},
},
props
:
{
props
:
{
...
@@ -70,14 +69,6 @@ export default {
...
@@ -70,14 +69,6 @@ export default {
return
[]
return
[]
}
}
},
},
typeName
:
{
type
:
String
,
default
:
()
=>
''
},
typeKey
:
{
type
:
String
,
default
:
()
=>
''
},
buttonFilter
:
{
buttonFilter
:
{
type
:
String
,
type
:
String
,
default
:
()
=>
''
default
:
()
=>
''
...
@@ -95,9 +86,6 @@ export default {
...
@@ -95,9 +86,6 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
componentProp
:
{
showSubType
:
true
},
dialogShow
:
false
,
dialogShow
:
false
,
selectionRows
:
[],
selectionRows
:
[],
tableData
:
[],
tableData
:
[],
...
@@ -106,8 +94,7 @@ export default {
...
@@ -106,8 +94,7 @@ export default {
cmpOptions
:
{
cmpOptions
:
{
typeName
:
'OutStorageUseItem'
,
typeName
:
'OutStorageUseItem'
,
layKey
:
'add_outStorageUseItem_useAO'
layKey
:
'add_outStorageUseItem_useAO'
},
}
editMaterialItem
:
null
}
}
},
},
computed
:
{
computed
:
{
...
@@ -121,16 +108,14 @@ export default {
...
@@ -121,16 +108,14 @@ export default {
this
.
$emit
(
'input'
,
data
)
this
.
$emit
(
'input'
,
data
)
}
}
},
},
'basicData.useRequestType'
:
{
basicData
:
{
immediate
:
true
,
immediate
:
true
,
deep
:
true
,
deep
:
true
,
handler
(
val
)
{
handler
(
val
)
{
this
.
$set
(
this
.
cmpOptions
,
'layKey'
,
`add_outStorageUseItem_
${
val
}
`
)
if
(
val
&&
val
.
useRequestType
)
{
this
.
$set
(
this
.
cmpOptions
,
'layKey'
,
`add_outStorageUseItem_
${
val
.
useRequestType
}
`
)
}
}
},
if
(
val
&&
val
.
id
)
{
'basicData.id'
:
{
immediate
:
true
,
handler
(
val
)
{
if
(
this
.
basicData
.
inStorageRequestItems
&&
(
!
this
.
tableData
||
!
this
.
tableData
.
length
))
{
if
(
this
.
basicData
.
inStorageRequestItems
&&
(
!
this
.
tableData
||
!
this
.
tableData
.
length
))
{
this
.
tableData
=
this
.
basicData
.
inStorageRequestItems
.
map
(
item
=>
{
this
.
tableData
=
this
.
basicData
.
inStorageRequestItems
.
map
(
item
=>
{
item
.
allocatedAmount
=
this
.
$utils
.
sumArray
(
item
.
inventoryJobResponses
,
'allocatedAmount'
)
item
.
allocatedAmount
=
this
.
$utils
.
sumArray
(
item
.
inventoryJobResponses
,
'allocatedAmount'
)
...
@@ -139,6 +124,7 @@ export default {
...
@@ -139,6 +124,7 @@ export default {
}
}
}
}
}
}
}
},
},
created
()
{
created
()
{
this
.
$bus
.
$on
(
'swapUseData'
,
(
data
)
=>
{
this
.
$bus
.
$on
(
'swapUseData'
,
(
data
)
=>
{
...
...
applications/dee-mes/src/privateComponents/components/EditReqAmount/index.vue
View file @
3e30bb4d
...
@@ -69,7 +69,7 @@ export default {
...
@@ -69,7 +69,7 @@ export default {
this
.
maxNum
=
maxAmount
this
.
maxNum
=
maxAmount
}
}
this
.
$emit
(
'input'
,
this
.
reqAmount
)
this
.
$emit
(
'input'
,
this
.
reqAmount
)
if
(
this
.
form
.
id
)
{
if
(
this
.
form
.
id
&&
this
.
parentType_Inject
!==
'退库入库'
)
{
this
.
changeAmount
()
this
.
changeAmount
()
}
}
},
},
...
...
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