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
6d8dfbaa
Commit
6d8dfbaa
authored
Jul 12, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购入库导入
parent
ac181cc8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
270 additions
and
47 deletions
+270
-47
importFile.vue
...s/PurchasingWarehousingNewOrEdit/component/importFile.vue
+144
-0
storageDetailsCreateCom.vue
...arehousingNewOrEdit/component/storageDetailsCreateCom.vue
+8
-0
index.vue
...nents/components/PurchasingWarehousingNewOrEdit/index.vue
+118
-47
No files found.
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/component/importFile.vue
0 → 100644
View file @
6d8dfbaa
/**
* @Description: 采购入库导入
* @author xioln
* @date 2023-06-21
* @FilePath: applications/dee-mes/src/privateComponents/components/ProcurementWarehousingImport/index.vue
*/
<
template
>
<div
class=
"procurement-Warehousing-import"
>
<dee-dialog
:dialog-visible=
"dialogVisible"
title=
"导入"
width=
"40%"
>
<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
size=
"small"
style=
"width: 400px; text-align: right"
>
<i
class=
"fa fa-folder-open-o"
/>
</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
>
import
{
post
}
from
'@/utils/http'
export
default
{
componentName
:
'导入'
,
name
:
'ProcurementWarehousingImport'
,
// name写在组件的最前方,自定义组件为必填
components
:
{},
props
:
{
param
:
{
type
:
Object
,
required
:
true
}
// baseComInfo: {
// type: Object,
// default: () => { }
// }
},
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
if
(
this
.
param
.
id
)
{
this
.
upLoadExcel
(
this
.
param
.
id
)
}
else
{
post
(
'/InventoryRequest/batch/recursionAdd'
,
this
.
param
).
then
(
res
=>
{
if
(
res
.
items
.
id
)
{
this
.
upLoadExcel
(
res
.
items
.
id
)
}
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
})
}
},
// 上传excel
upLoadExcel
(
id
)
{
const
formData
=
new
FormData
()
formData
.
append
(
'file'
,
this
.
file
.
raw
)
this
.
$api
.
apiUploadFile
(
`/InStorageRequestItem/importByExcel?id=
${
id
}
`
,
formData
).
then
(
res
=>
{
// 调用接口
this
.
uploading
=
false
if
(
res
.
code
===
'0'
)
{
this
.
$message
.
success
(
res
.
message
)
this
.
close
()
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
}).
catch
(
err
=>
{
this
.
$message
.
error
(
err
)
})
}
}
}
</
script
>
<
style
lang=
'scss'
>
.procurement-Warehousing-import
{
.dialog-footer
{
float
:
right
;
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/component/storageDetailsCreateCom.vue
View file @
6d8dfbaa
...
...
@@ -163,6 +163,13 @@ export default {
trigger
:
[
'blur'
,
'change'
]
}
],
sorties
:
[
{
required
:
true
,
message
:
'请填写表单信息'
,
trigger
:
[
'blur'
,
'change'
]
}
],
serialNo
:
[
{
required
:
true
,
...
...
@@ -238,6 +245,7 @@ export default {
this
.
$set
(
this
.
form
,
'operator'
,
'ADD'
)
}
else
if
(
type
===
'ADD'
)
{
this
.
parentId
=
row
.
rowId
this
.
$set
(
this
.
form
,
'operator'
,
'ADD'
)
}
else
if
(
type
===
'MODIFY'
)
{
console
.
log
(
'row'
,
row
)
console
.
log
(
'this.basicData'
,
this
.
basicData
.
operator
)
...
...
applications/dee-mes/src/privateComponents/components/PurchasingWarehousingNewOrEdit/index.vue
View file @
6d8dfbaa
This diff is collapsed.
Click to expand it.
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