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
45491d8f
Commit
45491d8f
authored
Apr 08, 2024
by
15008242619
Committed by
jingnan
May 06, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退库单退库新增申请人选人功能(暂不部署正式)
parent
eb4c582c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
349 additions
and
60 deletions
+349
-60
index.vue
...-mes/src/privateComponents/components/backApply/index.vue
+177
-53
index.vue
...task-center/myPlanTask/inStorageUseOutBackApply/index.vue
+172
-7
No files found.
applications/dee-mes/src/privateComponents/components/backApply/index.vue
View file @
45491d8f
<
template
>
<div>
<dee-as-com
ref=
"applyTable"
class=
"list-table"
:basic-data=
"
{ selectData,selectionRows }"
:lay-config="{ typeName: 'InStorageBack', layKey: 'InStorageBackApplyList' }"
@backApply="backApply
"
@selectionChange="selectionChange"
<div>
<dee-as-com
ref=
"applyTable"
class=
"list-table"
:basic-data=
"
{ selectData,selectionRows }"
:lay-config="{ typeName: 'InStorageBack', layKey: 'InStorageBackApplyList' }"
@tableToolHandler="tableToolHandler
"
@selectionChange="selectionChange"
/>
<dee-dialog
title=
"发起退库申请"
:dialog-visible=
"dialogVisible"
<dee-dialog
title=
"发起退库申请"
:dialog-visible=
"dialogVisible"
>
<div>
确认提交吗?
</div>
<el-button
@
click=
"confirm"
>
确 定
</el-button>
<div
style=
"margin-bottom: 20px;font-size: 14px;font-weight: bolder;"
>
确认提交吗?
</div>
<div
style=
"text-align: center;"
>
<el-button
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button>
<el-button
@
click=
"cancle"
>
取 消
</el-button>
</div>
</dee-dialog>
</div>
<dee-dialog
title=
"选择工艺员"
:dialog-visible=
"setPersonVisible"
>
<dee-form
ref=
"form"
label-width=
"100"
:form=
"form"
:form-data=
"formData"
:rules=
"rules"
>
<el-button
type=
"primary"
@
click=
"setPersonConfirm"
>
确 定
</el-button>
<el-button
@
click=
"setPersonCancle"
>
取 消
</el-button>
</dee-form>
</dee-dialog>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'backApply'
,
componentName
:
'退库申请'
,
components
:
{
},
props
:
{
selectData
:
{
type
:
Object
,
default
:
()
=>
{}
name
:
'BackApply'
,
componentName
:
'退库申请'
,
components
:
{
},
props
:
{
selectData
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
dialogVisible
:
false
,
setPersonVisible
:
false
,
selectionRows
:
[],
form
:
{},
formData
:
[{
split
:
1
,
data
:
[
{
title
:
'设置工艺员'
,
key
:
'userIds'
,
component
:
{
clearable
:
true
,
name
:
'el-select'
,
placeholder
:
'请选择'
,
multiple
:
true
,
options
:
[]
}
}]
}],
rules
:
{
userIds
:
[
{
required
:
true
,
message
:
'请填写工艺员'
,
trigger
:
[
'blur'
,
'change'
]
}
]
}
}
},
created
()
{
const
httpParams
=
{
'pageFrom'
:
1
,
'pageSize'
:
9999
,
'searchItems'
:
{
'children'
:
[],
'items'
:
[
{
'fieldName'
:
'source.name'
,
'operator'
:
'EQ'
,
'value'
:
'工艺员'
}
],
'operator'
:
'AND'
},
'openProps'
:
[
{
'name'
:
'source'
,
'pageFrom'
:
1
,
'pageSize'
:
9999
},
{
'name'
:
'target'
,
'pageFrom'
:
1
,
'pageSize'
:
9999
}
},
data
()
{
return
{
dialogVisible
:
false
,
selectionRows
:
[]
],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
post
(
'/DxGroupMemberLink/search'
,
httpParams
).
then
(
res
=>
{
this
.
formData
[
0
].
data
.
forEach
(
item
=>
{
item
.
key
===
'userIds'
&&
(
item
.
component
.
options
=
res
.
items
.
content
.
map
(
row
=>
{
return
{
value
:
row
.
target
.
id
,
label
:
row
.
target
.
name
+
'/'
+
row
.
target
.
number
}
}
))
})
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
methods
:
{
tableToolHandler
(
e
)
{
console
.
log
(
e
.
key
.
btnValue
)
if
(
e
.
key
.
btnValue
===
'backApply'
)
{
this
.
backApply
()
}
},
methods
:
{
backApply
()
{
this
.
dialogVisible
=
true
},
confirm
()
{
let
isTkdBack
=
0
this
.
selectionRows
.
forEach
(
item
=>
{
if
(
item
.
remarks
!==
'退库单退库'
){
isTkdBack
++
}
})
if
(
isTkdBack
===
0
)
{
// post('').then()
this
.
$utils
.
showMessageSuccess
(
'提交成功'
)
}
else
if
(
isTkdBack
===
this
.
selectionRows
.
length
)
{
this
.
$utils
.
showMessageSuccess
(
'提交成功'
)
}
else
{
this
.
$utils
.
showMessageWarning
(
'退库原因为退库单退库的不能与其他退库类型一起提交'
)
}
console
.
log
(
this
.
selectionRows
)
},
cancle
()
{
this
.
dialogVisible
=
false
},
selectionChange
(
val
)
{
this
.
selectionRows
=
val
backApply
()
{
this
.
dialogVisible
=
true
},
confirm
()
{
console
.
log
(
this
.
selectionRows
)
let
isTkdBack
=
0
this
.
selectionRows
.
forEach
(
item
=>
{
if
(
item
.
remark
!==
'退库单退库'
)
{
isTkdBack
++
}
})
if
(
isTkdBack
===
0
)
{
// 退库单退库选人
this
.
dialogVisible
=
false
this
.
setPersonVisible
=
true
}
else
if
(
isTkdBack
===
this
.
selectionRows
.
length
)
{
post
(
'/InventoryRequest/purchaseApply/submit?applyIds='
+
this
.
selectionRows
.
map
(
item
=>
Number
(
item
.
id
))).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'提交成功'
)
}).
catch
(()
=>
{
this
.
$utils
.
showMessageWarning
(
'出现异常,提交失败'
)
}).
finally
(()
=>
{
this
.
dialogVisible
=
false
})
}
else
{
this
.
$utils
.
showMessageWarning
(
'退库原因为退库单退库的不能与其他退库类型一起提交'
)
}
},
cancle
()
{
this
.
dialogVisible
=
false
},
setPersonConfirm
()
{
let
ids
=
[]
console
.
log
(
this
.
selectionRows
)
if
(
this
.
selectionRows
&&
this
.
selectionRows
.
length
)
{
ids
=
this
.
selectionRows
.
map
(
item
=>
item
.
id
)
}
post
(
'/InStorageRequestItem/creator/apply?userIds='
+
this
.
form
.
userIds
,
ids
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'提交成功'
)
}).
catch
(()
=>
{
this
.
$utils
.
showMessageWrong
(
'出现异常,提交失败'
)
}).
finally
(()
=>
{
this
.
dialogVisible
=
false
this
.
setPersonVisible
=
false
this
.
$set
(
this
.
form
,
'userIds'
,
''
)
})
},
setPersonCancle
()
{
this
.
setPersonVisible
=
false
this
.
$set
(
this
.
form
,
'userIds'
,
''
)
},
selectionChange
(
val
)
{
this
.
selectionRows
=
val
}
}
}
</
script
>
<
style
></
style
>
\ No newline at end of file
<
style
></
style
>
applications/dee-task-center/src/views/workflow/task-center/myPlanTask/inStorageUseOutBackApply/index.vue
View file @
45491d8f
...
...
@@ -8,16 +8,44 @@
<dee-as-com
ref=
"applyTable"
class=
"list-table"
:basic-data=
"
{ selectData: selectData }"
:lay-config="{ typeName: 'InStorageBackItem', layKey: 'batchSign_InStorageMatchBackApply'}"
:basic-data=
"
{ selectData,selectionRows }"
:lay-config="{ typeName: 'InStorageBackItem', layKey: 'batchSign_InStorageMatchBackApply' }"
@tableToolHandler="tableToolHandler"
@selectionChange="selectionChange"
/>
<dee-dialog
title=
"发起退库申请"
:dialog-visible=
"dialogVisible"
>
<div
style=
"margin-bottom: 20px;font-size: 14px;font-weight: bolder;"
>
确认提交吗?
</div>
<div
style=
"text-align: center;"
>
<el-button
type=
"primary"
@
click=
"confirm"
>
确 定
</el-button>
<el-button
@
click=
"cancle"
>
取 消
</el-button>
</div>
</dee-dialog>
<dee-dialog
title=
"选择工艺员"
:dialog-visible=
"setPersonVisible"
>
<dee-form
ref=
"form"
label-width=
"100"
:form=
"form"
:form-data=
"formData"
:rules=
"rules"
>
<el-button
type=
"primary"
@
click=
"setPersonConfirm"
>
确 定
</el-button>
<el-button
@
click=
"setPersonCancle"
>
取 消
</el-button>
</dee-form>
</dee-dialog>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
name
:
'InStorageUseOutBackApply'
,
components
:
{},
props
:
{
selectData
:
{
type
:
Object
,
...
...
@@ -25,14 +53,151 @@ export default {
}
},
data
()
{
return
{}
return
{
dialogVisible
:
false
,
setPersonVisible
:
false
,
selectionRows
:
[],
form
:
{},
formData
:
[{
split
:
1
,
data
:
[
{
title
:
'设置工艺员'
,
key
:
'userIds'
,
component
:
{
clearable
:
true
,
name
:
'el-select'
,
placeholder
:
'请选择'
,
multiple
:
true
,
options
:
[]
}
}]
}],
rules
:
{
userIds
:
[
{
required
:
true
,
message
:
'请填写工艺员'
,
trigger
:
[
'blur'
,
'change'
]
}
]
}
}
},
created
()
{
let
httpParams
=
{
"pageFrom"
:
1
,
"pageSize"
:
9999
,
"searchItems"
:
{
"children"
:
[],
"items"
:
[
{
"fieldName"
:
"source.name"
,
"operator"
:
"EQ"
,
"value"
:
"工艺员"
}
],
"operator"
:
"AND"
},
"openProps"
:
[
{
"name"
:
"source"
,
"pageFrom"
:
1
,
"pageSize"
:
9999
},
{
"name"
:
"target"
,
"pageFrom"
:
1
,
"pageSize"
:
9999
}
],
"sortItem"
:
[
{
"fieldName"
:
"modifyTime"
,
"sortOrder"
:
"desc"
}
]
}
post
(
'/DxGroupMemberLink/search'
,
httpParams
).
then
(
res
=>
{
this
.
formData
[
0
].
data
.
forEach
(
item
=>
{
item
.
key
===
'userIds'
&&
(
item
.
component
.
options
=
res
.
items
.
content
.
map
(
row
=>
{
return
{
value
:
row
.
target
.
id
,
label
:
row
.
target
.
name
+
'/'
+
row
.
target
.
number
}
}
))
})
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
},
computed
:
{},
watch
:
{},
created
()
{},
mounted
()
{},
mounted
()
{
},
// 组件方法
methods
:
{}
methods
:
{
tableToolHandler
(
e
)
{
console
.
log
(
e
.
key
.
btnValue
)
if
(
e
.
key
.
btnValue
===
'backApply'
)
{
this
.
backApply
()
}
},
backApply
()
{
this
.
dialogVisible
=
true
},
confirm
()
{
console
.
log
(
this
.
selectionRows
)
let
isTkdBack
=
0
this
.
selectionRows
.
forEach
(
item
=>
{
if
(
item
.
inventoryReq
.
remark
!==
'退库单退库'
)
{
isTkdBack
++
}
})
if
(
isTkdBack
===
0
)
{
//退库单退库选人
this
.
dialogVisible
=
false
this
.
setPersonVisible
=
true
}
else
if
(
isTkdBack
===
this
.
selectionRows
.
length
)
{
post
(
'/DxWorkflowTask/apply/pass'
,
this
.
selectionRows
.
map
(
item
=>
item
.
processTaskId
)).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'提交成功'
)
}).
catch
(
err
=>
{
this
.
$utils
.
showMessageWarning
(
'出现异常,提交失败'
)
}).
finally
(()
=>
{
this
.
dialogVisible
=
false
})
}
else
{
this
.
$utils
.
showMessageWarning
(
'退库原因为退库单退库的不能与其他退库类型一起提交'
)
}
},
cancle
()
{
this
.
dialogVisible
=
false
},
setPersonConfirm
()
{
let
ids
=
[]
console
.
log
(
this
.
selectionRows
)
if
(
this
.
selectionRows
&&
this
.
selectionRows
.
length
)
{
ids
=
this
.
selectionRows
.
map
(
item
=>
item
.
processTaskId
)
}
post
(
'/InStorageRequestItem/creator/applyByItems?userIds='
+
this
.
form
.
userIds
,
ids
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'提交成功'
)
}).
catch
(
err
=>
{
this
.
$utils
.
showMessageWarning
(
'出现异常,提交失败'
)
}).
finally
(()
=>
{
this
.
dialogVisible
=
false
this
.
setPersonVisible
=
false
this
.
$set
(
this
.
form
,
'userIds'
,
''
)
})
},
setPersonCancle
()
{
this
.
setPersonVisible
=
false
this
.
$set
(
this
.
form
,
'userIds'
,
''
)
},
selectionChange
(
val
)
{
this
.
selectionRows
=
val
}
}
}
</
script
>
...
...
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