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
97e23d4a
Commit
97e23d4a
authored
Jan 25, 2024
by
全洪江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap同步页面优化
parent
ce4406c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
69 deletions
+91
-69
index.vue
src/views/mes/md/sapdata/index.vue
+91
-69
No files found.
src/views/mes/md/sapdata/index.vue
View file @
97e23d4a
<
template
>
<
template
>
<div
class=
"app-container"
>
<div
class=
"app-container"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"
类型ID
"
prop=
"type"
>
<el-form-item
label=
"
特性类型
"
prop=
"type"
>
<el-select
v-model=
"queryParams.type"
placeholder=
"请选择
类型ID"
clearable
>
<el-select
v-model=
"queryParams.type"
placeholder=
"请选择
特新类型"
clearable
>
<el-option
label=
"请选择字典生成"
value=
""
/>
<el-option
v-for=
"item in dict.type.sap_property_type"
:key=
"item.value"
v-bind=
"item"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"关联ID"
prop=
"relationId"
>
<el-form-item
label=
"关联ID"
prop=
"relationId"
>
...
@@ -14,15 +14,23 @@
...
@@ -14,15 +14,23 @@
@
keyup
.
enter
.
native=
"handleQuery"
@
keyup
.
enter
.
native=
"handleQuery"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否上传过sap"
prop=
"uploadFlag"
>
<el-form-item
label=
"是否上传过sap"
prop=
"uploadFlag"
label-width=
"9em"
>
<el-input
<!--
<el-input-->
v-model=
"queryParams.uploadFlag"
<!-- v-model="queryParams.uploadFlag"-->
placeholder=
"请输入是否上传过sap"
<!-- placeholder="请输入是否上传过sap"-->
clearable
<!-- clearable-->
@
keyup
.
enter
.
native=
"handleQuery"
<!-- @keyup.enter.native="handleQuery"-->
/>
<!-- />-->
<el-select
v-model=
"queryParams.uploadFlag"
placeholder=
"请选择是否"
clearable
>
<el-option
v-for=
"dict in dict.type.sys_yes_no"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"上传sap时间"
prop=
"uploadTime"
>
<el-form-item
label=
"上传sap时间"
prop=
"uploadTime"
label-width=
"8em"
>
<el-date-picker
clearable
<el-date-picker
clearable
v-model=
"queryParams.uploadTime"
v-model=
"queryParams.uploadTime"
type=
"date"
type=
"date"
...
@@ -93,10 +101,10 @@
...
@@ -93,10 +101,10 @@
</el-row>
</el-row>
<el-table
v-loading=
"loading"
:data=
"sapdataList"
@
selection-change=
"handleSelectionChange"
>
<el-table
v-loading=
"loading"
:data=
"sapdataList"
@
selection-change=
"handleSelectionChange"
>
<!--
<el-table-column
type=
"selection"
width=
"55"
/>
-->
<el-table-column
label=
"
客户ID
"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"
id
"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"
类型ID"
align=
"center"
prop=
"type"
/>
<el-table-column
label=
"
特性类型"
align=
"center"
prop=
"type"
:formatter=
"formatType"
/>
<el-table-column
label=
"
关联ID
"
align=
"center"
prop=
"relationId"
/>
<el-table-column
label=
"
相关id
"
align=
"center"
prop=
"relationId"
/>
<!--
<el-table-column
label=
"客户SAP特性info"
align=
"center"
prop=
"sapData"
/>
-->
<!--
<el-table-column
label=
"客户SAP特性info"
align=
"center"
prop=
"sapData"
/>
-->
<el-table-column
label=
"是否上传过sap"
align=
"center"
prop=
"uploadFlag"
>
<el-table-column
label=
"是否上传过sap"
align=
"center"
prop=
"uploadFlag"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -182,7 +190,7 @@ import { listSapdata, getSapdata, delSapdata, addSapdata, updateSapdata,uploadSa
...
@@ -182,7 +190,7 @@ import { listSapdata, getSapdata, delSapdata, addSapdata, updateSapdata,uploadSa
export
default
{
export
default
{
name
:
"Sapdata"
,
name
:
"Sapdata"
,
dicts
:[
'sys_yes_no'
],
dicts
:[
'sys_yes_no'
,
'sap_property_type'
],
data
()
{
data
()
{
return
{
return
{
// 遮罩层
// 遮罩层
...
@@ -219,6 +227,10 @@ export default {
...
@@ -219,6 +227,10 @@ export default {
this
.
getList
();
this
.
getList
();
}
,
}
,
methods
:
{
methods
:
{
formatType
(
row
)
{
let
item
=
this
.
dict
.
type
.
sap_property_type
.
find
(
item
=>
item
.
value
==
row
.
type
)
return
item
?
item
.
label
:
''
}
,
/** 查询客户SAP特性信息列表 */
/** 查询客户SAP特性信息列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
@@ -255,64 +267,74 @@ export default {
...
@@ -255,64 +267,74 @@ export default {
this
.
single
=
selection
.
length
!==
1
this
.
single
=
selection
.
length
!==
1
this
.
multiple
=
!
selection
.
length
this
.
multiple
=
!
selection
.
length
}
,
}
,
/** 新增按钮操作 */
/
/ /
** 新增按钮操作 */
handleAdd
()
{
//
handleAdd()
{
this
.
reset
();
//
this.reset();
this
.
open
=
true
;
//
this.open = true;
this
.
title
=
"添加客户SAP特性信息"
;
//
this.title = "添加客户SAP特性信息";
}
,
//
}
,
/** 修改按钮操作 */
/
/ /
** 修改按钮操作 */
handleUpdate
(
row
)
{
//
handleUpdate(row)
{
this
.
reset
();
//
this.reset();
const
id
=
row
.
id
||
this
.
ids
//
const id = row.id || this.ids
getSapdata
(
id
).
then
(
response
=>
{
//
getSapdata(id).then(response =>
{
this
.
form
=
response
.
data
;
//
this.form = response.data;
this
.
open
=
true
;
//
this.open = true;
this
.
title
=
"修改客户SAP特性信息"
;
//
this.title = "修改客户SAP特性信息";
}
);
//
}
);
}
,
//
}
,
/** 上传给sap操作 */
/** 上传给sap操作 */
handleUpload
(
row
)
{
handleUpload
(
row
)
{
const
type
=
row
.
type
;
const
ids
=
row
.
id
||
this
.
ids
;
const
ids
=
row
.
id
||
this
.
ids
;
this
.
$modal
.
confirm
(
'是否确认上传客户SAP特性信息编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
return
uploadSapdata
(
ids
);
switch
(
type
)
{
}
).
then
(()
=>
{
case
'1'
:
this
.
getList
();
this
.
$modal
.
confirm
(
'是否确认上传客户SAP特性信息编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
this
.
$modal
.
msgSuccess
(
"上传成功"
);
return
uploadSapdata
(
ids
);
}
).
catch
(()
=>
{
}
);
}
).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"上传成功"
);
}
).
catch
(()
=>
{
}
);
case
'2'
:
case
'3'
:
case
'4'
:
case
'5'
:
}
}
,
}
,
/** 提交按钮 */
/
/ /
** 提交按钮 */
submitForm
()
{
//
submitForm()
{
this
.
$refs
[
"form"
].
validate
(
valid
=>
{
//
this.$refs["form"].validate(valid =>
{
if
(
valid
)
{
//
if (valid)
{
if
(
this
.
form
.
id
!=
null
)
{
//
if (this.form.id != null)
{
updateSapdata
(
this
.
form
).
then
(
response
=>
{
//
updateSapdata(this.form).then(response =>
{
this
.
$modal
.
msgSuccess
(
"修改成功"
);
//
this.$modal.msgSuccess("修改成功");
this
.
open
=
false
;
//
this.open = false;
this
.
getList
();
//
this.getList();
}
);
//
}
);
}
else
{
//
}
else
{
addSapdata
(
this
.
form
).
then
(
response
=>
{
//
addSapdata(this.form).then(response =>
{
this
.
$modal
.
msgSuccess
(
"新增成功"
);
//
this.$modal.msgSuccess("新增成功");
this
.
open
=
false
;
//
this.open = false;
this
.
getList
();
//
this.getList();
}
);
//
}
);
}
//
}
}
//
}
}
);
//
}
);
}
,
//
}
,
/** 删除按钮操作 */
/
/ /
** 删除按钮操作 */
handleDelete
(
row
)
{
//
handleDelete(row)
{
const
ids
=
row
.
id
||
this
.
ids
;
//
const ids = row.id || this.ids;
this
.
$modal
.
confirm
(
'是否确认删除客户SAP特性信息编号为"'
+
ids
+
'"的数据项?'
).
then
(
function
()
{
//
this.$modal.confirm('是否确认删除客户SAP特性信息编号为"' + ids + '"的数据项?').then(function()
{
return
delSapdata
(
ids
);
//
return delSapdata(ids);
}
).
then
(()
=>
{
//
}
).
then
(()
=>
{
this
.
getList
();
//
this.getList();
this
.
$modal
.
msgSuccess
(
"删除成功"
);
//
this.$modal.msgSuccess("删除成功");
}
).
catch
(()
=>
{
}
);
//
}
).
catch
(()
=>
{
}
);
}
,
//
}
,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
this
.
download
(
'md/sapdata/export'
,
{
this
.
download
(
'md/sapdata/export'
,
{
...
...
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