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
ff0fb21d
Commit
ff0fb21d
authored
Feb 19, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/luochao/superman
parents
60b46435
dd2db4ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
152 additions
and
114 deletions
+152
-114
BusExport.vue
src/components/BusExport.vue
+2
-2
LessPriceManagement.vue
src/components/systemManagement/LessPriceManagement.vue
+150
-112
No files found.
src/components/BusExport.vue
View file @
ff0fb21d
...
...
@@ -46,9 +46,9 @@
.totalTabal
td
{
height
:
33px
;
}
body
{
/*
body{
min-width: 100%!important;
}
}
*/
</
style
>
<
template
>
...
...
src/components/systemManagement/LessPriceManagement.vue
View file @
ff0fb21d
...
...
@@ -10,8 +10,8 @@
border-left
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
font-size
:
14px
;
/* width:100%; */
min-width
:
5752
px
;
width
:
100%
;
min-width
:
1500
px
;
padding-bottom
:
5px
;
}
...
...
@@ -24,29 +24,12 @@
border-right
:
1px
solid
#d1d1d1
;
position
:
relative
;
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
{
border-bottom
:
1px
solid
#d1d1d1
;
border-right
:
1px
solid
#d1d1d1
;
text-align
:
center
;
padding
:
5px
;
min-width
:
250px
;
padding
:
5px
0
;
}
.LP_table
.el-button--primary
{
...
...
@@ -64,51 +47,89 @@
right
:
30px
;
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
>
<
template
>
<div>
<div
class=
"query-box"
>
<ul>
<li>
<input
type=
'button'
class=
"normalBtn"
@
click=
"AddItem()"
value=
"新增"
></input>
</li>
</ul>
</div>
<div
class=
"LM_mainDiv"
>
<!--保存-->
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"LP_table"
v-loading=
"this.loading"
>
<tr>
<th
class=
"first"
>
<span
class=
"Lp_role"
>
岗位
</span>
<span
class=
"Lp_company"
>
公司
</span>
</th>
<template
v-for=
"item in BranchList"
>
<th>
{{
item
.
BName
}}
</th>
</
template
>
<th>
操作
</th>
<th
width=
"200"
>
公司
</th>
<th
width=
"400"
>
线路/系列
</th>
<th>
所有人
</th>
<th>
部门主管
</th>
<th>
分公司总经理
</th>
<th>
当团op
</th>
<th
width=
"200"
>
操作
</th>
</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>
<
el-select
:placeholder=
"$t('pub.pleaseSel')"
class=
"w150"
v-model=
"item.RoleId
"
>
<el-
option
label=
"不限"
:value=
"0"
></el-option
>
<el-
option
v-for=
"item in RoleList"
:label=
"item.PostName"
:value=
"item.PostId"
:key=
"item.PostId"
></el-option
>
</
el-select
>
<
div
v-for=
"subItem in item.LessPriceList"
class=
"comLessDiv
"
>
<el-
input
class=
"w80"
placeholder=
"少价金額"
v-model=
"subItem.LessMoney"
@
keyup
.
native=
"checkPrice(subItem,'LessMoney')"
></el-input
>
<el-
input
class=
"w80"
placeholder=
"减少提成百分比"
v-model=
"subItem.LessPercent"
@
keyup
.
native=
"checkPrice(subItem,'LessPercent')"
></el-input
>
</
div
>
</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>
<input
type=
'button'
class=
"normalBtn"
@
click=
"SaveLessPrice(item)"
value=
"保存"
></input>
<input
type=
'button'
class=
"normalBtn"
@
click=
"RemoveItem(item,index)"
value=
"删除"
></input>
<div
v-for=
"subItem in item.LessPriceList"
class=
"comLessDiv"
>
<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>
</tr>
</table>
...
...
@@ -120,47 +141,24 @@
data
()
{
return
{
//分公司列表
BranchList
:
[],
qMsg
:
{
PageIndex
:
1
,
PageSize
:
100
},
PageData
:
[],
dataList
:
[],
//角色列表
RoleList
:
[],
loading
:
false
loading
:
false
,
LineList
:
[],
commonSelect
:
0
,
};
},
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
(
"lessprice_post_Set"
,
i
tem
,
"lessprice_post_Set"
,
subI
tem
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
"操作成功!"
);
this
.
G
etList
();
}
else
{
this
.
Success
(
res
.
data
.
message
);
// this.g
etList();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
...
...
@@ -168,61 +166,101 @@
);
},
//获取列表
GetList
()
{
GetL
essL
ist
()
{
this
.
loading
=
true
;
this
.
apipost
(
"lessprice_get_GetPageList"
,
this
.
qMsg
,
res
=>
{
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
},
var
that
=
this
;
that
.
apipost
(
"lessprice_get_GetPageList"
,
{},
res
=>
{
that
.
loading
=
false
;
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
=>
{}
);
},
//获取列表
RemoveItem
(
item
,
index
)
{
RemoveItem
(
item
,
subItem
,
index
)
{
if
(
subItem
.
Id
==
0
){
item
.
LessPriceList
.
splice
(
index
,
1
);
return
;
}
var
that
=
this
;
this
.
Confirm
(
"是否删除此少价信息?"
,
function
()
{
if
(
i
tem
.
Id
>
0
)
{
if
(
subI
tem
.
Id
>
0
)
{
that
.
apipost
(
"lessprice_post_Remove"
,
{
ID
:
i
tem
.
Id
ID
:
subI
tem
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
"操作成功!"
);
that
.
G
etList
();
// that.g
etList();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
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
()
{
this
.
GetRol
eList
();
this
.
GetList
();
this
.
getLin
eList
();
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