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
05ba6a47
Commit
05ba6a47
authored
Aug 24, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领用出库申请开发15%
parent
abfa76e8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
374 additions
and
0 deletions
+374
-0
index.vue
...rivateComponents/components/AddOutStorageUseCom/index.vue
+144
-0
index.vue
...ponents/components/AddOutStorageUseDetailDialog/index.vue
+109
-0
index.vue
...mes/src/privateComponents/components/AoNoSelect/index.vue
+121
-0
No files found.
applications/dee-mes/src/privateComponents/components/AddOutStorageUseCom/index.vue
0 → 100644
View file @
05ba6a47
<!--
* @Author: gjn
* @Date: 2023-08-23 17:52:16
* @Description:领用出库申请新建
-->
<
template
>
<div
class=
"addOutStorageUseCom"
>
<div
class=
"sub-title"
>
领用类型
</div>
<div
class=
"useType"
>
<span
class=
"typeName"
>
领用类型:
</span>
<el-select
v-model=
"typeName"
placeholder=
"请选择"
size=
"mini"
@
change=
"changeVal"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
<DeeStaticCmp
v-if=
"typeName"
style=
"border:none;"
model-name=
"OutStorageUse"
:cmp-options=
"cmpOptions"
:default-data=
"defaultData"
:on-form-event-hander=
"formEventHander"
@
refreshForm=
"dataChangeHandler"
/>
</div>
</
template
>
<
script
>
export
default
{
componentName
:
'领用出库申请新建'
,
name
:
'AddOutStorageUseCom'
,
components
:
{},
props
:
{
defaultData
:
{
type
:
Object
,
default
:
()
=>
null
},
isEdit
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
typeName
:
'useAO'
,
options
:
[
],
showCmp
:
true
,
cmpOptions
:
{
typeName
:
'OutStorageUse'
,
value
:
'outStorageUseApply_add_instruct'
},
formEventHander
:
{
'on-submit'
:
()
=>
{
console
.
log
(
this
.
formData
,
'this.formData'
)
if
(
!
this
.
formData
||
!
this
.
formData
.
subTypeName
)
{
return
this
.
$message
.
error
(
'请选择一种管理方式'
)
}
this
.
$emit
(
'on-submit'
)
},
'on-cancel'
:
()
=>
{
this
.
$emit
(
'on-cancel'
)
}
}
}
},
computed
:
{},
watch
:
{
typeName
:
{
immediate
:
true
,
handler
(
val
)
{
this
.
changeModelCode
()
// this.cmpOptions.typeName = val
// this.formData.subTypeName = this.typeName
}
}
},
created
()
{},
mounted
()
{
this
.
getUseRequestTypes
()
},
// 组件方法
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
)
},
dataChangeHandler
(
val
)
{
if
(
val
)
{
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)
// }
// }
}
}
}
</
script
>
<
style
lang=
'scss'
>
.addOutStorageUseCom
{
.sub-title
{
margin-left
:
6px
;
}
.useType
{
.typeName
{
width
:
100px
;
margin-left
:
33px
;
text-align
:
right
;
vertical-align
:
middle
;
font-size
:
14px
;
color
:
#606266
;
line-height
:
40px
;
}
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/AddOutStorageUseDetailDialog/index.vue
0 → 100644
View file @
05ba6a47
/**
* @Description: 领用出库添加明细
* @author gjn
* @date 2023-08-24
*/
<
template
>
<div
class=
"addOutStorageUseDetailDialog"
>
<dee-as-com
ref=
"OfferTable"
class=
"list-table"
:lay-config=
"
{ typeName: 'OutStorageMatchItem', layKey: 'outStorageUseMaterial_Add'}"
:basic-data="basicData"
@row-click="handleRowClick"
/>
<el-form
ref=
"applyForm"
:rules=
"rules"
:model=
"applyForm"
class=
"applyForm"
>
<el-form-item
label=
"申领数量"
prop=
"reqAmount"
label-width=
"100px"
>
<el-input-number
v-model=
"applyForm.reqAmount"
placeholder=
"申领数量"
:min=
"0"
size=
"small"
/>
</el-form-item>
<el-form-item
class=
"foot-btn-box"
>
<el-button
type=
"primary"
@
click=
"submitEvent"
>
确认
</el-button>
<el-button
@
click=
"cancelEvent"
>
取消
</el-button>
</el-form-item>
</el-form>
</div>
</
template
>
<
script
>
export
default
{
componentName
:
'领用出库添加明细'
,
name
:
'AddOutStorageUseDetailDialog'
,
components
:
{},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
selection
:
null
,
defaultData
:
{},
applyForm
:
{},
rules
:
{
reqAmount
:
[
{
required
:
true
,
message
:
'请填写申领数量'
,
trigger
:
'blur'
}
]
}
}
},
computed
:
{},
watch
:
{
'value'
:
{
immediate
:
true
,
handler
(
val
)
{
console
.
log
(
'val'
,
val
)
}
}
},
created
()
{
// 初始化数据
console
.
log
(
'basicData'
,
this
.
basicData
)
},
methods
:
{
handleRowClick
(
val
)
{
this
.
selection
=
val
.
row
},
submitEvent
()
{
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
if
(
valid
&&
this
.
selection
)
{
if
(
this
.
applyForm
.
reqAmount
>
this
.
selection
.
unableAmount
)
return
this
.
$utils
.
showMessageWarning
(
'申领数量不能大于当前选中物料的可用数量!'
)
const
data
=
[{
'subTypeName'
:
'OutStorageUseItem'
,
'extMaterial'
:
this
.
selection
.
extMaterial
,
'extMaterialId'
:
this
.
selection
.
extMaterialId
,
'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
(
'申领数量必填!'
)
return
false
}
})
},
cancelEvent
()
{
this
.
$emit
(
'cancel'
)
}
}
}
</
script
>
<
style
lang=
'scss'
>
.addOutStorageUseDetailDialog
{
.list-table
{
height
:
510px
!
important
;
}
.applyForm
{
margin-top
:
30px
;
}
.foot-btn-box
{
display
:
flex
;
margin-top
:
10px
;
justify-content
:
center
;
align-content
:
center
;
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/AoNoSelect/index.vue
0 → 100644
View file @
05ba6a47
<
template
>
<div
class=
"AoNoSelectCom"
>
<el-select
:value=
"value"
:loading=
"loading"
filterable
remote
clearable
:remote-method=
"remoteMethod"
:disabled=
"disabled"
:placeholder=
"options.length?'请选择':'暂无数据'"
@
change=
"change"
@
clear=
"clear"
>
<el-option
v-for=
"item in options"
:key=
"item.key"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</
template
>
<
script
>
export
default
{
name
:
'AoNoSelectCom'
,
componentName
:
'指令号'
,
props
:
{
value
:
{
type
:
[
String
,
Number
],
default
:
''
},
form
:
{
type
:
Object
,
default
:
()
=>
({
sorties
:
''
})
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
loading
:
false
,
options
:
[],
remoteFlag
:
true
}
},
computed
:
{},
watch
:
{
'form.sorties'
:
{
handler
(
val
)
{
this
.
$set
(
this
.
form
,
'aoNo'
,
''
)
}
}
},
methods
:
{
remoteMethod
(
query
)
{
if
(
!
this
.
form
||
!
this
.
form
.
sorties
)
return
this
.
$utils
.
showMessageWarning
(
'请选择架次后查询!'
)
if
(
!
query
||
query
.
length
<
1
)
return
if
(
this
.
remoteFlag
)
{
this
.
remoteFlag
=
false
this
.
tableColumnSelect
=
true
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
999
,
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'serialNumber'
,
'operator'
:
'LIKE'
,
'value'
:
query
},
{
'fieldName'
:
'sorties'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
form
.
sorties
.
split
(
'+'
)[
1
]
}
]
},
'openProps'
:
[]
}
this
.
loading
=
true
this
.
options
=
[]
this
.
$api
.
searchApi
(
'ExtProcessPlan'
,
params
).
then
(
res
=>
{
if
(
res
.
items
&&
res
.
items
.
content
.
length
)
{
this
.
options
=
res
.
items
.
content
.
map
((
item
)
=>
{
return
{
label
:
item
.
serialNumber
,
value
:
item
.
serialNumber
}
})
}
else
{
this
.
locationList
=
[]
}
})
.
catch
((
err
)
=>
console
.
log
(
err
))
.
finally
(()
=>
{
this
.
loading
=
false
this
.
remoteFlag
=
true
this
.
tableColumnSelect
=
false
})
}
else
{
this
.
$utils
.
showMessageWarning
(
'上一步请求正在查询中,请稍后'
)
}
},
change
(
val
)
{
this
.
$emit
(
'input'
,
val
)
},
clear
()
{
this
.
$emit
(
'input'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
</
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