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
74a014c3
Commit
74a014c3
authored
May 21, 2024
by
wangdanlei
Committed by
jingnan
Jun 13, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
串件单
parent
ad705b5e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
564 additions
and
0 deletions
+564
-0
index.vue
...privateComponents/components/ProductModelSelect/index.vue
+152
-0
config.js
...privateComponents/components/SerialNumberSelect/config.js
+45
-0
index.vue
...privateComponents/components/SerialNumberSelect/index.vue
+148
-0
config.js
...privateComponents/components/SerialPieceSorties/config.js
+31
-0
index.vue
...privateComponents/components/SerialPieceSorties/index.vue
+188
-0
No files found.
applications/dee-mes/src/privateComponents/components/ProductModelSelect/index.vue
0 → 100644
View file @
74a014c3
<
template
>
<div>
<el-select
v-model=
"selVal"
filterable
:disabled=
"disabled"
remote
placeholder=
"请输入"
:remote-method=
"remoteMethod"
:loading=
"loading"
@
change=
"changeEvent"
>
<el-option
v-for=
"(item,i) in requestOp"
:key=
"i"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'产品件号/型号选择'
,
name
:
'ProductModelSelect'
,
components
:
{},
props
:
{
value
:
{
type
:
Object
,
default
:
null
},
basicData
:
{
type
:
Object
,
default
:
null
},
form
:
{
type
:
Object
,
default
:
null
},
itemObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
selVal
:
''
,
linkageValue
:
''
,
requestOp
:
[],
loading
:
false
,
com
:
null
}
},
computed
:
{
disabled
()
{
let
disabled
=
false
this
.
$utils
.
findByNameVnode
(
this
,
'DeeAsForm'
).
formData
.
forEach
(
item
=>
{
item
.
data
&&
item
.
data
.
forEach
(
x
=>
{
if
(
x
.
key
===
this
.
itemObj
.
key
)
{
disabled
=
x
.
component
.
disabled
}
})
})
return
disabled
}
},
watch
:
{
value
:
{
handler
:
function
()
{
if
(
Object
.
keys
(
this
.
basicData
).
length
)
{
this
.
setData
(
this
.
value
)
}
},
deep
:
true
}
},
// 生命周期 - 创建完成(可以访问当前this 实例)
created
()
{
},
// 生命周期 - 挂载之前
beforeMount
()
{
},
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted
()
{
// 流程里使用
if
(
Object
.
keys
(
this
.
basicData
).
length
)
{
this
.
setData
(
this
.
form
.
extMaterial
)
}
},
methods
:
{
async
setData
(
value
)
{
if
(
value
)
{
await
this
.
getModelNo
(
value
.
modelNo
)
this
.
selVal
=
JSON
.
stringify
(
value
)
}
},
async
getModelNo
(
query
)
{
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
200
,
'searchItems'
:
{
'operator'
:
'AND'
,
'items'
:
[{
'fieldName'
:
'modelNo'
,
'operator'
:
'LIKE'
,
'value'
:
query
}]
},
'openProps'
:
[
{
'name'
:
'extUnit'
}
]
}
await
post
(
`/ExtDxProcessMaterial/search`
,
params
)
.
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
code
===
0
)
{
this
.
requestOp
=
res
.
items
.
content
.
map
(
item
=>
{
return
{
label
:
item
.
modelNo
,
value
:
JSON
.
stringify
(
item
)
}
})
}
})
},
changeEvent
(
value
)
{
const
obj
=
JSON
.
parse
(
value
)
this
.
$set
(
this
.
form
,
'extMaterial'
,
obj
)
},
remoteMethod
(
query
)
{
if
(
query
&&
query
.
length
>=
2
)
{
if
(
this
.
time
)
{
this
.
time
=
null
}
this
.
time
=
setTimeout
(()
=>
{
this
.
loading
=
true
this
.
getModelNo
(
query
)
},
500
)
}
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
</
style
>
applications/dee-mes/src/privateComponents/components/SerialNumberSelect/config.js
0 → 100644
View file @
74a014c3
export
default
{
props
:
{},
layoutConfigData
:
[
{
title
:
'高级组件配置'
,
data
:
[
{
title
:
'attrKey'
,
key
:
'attrKey'
,
component
:
{
name
:
'el-input'
,
placeholder
:
''
}
},
{
title
:
'是否禁用'
,
key
:
'disabled'
,
component
:
{
name
:
'el-select'
,
options
:
[{
label
:
'是'
,
value
:
true
},
{
label
:
'否'
,
value
:
false
}]
}
}
]
}
],
data
()
{
return
{
}
},
created
()
{
},
computed
:
{
},
methods
:
{
}
}
applications/dee-mes/src/privateComponents/components/SerialNumberSelect/index.vue
0 → 100644
View file @
74a014c3
<
template
>
<div>
<el-select
v-model=
"selVal"
filterable
remote
:disabled=
"disabled"
placeholder=
"请输入"
:remote-method=
"remoteMethod"
:loading=
"loading"
@
change=
"changeEvent"
>
<el-option
v-for=
"(item,i) in requestOp"
:key=
"i"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</
template
>
<
script
>
import
{
post
}
from
'@/utils/http'
import
config
from
'./config'
export
default
{
componentName
:
'装机指令号选择器'
,
name
:
'SerialNumberSelect'
,
components
:
{},
mixins
:
[
config
],
props
:
{
basicData
:
{
type
:
Object
,
default
:
null
},
value
:
{
type
:
Object
,
default
:
null
},
form
:
{
type
:
Object
,
default
:
null
},
itemObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
selVal
:
''
,
linkageValue
:
''
,
requestOp
:
[],
loading
:
false
}
},
computed
:
{
disabled
()
{
return
this
.
itemObj
.
disabled
}
},
watch
:
{
value
()
{
if
(
typeof
this
.
value
!==
'string'
)
{
if
(
Object
.
keys
(
this
.
basicData
).
length
)
{
this
.
setData
(
this
.
value
)
}
}
}
},
// 生命周期 - 创建完成(可以访问当前this 实例)
created
()
{
},
// 生命周期 - 挂载之前
beforeMount
()
{
},
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted
()
{
this
.
com
=
this
.
$utils
.
findByNameVnode
(
this
,
'DeeAsForm'
)
if
(
Object
.
keys
(
this
.
basicData
).
length
)
{
this
.
setData
(
this
.
form
.
sourceAo
)
}
},
methods
:
{
async
setData
(
value
)
{
let
data
=
value
// 处理串件单类型等于库房串件时 source1(source必填,source1非必填)的回显问题
if
(
this
.
itemObj
.
attrKey
.
includes
(
'targetAo'
)
&&
this
.
form
.
replaceDocType
===
'库房串件'
)
{
data
=
this
.
form
.
targetAo
}
if
(
data
)
{
await
this
.
getModelNo
(
data
.
serialNumber
)
this
.
selVal
=
JSON
.
stringify
(
data
)
}
},
async
getModelNo
(
query
)
{
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
200
,
'searchItems'
:
{
'operator'
:
'AND'
,
'items'
:
[{
'fieldName'
:
'serialNumber'
,
'operator'
:
'LIKE'
,
'value'
:
query
}]
},
'openProps'
:
[
{
'name'
:
'extUnit'
}
]
}
await
post
(
`/ExtProcessPlan/search`
,
params
)
.
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
code
===
0
)
{
this
.
requestOp
=
res
.
items
.
content
.
map
(
item
=>
{
return
{
label
:
item
.
serialNumber
,
value
:
JSON
.
stringify
(
item
)
}
})
}
})
},
changeEvent
(
value
)
{
this
.
$set
(
this
.
form
,
this
.
itemObj
.
key
,
value
)
},
remoteMethod
(
query
)
{
if
(
query
&&
query
.
length
>=
2
)
{
if
(
this
.
time
)
{
this
.
time
=
null
}
this
.
time
=
setTimeout
(()
=>
{
this
.
loading
=
true
this
.
getModelNo
(
query
)
},
500
)
}
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
</
style
>
applications/dee-mes/src/privateComponents/components/SerialPieceSorties/config.js
0 → 100644
View file @
74a014c3
export
default
{
props
:
{},
layoutConfigData
:
[
{
title
:
'高级组件配置'
,
data
:
[
{
title
:
'attrKey'
,
key
:
'attrKey'
,
component
:
{
name
:
'el-input'
,
placeholder
:
''
}
}
]
}
],
data
()
{
return
{
}
},
created
()
{
},
computed
:
{
},
methods
:
{
}
}
applications/dee-mes/src/privateComponents/components/SerialPieceSorties/index.vue
0 → 100644
View file @
74a014c3
<
template
>
<div>
<el-select
v-model=
"selVal"
:disabled=
"disabled"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,i) in requestOp"
:key=
"i"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</
template
>
<
script
>
import
{
get
,
post
}
from
'@/utils/http'
import
config
from
'./config'
export
default
{
componentName
:
'串件架次选择'
,
name
:
'SerialPieceSorties'
,
components
:
{},
mixins
:
[
config
],
props
:
{
value
:
{
type
:
String
,
default
:
''
},
basicData
:
{
type
:
Object
,
default
:
null
},
form
:
{
type
:
Object
,
default
:
null
},
itemObj
:
{
type
:
Object
,
default
:
null
},
componentProp
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
data
()
{
return
{
selVal
:
''
,
linkageValue
:
''
,
requestOp
:
[],
loading
:
false
,
com
:
null
}
},
computed
:
{
disabled
()
{
let
disabled
=
false
this
.
$utils
.
findByNameVnode
(
this
,
'DeeAsForm'
).
formData
.
forEach
(
item
=>
{
item
.
data
&&
item
.
data
.
forEach
(
x
=>
{
if
(
x
.
key
===
this
.
itemObj
.
attrKey
)
{
disabled
=
x
.
component
.
disabled
}
})
})
return
disabled
}
},
watch
:
{
'form.aircraftType'
:
function
(
val
)
{
this
.
getSortiesByCode
(
val
)
},
'form.extMaterial'
:
function
(
val
)
{
this
.
findCanReplaceSerno
(
val
.
id
,
this
.
selVal
)
},
selVal
(
val
)
{
this
.
$set
(
this
.
form
,
this
.
itemObj
.
key
,
val
)
let
obj
=
this
.
form
const
keyList
=
this
.
itemObj
.
key
.
split
(
'.'
)
keyList
.
forEach
((
item
,
i
)
=>
{
if
(
i
<
keyList
.
length
-
1
)
{
if
(
!
obj
[
item
])
{
obj
[
item
]
=
{}
this
.
$set
(
obj
,
item
,
{})
obj
=
obj
[
item
]
}
}
else
{
this
.
$set
(
obj
,
item
,
val
)
}
})
if
(
this
.
form
.
extMaterial
)
{
this
.
findCanReplaceSerno
(
this
.
form
.
extMaterial
.
id
,
val
)
}
}
},
// 生命周期 - 创建完成(可以访问当前this 实例)
created
()
{
},
// 生命周期 - 挂载之前
beforeMount
()
{
},
// 生命周期 - 挂载完成(可以访问 DOM 元素)
mounted
()
{
this
.
com
=
this
.
$utils
.
findByNameVnode
(
this
,
'DeeAsForm'
)
if
(
Object
.
keys
(
this
.
basicData
).
length
)
{
this
.
setData
(
this
.
form
.
aircraftType
)
}
},
methods
:
{
async
setData
(
value
)
{
await
this
.
getSortiesByCode
(
value
)
if
(
this
.
itemObj
.
key
.
includes
(
'source'
))
{
this
.
selVal
=
this
.
basicData
.
sourceSorties
}
else
{
this
.
selVal
=
this
.
basicData
.
targetSorties
}
},
async
getSortiesByCode
(
val
)
{
await
get
(
`/AircraftSorties/getSortiesByCode?aircraftType=
${
val
}
&aircraftTypeId=
${
val
}
`
)
.
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
code
===
0
)
{
this
.
requestOp
=
res
.
items
.
map
(
item
=>
{
return
{
label
:
item
.
defName
,
value
:
item
.
defCode
}
})
}
})
},
findCanReplaceSerno
(
materialId
,
sorties
)
{
if
(
materialId
&&
sorties
)
{
post
(
`/Inventory/findCanReplaceSerno?materialId=
${
materialId
}
&sorties=
${
sorties
}
`
)
.
then
(
res
=>
{
this
.
loading
=
false
if
(
res
.
code
===
0
)
{
const
keyList
=
Object
.
keys
(
res
.
items
)
let
attrKey
=
'sourceSerno'
if
(
this
.
itemObj
.
key
.
includes
(
'source'
))
{
this
.
form
.
sourceInventoryMap
=
res
.
items
}
else
{
this
.
form
.
targetInventoryMap
=
res
.
items
attrKey
=
'targetSerno'
}
let
options
=
[]
if
(
keyList
.
length
)
{
options
=
keyList
.
map
(
key
=>
{
return
{
label
:
key
,
value
:
key
}
})
}
else
{
if
(
this
.
itemObj
.
key
.
includes
(
'source'
))
{
this
.
$set
(
this
.
form
,
'sourceSerno'
,
''
)
this
.
$set
(
this
.
form
,
'sourceApprovalCert'
,
''
)
this
.
$set
(
this
.
form
,
'sourceProductDrawver'
,
''
)
this
.
$set
(
this
.
form
,
'sourceElecHardwareNo'
,
''
)
this
.
$set
(
this
.
form
,
'sourceSoftConfPieceNo'
,
''
)
}
else
{
this
.
$set
(
this
.
form
,
'targetSerno'
,
''
)
this
.
$set
(
this
.
form
,
'targetApprovalCert'
,
''
)
this
.
$set
(
this
.
form
,
'targetProductDrawver'
,
''
)
this
.
$set
(
this
.
form
,
'targetElecHardwareNo'
,
''
)
this
.
$set
(
this
.
form
,
'targetSoftConfPieceNo'
,
''
)
}
}
this
.
com
.
formData
.
forEach
(
item
=>
{
item
.
data
&&
item
.
data
.
forEach
(
x
=>
{
if
(
x
.
key
===
attrKey
)
{
this
.
$set
(
x
.
component
,
'options'
,
options
)
}
})
})
}
})
}
}
}
}
</
script
>
<
style
lang=
'scss'
scoped
>
</
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