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
03d00146
Commit
03d00146
authored
Nov 30, 2023
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
无指令领用及供外出库批量导入联调
parent
4fcb3dd1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
196 additions
and
6 deletions
+196
-6
出库明细导入模板.xlsx
applications/architecture-dee/public/出库明细导入模板.xlsx
+0
-0
importFile.vue
applications/dee-mes/src/components/importFile.vue
+122
-0
index.vue
...rivateComponents/components/AddOutStorageUseCom/index.vue
+2
-2
index.vue
...teComponents/components/AddOutStorageUseDetails/index.vue
+30
-2
index.vue
...vateComponents/components/OutStorageOfferDetail/index.vue
+42
-2
No files found.
applications/architecture-dee/public/出库明细导入模板.xlsx
0 → 100644
View file @
03d00146
File added
applications/dee-mes/src/components/importFile.vue
0 → 100644
View file @
03d00146
<
template
>
<div
class=
"OutStorageDetailImport"
>
<dee-dialog
:visible=
"dialogVisible"
title=
"导入"
width=
"40%"
@
handleClose=
"close"
>
<el-form
ref=
"fileForm"
label-width=
"100px"
>
<el-form-item
label=
"选择文件"
>
<el-upload
ref=
"upload"
class=
"upload-demo"
accept=
".xlsx, .xlsm, .xls"
:auto-upload=
"false"
action=
"#"
:limit=
"1"
:file-list=
"fileList"
:on-change=
"handleChange"
:on-exceed=
"handleExceed"
:on-remove=
"handleRemove"
>
<el-button
type=
"primary"
size=
"small"
style=
"width: 400px; text-align: center"
>
选择待上传文件
</el-button>
</el-upload>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
:disabled=
"uploading"
@
click=
"handleImportExcel"
>
确定导入
</el-button>
</div>
</dee-dialog>
</div>
</
template
>
<
script
>
export
default
{
componentName
:
'导入'
,
name
:
'OutStorageDetailImport'
,
// name写在组件的最前方,自定义组件为必填
components
:
{},
props
:
{
param
:
{
type
:
Object
,
required
:
true
}
},
data
()
{
return
{
dialogVisible
:
false
,
fileList
:
[],
// 文件列表
file
:
{},
uploading
:
true
// 默认置灰确定导入按钮
}
},
computed
:
{},
created
()
{
// 初始化数据
},
mounted
()
{
this
.
$nextTick
(()
=>
{
// this.handleExcel()
})
},
methods
:
{
open
()
{
this
.
dialogVisible
=
true
},
close
()
{
this
.
dialogVisible
=
false
},
// 文件状态改变触发
handleChange
(
file
)
{
// (file,fileList)参数
this
.
uploading
=
false
this
.
file
=
file
},
// 文件超出个数限制
handleExceed
()
{
this
.
$message
.
warning
(
'仅允许上传一个文件!'
)
},
// 移除文件
handleRemove
()
{
this
.
uploading
=
true
},
// 导入excel
handleImportExcel
()
{
if
(
!
this
.
file
.
size
)
{
this
.
$message
.
warning
(
'请选择上传的文件'
)
return
}
this
.
uploading
=
true
this
.
upLoadExcel
()
},
// 上传excel
upLoadExcel
()
{
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
this
.
file
.
raw
)
formData
.
append
(
'outStorageRequest'
,
new
Blob
([
JSON
.
stringify
(
this
.
param
)],
{
type
:
'application/json'
}))
this
.
$api
.
apiUploadFile
(
`/InStorageRequestItem/item/importByExcel`
,
formData
).
then
(
res
=>
{
// 调用接口
this
.
uploading
=
false
this
.
$utils
.
showMessageSuccess
(
res
.
data
.
message
)
const
outStorageRequest
=
res
.
data
.
items
outStorageRequest
&&
this
.
$emit
(
'refreshTable'
,
outStorageRequest
)
this
.
close
()
}).
catch
(
err
=>
{
this
.
uploading
=
false
console
.
log
(
'err'
,
err
)
})
}
}
}
</
script
>
<
style
lang=
'scss'
>
.OutStorageDetailImport
{
.dialog-footer
{
margin-right
:
25px
;
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/AddOutStorageUseCom/index.vue
View file @
03d00146
...
...
@@ -8,7 +8,7 @@
<div
class=
"sub-title"
>
领用类型
</div>
<div
class=
"useType"
>
<span
class=
"typeName"
>
领用类型:
</span>
<el-select
v-model=
"typeName"
style=
"width: 200px;"
:disabled=
"!!basicData.id"
placeholder=
"请选择"
size=
"mini"
>
<el-select
v-model=
"typeName"
style=
"width: 200px;"
:disabled=
"!!basicData.id
|| !!outStorageUseId
"
placeholder=
"请选择"
size=
"mini"
>
<el-option
v-for=
"item in options"
:key=
"item.value"
...
...
@@ -59,7 +59,7 @@ export default {
typeName
:
'OutStorageUse'
,
layKey
:
'outStorageUseApplyAdd_useAO'
},
outStorageUseId
:
[]
// 取消使解除占用操作需要
outStorageUseId
:
''
//
}
},
computed
:
{},
...
...
applications/dee-mes/src/privateComponents/components/AddOutStorageUseDetails/index.vue
View file @
03d00146
...
...
@@ -33,17 +33,19 @@
@cancel="dialogShow = false"
/>
</dee-dialog>
<import-file
ref=
"importFile"
:param=
"basicForm"
@
refreshTable=
"refreshTable"
/>
</div>
</
template
>
<
script
>
import
AddOutStorageUseDetailDialog
from
'./components/AddOutStorageUseDetailDialog'
import
AdjustOccupyCom
from
'../adjustOccupyCom'
import
ImportFile
from
'@/components/importFile'
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'领用出库明细'
,
name
:
'AddOutStorageUseDetail'
,
components
:
{
AddOutStorageUseDetailDialog
,
AdjustOccupyCom
},
components
:
{
AddOutStorageUseDetailDialog
,
AdjustOccupyCom
,
ImportFile
},
provide
()
{
// 用于报废领用申领数量编辑校验
return
{
parentType_Inject
:
this
.
basicData
&&
this
.
basicData
.
useRequestType
||
''
...
...
@@ -95,7 +97,8 @@ export default {
cmpOptions
:
{
typeName
:
'OutStorageUseItem'
,
layKey
:
'add_outStorageUseItem_useAO'
}
},
basicForm
:
{}
}
},
computed
:
{
...
...
@@ -160,6 +163,9 @@ export default {
case
'remove'
:
this
.
remove
()
break
case
'import'
:
this
.
importHandle
()
break
default
:
break
}
...
...
@@ -337,6 +343,28 @@ export default {
})
})
},
importHandle
()
{
this
.
$utils
.
findForm
(
this
).
validate
((
isok
)
=>
{
if
(
isok
)
{
// 校验通过
this
.
basicForm
=
{
...
this
.
form
,
aircraftType
:
this
.
form
.
aircraftType
.
split
(
'+'
)[
1
],
sorties
:
this
.
form
.
sorties
.
split
(
'+'
)[
1
],
subTypeName
:
'OutStorageUse'
,
typeName
:
this
.
basicData
.
useRequestType
}
this
.
$refs
.
importFile
.
open
()
}
else
{
this
.
$utils
.
showMessageWarning
(
'请填写基本信息!'
)
}
})
},
refreshTable
(
res
)
{
this
.
$set
(
this
.
form
,
'id'
,
res
.
id
)
this
.
getDetailsData
(
res
.
id
)
this
.
$bus
.
$emit
(
'getApplyId'
,
res
.
id
)
},
submitEvent
({
formData
,
addContinue
})
{
const
extMaterialIds
=
this
.
tableData
.
map
(
item
=>
item
.
extMaterialId
).
includes
(
formData
[
0
].
extMaterialId
)
if
(
extMaterialIds
)
return
this
.
$utils
.
showMessageWarning
(
'相同物料不能重复添加,请重新选择!'
)
...
...
applications/dee-mes/src/privateComponents/components/OutStorageOfferDetail/index.vue
View file @
03d00146
...
...
@@ -28,17 +28,19 @@
:lay-config=
"
{ typeName: 'JobResponseOutStorageOut', layKey: 'table' }"
/>
</dee-dialog>
<import-file
ref=
"importFile"
:param=
"basicForm"
@
refreshTable=
"refreshTable"
/>
</div>
</
template
>
<
script
>
import
AddOutStorageOfferDetailDialog
from
'./components/addOutStorageOfferDetailDialog'
import
OutStorageOfferAdjustOccupy
from
'./components/outStorageOfferAdjustOccupy'
import
ImportFile
from
'@/components/importFile'
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'供外出库申请明细'
,
name
:
'OutStorageOfferDetail'
,
components
:
{
AddOutStorageOfferDetailDialog
,
OutStorageOfferAdjustOccupy
},
components
:
{
AddOutStorageOfferDetailDialog
,
OutStorageOfferAdjustOccupy
,
ImportFile
},
props
:
{
form
:
{
type
:
Object
,
...
...
@@ -52,6 +54,7 @@ export default {
data
()
{
return
{
dialogVisible
:
false
,
basicForm
:
{},
tableColumns
:
[
{
title
:
'物料编码'
,
key
:
'extMaterial.resCode'
,
align
:
'center'
},
{
title
:
'物料名称'
,
key
:
'extMaterial.resName'
,
align
:
'center'
},
...
...
@@ -162,7 +165,39 @@ export default {
this
.
remove
()
}
}
}],
},
{
name
:
'导入'
,
icon
:
'/icons/c-import.png'
,
handler
:
{
click
:
()
=>
{
this
.
$utils
.
findForm
(
this
).
validate
((
isok
)
=>
{
if
(
isok
)
{
// 校验通过
this
.
basicForm
=
{
...
this
.
form
,
aircraftType
:
this
.
form
.
aircraftType
.
split
(
'+'
)[
1
],
sorties
:
this
.
form
.
sorties
.
split
(
'+'
)[
1
],
subTypeName
:
'OutStorageOut'
}
this
.
$refs
.
importFile
.
open
()
}
else
{
this
.
$utils
.
showMessageWarning
(
'请填写基本信息!'
)
}
})
}
}
},
{
name
:
'模板下载'
,
icon
:
'/icons/c-down.png'
,
handler
:
{
click
:
()
=>
{
this
.
$utils
.
downLoadFileUrl
(
'/出库明细导入模板.xlsx'
,
'出库明细导入模板'
)
}
}
}
],
param
:
{},
aoDialogVisible
:
false
,
selectTableData
:
[],
...
...
@@ -239,6 +274,7 @@ export default {
post
(
'OutStorageRequest/outStorageOut/saveAndTake'
,
param
).
then
(
res
=>
{
this
.
$utils
.
findForm
(
this
).
applyId
=
res
.
items
.
id
this
.
applyId
=
res
.
items
.
id
this
.
$set
(
this
.
form
,
'id'
,
res
.
items
.
id
)
this
.
$utils
.
showMessageSuccess
(
'占用成功!'
)
const
data
=
res
.
items
.
inStorageRequestItems
const
tableData
=
[...
this
.
tableData
]
...
...
@@ -347,6 +383,10 @@ export default {
console
.
log
(
err
)
})
},
refreshTable
(
res
)
{
this
.
$set
(
this
.
form
,
'id'
,
res
.
id
)
this
.
getEditData
(
res
.
id
)
},
sumArray
(
array
,
key
)
{
let
sum
=
0
for
(
let
i
=
0
;
i
<
array
.
length
;
i
++
)
{
...
...
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