Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
4a7bb71a
Commit
4a7bb71a
authored
Feb 19, 2019
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改少价管理
parent
5a364a6f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
150 additions
and
112 deletions
+150
-112
LessPriceManagement.vue
src/components/systemManagement/LessPriceManagement.vue
+150
-112
No files found.
src/components/systemManagement/LessPriceManagement.vue
View file @
4a7bb71a
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
border-left
:
1px
solid
#d1d1d1
;
border-left
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
font-size
:
14px
;
font-size
:
14px
;
/* width:100%; */
width
:
100%
;
min-width
:
5752
px
;
min-width
:
1500
px
;
padding-bottom
:
5px
;
padding-bottom
:
5px
;
}
}
...
@@ -24,29 +24,12 @@
...
@@ -24,29 +24,12 @@
border-right
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
position
:
relative
;
position
:
relative
;
background-color
:
#E6E6E6
;
background-color
:
#E6E6E6
;
width
:
250px
;
}
}
th
[
class
=
first
]
:before
{
content
:
""
;
position
:
absolute
;
width
:
1px
;
height
:
252px
;
/*这里需要自己调整,根据td的宽度和高度*/
top
:
0
;
left
:
0
;
background-color
:
#d1d1d1
;
display
:
block
;
transform
:
rotate
(
-81deg
);
/*这里需要自己调整,根据线的位置*/
transform-origin
:
top
;
}
.LP_table
td
{
.LP_table
td
{
border-bottom
:
1px
solid
#d1d1d1
;
border-bottom
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
text-align
:
center
;
text-align
:
center
;
padding
:
5px
;
padding
:
5px
0
;
min-width
:
250px
;
}
}
.LP_table
.el-button--primary
{
.LP_table
.el-button--primary
{
...
@@ -64,51 +47,89 @@
...
@@ -64,51 +47,89 @@
right
:
30px
;
right
:
30px
;
top
:
5px
;
top
:
5px
;
}
}
.comLessDiv
{
width
:
100%
;
height
:
40px
;
margin-top
:
5px
;
padding-bottom
:
5px
;
border-bottom
:
1px
solid
#d1d1d1
;
}
.comLessDiv
:last-child
{
border
:
0
;
padding-bottom
:
0
;
}
.addLessPrice
{
margin-left
:
10px
;
color
:
seagreen
;
cursor
:
pointer
;
}
.lessBtn
{
margin-top
:
5px
;
}
</
style
>
</
style
>
<
template
>
<
template
>
<div>
<div>
<div
class=
"query-box"
>
<ul>
<li>
<input
type=
'button'
class=
"normalBtn"
@
click=
"AddItem()"
value=
"新增"
></input>
</li>
</ul>
</div>
<div
class=
"LM_mainDiv"
>
<div
class=
"LM_mainDiv"
>
<!--保存-->
<!--保存-->
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"LP_table"
v-loading=
"this.loading"
>
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"LP_table"
v-loading=
"this.loading"
>
<tr>
<tr>
<th
class=
"first"
>
<th
width=
"200"
>
公司
</th>
<span
class=
"Lp_role"
>
岗位
</span>
<th
width=
"400"
>
线路/系列
</th>
<span
class=
"Lp_company"
>
公司
</span>
<th>
所有人
</th>
</th>
<th>
部门主管
</th>
<template
v-for=
"item in BranchList"
>
<th>
分公司总经理
</th>
<th>
<th>
当团op
</th>
{{
item
.
BName
}}
<th
width=
"200"
>
操作
</th>
</th>
</
template
>
<th>
操作
</th>
</tr>
</tr>
<tr
v-for=
"(item,index) in PageData"
>
<tr
v-for=
"(item,index) in dataList"
>
<td>
{{
item
.
BName
}}
<i
class=
"iconfont icon-bumenguanli-tianjia addLessPrice"
@
click=
"addLessPrice(item)"
></i>
</td>
<td>
<div
v-for=
"subItem in item.LessPriceList"
class=
"comLessDiv"
>
<el-select
class=
'w150'
v-model=
"subItem.LineId"
filterable
:placeholder=
"$t('pub.pleaseSel')"
@
change=
"getLineTeamList(subItem)"
>
<el-option
label=
"不限"
:value=
'commonSelect'
></el-option>
<el-option
v-for=
"item in LineList"
:label=
'item.LineName'
:value=
'item.LineID'
:key=
'item.LineID'
>
</el-option>
</el-select>
{{
subItem
.
LineTeamList
}}
<!--
<el-select
class=
'w150'
v-model=
"subItem.LineTeamId"
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
label=
"不限"
:value=
'commonSelect'
></el-option>
<el-option
v-for=
"sitem in subItem.LineTeamList"
:label=
'sitem.LtName'
:value=
'sitem.LtID'
:key=
'sitem.LtID'
>
</el-option>
</el-select>
-->
</div>
</td>
<td>
<td>
<
el-select
:placeholder=
"$t('pub.pleaseSel')"
class=
"w150"
v-model=
"item.RoleId
"
>
<
div
v-for=
"subItem in item.LessPriceList"
class=
"comLessDiv
"
>
<el-
option
label=
"不限"
:value=
"0"
></el-option
>
<el-
input
class=
"w80"
placeholder=
"少价金額"
v-model=
"subItem.LessMoney"
@
keyup
.
native=
"checkPrice(subItem,'LessMoney')"
></el-input
>
<el-
option
v-for=
"item in RoleList"
:label=
"item.PostName"
:value=
"item.PostId"
:key=
"item.PostId"
></el-option
>
<el-
input
class=
"w80"
placeholder=
"减少提成百分比"
v-model=
"subItem.LessPercent"
@
keyup
.
native=
"checkPrice(subItem,'LessPercent')"
></el-input
>
</
el-select
>
</
div
>
</td>
</td>
<
template
v-for=
"subItem in item.DetailExtList"
>
<td>
<el-input
class=
"w80"
placeholder=
"少价金額"
v-model=
"subItem.LessMoney"
></el-input>
<el-input
class=
"w80"
placeholder=
"减少提成百分比"
v-model=
"subItem.LessPercent"
></el-input>
</td>
</
template
>
<td>
<td>
<input
type=
'button'
class=
"normalBtn"
@
click=
"SaveLessPrice(item)"
value=
"保存"
></input>
<div
v-for=
"subItem in item.LessPriceList"
class=
"comLessDiv"
>
<input
type=
'button'
class=
"normalBtn"
@
click=
"RemoveItem(item,index)"
value=
"删除"
></input>
<el-input
class=
"w80"
placeholder=
"少价金額"
v-model=
"subItem.DeptLessMoney"
@
keyup
.
native=
"checkPrice(subItem,'DeptLessMoney')"
></el-input>
<el-input
class=
"w80"
placeholder=
"减少提成百分比"
v-model=
"subItem.DeptLessPercent"
@
keyup
.
native=
"checkPrice(subItem,'DeptLessPercent')"
></el-input>
</div>
</td>
<td>
<div
v-for=
"subItem in item.LessPriceList"
class=
"comLessDiv"
>
<el-input
class=
"w80"
placeholder=
"少价金額"
v-model=
"subItem.FilialeLessMoney"
@
keyup
.
native=
"checkPrice(subItem,'FilialeLessMoney')"
></el-input>
<el-input
class=
"w80"
placeholder=
"减少提成百分比"
v-model=
"subItem.FilialeLessPercent"
@
keyup
.
native=
"checkPrice(subItem,'FilialeLessPercent')"
></el-input>
</div>
</td>
<td>
<div
v-for=
"subItem in item.LessPriceList"
class=
"comLessDiv"
>
<el-input
class=
"w80"
placeholder=
"少价金額"
v-model=
"subItem.OPLessMoney"
@
keyup
.
native=
"checkPrice(subItem,'OPLessMoney')"
></el-input>
<el-input
class=
"w80"
placeholder=
"减少提成百分比"
v-model=
"subItem.OPLessPercent"
@
keyup
.
native=
"checkPrice(subItem,'OPLessPercent')"
></el-input>
</div>
</td>
<td>
<div
v-for=
"(subItem,subIndex) in item.LessPriceList"
class=
"comLessDiv"
>
<input
type=
'button'
class=
"normalBtn lessBtn"
@
click=
"SaveLessPrice(subItem,index)"
value=
"保存"
></input>
<input
type=
'button'
class=
"normalBtn lessBtn"
@
click=
"RemoveItem(item,subItem,subIndex)"
value=
"删除"
></input>
</div>
</td>
</td>
</tr>
</tr>
</table>
</table>
...
@@ -120,47 +141,24 @@
...
@@ -120,47 +141,24 @@
data
()
{
data
()
{
return
{
return
{
//分公司列表
//分公司列表
BranchList
:
[],
dataList
:
[],
qMsg
:
{
PageIndex
:
1
,
PageSize
:
100
},
PageData
:
[],
//角色列表
//角色列表
RoleList
:
[],
RoleList
:
[],
loading
:
false
loading
:
false
,
LineList
:
[],
commonSelect
:
0
,
};
};
},
},
methods
:
{
methods
:
{
AddItem
()
{
var
obj
=
{
Id
:
0
,
RoleId
:
0
,
DetailExtList
:
[],
};
this
.
BranchList
.
forEach
(
item
=>
{
obj
.
DetailExtList
.
push
({
Id
:
0
,
ManagerId
:
0
,
RB_Branch_Id
:
item
.
Id
,
LessMoney
:
0
,
LessPercent
:
0
});
});
if
(
this
.
PageData
==
null
)
{
this
.
PageData
=
[];
}
this
.
PageData
.
push
(
obj
);
},
//保存少价管理
//保存少价管理
SaveLessPrice
(
i
tem
)
{
SaveLessPrice
(
subI
tem
)
{
this
.
apipost
(
this
.
apipost
(
"lessprice_post_Set"
,
i
tem
,
"lessprice_post_Set"
,
subI
tem
,
res
=>
{
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
"操作成功!"
);
this
.
Success
(
res
.
data
.
message
);
this
.
G
etList
();
// this.g
etList();
}
else
{
}
else
{
this
.
Error
(
res
.
data
.
message
);
this
.
Error
(
res
.
data
.
message
);
}
}
},
},
...
@@ -168,61 +166,101 @@
...
@@ -168,61 +166,101 @@
);
);
},
},
//获取列表
//获取列表
GetList
()
{
GetL
essL
ist
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
apipost
(
var
that
=
this
;
"lessprice_get_GetPageList"
,
this
.
qMsg
,
that
.
apipost
(
res
=>
{
"lessprice_get_GetPageList"
,
{},
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
BranchList
=
res
.
data
.
data
.
branchList
;
this
.
PageData
=
res
.
data
.
data
.
DataList
.
pageData
;
}
},
err
=>
{}
);
},
//获取列表
GetRoleList
()
{
let
userInfo
=
this
.
getLocalStorage
();
this
.
apipost
(
"admin_get_PostGetList"
,
{
"RB_Group_Id"
:
userInfo
.
RB_Group_id
},
res
=>
{
res
=>
{
that
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
RoleList
=
res
.
data
.
data
;
var
data
=
res
.
data
.
data
;
data
.
forEach
(
x
=>
{
x
.
LessPriceList
.
forEach
(
y
=>
{
that
.
getLineTeamList
(
y
);
})
})
that
.
dataList
=
data
;
console
.
log
(
that
.
dataList
,
'resssss'
);
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
}
},
},
err
=>
{}
err
=>
{}
);
);
},
},
//获取列表
//获取列表
RemoveItem
(
item
,
index
)
{
RemoveItem
(
item
,
subItem
,
index
)
{
if
(
subItem
.
Id
==
0
){
item
.
LessPriceList
.
splice
(
index
,
1
);
return
;
}
var
that
=
this
;
var
that
=
this
;
this
.
Confirm
(
"是否删除此少价信息?"
,
function
()
{
this
.
Confirm
(
"是否删除此少价信息?"
,
function
()
{
if
(
i
tem
.
Id
>
0
)
{
if
(
subI
tem
.
Id
>
0
)
{
that
.
apipost
(
that
.
apipost
(
"lessprice_post_Remove"
,
{
"lessprice_post_Remove"
,
{
ID
:
i
tem
.
Id
ID
:
subI
tem
.
Id
},
},
res
=>
{
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
"操作成功!"
);
that
.
Success
(
"操作成功!"
);
that
.
G
etList
();
// that.g
etList();
}
else
{
}
else
{
that
.
Error
(
res
.
data
.
message
);
that
.
Error
(
res
.
data
.
message
);
}
}
},
},
err
=>
{}
err
=>
{}
);
);
}
else
{
that
.
PageData
.
splice
(
index
,
1
);
}
}
});
});
},
},
//获取线路列表
getLineList
()
{
this
.
apipost
(
"line_post_GetAllList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
LineList
=
res
.
data
.
data
;
}
});
},
//获取系列列表
getLineTeamList
(
subItem
)
{
this
.
apipost
(
"team_post_GetList"
,
{
lineID
:
subItem
.
LineId
,
isTOOP
:
1
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
//subItem.LineTeamId = 0;
subItem
.
LineTeamList
=
res
.
data
.
data
;
}
});
},
//点击添加
addLessPrice
(
item
){
var
obj
=
{
DeptLessMoney
:
0
,
DeptLessPercent
:
0
,
DetailExtList
:
''
,
FilialeLessMoney
:
0
,
FilialeLessPercent
:
0
,
Id
:
0
,
LessMoney
:
0
,
LessPercent
:
0
,
LineId
:
0
,
LineTeamId
:
0
,
OPLessMoney
:
0
,
OPLessPercent
:
0
,
RB_Branch_Id
:
item
.
Id
,
RB_Group_Id
:
0
,
LineTeamList
:[],
}
item
.
LessPriceList
.
push
(
obj
);
}
},
},
mounted
()
{
mounted
()
{
this
.
GetRol
eList
();
this
.
getLin
eList
();
this
.
GetList
();
this
.
GetL
essL
ist
();
},
},
};
};
...
...
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