Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
mes
mes-ui
Commits
646ea8d7
Commit
646ea8d7
authored
Jan 24, 2024
by
全洪江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户主数据上传给sap界面
parent
8faa183f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
376 additions
and
0 deletions
+376
-0
sapdata.js
src/api/mes/md/sapdata.js
+52
-0
index.vue
src/views/mes/md/sapdata/index.vue
+324
-0
No files found.
src/api/mes/md/sapdata.js
0 → 100644
View file @
646ea8d7
import
request
from
'@/utils/request'
// 查询客户SAP特性信息列表
export
function
listSapdata
(
query
)
{
return
request
({
url
:
'/md/sapPropertyData/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询客户SAP特性信息详细
export
function
getSapdata
(
id
)
{
return
request
({
url
:
'/md/sapPropertyData/'
+
id
,
method
:
'get'
})
}
// 新增客户SAP特性信息
export
function
addSapdata
(
data
)
{
return
request
({
url
:
'/md/sapPropertyData'
,
method
:
'post'
,
data
:
data
})
}
// 修改客户SAP特性信息
export
function
updateSapdata
(
data
)
{
return
request
({
url
:
'/md/sapPropertyData'
,
method
:
'put'
,
data
:
data
})
}
// 删除客户SAP特性信息
export
function
delSapdata
(
id
)
{
return
request
({
url
:
'/md/sapPropertyData/'
+
id
,
method
:
'delete'
})
}
//上传给sap
export
function
uploadSapdata
(
id
)
{
return
request
({
url
:
'/md/sapPropertyData/uploadSapdata/'
+
id
,
method
:
'get'
})
}
src/views/mes/md/sapdata/index.vue
0 → 100644
View file @
646ea8d7
<
template
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"类型ID"
prop=
"type"
>
<el-select
v-model=
"queryParams.type"
placeholder=
"请选择类型ID"
clearable
>
<el-option
label=
"请选择字典生成"
value=
""
/>
</el-select>
</el-form-item>
<el-form-item
label=
"关联ID"
prop=
"relationId"
>
<el-input
v-model=
"queryParams.relationId"
placeholder=
"请输入关联ID"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"是否上传过sap"
prop=
"uploadFlag"
>
<el-input
v-model=
"queryParams.uploadFlag"
placeholder=
"请输入是否上传过sap"
clearable
@
keyup
.
enter
.
native=
"handleQuery"
/>
</el-form-item>
<el-form-item
label=
"上传sap时间"
prop=
"uploadTime"
>
<el-date-picker
clearable
v-model=
"queryParams.uploadTime"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"请选择上传sap时间"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
size=
"mini"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['md:sapPropertyData:add']"-->
<!-- >新增
</el-button>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['md:sapPropertyData:edit']"-->
<!-- >修改
</el-button>
-->
<!--
</el-col>
-->
<!--
<el-col
:span=
"1.5"
>
-->
<!--
<el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['md:sapPropertyData:remove']"-->
<!-- >删除
</el-button>
-->
<!--
</el-col>
-->
<el-col
:span=
"1.5"
>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['md:sapPropertyData:export']"
>
导出
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-upload"
size=
"mini"
@
click=
"handleExport"
v-hasPermi=
"['md:sapPropertyData:export']"
>
上传
</el-button>
</el-col>
<right-toolbar
:showSearch
.
sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
</el-row>
<el-table
v-loading=
"loading"
:data=
"sapdataList"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
label=
"客户ID"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"类型ID"
align=
"center"
prop=
"type"
/>
<el-table-column
label=
"关联ID"
align=
"center"
prop=
"relationId"
/>
<!--
<el-table-column
label=
"客户SAP特性info"
align=
"center"
prop=
"sapData"
/>
-->
<el-table-column
label=
"是否上传过sap"
align=
"center"
prop=
"uploadFlag"
>
<template
slot-scope=
"scope"
>
<dict-tag
:options=
"dict.type.sys_yes_no"
:value=
"scope.row.uploadFlag"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"上传sap时间"
align=
"center"
prop=
"uploadTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
parseTime
(
scope
.
row
.
uploadTime
,
'{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
align
=
"center"
class
-
name
=
"small-padding fixed-width"
>
<
template
slot
-
scope
=
"scope"
>
<!--
<
el
-
button
-->
<!--
size
=
"mini"
-->
<!--
type
=
"text"
-->
<!--
icon
=
"el-icon-edit"
-->
<!--
@
click
=
"handleUpdate(scope.row)"
-->
<!--
v
-
hasPermi
=
"['md:sapPropertyData:edit']"
-->
<!--
>
修改
<
/el-button>--
>
<!--
<
el
-
button
-->
<!--
size
=
"mini"
-->
<!--
type
=
"text"
-->
<!--
icon
=
"el-icon-delete"
-->
<!--
@
click
=
"handleDelete(scope.row)"
-->
<!--
v
-
hasPermi
=
"['md:sapPropertyData:remove']"
-->
<!--
>
删除
<
/el-button>--
>
<
el
-
button
size
=
"mini"
type
=
"text"
icon
=
"el-icon-upload"
@
click
=
"handleUpload(scope.row)"
v
-
hasPermi
=
"['md:sapPropertyData:upload']"
>
上传
<
/el-button
>
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.pageNum"
:
limit
.
sync
=
"queryParams.pageSize"
@
pagination
=
"getList"
/>
<!--
添加或修改客户
SAP
特性信息对话框
-->
<!--
<
el
-
dialog
:
title
=
"title"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
>-->
<!--
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
label
-
width
=
"80px"
>-->
<!--
<
el
-
form
-
item
label
=
"类型ID"
prop
=
"type"
>-->
<!--
<
el
-
select
v
-
model
=
"form.type"
placeholder
=
"请选择类型ID"
>-->
<!--
<
el
-
option
label
=
"请选择字典生成"
value
=
""
/>-->
<!--
<
/el-select>--
>
<!--
<
/el-form-item>--
>
<!--
<
el
-
form
-
item
label
=
"关联ID"
prop
=
"relationId"
>-->
<!--
<
el
-
input
v
-
model
=
"form.relationId"
placeholder
=
"请输入关联ID"
/>-->
<!--
<
/el-form-item>--
>
<!--
<
el
-
form
-
item
label
=
"客户SAP特性info"
prop
=
"sapData"
>-->
<!--
<
el
-
input
v
-
model
=
"form.sapData"
type
=
"textarea"
placeholder
=
"请输入内容"
/>-->
<!--
<
/el-form-item>--
>
<!--
<
el
-
form
-
item
label
=
"是否上传过sap"
prop
=
"uploadFlag"
>-->
<!--
<
el
-
input
v
-
model
=
"form.uploadFlag"
placeholder
=
"请输入是否上传过sap"
/>-->
<!--
<
/el-form-item>--
>
<!--
<
el
-
form
-
item
label
=
"上传sap时间"
prop
=
"uploadTime"
>-->
<!--
<
el
-
date
-
picker
clearable
-->
<!--
v
-
model
=
"form.uploadTime"
-->
<!--
type
=
"date"
-->
<!--
value
-
format
=
"yyyy-MM-dd"
-->
<!--
placeholder
=
"请选择上传sap时间"
>-->
<!--
<
/el-date-picker>--
>
<!--
<
/el-form-item>--
>
<!--
<
/el-form>--
>
<!--
<
div
slot
=
"footer"
class
=
"dialog-footer"
>-->
<!--
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button>--
>
<!--
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button>--
>
<!--
<
/div>--
>
<!--
<
/el-dialog>--
>
<
/div
>
<
/template
>
<
script
>
import
{
listSapdata
,
getSapdata
,
delSapdata
,
addSapdata
,
updateSapdata
,
uploadSapdata
}
from
"@/api/mes/md/sapdata"
;
export
default
{
name
:
"Sapdata"
,
dicts
:[
'sys_yes_no'
],
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 选中数组
ids
:
[],
// 非单个禁用
single
:
true
,
// 非多个禁用
multiple
:
true
,
// 显示搜索条件
showSearch
:
true
,
// 总条数
total
:
0
,
// 客户SAP特性信息表格数据
sapdataList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
// 查询参数
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
type
:
null
,
relationId
:
null
,
sapData
:
null
,
uploadFlag
:
null
,
uploadTime
:
null
}
,
// 表单参数
form
:
{
}
,
// 表单校验
rules
:
{
}
}
;
}
,
created
()
{
this
.
getList
();
}
,
methods
:
{
/** 查询客户SAP特性信息列表 */
getList
()
{
this
.
loading
=
true
;
listSapdata
(
this
.
queryParams
).
then
(
response
=>
{
this
.
sapdataList
=
response
.
rows
;
this
.
total
=
response
.
total
;
this
.
loading
=
false
;
}
);
}
,
// 取消按钮
cancel
()
{
this
.
open
=
false
;
this
.
reset
();
}
,
// 表单重置
reset
()
{
this
.
form
=
{
id
:
null
,
type
:
null
,
relationId
:
null
,
sapData
:
null
,
createTime
:
null
,
updateTime
:
null
,
createBy
:
null
,
updateBy
:
null
,
uploadFlag
:
null
,
uploadTime
:
null
}
;
this
.
resetForm
(
"form"
);
}
,
/** 搜索按钮操作 */
handleQuery
()
{
this
.
queryParams
.
pageNum
=
1
;
this
.
getList
();
}
,
/** 重置按钮操作 */
resetQuery
()
{
this
.
resetForm
(
"queryForm"
);
this
.
handleQuery
();
}
,
// 多选框选中数据
handleSelectionChange
(
selection
)
{
this
.
ids
=
selection
.
map
(
item
=>
item
.
id
)
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
}
,
/** 新增按钮操作 */
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"添加客户SAP特性信息"
;
}
,
/** 修改按钮操作 */
handleUpdate
(
row
)
{
this
.
reset
();
const
id
=
row
.
id
||
this
.
ids
getSapdata
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改客户SAP特性信息"
;
}
);
}
,
/** 上传给sap操作 */
handleUpload
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认上传客户SAP特性信息编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
return
uploadSapdata
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"上传成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 提交按钮 */
submitForm
()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
this
.
form
.
id
!=
null
)
{
updateSapdata
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
else
{
addSapdata
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
this
.
open
=
false
;
this
.
getList
();
}
);
}
}
}
);
}
,
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认删除客户SAP特性信息编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
return
delSapdata
(
ids
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
}
).
catch
(()
=>
{
}
);
}
,
/** 导出按钮操作 */
handleExport
()
{
this
.
download
(
'md/sapdata/export'
,
{
...
this
.
queryParams
}
,
`sapdata_${new Date().getTime()
}
.xlsx`
)
}
}
}
;
<
/script
>
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