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
21006e58
Commit
21006e58
authored
Oct 25, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领用出库增加材料修改
parent
a0fe9316
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
303 additions
and
29 deletions
+303
-29
util.js
applications/architecture-dee/src/utils/util.js
+2
-1
index.vue
...rivateComponents/components/AddOutStorageUseCom/index.vue
+24
-24
AddOutStorageUseDetailDialog.vue
...ageUseDetails/components/AddOutStorageUseDetailDialog.vue
+3
-2
index.vue
...teComponents/components/AddOutStorageUseDetails/index.vue
+5
-2
index.vue
...-mes/src/privateComponents/components/CASSelect/index.vue
+135
-0
index.vue
.../privateComponents/components/ExtPositionSelect/index.vue
+134
-0
No files found.
applications/architecture-dee/src/utils/util.js
View file @
21006e58
...
@@ -18,7 +18,7 @@ import httpObj from './http'
...
@@ -18,7 +18,7 @@ import httpObj from './http'
import
_get
from
'lodash.get'
import
_get
from
'lodash.get'
import
_set
from
'lodash.set'
import
_set
from
'lodash.set'
import
router
from
'../router'
import
router
from
'../router'
import
{
downFileByFileId
,
downFileUseFileId
}
from
'../api/file'
import
{
downFileByFileId
}
from
'../api/file'
// 限制promise并发数量
// 限制promise并发数量
export
function
promiseLimit
(
func
,
funcParams
,
limit
=
5
)
{
export
function
promiseLimit
(
func
,
funcParams
,
limit
=
5
)
{
let
i
=
0
let
i
=
0
...
@@ -1567,6 +1567,7 @@ export function findForm(elem = this) {
...
@@ -1567,6 +1567,7 @@ export function findForm(elem = this) {
// 计算列表数据中某一项的和
// 计算列表数据中某一项的和
export function sumArray(array, key) {
export function sumArray(array, key) {
if (!array || !Array.isArray(array)) return
const baseNum = 1000 // 解决js计算精度丢失问题
const baseNum = 1000 // 解决js计算精度丢失问题
let sum = 0
let sum = 0
for (let i = 0; i < array.length; i++) {
for (let i = 0; i < array.length; i++) {
...
...
applications/dee-mes/src/privateComponents/components/AddOutStorageUseCom/index.vue
View file @
21006e58
...
@@ -23,13 +23,13 @@
...
@@ -23,13 +23,13 @@
model-name=
"OutStorageUse"
model-name=
"OutStorageUse"
:lay-config=
"cmpOptions"
:lay-config=
"cmpOptions"
:basic-data=
"
{...basicData,useRequestType:basicData.typeName||typeName}"
:basic-data=
"
{...basicData,useRequestType:basicData.typeName||typeName}"
@on-cancelCreate="cancelHandler"
/>
/>
<!-- @on-cancelCreate="cancelHandler" -->
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
post
}
from
'@/utils/http'
//
import { post } from '@/utils/http'
export
default
{
export
default
{
componentName
:
'领用出库申请新建'
,
componentName
:
'领用出库申请新建'
,
name
:
'AddOutStorageUseCom'
,
name
:
'AddOutStorageUseCom'
,
...
@@ -96,29 +96,29 @@ export default {
...
@@ -96,29 +96,29 @@ export default {
this
.
formData
=
Object
.
assign
({},
val
)
this
.
formData
=
Object
.
assign
({},
val
)
this
.
formData
.
typeName
=
this
.
typeName
this
.
formData
.
typeName
=
this
.
typeName
}
}
},
cancelHandler
(
val
)
{
this
.
$confirm
(
'此操作将解除已占用的操作, 是否继续?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
post
(
`OutStorageRequest/outStorageOut/delete?applyIds=
${
this
.
outStorageUseId
}
`
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'删除成功!'
})
this
.
$emit
(
'cancel'
)
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
message
:
'已取消删除'
})
})
}
}
// cancelHandler(val) {
// this.$confirm('此操作将解除已占用的操作, 是否继续?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// post(`OutStorageRequest/outStorageOut/delete?applyIds=${this.outStorageUseId}`).then(res => {
// this.$message({
// type: 'success',
// message: '删除成功!'
// })
// this.$emit('cancel')
// }).catch((err) => {
// console.log(err)
// })
// }).catch(() => {
// this.$message({
// type: 'info',
// message: '已取消删除'
// })
// })
// }
}
}
}
}
</
script
>
</
script
>
...
...
applications/dee-mes/src/privateComponents/components/AddOutStorageUseDetails/components/AddOutStorageUseDetailDialog.vue
View file @
21006e58
...
@@ -73,6 +73,7 @@ export default {
...
@@ -73,6 +73,7 @@ export default {
switch
(
val
)
{
switch
(
val
)
{
case
'useAO'
:
case
'useAO'
:
case
'noAO'
:
case
'noAO'
:
case
'materialUse'
:
this
.
amountItemLabel
=
'申领数量'
this
.
amountItemLabel
=
'申领数量'
break
break
case
'swapUse'
:
case
'swapUse'
:
...
@@ -97,8 +98,8 @@ export default {
...
@@ -97,8 +98,8 @@ export default {
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
this
.
$refs
[
'applyForm'
].
validate
((
valid
)
=>
{
if
(
valid
&&
this
.
selection
)
{
if
(
valid
&&
this
.
selection
)
{
const
typeName
=
this
.
basicData
.
useRequestType
const
typeName
=
this
.
basicData
.
useRequestType
const
maxAmount
=
typeName
===
'scrapUse'
?
this
.
selection
.
reqAmountOri
:
this
.
selection
.
unableAmount
const
maxAmount
=
typeName
===
'scrapUse'
?
this
.
selection
.
reqAmountOri
:
t
ypeName
===
'materialUse'
?
Math
.
min
(
this
.
selection
.
unableAmount
,
this
.
selection
.
applyAmount
)
:
t
his
.
selection
.
unableAmount
const
maxWarning
=
typeName
===
'scrapUse'
?
'出库数量'
:
'可用数量'
const
maxWarning
=
typeName
===
'scrapUse'
?
'出库数量'
:
typeName
===
'materialUse'
?
'可用数量及可申领数量'
:
'可用数量'
if
(
this
.
applyForm
.
reqAmount
>
maxAmount
)
return
this
.
$utils
.
showMessageWarning
(
`申领数量不能大于当前选中物料的
${
maxWarning
}
!`
)
if
(
this
.
applyForm
.
reqAmount
>
maxAmount
)
return
this
.
$utils
.
showMessageWarning
(
`申领数量不能大于当前选中物料的
${
maxWarning
}
!`
)
const
data
=
[{
const
data
=
[{
'subTypeName'
:
'OutStorageUseItem'
,
'subTypeName'
:
'OutStorageUseItem'
,
...
...
applications/dee-mes/src/privateComponents/components/AddOutStorageUseDetails/index.vue
View file @
21006e58
...
@@ -255,9 +255,12 @@ export default {
...
@@ -255,9 +255,12 @@ export default {
const
param
=
{
const
param
=
{
...
form
,
...
form
,
typeName
:
typeName
,
// 领用类型
typeName
:
typeName
,
// 领用类型
inStorageRequestItems
:
this
.
selectionRows
,
inStorageRequestItems
:
this
.
selectionRows
.
map
(
row
=>
{
row
.
operator
=
row
.
id
?
'MODIFY'
:
'ADD'
return
row
}),
subTypeName
:
'OutStorageUse'
,
subTypeName
:
'OutStorageUse'
,
operator
:
'ADD'
operator
:
this
.
form
.
id
?
'MODIFY'
:
'ADD'
}
}
post
(
'/OutStorageRequest/outStorageUse/saveAndTake'
,
param
).
then
(
res
=>
{
post
(
'/OutStorageRequest/outStorageUse/saveAndTake'
,
param
).
then
(
res
=>
{
this
.
$bus
.
$emit
(
'getApplyId'
,
res
.
items
.
id
)
this
.
$bus
.
$emit
(
'getApplyId'
,
res
.
items
.
id
)
...
...
applications/dee-mes/src/privateComponents/components/CASSelect/index.vue
0 → 100644
View file @
21006e58
<
template
>
<div
class=
"CASSelect"
>
<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
:
'CASSelect'
,
componentName
:
'CAS号'
,
props
:
{
value
:
{
type
:
[
String
,
Number
],
default
:
''
},
basicData
:
{
type
:
Object
,
default
:
()
=>
({})
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
loading
:
false
,
options
:
[],
remoteFlag
:
true
}
},
computed
:
{},
watch
:
{},
methods
:
{
remoteMethod
(
query
,
id
)
{
if
(
!
this
.
basicData
||
!
this
.
basicData
.
sorties
)
return
this
.
$utils
.
showMessageWarning
(
'请选择架次后查询!'
)
if
((
!
query
||
query
.
length
<
3
)
&&
!
id
)
return
if
(
this
.
remoteFlag
)
{
this
.
remoteFlag
=
false
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
10
,
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'serialNumber'
,
'operator'
:
'LIKE'
,
'value'
:
query
||
''
},
{
'fieldName'
:
'sorties'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
basicData
.
sorties
.
split
(
'+'
)[
1
]
||
''
},
{
'fieldName'
:
'planeType'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
basicData
.
aircraftType
.
split
(
'+'
)[
1
]
||
''
},
{
'fieldName'
:
'positionNumber'
,
'operator'
:
'EQ'
,
'value'
:
this
.
basicData
.
aoNo
||
''
// 站位编号
},
{
'fieldName'
:
'subTypeName'
,
'operator'
:
'EQ'
,
'value'
:
'ExtCas'
}
]
},
'openProps'
:
[]
}
if
(
id
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
id
})
}
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
.
id
}
})
}
else
{
this
.
options
=
[]
}
})
.
catch
((
err
)
=>
console
.
log
(
err
))
.
finally
(()
=>
{
this
.
loading
=
false
this
.
remoteFlag
=
true
})
}
else
{
this
.
$utils
.
showMessageWarning
(
'上一步请求正在查询中,请稍后'
)
}
},
change
(
val
)
{
this
.
$emit
(
'input'
,
val
)
},
clear
()
{
this
.
$emit
(
'input'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
</
style
>
applications/dee-mes/src/privateComponents/components/ExtPositionSelect/index.vue
0 → 100644
View file @
21006e58
<
template
>
<div
class=
"ExtPositionSelect"
>
<el-select
:value=
"value"
:loading=
"loading"
filterable
clearable
: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
:
'ExtPositionSelect'
,
componentName
:
'站位选择(按材料)'
,
props
:
{
value
:
{
type
:
[
String
,
Number
],
default
:
''
},
basicData
:
{
type
:
Object
,
default
:
()
=>
({})
},
form
:
{
type
:
Object
,
default
:
()
=>
({
sorties
:
''
})
},
disabled
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
loading
:
false
,
options
:
[],
remoteFlag
:
true
}
},
computed
:
{},
watch
:
{
'form.sorties'
:
{
handler
(
val
)
{
if
(
!
this
.
basicData
.
id
)
{
this
.
$set
(
this
.
form
,
'aoNo'
,
''
)
val
&&
this
.
form
.
aircraftType
&&
this
.
getOptions
()
}
}
},
value
:
{
handler
(
val
)
{
if
(
this
.
basicData
.
id
&&
val
&&
Number
(
val
))
{
this
.
getOptions
(
Number
(
val
))
}
}
}
},
methods
:
{
getOptions
(
id
)
{
if
(
!
this
.
form
||
!
this
.
form
.
sorties
||
!
this
.
form
.
aircraftType
)
return
this
.
$utils
.
showMessageWarning
(
'请选择机型及架次后查询!'
)
this
.
tableColumnSelect
=
true
const
params
=
{
'pageFrom'
:
1
,
'pageSize'
:
9999
,
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'aircraftSorties.aircraftType.defName'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
form
.
aircraftType
.
split
(
'+'
)[
1
]
||
''
},
{
'fieldName'
:
'aircraftSorties.defName'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
form
.
sorties
.
split
(
'+'
)[
1
]
||
''
}
]
},
'openProps'
:
[]
}
if
(
id
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'id'
,
'operator'
:
'EQ'
,
'value'
:
id
})
}
this
.
loading
=
true
this
.
options
=
[]
this
.
$api
.
searchApi
(
'ExtPosition'
,
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
.
options
=
[]
}
})
.
catch
((
err
)
=>
console
.
log
(
err
))
.
finally
(()
=>
{
this
.
loading
=
false
this
.
remoteFlag
=
true
this
.
tableColumnSelect
=
false
})
},
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